From 1f9dea648f3a34e2769a76a9c87291789b192625 Mon Sep 17 00:00:00 2001 From: Burak Ozter Date: Tue, 29 Oct 2024 10:14:23 -0300 Subject: [PATCH 1/9] add cockpit-docker files. --- ui/cockpit-docker/.cockpit-ci/container | 1 + ui/cockpit-docker/.cockpit-ci/run | 1 + ui/cockpit-docker/.eslintignore | 2 + ui/cockpit-docker/.eslintrc.json | 55 + ui/cockpit-docker/.fmf/version | 1 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 + ui/cockpit-docker/.github/dependabot.yml | 38 + .../.github/workflows/dependabot.yml | 82 + .../.github/workflows/nightly.yml | 22 + .../.github/workflows/release.yml | 35 + .../workflows/tasks-container-update.yml | 37 + ui/cockpit-docker/.gitignore | 37 + ui/cockpit-docker/.gitmodules | 7 + ui/cockpit-docker/.stylelintrc.json | 39 + ui/cockpit-docker/HACKING.md | 107 + ui/cockpit-docker/LICENSE | 502 +++ ui/cockpit-docker/Makefile | 217 ++ ui/cockpit-docker/README.md | 86 + ui/cockpit-docker/build.js | 108 + .../me.chabad360.docker.metainfo.xml | 16 + ui/cockpit-docker/node-modules-fix.sh | 9 + ui/cockpit-docker/package.json | 61 + ui/cockpit-docker/packaging/debian/control | 22 + ui/cockpit-docker/packaging/debian/copyright | 38 + ui/cockpit-docker/packaging/debian/rules | 13 + .../packaging/debian/source/format | 1 + .../packaging/debian/source/lintian-overrides | 2 + .../packaging/debian/upstream/metadata | 4 + ui/cockpit-docker/packaging/debian/watch | 5 + ui/cockpit-docker/packit.yaml | 80 + ui/cockpit-docker/plans/all.fmf | 23 + ui/cockpit-docker/po/cs.po | 1510 +++++++++ ui/cockpit-docker/po/de.po | 1505 +++++++++ ui/cockpit-docker/po/es.po | 1489 +++++++++ ui/cockpit-docker/po/fi.po | 1484 +++++++++ ui/cockpit-docker/po/fr.po | 1529 ++++++++++ ui/cockpit-docker/po/ja.po | 1467 +++++++++ ui/cockpit-docker/po/ka.po | 1408 +++++++++ ui/cockpit-docker/po/ko.po | 1461 +++++++++ ui/cockpit-docker/po/pl.po | 1508 +++++++++ ui/cockpit-docker/po/sk.po | 1553 ++++++++++ ui/cockpit-docker/po/sv.po | 1484 +++++++++ ui/cockpit-docker/po/tr.po | 1501 +++++++++ ui/cockpit-docker/po/uk.po | 1522 +++++++++ ui/cockpit-docker/po/zh_CN.po | 1479 +++++++++ ui/cockpit-docker/pyproject.toml | 51 + .../src/ContainerCheckpointModal.jsx | 68 + .../src/ContainerCommitModal.jsx | 158 + .../src/ContainerDeleteModal.jsx | 42 + ui/cockpit-docker/src/ContainerDetails.jsx | 80 + ui/cockpit-docker/src/ContainerHeader.jsx | 22 + ui/cockpit-docker/src/ContainerHealthLogs.jsx | 158 + .../src/ContainerIntegration.jsx | 125 + ui/cockpit-docker/src/ContainerLogs.jsx | 174 ++ .../src/ContainerRenameModal.jsx | 107 + .../src/ContainerRestoreModal.jsx | 74 + ui/cockpit-docker/src/ContainerTerminal.css | 7 + ui/cockpit-docker/src/ContainerTerminal.jsx | 265 ++ ui/cockpit-docker/src/Containers.jsx | 611 ++++ ui/cockpit-docker/src/Containers.scss | 93 + ui/cockpit-docker/src/Env.jsx | 96 + ui/cockpit-docker/src/ForceRemoveModal.jsx | 33 + ui/cockpit-docker/src/ImageDeleteModal.jsx | 121 + ui/cockpit-docker/src/ImageDetails.jsx | 47 + ui/cockpit-docker/src/ImageHistory.jsx | 64 + ui/cockpit-docker/src/ImageRunModal.jsx | 1114 +++++++ ui/cockpit-docker/src/ImageRunModal.scss | 47 + ui/cockpit-docker/src/ImageSearchModal.css | 59 + ui/cockpit-docker/src/ImageSearchModal.jsx | 212 ++ ui/cockpit-docker/src/ImageUsedBy.jsx | 44 + ui/cockpit-docker/src/Images.css | 23 + ui/cockpit-docker/src/Images.jsx | 398 +++ ui/cockpit-docker/src/Notification.jsx | 45 + .../src/PruneUnusedContainersModal.jsx | 96 + .../src/PruneUnusedImagesModal.jsx | 101 + ui/cockpit-docker/src/PublishPort.jsx | 142 + ui/cockpit-docker/src/Volume.jsx | 90 + ui/cockpit-docker/src/app.jsx | 617 ++++ ui/cockpit-docker/src/client.js | 172 ++ ui/cockpit-docker/src/docker.scss | 149 + ui/cockpit-docker/src/index.html | 36 + ui/cockpit-docker/src/index.js | 30 + ui/cockpit-docker/src/manifest.json | 16 + ui/cockpit-docker/src/rest.js | 100 + ui/cockpit-docker/src/util.js | 214 ++ ui/cockpit-docker/test/browser/browser.sh | 82 + ui/cockpit-docker/test/browser/main.fmf | 20 + ui/cockpit-docker/test/browser/run-test.sh | 54 + ui/cockpit-docker/test/check-application | 2714 +++++++++++++++++ ui/cockpit-docker/test/reference-image | 1 + ui/cockpit-docker/test/run | 17 + ui/cockpit-docker/test/vm.install | 39 + 92 files changed, 31610 insertions(+) create mode 100644 ui/cockpit-docker/.cockpit-ci/container create mode 120000 ui/cockpit-docker/.cockpit-ci/run create mode 100644 ui/cockpit-docker/.eslintignore create mode 100644 ui/cockpit-docker/.eslintrc.json create mode 100644 ui/cockpit-docker/.fmf/version create mode 100644 ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 ui/cockpit-docker/.github/dependabot.yml create mode 100644 ui/cockpit-docker/.github/workflows/dependabot.yml create mode 100644 ui/cockpit-docker/.github/workflows/nightly.yml create mode 100644 ui/cockpit-docker/.github/workflows/release.yml create mode 100644 ui/cockpit-docker/.github/workflows/tasks-container-update.yml create mode 100644 ui/cockpit-docker/.gitignore create mode 100644 ui/cockpit-docker/.gitmodules create mode 100644 ui/cockpit-docker/.stylelintrc.json create mode 100644 ui/cockpit-docker/HACKING.md create mode 100644 ui/cockpit-docker/LICENSE create mode 100644 ui/cockpit-docker/Makefile create mode 100644 ui/cockpit-docker/README.md create mode 100755 ui/cockpit-docker/build.js create mode 100644 ui/cockpit-docker/me.chabad360.docker.metainfo.xml create mode 100755 ui/cockpit-docker/node-modules-fix.sh create mode 100644 ui/cockpit-docker/package.json create mode 100644 ui/cockpit-docker/packaging/debian/control create mode 100644 ui/cockpit-docker/packaging/debian/copyright create mode 100755 ui/cockpit-docker/packaging/debian/rules create mode 100644 ui/cockpit-docker/packaging/debian/source/format create mode 100644 ui/cockpit-docker/packaging/debian/source/lintian-overrides create mode 100644 ui/cockpit-docker/packaging/debian/upstream/metadata create mode 100644 ui/cockpit-docker/packaging/debian/watch create mode 100644 ui/cockpit-docker/packit.yaml create mode 100644 ui/cockpit-docker/plans/all.fmf create mode 100644 ui/cockpit-docker/po/cs.po create mode 100644 ui/cockpit-docker/po/de.po create mode 100644 ui/cockpit-docker/po/es.po create mode 100644 ui/cockpit-docker/po/fi.po create mode 100644 ui/cockpit-docker/po/fr.po create mode 100644 ui/cockpit-docker/po/ja.po create mode 100644 ui/cockpit-docker/po/ka.po create mode 100644 ui/cockpit-docker/po/ko.po create mode 100644 ui/cockpit-docker/po/pl.po create mode 100644 ui/cockpit-docker/po/sk.po create mode 100644 ui/cockpit-docker/po/sv.po create mode 100644 ui/cockpit-docker/po/tr.po create mode 100644 ui/cockpit-docker/po/uk.po create mode 100644 ui/cockpit-docker/po/zh_CN.po create mode 100644 ui/cockpit-docker/pyproject.toml create mode 100644 ui/cockpit-docker/src/ContainerCheckpointModal.jsx create mode 100644 ui/cockpit-docker/src/ContainerCommitModal.jsx create mode 100644 ui/cockpit-docker/src/ContainerDeleteModal.jsx create mode 100644 ui/cockpit-docker/src/ContainerDetails.jsx create mode 100644 ui/cockpit-docker/src/ContainerHeader.jsx create mode 100644 ui/cockpit-docker/src/ContainerHealthLogs.jsx create mode 100644 ui/cockpit-docker/src/ContainerIntegration.jsx create mode 100644 ui/cockpit-docker/src/ContainerLogs.jsx create mode 100644 ui/cockpit-docker/src/ContainerRenameModal.jsx create mode 100644 ui/cockpit-docker/src/ContainerRestoreModal.jsx create mode 100644 ui/cockpit-docker/src/ContainerTerminal.css create mode 100644 ui/cockpit-docker/src/ContainerTerminal.jsx create mode 100644 ui/cockpit-docker/src/Containers.jsx create mode 100644 ui/cockpit-docker/src/Containers.scss create mode 100644 ui/cockpit-docker/src/Env.jsx create mode 100644 ui/cockpit-docker/src/ForceRemoveModal.jsx create mode 100644 ui/cockpit-docker/src/ImageDeleteModal.jsx create mode 100644 ui/cockpit-docker/src/ImageDetails.jsx create mode 100644 ui/cockpit-docker/src/ImageHistory.jsx create mode 100644 ui/cockpit-docker/src/ImageRunModal.jsx create mode 100644 ui/cockpit-docker/src/ImageRunModal.scss create mode 100644 ui/cockpit-docker/src/ImageSearchModal.css create mode 100644 ui/cockpit-docker/src/ImageSearchModal.jsx create mode 100644 ui/cockpit-docker/src/ImageUsedBy.jsx create mode 100644 ui/cockpit-docker/src/Images.css create mode 100644 ui/cockpit-docker/src/Images.jsx create mode 100644 ui/cockpit-docker/src/Notification.jsx create mode 100644 ui/cockpit-docker/src/PruneUnusedContainersModal.jsx create mode 100644 ui/cockpit-docker/src/PruneUnusedImagesModal.jsx create mode 100644 ui/cockpit-docker/src/PublishPort.jsx create mode 100644 ui/cockpit-docker/src/Volume.jsx create mode 100644 ui/cockpit-docker/src/app.jsx create mode 100644 ui/cockpit-docker/src/client.js create mode 100644 ui/cockpit-docker/src/docker.scss create mode 100644 ui/cockpit-docker/src/index.html create mode 100644 ui/cockpit-docker/src/index.js create mode 100644 ui/cockpit-docker/src/manifest.json create mode 100644 ui/cockpit-docker/src/rest.js create mode 100644 ui/cockpit-docker/src/util.js create mode 100755 ui/cockpit-docker/test/browser/browser.sh create mode 100644 ui/cockpit-docker/test/browser/main.fmf create mode 100644 ui/cockpit-docker/test/browser/run-test.sh create mode 100755 ui/cockpit-docker/test/check-application create mode 100644 ui/cockpit-docker/test/reference-image create mode 100755 ui/cockpit-docker/test/run create mode 100755 ui/cockpit-docker/test/vm.install diff --git a/ui/cockpit-docker/.cockpit-ci/container b/ui/cockpit-docker/.cockpit-ci/container new file mode 100644 index 0000000..218f87f --- /dev/null +++ b/ui/cockpit-docker/.cockpit-ci/container @@ -0,0 +1 @@ +ghcr.io/cockpit-project/tasks:2024-04-08 diff --git a/ui/cockpit-docker/.cockpit-ci/run b/ui/cockpit-docker/.cockpit-ci/run new file mode 120000 index 0000000..40892d3 --- /dev/null +++ b/ui/cockpit-docker/.cockpit-ci/run @@ -0,0 +1 @@ +cockpit-docker/../test/run \ No newline at end of file diff --git a/ui/cockpit-docker/.eslintignore b/ui/cockpit-docker/.eslintignore new file mode 100644 index 0000000..85f5a45 --- /dev/null +++ b/ui/cockpit-docker/.eslintignore @@ -0,0 +1,2 @@ +node_modules/* +pkg/lib/* diff --git a/ui/cockpit-docker/.eslintrc.json b/ui/cockpit-docker/.eslintrc.json new file mode 100644 index 0000000..dd1624f --- /dev/null +++ b/ui/cockpit-docker/.eslintrc.json @@ -0,0 +1,55 @@ +{ + "root": true, + "env": { + "browser": true, + "es2022": true + }, + "extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react", "plugin:jsx-a11y/recommended"], + "parserOptions": { + "ecmaVersion": 2022 + }, + "plugins": ["react", "react-hooks", "jsx-a11y"], + "rules": { + "indent": ["error", 4, + { + "ObjectExpression": "first", + "CallExpression": {"arguments": "first"}, + "MemberExpression": 2, + "ignoredNodes": [ "JSXAttribute" ] + }], + "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }], + "no-var": "error", + "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], + "prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }], + "react/jsx-indent": ["error", 4], + "semi": ["error", "always", { "omitLastInOneLineBlock": true }], + + "camelcase": "off", + "comma-dangle": "off", + "curly": "off", + "jsx-quotes": "off", + "no-console": "off", + "no-undef": "error", + "quotes": "off", + "react/jsx-curly-spacing": "off", + "react/jsx-indent-props": "off", + "react/jsx-closing-bracket-location": "off", + "react/jsx-closing-tag-location": "off", + "react/jsx-first-prop-new-line": "off", + "react/jsx-curly-newline": "off", + "react/jsx-handler-names": "off", + "react/prop-types": "off", + "react/jsx-no-useless-fragment": "error", + "space-before-function-paren": "off", + "standard/no-callback-literal": "off", + + "jsx-a11y/anchor-is-valid": "off", + + "eqeqeq": "off", + "react/jsx-no-bind": "off" + }, + "globals": { + "require": false, + "module": false + } +} diff --git a/ui/cockpit-docker/.fmf/version b/ui/cockpit-docker/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/ui/cockpit-docker/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md b/ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..a649814 --- /dev/null +++ b/ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: For bugs and general problems +title: +labels: 'bug' +assignees: '' + +--- + +Cockpit version: xxx +Cockpit-docker version: xxx +Docker version: xxx +OS: + + + + + +Steps to reproduce + +1. +2. +3. + + diff --git a/ui/cockpit-docker/.github/dependabot.yml b/ui/cockpit-docker/.github/dependabot.yml new file mode 100644 index 0000000..a6ca0d0 --- /dev/null +++ b/ui/cockpit-docker/.github/dependabot.yml @@ -0,0 +1,38 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + # run these when most of our developers don't work, don't DoS our CI over the day + time: "22:00" + timezone: "Europe/Berlin" + open-pull-requests-limit: 3 + commit-message: + prefix: "[no-test]" + labels: + - "node_modules" + groups: + eslint: + patterns: + - "eslint*" + esbuild: + patterns: + - "esbuild*" + stylelint: + patterns: + - "stylelint*" + xterm: + patterns: + - "xterm*" + patternfly: + patterns: + - "@patternfly*" + + - package-ecosystem: "github-actions" + directory: "/" + open-pull-requests-limit: 3 + labels: + - "no-test" + schedule: + interval: "weekly" diff --git a/ui/cockpit-docker/.github/workflows/dependabot.yml b/ui/cockpit-docker/.github/workflows/dependabot.yml new file mode 100644 index 0000000..0ab8975 --- /dev/null +++ b/ui/cockpit-docker/.github/workflows/dependabot.yml @@ -0,0 +1,82 @@ +name: update node_modules +on: + pull_request_target: + types: [opened, reopened, synchronize, labeled] + +jobs: + dependabot: + environment: npm-update + permissions: + contents: read + pull-requests: write + timeout-minutes: 5 + # 22.04's podman has issues with piping and causes tar errors + runs-on: ubuntu-20.04 + if: ${{ contains(github.event.pull_request.labels.*.name, 'node_modules') }} + + steps: + - name: Clone repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + fetch-depth: 0 + + - name: Clear node_modules label + uses: actions/github-script@v7 + with: + script: | + try { + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'node_modules' + }); + } catch (e) { + if (e.name == 'HttpError' && e.status == 404) { + /* expected: 404 if label is unset */ + } else { + throw e; + } + } + + - name: Update node_modules for package.json changes + run: | + make tools/node-modules + git config --global user.name "GitHub Workflow" + git config --global user.email "cockpituous@cockpit-project.org" + eval $(ssh-agent) + ssh-add - <<< '${{ secrets.NODE_CACHE_DEPLOY_KEY }}' + ./tools/node-modules install + ./tools/node-modules push + git add node_modules + ssh-add -D + ssh-agent -k + + - name: Clear [no-test] prefix from PR title + if: ${{ contains(github.event.pull_request.title, '[no-test]') }} + uses: actions/github-script@v7 + env: + TITLE: '${{ github.event.pull_request.title }}' + with: + script: | + const title = process.env['TITLE'].replace(/\[no-test\]\W+ /, '') + await github.rest.pulls.update({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + title, + }); + + - name: Force push node_modules update + run: | + # Dependabot prefixes the commit with [no-test] which we don't want to keep in the commit + title=$(git show --pretty="%s" -s | sed -E "s/\[no-test\]\W+ //") + body=$(git show -s --pretty="%b") + git commit --amend -m "${title}" -m "${body}" --no-edit node_modules + eval $(ssh-agent) + ssh-add - <<< '${{ secrets.SELF_DEPLOY_KEY }}' + git push --force 'git@github.com:${{ github.repository }}' '${{ github.head_ref }}' + ssh-add -D + ssh-agent -k diff --git a/ui/cockpit-docker/.github/workflows/nightly.yml b/ui/cockpit-docker/.github/workflows/nightly.yml new file mode 100644 index 0000000..ec7a633 --- /dev/null +++ b/ui/cockpit-docker/.github/workflows/nightly.yml @@ -0,0 +1,22 @@ +name: nightly +on: + schedule: + - cron: '0 1 * * *' + # can be run manually on https://github.com/cockpit-project/cockpit-podman/actions + workflow_dispatch: +jobs: + trigger: + permissions: + statuses: write + runs-on: ubuntu-22.04 + steps: + - name: Clone repository + uses: actions/checkout@v4 + + - name: Trigger updates-testing scenario + run: | + make bots + mkdir -p ~/.config/cockpit-dev + echo "${{ github.token }}" >> ~/.config/cockpit-dev/github-token + TEST_OS=$(PYTHONPATH=bots python3 -c 'from lib.constants import TEST_OS_DEFAULT; print(TEST_OS_DEFAULT)') + bots/tests-trigger --force "-" "${TEST_OS}/updates-testing" "${TEST_OS}/docker-next" diff --git a/ui/cockpit-docker/.github/workflows/release.yml b/ui/cockpit-docker/.github/workflows/release.yml new file mode 100644 index 0000000..0ddfe21 --- /dev/null +++ b/ui/cockpit-docker/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: release +on: + push: + tags: + # this is a glob, not a regexp + - '[0-9]*' +jobs: + source: + runs-on: ubuntu-latest + container: + image: ghcr.io/cockpit-project/tasks:latest + options: --user root + permissions: + # create GitHub release + contents: write + steps: + - name: Clone repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # https://github.blog/2022-04-12-git-security-vulnerability-announced/ + - name: Pacify git's permission check + run: git config --global --add safe.directory /__w/cockpit-docker/cockpit-docker + + - name: Workaround for https://github.com/actions/checkout/pull/697 + run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags) + + - name: Build release + run: make dist + + - name: Publish GitHub release + uses: cockpit-project/action-release@7d2e2657382e8d34f88a24b5987f2b81ea165785 + with: + filename: "cockpit-docker-${{ github.ref_name }}.tar.xz" diff --git a/ui/cockpit-docker/.github/workflows/tasks-container-update.yml b/ui/cockpit-docker/.github/workflows/tasks-container-update.yml new file mode 100644 index 0000000..8473ac6 --- /dev/null +++ b/ui/cockpit-docker/.github/workflows/tasks-container-update.yml @@ -0,0 +1,37 @@ +name: tasks-container-update +on: + schedule: + - cron: '0 2 * * 1' + # can be run manually on https://github.com/cockpit-project/cockpit-podman/actions + workflow_dispatch: +jobs: + tasks-container-update: + environment: self + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + statuses: write + container: + image: ghcr.io/cockpit-project/tasks + options: --user root + steps: + - name: Set up configuration and secrets + run: | + printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig + mkdir -p ~/.config + echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token + + - name: Clone repository + uses: actions/checkout@v4 + with: + ssh-key: ${{ secrets.DEPLOY_KEY }} + + # https://github.blog/2022-04-12-git-security-vulnerability-announced/ + - name: Pacify git's permission check + run: git config --global --add safe.directory /__w/cockpit-docker/cockpit-docker + + - name: Run tasks-container-update + run: | + make bots + bots/tasks-container-update diff --git a/ui/cockpit-docker/.gitignore b/ui/cockpit-docker/.gitignore new file mode 100644 index 0000000..841ffcc --- /dev/null +++ b/ui/cockpit-docker/.gitignore @@ -0,0 +1,37 @@ +# Please keep this file sorted (LC_COLLATE=C.UTF-8), +# grouped into the 3 categories below: +# - general patterns (match in all directories) +# - patterns to match files at the toplevel +# - patterns to match files in subdirs + +# general patterns +*.pyc +*.rpm + +# toplevel (/...) +/Test*.html +/Test*.json +/Test*.log +/Test*.log.gz +/Test*.png +/*.whl +/bots +/cockpit-*.tar.xz +/cockpit-docker.spec +/dist/ +/package-lock.json +/pkg/ +/tmp/ +/tools/ +/node_modules/ +/.idea/ +/.vscode/ + +# subdirs (/subdir/...) +/packaging/arch/PKGBUILD +/packaging/debian/changelog +/po/*.pot +/po/LINGUAS +/test/common/ +/test/images/ +/test/static-code diff --git a/ui/cockpit-docker/.gitmodules b/ui/cockpit-docker/.gitmodules new file mode 100644 index 0000000..2ca4fcf --- /dev/null +++ b/ui/cockpit-docker/.gitmodules @@ -0,0 +1,7 @@ +[submodule "test/reference"] + path = test/reference + url = https://github.com/cockpit-project/pixel-test-reference + branch = empty +[submodule "node_modules"] + path = node_modules + url = https://github.com/cockpit-project/node-cache.git diff --git a/ui/cockpit-docker/.stylelintrc.json b/ui/cockpit-docker/.stylelintrc.json new file mode 100644 index 0000000..67a29f0 --- /dev/null +++ b/ui/cockpit-docker/.stylelintrc.json @@ -0,0 +1,39 @@ +{ + "extends": "stylelint-config-standard-scss", + "plugins": [ + "stylelint-use-logical-spec" + ], + "rules": { + "at-rule-empty-line-before": null, + "declaration-empty-line-before": null, + "custom-property-empty-line-before": null, + "comment-empty-line-before": null, + "scss/double-slash-comment-empty-line-before": null, + "scss/dollar-variable-colon-space-after": null, + + "custom-property-pattern": null, + "declaration-block-no-duplicate-properties": null, + "declaration-block-no-redundant-longhand-properties": null, + "declaration-block-no-shorthand-property-overrides": null, + "declaration-block-single-line-max-declarations": null, + "font-family-no-duplicate-names": null, + "function-url-quotes": null, + "keyframes-name-pattern": null, + "media-feature-range-notation": "prefix", + "no-descending-specificity": null, + "no-duplicate-selectors": null, + "scss/at-extend-no-missing-placeholder": null, + "scss/at-import-partial-extension": null, + "scss/at-import-no-partial-leading-underscore": null, + "scss/load-no-partial-leading-underscore": true, + "scss/at-mixin-pattern": null, + "scss/comment-no-empty": null, + "scss/dollar-variable-pattern": null, + "scss/double-slash-comment-whitespace-inside": null, + "scss/no-global-function-names": null, + "scss/operator-no-unspaced": null, + "selector-class-pattern": null, + "selector-id-pattern": null, + "liberty/use-logical-spec": "always" + } +} diff --git a/ui/cockpit-docker/HACKING.md b/ui/cockpit-docker/HACKING.md new file mode 100644 index 0000000..58a0898 --- /dev/null +++ b/ui/cockpit-docker/HACKING.md @@ -0,0 +1,107 @@ +# Hacking on Cockpit docker + +The commands here assume you're in the top level of the Cockpit docker git +repository checkout. + +## Running out of git checkout + +For development, you usually want to run your module straight out of the git +tree. To do that, run `make devel-install`, which links your checkout to the +location were `cockpit-bridge` looks for packages. If you prefer to do this +manually: + +``` +mkdir -p ~/.local/share/cockpit +ln -s `pwd`/dist ~/.local/share/cockpit/docker +``` + +After changing the code and running `make` again, reload the Cockpit page in +your browser. + +You can also use +[watch mode](https://esbuild.github.io/api/#watch) to +automatically update the bundle on every code change with + + $ make watch + +When developing against a virtual machine, watch mode can also automatically upload +the code changes by setting the `RSYNC` environment variable to +the remote hostname. + + $ RSYNC=c make watch + +When developing against a remote host as a normal user, `RSYNC_DEVEL` can be +set to upload code changes to `~/.local/share/cockpit/` instead of +`/usr/local`. + + $ RSYNC_DEVEL=example.com make watch + +## Running eslint + +Cockpit docker uses [ESLint](https://eslint.org/) to automatically check +JavaScript code style in `.jsx` and `.js` files. + +eslint is executed as part of `test/static-code`, aka. `make codecheck`. + +For developer convenience, the ESLint can be started explicitly by: + + $ npm run eslint + +Violations of some rules can be fixed automatically by: + + $ npm run eslint:fix + +Rules configuration can be found in the `.eslintrc.json` file. + +## Running stylelint + +Cockpit uses [Stylelint](https://stylelint.io/) to automatically check CSS code +style in `.css` and `scss` files. + +styleint is executed as part of `test/static-code`, aka. `make codecheck`. + +For developer convenience, the Stylelint can be started explicitly by: + + $ npm run stylelint + +Violations of some rules can be fixed automatically by: + + $ npm run stylelint:fix + +Rules configuration can be found in the `.stylelintrc.json` file. + +# Running tests locally + +Run `make vm` to build an RPM and install it into a standard Cockpit test VM. +This will be `fedora-39` by default. You can set `$TEST_OS` to use a different +image, for example + + TEST_OS=centos-8-stream make vm + +Then run + + make test/common + +to pull in [Cockpit's shared test API](https://github.com/cockpit-project/cockpit/tree/main/test/common) +for running Chrome DevTools Protocol based browser tests. + +With this preparation, you can manually run a single test without +rebuilding the VM, possibly with extra options for tracing and halting on test +failures (for interactive debugging): + + TEST_OS=... test/check-application TestApplication.testRunImageSystem -stv + +Use this command to list all known tests: + + test/check-application -l + +You can also run all of the tests: + + TEST_OS=centos-8-stream make check + +However, this is rather expensive, and most of the time it's better to let the +CI machinery do this on a draft pull request. + +Please see [Cockpit's test documentation](https://github.com/cockpit-project/cockpit/blob/main/test/README.md) +for details how to run against existing VMs, interactive browser window, +interacting with the test VM, and more. diff --git a/ui/cockpit-docker/LICENSE b/ui/cockpit-docker/LICENSE new file mode 100644 index 0000000..4362b49 --- /dev/null +++ b/ui/cockpit-docker/LICENSE @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/ui/cockpit-docker/Makefile b/ui/cockpit-docker/Makefile new file mode 100644 index 0000000..af04f76 --- /dev/null +++ b/ui/cockpit-docker/Makefile @@ -0,0 +1,217 @@ +# extract name from package.json +PACKAGE_NAME := $(shell awk '/"name":/ {gsub(/[",]/, "", $$2); print $$2}' package.json) +RPM_NAME := cockpit-$(PACKAGE_NAME) +VERSION := $(shell T=$$(git describe --tags 2>/dev/null) || T=1; echo $$T | tr '-' '.') +ifeq ($(TEST_OS),) +TEST_OS = fedora-39 +endif +export TEST_OS +TARFILE=$(RPM_NAME)-$(VERSION).tar.xz +NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz +SPEC=$(RPM_NAME).spec +PREFIX ?= /usr/local +APPSTREAMFILE=me.chabad360.$(PACKAGE_NAME).metainfo.xml +VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) +# stamp file to check for node_modules/ +NODE_MODULES_TEST=package-lock.json +# one example file in dist/ from bundler to check if that already ran +DIST_TEST=dist/manifest.json +# one example file in pkg/lib to check if it was already checked out +COCKPIT_REPO_STAMP=pkg/lib/cockpit-po-plugin.js +# common arguments for tar, mostly to make the generated tarballs reproducible +TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0 + +VM_CUSTOMIZE_FLAGS = + +# HACK: https://github.com/containers/podman/issues/21896 +VM_CUSTOMIZE_FLAGS += --run-command 'nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1 >&2' + +# the following scenarios need network access +ifeq ("$(TEST_SCENARIO)","updates-testing") +VM_CUSTOMIZE_FLAGS += --run-command 'dnf -y update --setopt=install_weak_deps=False --enablerepo=updates-testing >&2' +else ifeq ("$(TEST_SCENARIO)","docker-next") +VM_CUSTOMIZE_FLAGS += --run-command 'dnf -y copr enable rhcontainerbot/docker-next >&2; dnf -y update --repo "copr*" >&2' +else +# default scenario does not install packages +VM_CUSTOMIZE_FLAGS += --no-network +endif + +ifeq ($(TEST_COVERAGE),yes) +RUN_TESTS_OPTIONS+=--coverage +NODE_ENV=development +endif + +all: $(DIST_TEST) + +# checkout common files from Cockpit repository required to build this project; +# this has no API stability guarantee, so check out a stable tag when you start +# a new project, use the latest release, and update it from time to time +COCKPIT_REPO_FILES = \ + pkg/lib \ + test/common \ + test/static-code \ + tools/node-modules \ + $(NULL) + +COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git +COCKPIT_REPO_COMMIT = d39255f6f768cc1c37a5786be8e8dc9d8f4d5ed2 # 315 + 83 commits + +$(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) +COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' +$(COCKPIT_REPO_STAMP): Makefile + @git rev-list --quiet --objects $(COCKPIT_REPO_TREE) -- 2>/dev/null || \ + git fetch --no-tags --no-write-fetch-head --depth=1 $(COCKPIT_REPO_URL) $(COCKPIT_REPO_COMMIT) + git archive $(COCKPIT_REPO_TREE) -- $(COCKPIT_REPO_FILES) | tar x + +# +# i18n +# + +LINGUAS=$(basename $(notdir $(wildcard po/*.po))) + +po/$(PACKAGE_NAME).js.pot: + xgettext --default-domain=$(PACKAGE_NAME) --output=$@ --language=C --keyword= \ + --keyword=_:1,1t --keyword=_:1c,2,2t --keyword=C_:1c,2 \ + --keyword=N_ --keyword=NC_:1c,2 \ + --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ + --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ + --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ + --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') + +po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) + pkg/lib/html2po.js -o $@ $$(find src -name '*.html') + +po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) + pkg/lib/manifest2po.js src/manifest.json -o $@ + +po/$(PACKAGE_NAME).metainfo.pot: $(APPSTREAMFILE) + xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< + +po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot po/$(PACKAGE_NAME).metainfo.pot + msgcat --sort-output --output-file=$@ $^ + +po/LINGUAS: + echo $(LINGUAS) | tr ' ' '\n' > $@ + +# +# Build/Install/dist +# +$(SPEC): packaging/$(SPEC).in $(NODE_MODULES_TEST) + provides=$$(npm ls --omit dev --package-lock-only --depth=Infinity | grep -Eo '[^[:space:]]+@[^[:space:]]+' | sort -u | sed 's/^/Provides: bundled(npm(/; s/\(.*\)@/\1)) = /'); \ + awk -v p="$$provides" '{gsub(/%{VERSION}/, "$(VERSION)"); gsub(/%{NPM_PROVIDES}/, p)}1' $< > $@ + +packaging/arch/PKGBUILD: packaging/arch/PKGBUILD.in + sed 's/VERSION/$(VERSION)/; s/SOURCE/$(TARFILE)/' $< > $@ + +packaging/debian/changelog: packaging/debian/changelog.in + sed 's/VERSION/$(VERSION)/' $< > $@ + +$(DIST_TEST): $(COCKPIT_REPO_STAMP) $(shell find src/ -type f) package.json build.js + $(MAKE) package-lock.json && NODE_ENV=$(NODE_ENV) ./build.js + +watch: $(NODE_MODULES_TEST) + NODE_ENV=$(NODE_ENV) ./build.js -w + +clean: + rm -rf dist/ + rm -f $(SPEC) packaging/arch/PKGBUILD packaging/debian/changelog + rm -f po/LINGUAS + +install: $(DIST_TEST) po/LINGUAS + mkdir -p $(DESTDIR)$(PREFIX)/share/cockpit/$(PACKAGE_NAME) + cp -r dist/* $(DESTDIR)$(PREFIX)/share/cockpit/$(PACKAGE_NAME) + mkdir -p $(DESTDIR)$(PREFIX)/share/metainfo/ + msgfmt --xml -d po \ + --template $(APPSTREAMFILE) \ + -o $(DESTDIR)$(PREFIX)/share/metainfo/$(APPSTREAMFILE) + +# this requires a built source tree and avoids having to install anything system-wide +devel-install: $(DIST_TEST) + mkdir -p ~/.local/share/cockpit + ln -s `pwd`/dist ~/.local/share/cockpit/$(PACKAGE_NAME) + +# assumes that there was symlink set up using the above devel-install target, +# and removes it +devel-uninstall: + rm -f ~/.local/share/cockpit/$(PACKAGE_NAME) + +print-version: + @echo "$(VERSION)" + +# required for running integration tests; commander and ws are deps of chrome-remote-interface +TEST_NPMS = \ + node_modules/chrome-remote-interface \ + node_modules/commander \ + node_modules/sizzle \ + node_modules/ws \ + $(NULL) + +dist: $(TARFILE) + @ls -1 $(TARFILE) + +# when building a distribution tarball, call bundler with a 'production' environment by default +# we don't ship most node_modules for license and compactness reasons, only the ones necessary for running tests +# we ship a pre-built dist/ (so it's not necessary) and ship package-lock.json (so that node_modules/ can be reconstructed if necessary) +$(TARFILE): export NODE_ENV ?= production +$(TARFILE): $(DIST_TEST) $(SPEC) packaging/arch/PKGBUILD packaging/debian/changelog + if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi + tar --xz $(TAR_ARGS) -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ + --exclude '*.in' --exclude test/reference \ + $$(git ls-files | grep -v node_modules) \ + $(COCKPIT_REPO_FILES) $(NODE_MODULES_TEST) $(SPEC) $(TEST_NPMS) \ + packaging/arch/PKGBUILD packaging/debian/changelog dist/ + +# convenience target for developers +rpm: $(TARFILE) + rpmbuild -tb --define "_topdir $(CURDIR)/tmp/rpmbuild" $(TARFILE) + find tmp/rpmbuild -name '*.rpm' -printf '%f\n' -exec mv {} . \; + rm -r tmp/rpmbuild + +# build a VM with locally built distro pkgs installed +$(VM_IMAGE): $(TARFILE) packaging/debian/rules packaging/debian/control packaging/arch/PKGBUILD bots + # HACK for ostree images: skip the rpm build/install + if [ "$${TEST_OS%coreos}" != "$$TEST_OS" ] || [ "$${TEST_OS%bootc}" != "$$TEST_OS" ] || [ "$$TEST_OS" = "rhel4edge" ]; then \ + bots/image-customize --verbose --fresh --no-network --run-command 'mkdir -p /usr/local/share/cockpit' \ + --upload dist/:/usr/local/share/cockpit/docker \ + --script $(CURDIR)/test/vm.install $(TEST_OS); \ + else \ + bots/image-customize --verbose --fresh $(VM_CUSTOMIZE_FLAGS) --build $(TARFILE) \ + --script $(CURDIR)/test/vm.install $(TEST_OS); \ + fi + +# convenience target for the above +vm: $(VM_IMAGE) + @echo $(VM_IMAGE) + +# convenience target to print the filename of the test image +print-vm: + @echo $(VM_IMAGE) + +# run static code checks for python code +PYEXEFILES=$(shell git grep -lI '^#!.*python') + +codecheck: test/static-code $(NODE_MODULES_TEST) + test/static-code + +# convenience target to setup all the bits needed for the integration tests +# without actually running them +prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common test/reference + +# run the browser integration tests; skip check for SELinux denials +# this will run all tests/check-* and format them as TAP +check: prepare-check + TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} + +bots: $(COCKPIT_REPO_STAMP) + test/common/make-bots + +test/reference: test/common + test/common/pixel-tests pull + +# We want tools/node-modules to run every time package-lock.json is requested +# See https://www.gnu.org/software/make/manual/html_node/Force-Targets.html +FORCE: +$(NODE_MODULES_TEST): FORCE tools/node-modules + ./node-modules-fix.sh + +.PHONY: all clean install devel-install devel-uninstall print-version dist rpm prepare-check check vm print-vm diff --git a/ui/cockpit-docker/README.md b/ui/cockpit-docker/README.md new file mode 100644 index 0000000..cbab395 --- /dev/null +++ b/ui/cockpit-docker/README.md @@ -0,0 +1,86 @@ +# cockpit-docker + +This is the [Cockpit](https://cockpit-project.org/) user interface for [docker +containers](https://docker.io/). + +## Technologies + + - cockpit-docker communicates to docker through its [REST API](https://docs.docker.com/engine/api/v1.43/). + + - This project is based on [cockpit-podman](https://github.com/cockpit-project/cockpit-podman), I ported as much as I could to the docker API, but not everything maps (e.g. pods) and not everything is ported yet. + +# Development dependencies + +On Debian/Ubuntu: + + $ sudo apt install gettext nodejs make + +On Fedora: + + $ sudo dnf install gettext nodejs make + +# Getting and building the source + +These commands check out the source and build it into the `dist/` directory: + +``` +git clone https://github.com/cockpit-docker/cockpit-docker +cd cockpit-docker +make +``` + +# Installing + +`sudo make install` installs the package in `/usr/local/share/cockpit/`. This depends +on the `dist` target, which generates the distribution tarball. + +You can also run `make rpm` to build RPMs for local installation. + +In `production` mode, source files are automatically minified and compressed. +Set `NODE_ENV=production` if you want to duplicate this behavior. + +## Arch Derivatives +[AUR package](https://aur.archlinux.org/packages/cockpit-docker) + +`yay -Ss cockpit-docker` + +OR for Manjaro + +`pamac install cockpit-docker` + +# Development instructions + +See [HACKING.md](./HACKING.md) for details about how to efficiently change the +code, run, and test it. + +# Automated release + +The intention is that the only manual step for releasing a project is to create +a signed tag for the version number, which includes a summary of the noteworthy +changes: + +``` +123 + +- this new feature +- fix bug #123 +``` + +Pushing the release tag triggers the [release.yml](.github/workflows/release.yml) +[GitHub action](https://github.com/features/actions) workflow. This creates the +official release tarball and publishes as upstream release to GitHub. + +The Fedora and COPR releases are done with [Packit](https://packit.dev/), +see the [packit.yaml](./packit.yaml) control file. + +# Automated maintenance + +It is important to keep your [NPM modules](./package.json) up to date, to keep +up with security updates and bug fixes. This happens with +[dependabot](https://github.com/dependabot), +see [configuration file](.github/dependabot.yml). + +Translations are refreshed every Tuesday evening (or manually) through the +[weblate-sync-po.yml](.github/workflows/weblate-sync-po.yml) action. +Conversely, the PO template is uploaded to weblate every day through the +[weblate-sync-pot.yml](.github/workflows/weblate-sync-pot.yml) action. diff --git a/ui/cockpit-docker/build.js b/ui/cockpit-docker/build.js new file mode 100755 index 0000000..ba8f1d1 --- /dev/null +++ b/ui/cockpit-docker/build.js @@ -0,0 +1,108 @@ +#!/usr/bin/env node + +import fs from 'node:fs'; +import os from 'node:os'; + +import copy from 'esbuild-plugin-copy'; + +import { cockpitCompressPlugin } from './pkg/lib/esbuild-compress-plugin.js'; +import { cockpitPoEsbuildPlugin } from './pkg/lib/cockpit-po-plugin.js'; +import { cockpitRsyncEsbuildPlugin } from './pkg/lib/cockpit-rsync-plugin.js'; +import { cleanPlugin } from './pkg/lib/esbuild-cleanup-plugin.js'; +import { esbuildStylesPlugins } from './pkg/lib/esbuild-common.js'; + +const useWasm = os.arch() !== 'x64'; +const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')); + +const production = process.env.NODE_ENV === 'production'; +/* List of directories to use when resolving import statements */ +const nodePaths = ['pkg/lib']; +const outdir = 'dist'; + +// Obtain package name from package.json +const packageJson = JSON.parse(fs.readFileSync('package.json')); + +const parser = (await import('argparse')).default.ArgumentParser(); +parser.add_argument('-r', '--rsync', { help: "rsync bundles to ssh target after build", metavar: "HOST" }); +parser.add_argument('-w', '--watch', { action: 'store_true', help: "Enable watch mode", default: process.env.ESBUILD_WATCH === "true" }); +const args = parser.parse_args(); + +if (args.rsync) + process.env.RSYNC = args.rsync; + +function notifyEndPlugin() { + return { + name: 'notify-end', + setup(build) { + let startTime; + + build.onStart(() => { + startTime = new Date(); + }); + + build.onEnd(() => { + const endTime = new Date(); + const timeStamp = endTime.toTimeString().split(' ')[0]; + console.log(`${timeStamp}: Build finished in ${endTime - startTime} ms`); + }); + } + }; +} + +const context = await esbuild.context({ + ...!production ? { sourcemap: "linked" } : {}, + bundle: true, + entryPoints: ["./src/index.js"], + external: ['*.woff', '*.woff2', '*.jpg', '*.svg', '../../assets*'], // Allow external font files which live in ../../static/fonts + legalComments: 'external', // Move all legal comments to a .LEGAL.txt file + loader: { ".js": "jsx" }, + minify: production, + nodePaths, + outdir, + target: ['es2020'], + plugins: [ + cleanPlugin(), + // Esbuild will only copy assets that are explicitly imported and used + // in the code. This is a problem for index.html and manifest.json which are not imported + copy({ + assets: [ + { from: ['./src/manifest.json'], to: ['./manifest.json'] }, + { from: ['./src/index.html'], to: ['./index.html'] }, + ] + }), + ...esbuildStylesPlugins, + cockpitPoEsbuildPlugin(), + + ...production ? [cockpitCompressPlugin()] : [], + cockpitRsyncEsbuildPlugin({ dest: packageJson.name }), + + notifyEndPlugin(), + ] +}); + +try { + console.log(`Building ${production ? "for production" : "for dev"}...`); + await context.rebuild(); +} catch (e) { + if (!args.watch) + process.exit(1); + // ignore errors in watch mode +} + +if (args.watch) { + // Attention: this does not watch subdirectories -- if you ever introduce one, need to set up one watch per subdir + fs.watch('src', {}, async (ev, path) => { + // only listen for "change" events, as renames are noisy + if (ev !== "change") + return; + console.log("change detected:", path); + await context.cancel(); + try { + await context.rebuild(); + } catch (e) {} // ignore in watch mode + }); + // wait forever until Control-C + await new Promise(() => {}); +} + +context.dispose(); diff --git a/ui/cockpit-docker/me.chabad360.docker.metainfo.xml b/ui/cockpit-docker/me.chabad360.docker.metainfo.xml new file mode 100644 index 0000000..6725aad --- /dev/null +++ b/ui/cockpit-docker/me.chabad360.docker.metainfo.xml @@ -0,0 +1,16 @@ + + + me.chabad360.docker + CC0-1.0 + Docker + + Cockpit component for Docker containers + + +

+ The Cockpit user interface for Docker containers. +

+
+ org.cockpit_project.cockpit + docker +
diff --git a/ui/cockpit-docker/node-modules-fix.sh b/ui/cockpit-docker/node-modules-fix.sh new file mode 100755 index 0000000..05665ef --- /dev/null +++ b/ui/cockpit-docker/node-modules-fix.sh @@ -0,0 +1,9 @@ +tools/node-modules make_package_lock_json || ( \ + sed -i 's/local sha="${1-$(get_index_gitlink node_modules)}"/local sha="${2-$(get_index_gitlink node_modules)}"/' tools/node-modules && \ + tools/node-modules checkout --force && \ + sed -i 's/"name": "podman"/"name": "docker"/' node_modules/.package.json && \ + sed -i 's/"description": "Cockpit UI for Podman Containers"/"description": "Cockpit UI for Docker Containers"/' node_modules/.package.json && \ + sed -i 's/"repository": "git@github.com:cockpit-project\/cockpit-podman.git"/"repository": "https:\/\/github.com\/chabad360\/cockpit-docker.git"/' node_modules/.package.json && \ + sed -i 's/"name": "podman"/"name": "docker"/' node_modules/.package-lock.json && \ + tools/node-modules make_package_lock_json \ + ) \ No newline at end of file diff --git a/ui/cockpit-docker/package.json b/ui/cockpit-docker/package.json new file mode 100644 index 0000000..75b6130 --- /dev/null +++ b/ui/cockpit-docker/package.json @@ -0,0 +1,61 @@ +{ + "name": "docker", + "description": "Cockpit UI for Docker Containers", + "type": "module", + "main": "index.js", + "repository": "https://github.com/chabad360/cockpit-docker.git", + "author": "", + "license": "LGPL-2.1", + "scripts": { + "watch": "./build.js -w", + "build": "./build.js", + "eslint": "eslint --ext .jsx --ext .js src/", + "eslint:fix": "eslint --fix --ext .jsx --ext .js src/", + "stylelint": "stylelint src/*{.css,scss}", + "stylelint:fix": "stylelint --fix src/*{.css,scss}" + }, + "devDependencies": { + "argparse": "2.0.1", + "chrome-remote-interface": "^0.33.0", + "esbuild": "0.20.2", + "esbuild-plugin-copy": "2.1.1", + "esbuild-plugin-replace": "1.4.0", + "esbuild-sass-plugin": "3.2.0", + "esbuild-wasm": "0.20.2", + "eslint": "8.57.0", + "eslint-config-standard": "17.1.0", + "eslint-config-standard-jsx": "11.0.0", + "eslint-config-standard-react": "13.0.0", + "eslint-plugin-import": "2.29.1", + "eslint-plugin-jsx-a11y": "6.8.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-react": "7.34.1", + "eslint-plugin-react-hooks": "4.6.0", + "gettext-parser": "8.0.0", + "htmlparser": "1.7.7", + "jed": "1.1.1", + "sass": "1.75.0", + "sizzle": "2.3.10", + "stylelint": "16.4.0", + "stylelint-config-standard-scss": "13.1.0", + "stylelint-formatter-pretty": "4.0.0", + "stylelint-use-logical-spec": "5.0.1" + }, + "dependencies": { + "@patternfly/patternfly": "5.3.0", + "@patternfly/react-core": "5.3.0", + "@patternfly/react-icons": "5.3.0", + "@patternfly/react-styles": "5.3.0", + "@patternfly/react-table": "5.3.0", + "@patternfly/react-tokens": "5.3.0", + "date-fns": "3.6.0", + "docker-names": "1.2.1", + "ipaddr.js": "2.2.0", + "prop-types": "15.8.1", + "react": "18.2.0", + "react-dom": "18.2.0", + "throttle-debounce": "5.0.0", + "xterm": "5.1.0", + "xterm-addon-canvas": "0.4.0" + } +} diff --git a/ui/cockpit-docker/packaging/debian/control b/ui/cockpit-docker/packaging/debian/control new file mode 100644 index 0000000..f5590eb --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/control @@ -0,0 +1,22 @@ +Source: cockpit-docker +Section: admin +Priority: optional +Maintainer: Martin Pitt +Build-Depends: debhelper-compat (= 13), +Standards-Version: 4.6.2 +Rules-Requires-Root: no +Homepage: https://github.com/chabad360/cockpit-docker +Vcs-Git: https://github.com/chabad360/cockpit-docker.git +Vcs-Browser: https://github.com/chabad360/cockpit-docker + +Package: cockpit-docker +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, + cockpit-bridge, + docker (>= 24), +Description: Cockpit component for docker containers + The Cockpit Web Console enables users to administer GNU/Linux servers using a + web browser. + . + This package adds an user interface for docker containers. diff --git a/ui/cockpit-docker/packaging/debian/copyright b/ui/cockpit-docker/packaging/debian/copyright new file mode 100644 index 0000000..7262793 --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/copyright @@ -0,0 +1,38 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cockpit-docker +Source: https://github.com/chabad360/cockpit-docker +Comment: + This does not directly cover the files in dist/*. These are "minified" and + compressed JavaScript/HTML files built from src/, lib/, po/, and node_modules/ + with node, npm, and a bundler. node_modules/ is not shipped as part of the + upstream release tarballs, but can be reconstructed precisely through the + shipped package-lock.json with the command "npm install". Rebuilding files in + dist/ requires internet access as that process needs to download additional + npm modules from the Internet, thus upstream ships the pre-minified bundles + as part of the upstream release tarball so that the package can be built + without internet access and lots of extra unpackaged build dependencies. + +Files: * +Copyright: 2016-2020 Red Hat, Inc and 2023 Jewish Education Media. +License: LGPL-2.1 + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU Lesser General + Public License can be found in "/usr/share/common-licenses/LGPL-2.1". + +Files: *.metainfo.xml +Copyright: Copyright (C) 2018 Red Hat, Inc and 2023 Jewish Education Media. +License: CC0-1.0 + On Debian systems, the complete text of the Creative Commons Zero v1.0 + Universal Public License is in "/usr/share/common-licenses/LGPL-2.1". diff --git a/ui/cockpit-docker/packaging/debian/rules b/ui/cockpit-docker/packaging/debian/rules new file mode 100755 index 0000000..c349516 --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +export PREFIX=/usr + +%: + dh $@ + +override_dh_auto_clean: + # don't call `make clean`, in a release dist/ is precious + rm -f po/LINGUAS + +override_dh_auto_test: + # don't call `make check`, these are integration tests diff --git a/ui/cockpit-docker/packaging/debian/source/format b/ui/cockpit-docker/packaging/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/ui/cockpit-docker/packaging/debian/source/lintian-overrides b/ui/cockpit-docker/packaging/debian/source/lintian-overrides new file mode 100644 index 0000000..c8c9e0d --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/source/lintian-overrides @@ -0,0 +1,2 @@ +# source contains NPM modules required for running browser integration tests +cockpit-docker source: source-is-missing *node_modules/* diff --git a/ui/cockpit-docker/packaging/debian/upstream/metadata b/ui/cockpit-docker/packaging/debian/upstream/metadata new file mode 100644 index 0000000..29a8d5c --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/upstream/metadata @@ -0,0 +1,4 @@ +--- +Bug-Database: https://github.com/chabad360/cockpit-docker/issues +Bug-Submit: https://github.com/chabad360/cockpit-docker/issues/new +Repository-Browse: https://github.com/chabad360/cockpit-docker diff --git a/ui/cockpit-docker/packaging/debian/watch b/ui/cockpit-docker/packaging/debian/watch new file mode 100644 index 0000000..9820c0a --- /dev/null +++ b/ui/cockpit-docker/packaging/debian/watch @@ -0,0 +1,5 @@ +version=4 +opts="searchmode=plain, \ +filenamemangle=s/.+\/@PACKAGE@-@ANY_VERSION@.tar.gz/@PACKAGE@-$1\.tar\.xz/" \ +https://api.github.com/repos/cockpit-chabad360/@PACKAGE@/releases \ +https://github.com/cockpit-chabad360/@PACKAGE@/releases/download/\d[\.\d]*/@PACKAGE@-@ANY_VERSION@.tar.xz diff --git a/ui/cockpit-docker/packit.yaml b/ui/cockpit-docker/packit.yaml new file mode 100644 index 0000000..2597a21 --- /dev/null +++ b/ui/cockpit-docker/packit.yaml @@ -0,0 +1,80 @@ +upstream_project_url: https://github.com/chabad360/cockpit-docker +# enable notification of failed downstream jobs as issues +issue_repository: https://github.com/chabad360/cockpit-docker +specfile_path: cockpit-docker.spec +upstream_package_name: cockpit-docker +downstream_package_name: cockpit-docker +# use the nicely formatted release description from our upstream release, instead of git shortlog +copy_upstream_release_description: true + +actions: + post-upstream-clone: make cockpit-docker.spec + create-archive: make dist + +srpm_build_deps: + - make + - npm + +jobs: + - job: copr_build + trigger: pull_request + targets: + - fedora-39 + - fedora-40 + - fedora-latest-aarch64 + - fedora-development + - centos-stream-9-x86_64 + - centos-stream-9-aarch64 + - centos-stream-8-x86_64 + + - job: tests + trigger: pull_request + targets: + - fedora-39 + - fedora-40 + - fedora-latest-aarch64 + - fedora-development + - centos-stream-9-x86_64 + - centos-stream-9-aarch64 + - centos-stream-8-x86_64 + + - job: copr_build + trigger: release + owner: "@cockpit" + project: "cockpit-preview" + preserve_project: True + actions: + post-upstream-clone: make cockpit-docker.spec + # HACK: tarball for releases (copr_build, koji, etc.), copying spec's Source0; this + # really should be the default, see https://github.com/packit/packit-service/issues/1505 + create-archive: + - sh -exc "curl -L -O https://github.com/chabad360/cockpit-docker/releases/download/${PACKIT_PROJECT_VERSION}/${PACKIT_PROJECT_NAME_VERSION}.tar.xz" + - sh -exc "ls ${PACKIT_PROJECT_NAME_VERSION}.tar.xz" + + - job: copr_build + trigger: commit + branch: "^main$" + owner: "@cockpit" + project: "main-builds" + preserve_project: True + + - job: propose_downstream + trigger: release + dist_git_branches: + - fedora-development + - fedora-39 + - fedora-40 + + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-development + - fedora-39 + - fedora-40 + + - job: bodhi_update + trigger: commit + dist_git_branches: + # rawhide updates are created automatically + - fedora-39 + - fedora-40 diff --git a/ui/cockpit-docker/plans/all.fmf b/ui/cockpit-docker/plans/all.fmf new file mode 100644 index 0000000..1529147 --- /dev/null +++ b/ui/cockpit-docker/plans/all.fmf @@ -0,0 +1,23 @@ +discover: + how: fmf +execute: + how: tmt + +# Let's handle them upstream only, don't break Fedora/RHEL reverse dependency gating +environment: + TEST_AUDIT_NO_SELINUX: 1 + +/system: + summary: Run tests on system docker + discover+: + test: /test/browser/system + +/user: + summary: Run tests on user docker + discover+: + test: /test/browser/user + +/misc: + summary: Run other tests + discover+: + test: /test/browser/other diff --git a/ui/cockpit-docker/po/cs.po b/ui/cockpit-docker/po/cs.po new file mode 100644 index 0000000..48d63a2 --- /dev/null +++ b/ui/cockpit-docker/po/cs.po @@ -0,0 +1,1510 @@ +# Pavel Borecki , 2019. #zanata, 2020. +# Matej Marusak , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-11-29 13:31+0000\n" +"Last-Translator: Pavel Borecki \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" +"X-Generator: Weblate 5.2.1\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 kontejner" +msgstr[1] "$0 kontejnery" +msgstr[2] "$0 kontejnerů" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 obraz celkem, $1" +msgstr[1] "$0 obrazy celkem, $1" +msgstr[2] "$0 obrazů celkem, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 sekunda" +msgstr[1] "$0 sekundy" +msgstr[2] "$0 sekund" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 nepoužitý obraz, $1" +msgstr[1] "$0 nepoužité obrazy, $1" +msgstr[2] "$0 nepoužitých obrazů, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 až 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "" +"Akce kterou podniknout jakmile kontejner přejde do stavu, kdy nebude v " +"pořádku." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Přidat mapování portů" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Přidat proměnnou prostředí" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Přidat svazek" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Vše" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Všechny registry" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Vždy" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Došlo k chybě" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Autor" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Docker spouštět automaticky při zavádění systému" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "Procesor" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "Nápověda ke sdílení procesoru" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "Sdílení procesoru" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"Sdílení procesoru určuje prioritu spuštěných kontejnerů. Výchozí priorita je " +"1024. Vyšší číslo upřednostňuje tento kontejner. Nižší číslo jeho přednost " +"snižuje." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Storno" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Kontroluje se stav" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Kontrolní bod" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Kontrolní bod a podpora obnovení" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Kontejner kontrolního bodu $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Kliknutím zobrazíte publikované porty" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Kliknutím zobrazíte svazky" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Součást Cockpit pro Docker kontejnery" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Příkaz" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Komentáře" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Odeslat" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Odeslat kontejner" + +#: src/util.js:23 +msgid "Configured" +msgstr "Nastaveno" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konzole" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Kontejner" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Kontejner se nepodařilo vytvořit" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Kontejner se nepodařilo spustit" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Kontejner není spuštěný" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Název kontejneru" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Je třeba zadat název kontejneru." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Popis umístění kontejneru" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "Je třeba vyplnit popis umístění kontejneru" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Port kontejneru" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "Je třeba vyplnit port kontejneru" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Kontejnery" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Vytvořit" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Vytvořit nový obraz založený na stávajícím stavu kontejneru $0." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Vytvořit a spustit" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Vytvořit kontejner" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Vytvořit kontejner v $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Vytvořit kontejner v podu" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Vytvořit pod" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Vytvořeno" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Vytvořil" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Snížit podíl na procesoru" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Snížit interval" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Snížit limit počtu opětovných pokusů" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Zmenšit paměť" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Snížit počet opakovaných pokusů" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Snížit periodu startu" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Snížit časový limit" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Smazat" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "Smazat obraz $0?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "Smazat $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "Smazat obraz" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Smazat pod $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Smazat značkou označené obrazy" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Smazat nepoužívané systémové obrazy:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Smazat nepoužívané uživatelské obrazy:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Smazání kontejneru smaže veškerá data v něm." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "Smazání spuštěného kontejneru smaže veškerá data v něm." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Smazání tohoto podu odebere následující kontejnery:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Podrobnosti" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Prostor na disku" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "Formát Docker se hodí pro sdílení obrazu s enginem Docker nebo Moby" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Stáhnout" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Stáhnout si nový obraz" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Prázdný pod $0 bude nenávratně odebrán." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Vstupní bod" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Proměnné prostředí" + +#: src/util.js:26 +msgid "Error" +msgstr "Chyba" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Chybové hlášení" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Nastala chyba při připojování ke konzoli" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Příklad, vaše jméno " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Příklad: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Skončilo" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Nepodařilo se spustit kontrolu vitálnosti" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Kontejner $0 se nepodařilo opatřit kontrolním bodem" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Nepodařilo se vyčistit kontejner" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Nepodařilo se odeslat kontejner $0" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Nepodařilo se vytvořit kontejner $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Nepodařilo se stáhnout obraz $0:$1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Nepodařilo se vynutit odebrání kontejneru $0" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Nepodařilo se vynutit odebrání obrazu $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Nepodařilo se vynutit restart podu $0" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Nepodařilo se vynutit zastavení podu $0" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Nepodařilo se pozastavit kontejner $0" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Nepodařilo se pozastavit pod $0" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Nepodařilo se prořezat nepoužívané kontejnery" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Nepodařilo se prořezat nepoužívané obrazy" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Nepodařilo se odeslat obraz $0" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Nepodařilo se odebrat kontejner $0" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Nepodařilo se odebrat obraz $0" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Nepodařilo se přejmenovat kontejner $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Nepodařilo se restartovat kontejner $0" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Nepodařilo se restartovat pod $0" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Nepodařilo se obnovit kontejner $0" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Nepodařilo se navázat v chodu kontejneru $0" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Nepodařilo se navázat v chodu podu $0" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Nepodařilo se spustit kontejner $0" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Nepodařilo se zkontrolovat vitálnost kontejneru $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Nepodařilo se vyhledat obrazy." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Nepodařilo se vyhledat obrazy: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Nepodařilo se vyhledat nové obrazy" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Nepodařilo se spustit kontejner $0" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Nepodařilo se spustit pod $0" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Nepodařilo se zastavit kontejner $0" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Nepodařilo se zastavit pod $0" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Selhávající streak" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Vynutit odeslání" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Vynutit smazání" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Vynutit smazání podu $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Vynutit restart" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Vynutit zastavení" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Brána" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Kontrola vitálnosti" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Nápověda k intervalu kontroly vitálnosti" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Nápověda k opakovaným pokusům o kontrolu vitálnosti" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Nápověda k periodě startu kontroly vitálnosti" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Nápověda k časovému limitu kontroly vitálnosti" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Nápověda k akci kontroly selhání" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "V pořádku" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Skrýt obrazy" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Skrýt obrazy mezi tím" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Historie" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Popis umístění hostitele" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Port hostitele" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Nápověda k portu hostitele" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "Identif." + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP adresa" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Nápověda k IP adrese" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Ideální pro vývoj" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Ideální pro provozování služeb" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Pokud je IP adresa hostitele nastavena na 0.0.0.0 nebo vůbec nenastavena, " +"port bude navázán na všechny IP adresy hostitele." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Pokud port hostitele není nastavený, port kontejneru bude náhodně přiřazen " +"na port hostitele." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Pokud je nastavená staticky, IP adresu ignorovat" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Pokud je nastavená staticky, MAC adresu ignorovat" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Obraz" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Název obrazu už je použit" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Je třeba zadat název obrazu" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Nápověda k výběru obrazu" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Obrazy" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Zvýšit podíl na procesoru" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Prodloužit interval" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Zvýšit počet opětovných pokusů" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Zvětšit paměť" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Zvýšit počet opakování pokusů" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Zvýšit periodu startu" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Prodloužit časový limit" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Napojení" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Interval" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Jak často spouštět kontrolu vitálnosti." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Neplatné znaky. Název může obsahovat pouze písmena, číslice a vybranou " +"interpunkci (_.-)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Ponechat všechny dočasné soubory kontrolních bodů" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Klíč" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "Je třeba vyplnit klíč" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Minulých 5 spuštění" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Nejnovější kontrolní bod" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Po zapsání kontrolního bodu na disk ponechat spuštěné" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Načítání podrobností…" + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Načítání záznamů událostí…" + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Načítání…" + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Lokální" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Lokální obrazy" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Záznamy událostí" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC adresa" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Maximální počet opětovných pokusů" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Operační paměť" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Limit operační paměti" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Jednotka operační paměti" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Režim" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Pro tento obraz existuje vícero štítků. Vyberte oštítkované obrazy, které " +"smazat." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "Je třeba, aby byla platná IP adresa" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Název" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "Název je už používán" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Nový název pro kontejner" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Název nového obrazu" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Ne" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Žádná akce" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Žádné kontejnery" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Tento obraz není používán žádným kontejnerem" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "V tomto podu nejsou žádné kontejnery" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Stávajícímu filtru neodpovídají žádné kontejnery" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Nezadány žádné proměnné prostředí" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Žádné obrazy" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Nenalezeny žádné obrazy" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Žádné obrazy které by odpovídaly stávajícímu filtru" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Žádný štítek" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Nejsou vystavené žádné porty" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Žádné výsledky pro $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Žádné spuštěné kontejnery" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Nejsou určeny žádné svazky" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Při nezdaru" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Pouze spuštěné" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Volby" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Vlastník" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Nápověda k vlastníkovi" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Prošlo kontrolou vitálnosti" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Pokud chcete hromadně naimportovat, zadejte do libovolné kolonky jeden či " +"více řádků s dvojicemi klíč=hodnota" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Pozastavit" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Při vytváření obrazu pozastavit kontejner" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Pozastaveno" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Pod se nepodařilo vytvořit" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Název pro pod" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker kontejnery" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Služba docker není aktivní" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Mapování portů" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Porty" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Je možné mapovat porty do čísla 1024" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Soukromé" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokol" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Prořezat" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Prořezat nepoužívané kontejnery" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Prořezat nepoužívané obrazy" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Prořezávání kontejnerů" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Prořezávají se obrazy" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Stáhnout si nejnovější obraz" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Stahování" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Přístup pouze pro čtení" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Přístup pro čtení i zápis" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Odebrat položku" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Odebere označené (a nespuštěné) kontejnery" + +#: src/util.js:23 +msgid "Removing" +msgstr "Odebírá se" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Přejmenovat" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Přejmenovat kontejner $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Je možné nastavit limity prostředků" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Restart" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Pravidlo restartování" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Nápověda k pravidlu restartování" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "" +"Které pravidlo ohledně restartování následovat když se kontejnery ukončují." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Pravidlo ohledně restartování kterým se řídit při ukončení kontejnerů. Pokud " +"je v rámci uživatelského účtu používán např. ecryptfs, systemd-homed, NFS " +"nebo 2FA, pak se může stávat, že automatické spouštění pomocí linger za " +"určitých podmínek nemusí zafungovat." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Obnovit" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Obnovit kontejner $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Obnovit s navázanými TCP spojeními" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Omezeno oprávněními uživatelského účtu" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Navázat v chodu" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Opětovných pokusů" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Zkusit znovu jiný pojem." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Zkontrolovat vitálnost" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Spuštěné" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Hledat podle názvu nebo popisu" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Hledat podle registru (repozitáře)" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Hledat" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Hledat obraz" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Hledat řetězec nebo umístění kontejneru" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Vyhledávání..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Vyhledávání: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Sdílené" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Zobrazit" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Zobrazit obrazy" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Zobrazit obrazy mezi tím" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Zobrazit méně" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Zobrazit více" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Velikost" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Spustit" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Perioda startu" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Spustit docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Vyhledávání obrazů zahájíte psaním." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Spuštěno v" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Stav" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Stav" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Zastavit" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Zastaveno" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Podpora pro zachování navázaných TCP spojení" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Systém" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Je také k dispozici systémová služba Docker" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Štítek" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Štítky" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Cockpit uživatelské rozhraní pro Docker kontejnery." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Doba potřebná pro inicializaci zavádění kontejneru." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Nejdelší přijatelná doba pro dokončení kontroly vitálnosti, než bude " +"interval považován za nezdařilý." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Umožněný počet opětovných pokusů než bude výsledek kontroly vitálnosti " +"považován za negativní." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Časový limit" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Řešení problémů" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Filtrujte psaním…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Nepodařilo se načíst historii obrazu" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Není v pořádku" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "V chodu od $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Použít původní Docker formát" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Používáno" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Uživatel" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Je také k dispozici uživatelská služba Docker" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Uživatel:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Hodnota" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Svazky" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "Pokud v nepořádku" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "S terminálem" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Zapisovatelné" + +#: src/manifest.json:0 +msgid "container" +msgstr "kontejner" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "stahuje se" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "hostitel[:port]/[uživatel]/kontejner[:štítek]" + +#: src/manifest.json:0 +msgid "image" +msgstr "obraz" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "v" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "mezi tím" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "Obraz mezi tím" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "n/a" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "není k dispozici" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "skupina podu" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "porty" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "sekund" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "systém" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "nepoužito" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "uživatel:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "svazky" + +#~ msgid "Delete $0" +#~ msgstr "Smazat $0" + +#~ msgid "select all" +#~ msgstr "vybrat vše" + +#~ msgid "Failure action" +#~ msgstr "Akce při selhání" + +#~ msgid "Restarting" +#~ msgstr "Restartuje se" + +#, fuzzy +#~| msgid "Please confirm deletion of $0" +#~ msgid "Confirm deletion of $0" +#~ msgstr "Potvrďte smazání $0" + +#, fuzzy +#~| msgid "Please confirm deletion of pod $0" +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Potvrďte smazání podu $0" + +#, fuzzy +#~| msgid "Please confirm force deletion of pod $0" +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Potvrďte vynucení smazání podu $0" + +#, fuzzy +#~| msgid "Please confirm forced deletion of $0" +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Potvrďte vynucení smazání $0" + +#~ msgid "Container is currently running." +#~ msgstr "Kontejner je nyní spuštěný." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Do exportu nezahrnovat změny v kořenovém souborovém systému" + +#~ msgid "Default with single selectable" +#~ msgstr "Výchozí s jedním k výběru" + +#~ msgid "Start after creation" +#~ msgstr "Po vytvoření spustit" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "Smazat nepoužité $0 obrazy:" + +#~ msgid "created" +#~ msgstr "vytvořeno" + +#~ msgid "exited" +#~ msgstr "skončilo" + +#~ msgid "paused" +#~ msgstr "pozastaveno" + +#~ msgid "running" +#~ msgstr "spuštěné" + +#~ msgid "stopped" +#~ msgstr "zastaveno" + +#~ msgid "user" +#~ msgstr "uživatel" + +#~ msgid "Add on build variable" +#~ msgstr "Přídatná proměnná prostředí" + +#~ msgid "Commit image" +#~ msgstr "Odeslat obraz" + +#~ msgid "Format" +#~ msgstr "Formát" + +#~ msgid "Message" +#~ msgstr "Zpráva" + +#~ msgid "Pause the container" +#~ msgstr "Pozastavit kontejner" + +#~ msgid "Remove on build variable" +#~ msgstr "Odebrat na proměnných prostředí" + +#~ msgid "Set container on build variables" +#~ msgstr "Nastavit kontejner na proměnných prostředí" + +#~ msgid "Add item" +#~ msgstr "Přidat položku" + +#~ msgid "Host port (optional)" +#~ msgstr "Port hostitele (volitelně)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (volitelně)" + +#~ msgid "ReadOnly" +#~ msgstr "PouzeProČtení" + +#~ msgid "IP prefix length" +#~ msgstr "Délka přepony IP adresy" + +#~ msgid "Get new image" +#~ msgstr "Získat nový obraz" + +#~ msgid "Run" +#~ msgstr "Spustit" + +#~ msgid "On build" +#~ msgstr "Při sestavení" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Opravdu chcete tento obraz smazat?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Nedaří se připojit k tomuto kontejneru: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Nedaří se otevřít kanál:$0" + +#~ msgid "Everything" +#~ msgstr "Vše" + +#~ msgid "Security" +#~ msgstr "Zabezpečení" + +#~ msgid "The scan from $time ($type) found no vulnerabilities." +#~ msgstr "Sken z $time ($type) nenalezl žádné zranitelnosti." + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "Tato verze Web Console nepodporuje terminál." diff --git a/ui/cockpit-docker/po/de.po b/ui/cockpit-docker/po/de.po new file mode 100644 index 0000000..8f9dc55 --- /dev/null +++ b/ui/cockpit-docker/po/de.po @@ -0,0 +1,1505 @@ +# Martin Pitt , 2019. #zanata +# Mike FABIAN , 2020. +# Matej Marusak , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-09-02 07:21+0000\n" +"Last-Translator: Martin Pitt \n" +"Language-Team: German \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"X-Generator: Weblate 4.18.2\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 Container" +msgstr[1] "$0 Container" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 Abbild insgesamt, $1" +msgstr[1] "$0 Abbilder insgesamt, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 Sekunde" +msgstr[1] "$0 Sekunden" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 ungenutztes Abbild, $1" +msgstr[1] "$0 ungenutzte Abbilder, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "" +"Zu ergreifende Maßnahmen, wenn der Container in einen ungesunden Zustand " +"übergeht." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Port-Zuordnung hinzufügen" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Variable hinzufügen" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Volumen hinzufügen" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Alle" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Alle Registries" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Immer" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Ein Fehler ist aufgetreten" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Autor" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Docker automatisch beim Hochfahren starten" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "CPU Shares Hilfe" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU-Shares" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU Shares legt die Priorität laufender Container fest. Standardwert ist " +"1024. Ein höherer Wert priorisiert den Container. Ein niedrigerer Wert senkt " +"dessen Priorität." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Abbruch" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Überprüfung der Gesundheit" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Kontrollpunkt" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Unterstützung von Kontrollpunkten und Wiederherstellung" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Kontrollpunkt für Container $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Klicken um veröffentlichte Ports zu sehen" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Klicken um Volumen zu sehen" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Cockpit Bestandteil für Docker-Container" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Befehl" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Kommentare" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Committen" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Container übergeben" + +#: src/util.js:23 +msgid "Configured" +msgstr "Konfiguriert" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konsole" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Container" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Container konnte nicht erstellt werden" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Container konnte nicht erstellt werden" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Container läuft nicht" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Container-Name" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Containername ist erforderlich." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Container-Pfad" + +#: src/Volume.jsx:23 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container path must not be empty" +msgstr "Container konnte nicht erstellt werden" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Container-Port" + +#: src/PublishPort.jsx:37 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container port must not be empty" +msgstr "Container konnte nicht erstellt werden" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Container" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Erstellen" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "" +"Ein neues Abbild auf der Grundlage des aktuellen Zustands des Containers $0 " +"erstellen." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Erstellen und ausführen" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Container erstellen" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Container in $0 erstellen" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Container in Pod erstellen" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Pod erstellen" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Erstellt" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Erstellt von" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "CPU-Anteile verringern" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Intervall verringern" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Maximale Wiederholungsversuche verringern" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Speicher verringern" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Wiederholungsversuche verringern" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Startzeitraum verringern" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Zeitüberschreitung verringern" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Löschen" + +#: src/ImageDeleteModal.jsx:92 +#, fuzzy +#| msgid "Delete $0?" +msgid "Delete $0 image?" +msgstr "$0 löschen?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "$0 löschen?" + +#: src/ImageDeleteModal.jsx:96 +#, fuzzy +#| msgid "Delete tagged images" +msgid "Delete image" +msgstr "Markierte Image löschen" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Pod $0 löschen?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Markierte Image löschen" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Nicht verwendete Systemabbilder löschen:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Nicht verwendete Benutzerabbilder löschen:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Beim Löschen des Containers werden alle Daten darin verloren gehen." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "" +"Das Löschen eines laufenden Containers führt dazu, dass alle darin " +"enthaltenen Daten gelöscht werden." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Löschen des Pods wird die folgenden Container entfernen:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Details" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Speicherplatz" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Docker-Format ist hilfreich, wenn das Image mit Docker oder Moby Engine " +"geteilt wird" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Herunterladen" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Neues Abbild herunterladen" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Leerer Pod $0 wird endgültig entfernt." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Einsprungspunkt" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Umgebungsvariablen" + +#: src/util.js:26 +msgid "Error" +msgstr "Fehler" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Fehlermeldung" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Beim Verbinden der Konsole ist ein Fehler aufgetreten" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Beispiel, Ihr Name " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Beispiel: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Beendet" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Gesundheitsprüfung fehlgeschlagen" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Überprüfung von Container $0 fehlgeschlagen" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Fehler bei der Bereinigung des Containers" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Konnte Container $0 nicht committen" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Fehler bei der Erstellung des Containers $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Konnte Image $0 nicht herunterladen: $1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Konnte Container $0 nicht neu entfernen" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Fehler bei der erzwungenen Entfernung des Abbilds $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Konnte Pod $0 nicht neu starten" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Konnte Pod $0 nicht stoppen" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Konnte Container $0 nicht pausieren" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Konnte Pod $0 nicht pausieren" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Löschen nicht gebrauchter Container fehlgeschlagen" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Reduzierung nicht gebrauchter Abbilder fehlgeschlagen" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Image $0 konnte nicht gepullt werden" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Konnte Container $0 nicht neu entfernen" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Fehler bei der Entfernung von Abbild $0" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Fehler beim Umbenennen des Containers $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Konnte Container $0 nicht neu starten" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Konnte Pod $0 nicht neu starten" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Konnte Container $0 nicht wiederherstellen" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Konnte Container $0 nicht wieder starten" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Konnte Pod $0 nicht wieder starten" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Konnte Container $0 nicht starten" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Gesundheitsprüfung von Container $0 fehlgeschlagen" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Konnte nicht nach Images suchen." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Konnte nicht nach Images suchen: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Konnte nicht nach neuen Images suchen" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Konnte Container $0 nicht starten" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Konnte Pod $0 nicht starten" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Konnte Container $0 nicht stoppen" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Konnte Pod $0 nicht stoppen" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Übergabe erzwingen" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Löschen erzwingen" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Löschen von Pod $0 erzwingen?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Neustart erzwingen" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Stoppen erzwingen" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Gateway" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Gesundheitsprüfung" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Hilfe zum Gesundheitsprüfungsintervall" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Hilfe zur Wiederholung der Gesundheitsprüfung" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Hilfe zur Periode der Gesundheitsprüfung" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Hilfe zum Zeitlimit der Gesundheitsprüfung" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Hilfe zur Gesundheitsprüfungs-Aktion" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Gesund" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Abbilder ausblenden" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Intermediate Images verstecken" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Verlauf" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Host-Pfad" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Host-Port" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Hilfe zum Host-Port" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP-Adresse" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Hilfe zur IP-Adresse" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Ideal zur Entwicklung" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Ideal für Dienste" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Wenn die Host-IP auf 0.0.0.0 oder gar nicht gesetzt ist, wird der Port an " +"alle IPs des Hosts gebunden." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Wenn der Host-Port nicht gesetzt ist, wird dem Container-Port ein zufälliger " +"Port auf dem Host zugewiesen." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "IP-Adresse ignorieren, wenn statisch festgelegt" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "MAC-Adresse ignorieren, wenn statisch festgelegt" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Image" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Abbildname ist nicht eindeutig" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Abbildname ist erforderlich" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Abbildauswahl-Hilfe" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Images" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "CPU-Anteile erhöhen" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Intervall erhöhen" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Maximale Wiederholungsversuche erhöhen" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Speicher erhöhen" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Wiederholungsversuche erhöhen" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Startzeitraum erhöhen" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Zeitüberschreitung erhöhen" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Integration" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Intervall" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Intervall, in dem die Gesundheitsprüfung durchgeführt wird." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Ungültige Zeichen. Der Name darf nur Buchstaben, Zahlen und bestimmte " +"Satzzeichen (_ . -) enthalten." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Alle temporären Kontrollpunktdateien behalten" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Schlüssel" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Letzte 5 Durchläufe" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "LetzterKontrollpunkt" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "" +"Nach dem Schreiben des Kontrollpunkts auf die Festplatte weiterlaufen lassen" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Details werden geladen ..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Protokolle werden geladen ..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Wird geladen ..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Lokal" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Lokale Abbilder" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Protokolle" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC-Adresse" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Maximale Versuche" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Speicher" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Speicher-Limit" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Speichereinheit" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Modus" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Mehrere Tags für dieses Image vorhanden. Getagte Images zum Löschen " +"auswählen." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Name" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Neuer Containername" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Neuer Abbildname" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Nein" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Keine Aktion" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Keine Container" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Keine Container benutzen dieses Abbild" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "Keine Container in diesem Pod" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Aktueller Filter passt auf keinen Container" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Keine Umgebungsvariablen angegeben" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Keine Images" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Keine Abbilder gefunden" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Aktueller Filter passt auf kein Image" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Keine Bezeichnung" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Keine offenen Ports" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Keine Ergebnisse für $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Keine laufenden Container" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Keine Volumen angegeben" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Bei einem Ausfall" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Nur laufenlassen" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Optionen" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Eigentümer" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Eigentümer-Hilfe" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Bestandener Gesundheitstest" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Fügen Sie eine oder mehrere Zeilen mit key=value Paaren in irgendein Feld " +"ein für multiplen Import" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Anhalten" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Container bei der Abbilderstellung pausieren" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Pausiert" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Pod konnte nicht erstellt werden" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Pod-Name" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker-Container" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker-Service ist nicht aktiv" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Portzuordnung" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Ports" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Privat" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokoll" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Reduzieren" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Nicht benötigte Abbilder löschen" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Reduzierung nicht benötigter Abbilder" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Räume Container auf" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Reduziere Abbilder" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Neuestes Image pullen" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Herunterladen" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Nur-Lese-Zugriff" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Lese-/Schreibzugriff" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Element entfernen" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Entfernt selektierte nicht-laufende Container" + +#: src/util.js:23 +msgid "Removing" +msgstr "Wird entfernt" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Umbenennen" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Container $0 umbenennen" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Ressourcen-Grenzen können gesetzt werden" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Neustart" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Neustartrichtlinie" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Neustartrichtlinien-Hilfe" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "" +"Neustart-Richtlinie, die beim Beenden von Containern befolgt werden soll." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Wiederherstellen" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Container $0 wiederherstellen" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Wiederherstellung mit bestehenden TCP-Verbindungen" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Eingeschränkt durch Benutzerkonto-Privilegien" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Fotfahren" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Wiederholungsversuche" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Versuchen Sie einen anderen Begriff." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Gesundheitsprüfung durchführen" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Läuft" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Nach Name oder Beschreibung suchen" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Nach Registry suchen" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Suchen nach" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Nach einem Abbild suchen" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Suchbegriff oder Containerort" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Wird gesucht ..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Wird gesucht: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Freigegeben" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Anzeigen" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Abbilder anzeigen" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Zwischenabbilder anzeigen" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Weniger anzeigen" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Mehr anzeigen" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Größe" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Starten" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Startzeitraum" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Docker starten" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Zum Suchen nach Abbildern mit dem Tippen beginnen." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Gestartet am" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Zustand" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Status" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Stoppen" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Angehalten" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Unterstützung der Aufrechterhaltung bestehender TCP-Verbindungen" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "System" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "System-Docker ist auch verfügbar" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Etikett" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Etiketten" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Die Cockpit Benutzeroberfläche für Docker Container." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "" + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Die maximal zulässige Zeit für den Abschluss der Gesundheitsprüfung, bevor " +"ein Intervall als fehlgeschlagen gilt." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Die Anzahl der zulässigen Wiederholungsversuche, bevor eine " +"Gesundheitsprüfung als ungesund gilt." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Zeitüberschreitung" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Fehler suchen" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Tippen zum filtern…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Abbildverlauf kann nicht geladen werden" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Ungesund" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Läuft seit $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Veraltetes Docker-Format verwenden" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Benutzt von" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Benutzer" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Benutzer Docker ist auch verfügbar" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Benutzer:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Wert" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Datenträger" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "Wenn ungesund" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Mit Terminal" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Beschreibbar" + +#: src/manifest.json:0 +msgid "container" +msgstr "container" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "wird heruntergeladen" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "Host[:Port]/[Benutzer]/Container[:Tag]" + +#: src/manifest.json:0 +msgid "image" +msgstr "Image" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "in" + +#: src/ImageDeleteModal.jsx:79 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate" +msgstr "Intermediate Images verstecken" + +#: src/ImageDeleteModal.jsx:59 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate image" +msgstr "Intermediate Images verstecken" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "n.v." + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "nicht verfügbar" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "Pod-Gruppe" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "Ports" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "Sekunden" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "System" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "ungenutzt" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "Benutzer:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "Volumen" + +#~ msgid "Delete $0" +#~ msgstr "$0 löschen" + +#~ msgid "select all" +#~ msgstr "Alles auswählen" + +#~ msgid "Restarting" +#~ msgstr "Wird neu gestartet" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Löschen von $0 bestätigen" + +#, fuzzy +#~| msgid "Please confirm deletion of pod $0" +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Löschen von Pod $0 bestätigen" + +#, fuzzy +#~| msgid "Please confirm force deletion of pod $0" +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Erzwungenes Löschen von Pod $0 bestätigen" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Erzwungenes Löschen von $0 bestätigen" + +#~ msgid "Container is currently running." +#~ msgstr "Container läuft gerade." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Keine root-Dateisystem-Änderungen beifügen, wenn exportieren" + +#~ msgid "Start after creation" +#~ msgstr "Nach der Erstellung starten" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "Nicht verwendete $0 Abbilder löschen:" + +#~ msgid "created" +#~ msgstr "erstellt" + +#~ msgid "exited" +#~ msgstr "beendet" + +#~ msgid "paused" +#~ msgstr "pausiert" + +#~ msgid "running" +#~ msgstr "Läuft" + +#~ msgid "stopped" +#~ msgstr "Angehalten" + +#~ msgid "user" +#~ msgstr "Benutzer" + +#~ msgid "Add on build variable" +#~ msgstr "Build-Variable hinzufügen" + +#~ msgid "Commit image" +#~ msgstr "Image committen" + +#~ msgid "Format" +#~ msgstr "Format" + +#~ msgid "Message" +#~ msgstr "Nachricht" + +#~ msgid "Pause the container" +#~ msgstr "Den Container anhalten" + +#~ msgid "Remove on build variable" +#~ msgstr "Bei Bau-Variable entfernen" + +#~ msgid "Add item" +#~ msgstr "Element hinzufügen" + +#, fuzzy +#~| msgid "Host port" +#~ msgid "Host port (optional)" +#~ msgstr "Host-Port" + +#~ msgid "ReadOnly" +#~ msgstr "Nur lesen" + +#~ msgid "IP prefix length" +#~ msgstr "IP-Präfixlänge" + +#~ msgid "Get new image" +#~ msgstr "Neues Image herunterladen" + +#~ msgid "Run" +#~ msgstr "Starten" + +#~ msgid "On build" +#~ msgstr "Beim Bauen" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Sind Sie sicher, dass Sie dieses Image löschen wollen?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Konnte nicht mit diesem Container verbinden: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Konnte keinen Kanal öffnen: $0" + +#~ msgid "Everything" +#~ msgstr "Alles" + +#~ msgid "Security" +#~ msgstr "Sicherheit" + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "Diese Version der Web-Konsole unterstützt kein Terminal." diff --git a/ui/cockpit-docker/po/es.po b/ui/cockpit-docker/po/es.po new file mode 100644 index 0000000..61212d3 --- /dev/null +++ b/ui/cockpit-docker/po/es.po @@ -0,0 +1,1489 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Álvaro Castillo , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-12-15 14:41+0000\n" +"Last-Translator: Neftali Yagua \n" +"Language-Team: Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"X-Generator: Weblate 5.3\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 contenedor" +msgstr[1] "$0 contenedores" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 imagen, $1" +msgstr[1] "$0 imágenes en total, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 segundo" +msgstr[1] "$0 segundos" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 imagen sin usar, $1" +msgstr[1] "$0 imágenes sin usar, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 a 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "" +"Acción a tomar una vez que el contenedor pase a un mal estado de salud." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Añadir mapeo de puertos" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Añadir variable" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Añadir volumen" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Todos" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Todos los registros" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Siempre" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Ocurrió un error" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Autor" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Iniciar docker en el arranque" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "Ayuda sobre shares de CPU" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "Shares de CPU" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"Los shares de CPU determinan la prioridad de ejecución de contenedores. La " +"prioridad por defecto es 1024. Un número mayor prioriza este contenedor. Un " +"número menor reduce la prioridad." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Cancelar" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Comprobando estado de salud" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Checkpoint" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Soporte para checkpoint y restauración" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Crear checkpoint del contenedor $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Pulse para ver los puertos publicados" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Pulse para ver los volúmenes" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Componente Cockpit para contenedores Docker" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Comando" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Comentarios" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Commit" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Confirmar contenedor" + +#: src/util.js:23 +msgid "Configured" +msgstr "Configurado" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Consola" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Contenedores" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Falló al crear el contenedor" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "El contenedor no pudo ser iniciado" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "El contenedor no se está ejecutando" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Nombre de contenedor" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Se requiere un nombre para el contenedor." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Ruta del contenedor" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "La ruta del contenedor no debe estar vacía" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Puerto del contenedor" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "El puerto de contenedores no debe estar vacío" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Contenedores" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Crear" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Crear una imagen nueva basada en el estado actual del contenedor $0." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Crear y ejecutar" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Crear contenedor" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Crear contenedor en $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Crear un contenedor en el pod" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Crear pod" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Creado" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Creada por" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Reducir shares de CPU" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Reducir intervalo" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Reducir el número máximo de reintentos" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Reducir la cantidad de memoria" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Reducir el número de reintentos" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Reducir el periodo de arranque" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Reducir el tiempo de espera" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Eliminar" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "¿Eliminar imagen de $0?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "¿Eliminar $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "Eliminar Imagen" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "¿Eliminar pod $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Borrar imágenes seleccionadas" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Borrar imágenes del sistema sin usar:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Borrar imágenes del usuario sin usar:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Eliminando un contenedor se borrará toda la información que hay en él." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "" +"Eliminando un contenedor en ejecución borrará toda la información que haya " +"en él." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Eliminando este pod eliminará los siguientes contenedores:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Detalles" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Tamaño en disco" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"El formato Docker es útil para compartir la imagen con Docker o Moby Engine" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Descargar" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Descargar nueva imagen" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "El pod $0, vacío, será eliminado permanentemente." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Punto de entrada" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Variables de entorno" + +#: src/util.js:26 +msgid "Error" +msgstr "Error" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Mensaje de error" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Hubo un error al conectar la consola" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Por ejemplo, Tu Nombre " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Por ejemplo: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Finalizado" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Comprobación de estado de salud fallada" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Fallo hacer el checkpoint del contenedor $0" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Fallo al limpiar el contenedor" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Falló hacer el commit en el contenedor $0" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Fallo al crear el contenedor $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Fallo al descargar la imagen $0:$1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Falló al forzar el borrado del contenedor $0" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Fallo al forzar el borrado de la imagen $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Fallo al reiniciar forzadamente el pod $0" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Fallo al detener forzadamente el pod $0" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Fallo al pausar el contenedor $0" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Fallo al pausar el pod $0" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Fallo al eliminar los contenedores no utilizados" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Fallo al eliminar las imágenes no usadas" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Fallo al obtener la imagen $0" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Falló al eliminar el contenedor $0" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Fallo al eliminar la imagen $0" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Fallo al renombrar el contenedor $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Falló al reiniciar el contenedor $0" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Fallo al reiniciar el pod $0" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Fallo al restaurar el contenedor $0" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Fallo al reanudar el contenedor $0" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Fallo al reanudar el pod $0" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Fallo al iniciar el contenedor $0" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Fallo al comprobar el estado de salud del contenedor $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Fallo al buscar imágenes." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Fallo al buscar las imágenes: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Falló al buscar nuevas imágenes" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Falló al iniciar el contenedor $0" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Fallo al iniciar el pod $0" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Falló al parar el contenedor $0" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Fallo al parar el pod $0" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Racha de fallos" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Forzar commit" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Forzar el borrado" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "¿Forzar la eliminación del pod $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Forzar el reinicio" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Forzar la parada" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Puerta de enlace" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Comprobación del estado de salud" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Ayuda sobre el intervalo de comprobación del estado de salud" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "" +"Ayuda sobre el número de reintentos de comprobación del estado de salud" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Ayuda sobre el periodo de arranque de comprobación del estado de salud" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Ayuda sobre el tiempo de espera de comprobación del estado de salud" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Ayuda sobre la acción al fallo al comprobar el estado de salud" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Buen estado de salud" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Ocultar imágenes" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Ocultar imágenes intermedias" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Historial" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Ruta del anfitrión" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Puerto del anfitrión" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Ayuda sobre el puerto del anfitrión" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "Dirección IP" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Ayuda sobre la dirección IP" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Idóneo para entornos de desarrollo" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Idóneo para ejecutar servicios" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Si la IP del host se asigna a 0.0.0.0 o no se asigna, el puerto se asociará " +"a todas las IP's del host." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Si no se asigna el puerto del host, el puerto del contenedor se asignará a " +"un puerto aleatorio del host." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ignorar la dirección IP si se ha configurado de forma estática" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ignorar la dirección MAC si se ha configurado de forma estática" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Imagen" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "El nombre de la imagen no es único" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Se requiere un nombre para la imagen" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Ayuda sobre la selección de imagen" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Imágenes" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Incrementar shares de CPU" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Incrementar el intervalo" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Incrementar el número máximo de reintentos" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Incrementar la cantidad de memoria" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Incrementar el número de reintentos" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Incrementar el periodo de arranque" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Incrementar el tiempo de espera" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Integración" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Intervalo" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Cada cuánto se ejecuta la comprobación del estado de salud." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Carácteres inválidos. El nombre sólo puede contener letras, números y " +"ciertos signos de puntuación (_ . -)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Mantener todos los archivos temporales de checkpoint" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Clave" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "La clave no debe estar vacía" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Últimas 5 comprobaciones" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Último checkpoint" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Seguir ejecutando tras escribir el checkpoint en disco" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Cargando detalles..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Cargando registros..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Cargando..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Local" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Imágenes locales" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Registros" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "Dirección MAC" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Número máximo de reintentos" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Memoria" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Límite de memoria" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Unidad de medida de memoria" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Modo" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Existen múltiples etiquetas para esta imagen. Seleccione las imágenes " +"etiquetadas a eliminar." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "Debe ser una dirección IP válida" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Nombre" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "Nombre ya en uso" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Nuevo nombre del contenedor" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Nombre de la nueva imagen" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "No" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Ninguna acción" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "No hay contenedores" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "No hay contenedores que utilicen esta imagen" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "No hay contenedores en este pod" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "No hay contenedores relacionados con los criterios de búsqueda" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "No se han especificado variables de entorno" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "No hay imágenes" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "No se han encontrado imágenes" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "No hay imágenes relacionadas con el criterio de búsqueda" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Sin etiqueta" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "No hay puertos expuestos" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "No hay resultados para $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "No hay contenedores ejecutándose" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "No se han especificado volúmenes" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "En caso de fallo" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Sólo los que se están ejecutando" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Opciones" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Propietario" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Ayuda sobre el propietario" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Comprobación de estado de salud superada" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Pegue una o más líneas de pares clave=valor en cualquier campo para importar " +"en masa" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Pausar" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Pausar el contenedor cuando se cree la imagen" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Pausado" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Fallo al crear el pod" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Nombre del pod" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Contenedores de Docker" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "El servicio Docker no está activo" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Mapeo de puertos" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Puertos" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Se pueden mapear puertos inferiores a 1024" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Privado" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protocolo" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Eliminar" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Eliminar contenedores no utilizados" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Eliminar imágenes no utilizadas" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Eliminando contenedores" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Eliminando imágenes no utilizadas" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Obtener la última imagen" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Obteniendo" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Acceso de sólo lectura" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Acceso de lectura y escritura" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Eliminar elemento" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Elimina los contenedores seleccionados que no se están ejecutando" + +#: src/util.js:23 +msgid "Removing" +msgstr "Eliminándose" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Renombrar" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Renombrar el contenedor $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Se pueden establecer límites sobre los recursos" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Reiniciar" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Política de reinicio" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Ayuda sobre la política de reinicio" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Política de reinicio a seguir cuando se cierren contenedores." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Política de reinicio a seguir cuando los contenedores finalicen. Utilizar " +"linger para iniciar contenedores automáticamente puede no funcionar bajo " +"ciertas circunstancias, como cuando se emplean ecryptfs, systemd-homed, NFS " +"o 2FA en una cuenta de usuario." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Restaurar" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Restaurar el contenedor $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Restaurar con las conexiones TCP establecidas" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Restringido por los permisos de la cuenta de usuario" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Reanudar" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Número de reintentos" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Pruebe con otro término." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Ejecutar comprobación de estado de salud" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Ejecutándose" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Buscar por nombre o descripción" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Buscar por registro" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Buscar" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Buscar una imagen" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Buscar cadena o ubicación de contenedor" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Buscando…" + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Buscando: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Compartido" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Mostrar" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Mostrar imágenes" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Mostrar imágenes intermedias" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Mostrar menos" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Mostrar más" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Tamaño" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Iniciar" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Periodo de arranque" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Iniciar docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Comience a escribir para buscar imágenes." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Comenzó" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Estado" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Estado" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Parar" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Detenido" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Habilitar la preservación de las conexiones TCP establecidas" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Sistema" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "El servicio de sistema Docker también está disponible" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Etiqueta" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Etiquetas" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "La interfaz de usuario de Cockpit para contenedores Docker." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "El tiempo de inicialización necesario para que un contenedor arranque." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"El máximo tiempo permitido para completar una comprobación de estado de " +"salud antes de que se considere fallada." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"El máximo número de reintentos permitidos antes de que se considere un mal " +"estado de salud." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Tiempo de espera" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Solución de errores" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Escriba para establecer un criterio de búsqueda…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "No se pudo cargar el historial de imágenes" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Mal estado de salud" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Levantado desde $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Usar el formato heredado Docker" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Usado por" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Usuario" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "El servicio de usuario Docker también está disponible" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Usuario:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Valor" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Volúmenes" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "En caso de mal estado de salud" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Con terminal" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Puede escribirse" + +#: src/manifest.json:0 +msgid "container" +msgstr "contenedor" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "descargando" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "host[:puerto]/[usuario]/contenedor[:etiqueta]" + +#: src/manifest.json:0 +msgid "image" +msgstr "imagen" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "en" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "intermedia" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "imagen intermedia" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "sin/aplicar" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "no disponible" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "Grupo de pod" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "puertos" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "segundos" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "sistema" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "sin utilizar" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "usuario:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "volúmenes" + +#~ msgid "Delete $0" +#~ msgstr "Eliminar $0" + +#~ msgid "select all" +#~ msgstr "seleccionar todas" + +#~ msgid "Failure action" +#~ msgstr "Acción al fallo" + +#~ msgid "Restarting" +#~ msgstr "Reiniciándose" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Confirme el borrado de $0" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Confirme el borrado del pod $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Confirme el borrado forzado del pod $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Confirme forzar el borrado de $0" + +#~ msgid "Container is currently running." +#~ msgstr "El contenedor se está ejecutando." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "No incluir cambios en el sistema de archivos raíz al exportar" + +#, fuzzy +#~| msgid "Get new image" +#~ msgid "Delete unused $0 images:" +#~ msgstr "Obtener nueva imagen" + +#, fuzzy +#~| msgid "Created" +#~ msgid "created" +#~ msgstr "Creado" + +#, fuzzy +#~| msgid "Exited" +#~ msgid "exited" +#~ msgstr "Cerrado" + +#, fuzzy +#~| msgid "Pause" +#~ msgid "paused" +#~ msgstr "Pausar" + +#, fuzzy +#~| msgid "user" +#~ msgid "user" +#~ msgstr "usuario" + +#, fuzzy +#~| msgid "Set container on build variables" +#~ msgid "Add on build variable" +#~ msgstr "Establecer el contenedor en las variables de construcción" + +#~ msgid "Commit image" +#~ msgstr "Commit una imagen" + +#~ msgid "Format" +#~ msgstr "Formato" + +#~ msgid "Message" +#~ msgstr "Mensaje" + +#~ msgid "Pause the container" +#~ msgstr "Pausar el contenedor" + +#, fuzzy +#~| msgid "Set container on build variables" +#~ msgid "Remove on build variable" +#~ msgstr "Establecer el contenedor en las variables de construcción" + +#~ msgid "Set container on build variables" +#~ msgstr "Establecer el contenedor en las variables de construcción" + +#, fuzzy +#~| msgid "Host port" +#~ msgid "Host port (optional)" +#~ msgstr "Puerto del anfitrión" + +#~ msgid "ReadOnly" +#~ msgstr "SoloLectura" + +#~ msgid "Run" +#~ msgstr "Ejecutar" + +#~ msgid "On build" +#~ msgstr "En construcción" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "¿Está seguro de que quiere eliminar esta imagen?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "No se pudo asociar a este contenedor: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "No se pudo abrir un canal: $0" + +#~ msgid "Everything" +#~ msgstr "Todo" + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "Esta versión de consola Web no soporta un terminal." diff --git a/ui/cockpit-docker/po/fi.po b/ui/cockpit-docker/po/fi.po new file mode 100644 index 0000000..996b600 --- /dev/null +++ b/ui/cockpit-docker/po/fi.po @@ -0,0 +1,1484 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2024-02-20 20:36+0000\n" +"Last-Translator: Jan Kuparinen \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"X-Generator: Weblate 5.4\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 kontti" +msgstr[1] "$0 konttia" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 levykuva yhteensä, $1" +msgstr[1] "$0 levykuvaa yhteensä, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 sekunti" +msgstr[1] "$0 sekuntia" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 käyttämätön levykuva, $1" +msgstr[1] "$0 käyttämätöntä levykuvaa, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "Toimenpiteet, kun kontti siirtyy epäterveelliseen tilaan." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Lisää porttiassosiaatio" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Lisää muuttuja" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Lisää taltio" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Kaikki" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Kaikki rekisterit" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Aina" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Tapahtui virhe" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Tekijä" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Käynnistä docker automaattisesti käynnistyksen yhteydessä" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "Suoritin" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "Ohjeita CPU-osuuksista" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "Suoritinosuus" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU-osuudet määrittävät käynnissä olevien konttien prioriteetin. " +"Oletusprioriteetti on 1024. Suurempi numero priorisoi tätä konttia. Pienempi " +"numero laskee prioriteettia." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Peru" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Tarkistetaan tilaa" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Tarkistuspiste" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Tarkistuspisteen ja palautuksen tuki" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Luo tarkistuspiste kontista $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Napsauta nähdäksesi julkaistut portit" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Napsauta nähdäksesi taltiot" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Cockpit-komponentti Docker-konteille" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Komento" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Kommentit" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Kommitoi" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Kommitoi kontti" + +#: src/util.js:23 +msgid "Configured" +msgstr "Asetukset asetettu" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konsoli" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Kontti" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Kontin luonti epäonnistui" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Kontin käynnistys epäonnistui" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Kontti ei ole käynnissä" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Kontin nimi" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Kontin nimi vaaditaan." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Kontin polku" + +#: src/Volume.jsx:23 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container path must not be empty" +msgstr "Kontin luonti epäonnistui" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Kontin portti" + +#: src/PublishPort.jsx:37 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container port must not be empty" +msgstr "Kontin luonti epäonnistui" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Kontit" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Luo" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Luo uusi levykuva $0-kontin nykyisen tilan perusteella." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Luo ja suorita" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Luo kontti" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Luo kontti kohteeseen $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Luo kontti podiin" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Luo podi" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Luotu" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Tekijä" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Vähennä suoritinosuuksia" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Pienennä väliä" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Pienennä uudelleenyritysten enimmäismäärää" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Vähennä muistia" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Vähennä uudelleenyrityksiä" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Pienennä aloitusaikaa" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Pienennä aikakatkaisua" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Poista" + +#: src/ImageDeleteModal.jsx:92 +#, fuzzy +#| msgid "Delete $0?" +msgid "Delete $0 image?" +msgstr "Poista $0?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "Poista $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "Poista levykuva" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Poista podi $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Poista merkityt kuvat" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Poista käyttämättömät järjestelmälevykuvat:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Poista käyttämättömät käyttäjän levykuvat:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Kontin poistaminen tuhoaa kaiken sillä olevan datan." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "Käynnissä olevan kontin poistaminen tuhoaa kaiken sillä olevan datan." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Tämän podin poisto poistaa seuraavat kontit:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Yksityiskohdat" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Levytila" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Docker-muoto on hyödyllinen, kun levykuvaa jaetaan Dockerin tai Moby Enginen " +"kanssa" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Lataa" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Lataa uusi levykuva" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Tyhjä podi $0 poistetaan pysyvästi." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Sisääntulokohta" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Ympäristömuuttujat" + +#: src/util.js:26 +msgid "Error" +msgstr "Virhe" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Virheviesti" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Virhe konsolia liitettäessä" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Esimerkki: Nimesi " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Esimerkki: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Päättyi" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Epäonnistunut eheysajo" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Kontin $0 tarkistuspisteen luominen epäonnistui" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Kontin poistaminen epäonnistui" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Kontin $0 kommitointi epäonnistui" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Kontin $0 luominen epäonnistui" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Levykuvan lataaminen epäonnistui $0:$1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Kontin $0 pakotettu poistaminen epäonnistui" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Levykuvan $0 pakotettu poistaminen epäonnistui" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Podin $0 pakotettu uudelleenkäynnistäminen epäonnistui" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Podin $0 pakotettu pysäyttäminen epäonnistui" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Kontin $0 keskeyttäminen epäonnistui" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Podin $0 keskeyttäminen epäonnistui" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Käyttämättömien konttien poisto epäonnistui" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Käyttämättömien levykuvien karsiminen epäonnistui" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Levykuvan $0 hakeminen epäonnistui" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Kontin $0 poistaminen epäonnistui" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Levykuvan $0 poistaminen epäonnistui" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Kontin $0 uudelleennimeäminen epäonnistui" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Kontin $0 uudelleenkäynnistäminen epäonnistui" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Podin $0 uudelleenkäynnistäminen epäonnistui" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Kontin $0 palauttaminen epäonnistui" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Kontin $0 palauttaminen epäonnistui" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Podin $0 käytön jatkaminen epäonnistui" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Kontin $0 suorittaminen epäonnistui" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Kontin $0 eheystarkastus epäonnistui" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Levykuvien etsintä epäonnistui." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Levykuvien etsintä epäonnistui: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Uusien levykuvien etsintä epäonnistui" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Kontin $0 käynnistäminen epäonnistui" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Podin $0 käynnistäminen epäonnistui" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Kontin $0 pysäyttäminen epäonnistui" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Podin $0 pysäyttäminen epäonnistui" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Epäonnistunut sarja" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Pakota kommitti" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Pakota poisto" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Pakota podin $0 poisto?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Pakota uudelleenkäynnistys" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Pakota pysäytys" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "Gt" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Yhdyskäytävä" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Eheystarkistus" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Tietoa eheystarkistuksen aikavälistä" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Tietoa eheystarkistuksen uudelleenyrityksistä" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Tietoa eheystarkistuksen aloitusjaksosta" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Tietoa eheystarkistuksen aikakatkaisusta" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Tietoa terveystarkistuksen virhetilan toimenpiteistä" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Ehjä" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Piilota levykuvat" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Piilota välivaiheen levykuvat" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Historia" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Koneen polku" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Koneen portti" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Ohjeita koneen portista" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "TUNNISTE" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP-osoite" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Ohjeita IP-osoitteesta" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Ihanteellinen kehittämiseen" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Ihanteellinen palvelujen suorittamiseen" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Jos isäntäkoneen IP-osoitteeksi on asetettu 0.0.0.0 tai sitä ei ole " +"määritetty lainkaan, portti sidotaan kaikkiin isäntäkoneen IP-osoitteisiin." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Jos isäntäporttia ei ole asetettu, konttiportille määritetään satunnainen " +"isäntäportti." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ohita IP-osoite, jos se on asetettu staattisesti" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ohita MAC-osoite, jos se on asetettu staattisesti" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Levykuva" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Kevykuvan nimi ei ole ainutlaatuinen" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Levykuvan nimi vaaditaan" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Ohjeita levykuvan valintaan" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Levykuvat" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Lisää suoritinosuuksia" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Suurenna väliä" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Lisää uudelleenyritysten enimmäismäärää" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Lisää muistia" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Lisää uudelleenyrityksiä" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Pidennä aloitusjaksoa" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Nosta aikakatkaisua" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Integraatio" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Aikaväli" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Eheystarkistusten aikaväli." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Virheellisiä merkkejä. Nimi voi sisältää vain kirjaimia, numeroita ja " +"tiettyjä välimerkkejä (_ . -)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "Kt" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Säilytä kaikki väliaikaiset tarkistuspistetiedostot" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Avain" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "Avain ei saa olla tyhjä" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Viimeiset 5 ajoa" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Viimeisin tarkistuspiste" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Jätä käyntiin tarkistuspisteen levylle kirjoittamisen jälkeen" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Ladataan tietoja..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Ladataan lokeja..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Ladataan..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Paikallinen" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Paikallisia levykuvia" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Lokit" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC-osoite" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "Mt" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Uudelleenyritysten enimmäismäärä" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Muisti" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Muistiraja" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Muistiyksikkö" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Tila" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Tälle levykuvalle on useita tunnisteita. Valitse tunnisteelliset levykuvat " +"jotka poistetaan." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Nimi" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "Nimi on jo käytössä" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Kontin uusi nimi" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Uusi levykuvan nimi" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Ei" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Ei toimintoa" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Ei kontteja" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Yksikään kontti ei käytä tätä levykuvaa" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "Tässä podissa ei ole kontteja" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Ei nykyistä suodatusta vastaavia kontteja" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Ympäristömuuttujia ei ole määritetty" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Ei levykuvia" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Levykuvia ei löytynyt" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Ei nykyistä suodatusta vastaavia levykuvia" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Ei nimiötä" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Ei paljastettuja portteja" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Ei tuloksia hakusanalle $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Ei käynnissä olevia kontteja" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Taltiota ei ole määritelty" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Epäonnistumisesta" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Vain käynnissä olevat" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Valinnat" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "omistaja" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Omistajan ohjeet" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Onnistunut eheysajo" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Liitä yksi tai useampi rivi avain=arvo-pareja mihin tahansa kenttään " +"joukkotuontia varten" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Keskeytä" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Pysäytä kontti levykuvan luomisen ajaksi" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Keskeytetty" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Podin luonti epäonnistui" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Podin nimi" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker-kontit" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker-palvelu ei ole aktiivinen" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Porttiassosiaatio" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Portit" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Portit alle 1024 voidaan kartoittaa" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Yksityinen" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokolla" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Karsi" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Poista käyttämättömiä kontteja" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Karsi käyttämättömät levykuvat" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Siivotaan kontteja" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Karsitaan levykuvia" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Hae viimeisin levykuva" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Haetaan" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Vain luku-käyttöoikeus" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Luku-kirjoitusoikeus" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Poista kohde" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Poistaa valitut ei käynnissä olevat kontit" + +#: src/util.js:23 +msgid "Removing" +msgstr "Poistetaan" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Nimeä uudelleen" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Nimeä kontti $0 uudelleen" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Resurssirajoja voidaan asettaa" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Käynnistä uudelleen" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Uudelleenkäynnistyksen käytäntö" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Ohjeita uudelleenkäynnistyksen käytännöstä" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Noudata uudelleenkäynnistyskäytäntöä, kun kontit poistuvat." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Käytettävä uudelleenkäynnistyskäytäntö, kun kontit poistuvat. Viivyttämisen " +"käyttäminen konttien automaattiseen käynnistykseen ei välttämättä toimi " +"joissain olosuhteissa, kuten kun käyttäjätilillä on käytössä ecryptfs, " +"systemd-homed, NFS tai 2FA." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Palauta" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Palauta kontti $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Palauta käyttäen luotuja TCP-yhteyksiä" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Rajoitettu käyttäjätilin käyttöoikeuksilla" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Jatka" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Uudelleenyritykset" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Yritä toisella termillä uudelleen." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Aja eheystarkistus" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Käynnissä" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Hae nimen tai kuvauksen perusteella" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Haku rekisterin perusteella" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Etsittävä" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Etsi levykuvaa" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Hae merkkijonon tai kontin sijaintia" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Etsitään..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Etsitään: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Jaettu" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Näytä" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Näytä levykuvat" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Näytä välivaiheen levykuvat" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Näytä vähemmän" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Näytä lisää" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Koko" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Käynnistä" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Aloitusjakso" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Käynnistä docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Aloita kirjoittaminen etsiäksesi levykuvia." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Käynnistetty klo" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Tila" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Tila" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Pysäytä" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Pysäytetty" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Tue jo luotujen TCP -yhteyksien säilyttämistä" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Järjestelmä" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Järjestelmän Docker-palvelu on myös saatavilla" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Tunniste" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Tunnisteet" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Cockpit-käyttöliittymä Docker-konteille." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Alustusaika, joka tarvitaan kontin käynnistymiseen." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Enimmäisaika, joka on sallittu eheystarkastuksen suorittamiseen ennen kuin " +"se katsotaan epäonnistuneeksi." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Yritysten enimmäismäärä, joka on sallittu eheystarkastuksen suorittamiseen " +"ennen kuin se katsotaan epäonnistuneeksi." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Aikakatkaisu" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Vianetsintä" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Kirjoita suodattaaksesi…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Levykuvan historian lataaminen epäonnistui" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Rikki" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Käynnissä $0 lähtien" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Käytä vanhaa Docker-muotoa" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Käyttää" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Käyttäjä" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Käyttäjän Docker-palvelu on myös saatavilla" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Käyttäjä:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Arvo" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Taltiot" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "Kun rikki" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Päätteen kanssa" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Kirjoitettavissa" + +#: src/manifest.json:0 +msgid "container" +msgstr "kontti" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "ladataan" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "host[:port]/[user]/container[:tag]" + +#: src/manifest.json:0 +msgid "image" +msgstr "levykuva" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "sijainnissa" + +#: src/ImageDeleteModal.jsx:79 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate" +msgstr "Piilota välivaiheen levykuvat" + +#: src/ImageDeleteModal.jsx:59 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate image" +msgstr "Piilota välivaiheen levykuvat" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "ei sovellu" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "ei käytettävissä" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "podiryhmä" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "portit" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "sekuntia" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "järjestelmä" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "ei käytössä" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "käyttäjä:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "taltiot" + +#~ msgid "Delete $0" +#~ msgstr "Poista $0" + +#~ msgid "select all" +#~ msgstr "valitse kaikki" + +#~ msgid "Failure action" +#~ msgstr "virhetilan toimenpiteet" + +#~ msgid "Restarting" +#~ msgstr "Käynnistyy uudelleen" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Vahvista kohteen $0 poistaminen" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Vahvista podin $0 poistaminen" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Vahvista podin $0 pakotettu poistaminen" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Vahvista kohteen $0 pakotettu poistaminen" + +#~ msgid "Container is currently running." +#~ msgstr "Kontti on parhaillaan käynnissä." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Älä sisällytä juuritiedostojärjestelmän muutoksia vientiä varten" + +#~ msgid "Default with single selectable" +#~ msgstr "Oletusarvo kun yksi valittavissa" + +#~ msgid "Start after creation" +#~ msgstr "Käynnistä luomisen jälkeen" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "Poista käyttämättömät $0 levykuvat:" + +#~ msgid "created" +#~ msgstr "luotu" + +#~ msgid "exited" +#~ msgstr "päättyi" + +#~ msgid "paused" +#~ msgstr "pysäytetty" + +#~ msgid "running" +#~ msgstr "suoritetaan" + +#~ msgid "stopped" +#~ msgstr "pysäytetty" + +#~ msgid "user" +#~ msgstr "käyttäjä" + +#~ msgid "Add on build variable" +#~ msgstr "Lisää koontimuuttuja" + +#~ msgid "Commit image" +#~ msgstr "Commit-levykuva" + +#~ msgid "Format" +#~ msgstr "Alusta" + +#~ msgid "Message" +#~ msgstr "Viesti" + +#~ msgid "Pause the container" +#~ msgstr "Keskeytä kontin ajo" + +#~ msgid "Remove on build variable" +#~ msgstr "Poista koontimuuttujalla" + +#~ msgid "Set container on build variables" +#~ msgstr "Aseta kontti koontimuuttujiin" + +#~ msgid "Add item" +#~ msgstr "Lisää kohta" + +#~ msgid "Host port (optional)" +#~ msgstr "Koneen portti (valinnainen)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (valinnainen)" + +#~ msgid "ReadOnly" +#~ msgstr "Vain-luku" + +#~ msgid "IP prefix length" +#~ msgstr "IP Prefix Pituus" + +#~ msgid "Run" +#~ msgstr "Suorita" diff --git a/ui/cockpit-docker/po/fr.po b/ui/cockpit-docker/po/fr.po new file mode 100644 index 0000000..cce1d6e --- /dev/null +++ b/ui/cockpit-docker/po/fr.po @@ -0,0 +1,1529 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Julien Humbert , 2020. +# Timothée Ravier , 2020. +# Sébastien Pascal-Poher , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-05-30 13:20+0000\n" +"Last-Translator: Ludek Janda \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1\n" +"X-Generator: Weblate 4.17\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 conteneur" +msgstr[1] "$0 conteneurs" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 image total, $1" +msgstr[1] "$0 images total, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 seconde" +msgstr[1] "$0 secondes" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 image non utilisée, $1" +msgstr[1] "$0 images non utilisées, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "Action à entreprendre lorsque le conteneur passe à un état insalubre." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Ajouter un mappage de port" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Ajouter une variable" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Ajouter volume" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Tous" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Tous les registres" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Toujours" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Une erreur s’est produite" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Auteur" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Démarrer automatiquement docker au démarrage" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "Assistance CPU Shares" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "Parts de CPU" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU Shares déterminent la priorité des conteneurs en cours d'exécution. La " +"priorité par défaut est de 1024. Un nombre plus élevé donne la priorité à ce " +"conteneur. Un nombre inférieur diminue la priorité." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Annuler" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Contrôle de fonctionnement" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Point de contrôle" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Prise en charge des points de contrôle et des restaurations" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Point de contrôle du conteneur $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Cliquez pour voir les ports publiés" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Cliquez pour voir les volumes" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Composant Cockpit pour les conteneurs Docker" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Commande" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Commentaires" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Valider" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Valider conteneur" + +#: src/util.js:23 +msgid "Configured" +msgstr "Configuré" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Console" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Conteneur" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Le conteneur n’a pas pu être créé" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Le conteneur n’a pas pu être démarré" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Le conteneur n’est pas en cours d’exécution" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Nom du conteneur" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Le nom du conteneur est obligatoire." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Chemin du conteneur" + +#: src/Volume.jsx:23 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container path must not be empty" +msgstr "Le conteneur n’a pas pu être créé" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Port du conteneur" + +#: src/PublishPort.jsx:37 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container port must not be empty" +msgstr "Le conteneur n’a pas pu être créé" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Conteneurs" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Créer" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Créer une nouvelle image basée sur l'état actuel du conteneur $0." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Créer et démarrer" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Créer un conteneur" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Créer un conteneur dans $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Créer un conteneur dans un pod" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Créer un pod" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Créé" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Créé par" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Diminution des parts de CPU" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Diminution de l'intervalle" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Diminuer le nombre maximum de tentatives" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Diminution de la mémoire" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Diminuer les tentatives" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Diminution de la période de démarrage" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Diminuer le délai d'attente" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Supprimer" + +#: src/ImageDeleteModal.jsx:92 +#, fuzzy +#| msgid "Delete $0?" +msgid "Delete $0 image?" +msgstr "Supprimer $0 ?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "Supprimer $0 ?" + +#: src/ImageDeleteModal.jsx:96 +#, fuzzy +#| msgid "Delete tagged images" +msgid "Delete image" +msgstr "Supprimer les images taguées" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Supprimer le pod $0 ?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Supprimer les images taguées" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Supprimer les images système non utilisées :" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Supprimer les images utilisateur non utilisées :" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Supprimer un conteneur va effacer toutes les données qu’il contient." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "" +"La suppression d'un conteneur en cours d'exécution efface toutes les données " +"qu'il contient." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "La suppression de ce pod entraînera celle des conteneurs suivants :" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Détails" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Espace disque" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Le format Docker est utile pour partager l'image avec Docker ou Moby Engine" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Télécharger" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Télécharger la nouvelle image" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Le pod vide $0 sera définitivement supprimé." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Point d’entrée" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Variables d’environnement" + +#: src/util.js:26 +msgid "Error" +msgstr "Erreur" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Message d’erreur" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Une erreur s’est produite lors de la connexion à la console" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Exemple, votre nom " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Exemple : $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Quittés" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Échec de l’exécution du bilan de fonctionnement" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Échec de la création du point de contrôle du conteneur $0" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Échec du nettoyage du conteneur" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Échec de la validation du conteneur $0" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Échec de la création du conteneur $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Échec du téléchargement de l’image $0 : $1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Échec de la suppression forcée du conteneur $0" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Échec de la suppression forcée de l’image $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Échec du redémarrage forcé du pod $0" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Échec de l'arrêt forcé du pod $0" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Échec de la mise en pause du conteneur $0" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Échec de la mise en pause du pod $0" + +#: src/PruneUnusedContainersModal.jsx:57 +#, fuzzy +#| msgid "Failed to prune unused images" +msgid "Failed to prune unused containers" +msgstr "Échec de la suppression des images non utilisées" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Échec de la suppression des images non utilisées" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Échec d’extraction de l’image $0" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Échec de la suppression du conteneur $0" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Échec de la suppression de l’image $0" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Échec du renommage du conteneur $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Échec du redémarrage du conteneur $0" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Échec du redémarrage du pod $0" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Échec de la restauration du conteneur $0" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Échec de la reprise conteneur $0" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Échec de la reprise pod $0" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Échec du démarrage du conteneur $0" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Échec de l'exécution du contrôle de fonctionnement du conteneur $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Échec de la recherche d'images." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Échec de la recherche de l'image : $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Échec de la recherche de nouvelles images" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Échec du démarrage du conteneur $0" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Échec du démarrage du pod $0" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Échec de l’arrêt du conteneur $0" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Échec de l’arrêt du pod $0" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Une série d'échecs" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Validation forcée" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Suppression forcée" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Forcer la suppression du pod $0 ?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Redémarrage forcé" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Arrêt forcé" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "Go" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Passerelle" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Bilan de fonctionnement" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Aide à l'intervalle entre les bilans de fonctionnement" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Aide pour les tentatives de bilans de fonctionnement" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Aide pour la période de démarrage du bilan de fonctionnement" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Aide sur le délai d'exécution du bilan de fonctionnement" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Aide à l’action pour les bilans de fonctionnement" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Fonctions intactes" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Cacher les images" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Cacher les images intermédiaires" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Historique" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Chemin vers l’hôte" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Port de l’hôte" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Assistance Port d’hôte" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "Adresse IP" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Assistance Adresse IP" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Idéal pour le développement" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Idéal pour le fonctionnement des services" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Si l’IP de l’hôte est définie ainsi 0.0.0.0 ou si elle n’est pas dutout " +"définie, le port sera relié à tous les IP de l’hôte." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Si le port de l’hôte n’est pas défini, le port du conteneur sera assigné au " +"hasard sur l’hôte." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ignorer l'adresse IP si définie statiquement" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ignorer l'adresse MAC si définie statiquement" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Image" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Le nom de l'image n'est pas unique" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Le nom de l'image est obligatoire" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Aide à la sélection d'images" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Images" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Augmenter les parts de CPU" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Augmenter l'intervalle" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Augmenter le nombre maximum de tentatives" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Augmenter la mémoire" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Augmenter les tentatives" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Augmenter la période de démarrage" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Augmenter le délai d'attente" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Intégration" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Intervalle" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Intervalle à partir duquel le contrôle de fonctionnement est exécuté." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Caractères non valides. Le nom ne peut contenir que des lettres, des " +"chiffres et certains signes de ponctuation (_ . -)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "Ko" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Conserver tous les fichiers de points de contrôle temporaires" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Clé" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Les 5 dernières exécutions" + +#: src/ContainerDetails.jsx:71 +#, fuzzy +#| msgid "Checkpoint" +msgid "Latest checkpoint" +msgstr "Point de contrôle" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Conserver actif après la création du point de contrôle sur le disque" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Chargement des détails..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Chargement des logs..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Chargement..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Local" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Aucune image" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Journaux" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "Adresse MAC" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "Mo" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Nombre max de nouvellles tentatives" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Mémoire" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Limite mémoire" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Unité de mémoire" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Mode" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Plusieurs tags existent pour cette image. Sélectionnez les images marquées à " +"supprimer." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Nom" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Nouveau nom du conteneur" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Nom de la nouvelle image" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Non" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Pas d'action" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Aucun conteneur" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Aucun conteneur n’utilise cette image" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "Aucun conteneur dans ce pod" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Aucun conteneur ne correspond au filtre actuel" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Aucune variables d’environnement spécifiée" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Aucune image" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Aucune image trouvée" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Aucune image ne correspond au filtre actuel" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Pas de label" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Aucuns ports exposés" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Aucun résultat pour $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Aucun conteneur en cours d’exécution" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Aucuns volumes spécifiés" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "En cas d’échec" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "En cours d’exécution seulement" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Options" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Propriétaire" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Aide au propriétaire" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Bilan de fonctionnement réussi" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Collez une ou plusieurs lignes de paires clé=valeur dans n'importe quel " +"champ pour une importation en masse" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Pause" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Mettre le conteneur en pause lors de la création de l’image" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "En pause" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Échec de la création du pod" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Nom du pod" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Conteneurs Docker" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Le service Docker n’est pas actif" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Mappage de port" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Ports" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Les ports inférieurs à 1024 peuvent être mappés" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Privé" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protocole" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Suppression de certaines images" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +#, fuzzy +#| msgid "Prune unused images" +msgid "Prune unused containers" +msgstr "Suppression d’images non utilisées" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Suppression d’images non utilisées" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +#, fuzzy +#| msgid "No running containers" +msgid "Pruning containers" +msgstr "Aucun conteneur en cours d’exécution" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Suppression de certaines images" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Extraire la dernière image" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Extraction" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Accès en lecture seule" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Accès en lecture-écriture" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Supprimer l'élément" + +#: src/PruneUnusedContainersModal.jsx:99 +#, fuzzy +#| msgid "Images and running containers" +msgid "Removes selected non-running containers" +msgstr "Images et conteneurs en cours d’exécution" + +#: src/util.js:23 +msgid "Removing" +msgstr "En cours de suppression" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Renommer" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Renommer le conteneur $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Des limites de ressources peuvent être fixées" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Redémarrer" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Redémarrer la stratégie" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Assistance pour la politique de redémarrage" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Politique de redémarrage à suivre lors de la sortie des conteneurs." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Politique de redémarrage à suivre lorsque les conteneurs se terminent. " +"L'utilisation de linger pour le démarrage automatique des conteneurs peut ne " +"pas fonctionner dans certaines circonstances, comme lorsque ecryptfs, " +"systemd-homed, NFS ou 2FA sont utilisés sur un compte utilisateur." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Restaurer" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Restaurer le conteneur $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Restaurer avec les connexions TCP établies" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Limité par les autorisations du compte de l'utilisateur" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Reprendre" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Tentatives" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Nouvelle tentative sur autre term." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Exécuter le bilan de fonctionnement" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "En fonctionnement" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Rechercher par nom ou description" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Recherche par registre" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Rechercher" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Chercher une image" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Chaîne de recherche ou emplacement du conteneur" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Recherche en cours..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Recherche en cours : $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Partagé" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Afficher" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Afficher les images" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Afficher les images intermédiaires" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Afficher moins de détails" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Montrer plus" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Taille" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Démarrer" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Période de démarrage" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Démarrer docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Commencez à saisir les données pour rechercher des images." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Commencé à" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "État" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Statut" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Arrêter" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Arrêté" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Prendre en charge le maintien des connexions TCP établies" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Système" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Le service Docker est également disponible" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Tag" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Étiquettes" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "L’interface utilisateur Cockpit pour les conteneur Docker." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Le temps d'initialisation nécessaire à l'amorçage d'un conteneur." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Le temps maximum autorisé pour compléter le contrôle de fonctionnement avant " +"qu'un intervalle soit considéré comme ayant échoué." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Le nombre de tentatives autorisées avant qu'un contrôle de fonctionnement ne " +"soit considéré non acceptable." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Délai d'attente" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Dépannage" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Entrez pour filtrer…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Impossible de charger l'historique des images" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Non acceptable" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "En cours d’exécution depuis $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Utiliser l'ancien format Docker" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Utilisé par" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Utilisateur" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Le service utilisateur Docker est également disponible" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Utilisateur :" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Valeur" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Volumes" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "En cas d'insalubrité" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Avec le terminal" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Accessible en écriture" + +#: src/manifest.json:0 +msgid "container" +msgstr "conteneur" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "En cours de téléchargement" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "host[:port]/[user]/container[:tag]" + +#: src/manifest.json:0 +msgid "image" +msgstr "image" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "dans" + +#: src/ImageDeleteModal.jsx:79 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate" +msgstr "Cacher les images intermédiaires" + +#: src/ImageDeleteModal.jsx:59 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate image" +msgstr "Cacher les images intermédiaires" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "n. d." + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "non disponible" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "groupe pod" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "ports" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "secondes" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "système" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "non utilisé" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "utilisateur :" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "volumes" + +#~ msgid "Delete $0" +#~ msgstr "Supprimer $0" + +#~ msgid "select all" +#~ msgstr "tout sélectionner" + +#~ msgid "Restarting" +#~ msgstr "Redémarrage" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Confirmer la suppression de $0" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Confirmer la suppression du pod $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Confirmer la suppression forcée du pod $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Confirmer la suppression forcée de $0" + +#~ msgid "Container is currently running." +#~ msgstr "Le conteneur est actuellement en cours d’exécution." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "" +#~ "Ne pas inclure les changements effectués sur la racine du système de " +#~ "fichier lors de l'export" + +#~ msgid "Default with single selectable" +#~ msgstr "Par défaut avec sélection simple" + +#~ msgid "Start after creation" +#~ msgstr "Démarrer après création" + +#, fuzzy +#~| msgid "Delete tagged images" +#~ msgid "Delete unused $0 images:" +#~ msgstr "Supprimer les images taguées" + +#~ msgid "created" +#~ msgstr "créé" + +#~ msgid "exited" +#~ msgstr "Quittés" + +#~ msgid "paused" +#~ msgstr "Mis en pause" + +#~ msgid "running" +#~ msgstr "en cours d'exécution" + +#~ msgid "stopped" +#~ msgstr "arrêté" + +#, fuzzy +#~| msgid "user:" +#~ msgid "user" +#~ msgstr "utilisateur :" + +#~ msgid "Add on build variable" +#~ msgstr "Ajouter une variable de build" + +#~ msgid "Commit image" +#~ msgstr "Valider image" + +#~ msgid "Format" +#~ msgstr "Format" + +#~ msgid "Message" +#~ msgstr "Message" + +#~ msgid "Pause the container" +#~ msgstr "Mettre le conteneur en pause" + +#~ msgid "Remove on build variable" +#~ msgstr "Supprimer la variable de construction" + +#~ msgid "Set container on build variables" +#~ msgstr "Définir le conteneur sur les variables de construction" + +#~ msgid "Add item" +#~ msgstr "Ajouter un élément" + +#~ msgid "Host port (optional)" +#~ msgstr "Port de l’hôte (optionnel)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (optionnel)" + +#~ msgid "ReadOnly" +#~ msgstr "LectureSeule" + +#~ msgid "IP prefix length" +#~ msgstr "Taille du préfixe IP" + +#~ msgid "Get new image" +#~ msgstr "Obtenir une nouvelle image" + +#~ msgid "Run" +#~ msgstr "Exécuter" + +#~ msgid "On build" +#~ msgstr "En construction" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Voulez-vous vraiment supprimer cette image ?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Impossible de s’attacher à ce conteneur : $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Impossible d’ouvrir le canal : $0" + +#~ msgid "Everything" +#~ msgstr "Tout" + +#~ msgid "Security" +#~ msgstr "Sécurité" + +#~ msgid "The scan from $time ($type) found no vulnerabilities." +#~ msgstr "L’analyse de $time ($type) n’a trouvé aucune vulnérabilité." + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "" +#~ "Cette version de la console web n’est compatible avec les terminaux." diff --git a/ui/cockpit-docker/po/ja.po b/ui/cockpit-docker/po/ja.po new file mode 100644 index 0000000..dd5e9ba --- /dev/null +++ b/ui/cockpit-docker/po/ja.po @@ -0,0 +1,1467 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2024-02-19 03:30+0000\n" +"Last-Translator: Mie Yamamoto \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"X-Generator: Weblate 5.4\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 コンテナー" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 イメージ合計、$1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 2 番目" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 の未使用イメージ、$1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 - 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "コンテナーが異常な状態に移行したときに実行するアクション。" + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "ポートマッピングの追加" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "変数の追加" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "ボリュームの追加" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "すべて" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "すべてのレジストリー" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "常時" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "エラーが発生しました" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "作成者" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "起動時に docker を自動的に起動する" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "CPU share のヘルプ" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU 共有" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU 共有は実行中のコンテナーの優先度を決定します。デフォルトの優先度は 1024 " +"です。数値が高いほど、このコンテナーの優先度が高くなります。数値が低いほど優" +"先度が低くなります。" + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "取り消し" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "ヘルスチェック" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "チェックポイント" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "チェックポイントおよび復元のサポート" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "チェックポイントコンテナー $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "クリックして公開されたポートを表示します" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "クリックしてボリュームを表示します" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Docker コンテナーの Cockpit コンポーネント" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "コマンド" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "コメント" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "コミット" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "コンテナーのコミット" + +#: src/util.js:23 +msgid "Configured" +msgstr "設定済み" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "コンソール" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "コンテナー" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "コンテナーの作成に失敗しました" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "コンテナーの開始に失敗しました" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "コンテナーが実行されていません" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "コンテナー名" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "コンテナー名が必要です。" + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "コンテナーパス" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "コンテナーパスは空欄にできません" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "コンテナーポート" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "コンテナーポートは空欄にできません" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "コンテナー" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "作成" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "$0 コンテナーの現在の状態に基づいて、新しいイメージを作成します。" + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "作成して実行する" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "コンテナーの作成" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "$0 でのコンテナーの作成" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Pod でのコンテナーの作成" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Pod の作成" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "作成済み" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "作成元" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "CPU 共有を減らす" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "間隔を縮小する" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "最大再試行回数を減らす" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "メモリーを減らす" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "再試行回数を減らす" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "開始期間を縮小する" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "タイムアウトを縮小する" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "削除" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "$0 イメージを削除しますか?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "$0 を削除しますか?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "イメージの削除" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Pod $0 を削除しますか?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "タグ付けされたイメージの削除" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "使用されていないシステムイメージの削除:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "使用されていないユーザーイメージの削除:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "コンテナーを削除すると、コンテナー内のすべてのデータが削除されます。" + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "実行中のコンテナーを削除すると、その中のすべてのデータが削除されます。" + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "この Pod を削除すると、以下のコンテナーが削除されます:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "詳細" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "ディスクの空き容量" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Dockerフォーマットは、イメージをDockerまたはMoby Engineで共有する時に便利です" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "ダウンロード" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "新規イメージのダウンロード" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "空の Pod $0 は完全に削除されます。" + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "エントリーポイント" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "環境変数" + +#: src/util.js:26 +msgid "Error" +msgstr "エラー" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "エラーメッセージ" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "コンソールへの接続中にエラーが発生しました" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "例: 名前 " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "例: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "終了" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "失敗したヘルスの実行" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "コンテナー $0 のチェックポイントに失敗しました" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "コンテナーのクリーンアップに失敗しました" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "コンテナー $0 のコミットに失敗しました" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "コンテナー $0 の作成に失敗しました" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "イメージ $0 のダウンロードに失敗しました: $1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "コンテナー $0 を強制的に削除できませんでした" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "イメージ $0 の強制削除に失敗しました" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Pod $0 の強制再起動に失敗しました" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Pod $0 の強制停止に失敗しました" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "コンテナー $0 の一時停止に失敗しました" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Pod $0 の一時停止に失敗しました" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "使用されていないイメージの prune に失敗しました" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "使用されていないイメージのpruneに失敗しました" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "イメージ $0 のpullに失敗しました" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "コンテナー $0 の削除に失敗しました" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "イメージ $0 の削除に失敗しました" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "コンテナーの名前変更に失敗しました $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "コンテナー $0 の再起動に失敗しました" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Pod $0 の再起動に失敗しました" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "コンテナー $0 の復元に失敗しました" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "コンテナー $0 のレジュームに失敗しました" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Pod $0 の再開に失敗しました" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "コンテナー $0 の実行に失敗しました" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "コンテナーでのヘルスチェックの実行に失敗しました $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "イメージの検索に失敗しました。" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "イメージの検索に失敗しました: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "新規イメージの検索に失敗しました" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "コンテナー $0 の起動に失敗しました" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Pod $0 の起動に失敗しました" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "コンテナー $0 の停止に失敗しました" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Pod $0 の停止に失敗しました" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "失敗の連続" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "強制コミット" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "削除の強制" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Pod $0 を強制的に削除しますか?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "再起動の強制" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "停止の強制" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "ゲートウェイ" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "ヘルスチェック" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "ヘルスチェックの間隔のヘルプ" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "ヘルスチェックの再試行のヘルプ" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "ヘルスチェックの開始期間のヘルプ" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "ヘルスチェックのタイムアウトのヘルプ" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "ヘルスチェック失敗時のアクションのヘルプ" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "健全" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "イメージを非表示" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "中間イメージを非表示" + +#: src/Images.jsx:158 +msgid "History" +msgstr "履歴" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "ホストパス" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "ホストポート" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "ホストポートヘルプ" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP アドレス" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "IP アドレスヘルプ" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "開発に最適" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "実行中のサービスに最適" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"ホスト IP を 0.0.0.0 に設定した場合、またはまったく設定しなかった場合、ポート" +"はホスト上のすべての IP にバインドされます。" + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"ホストポートが設定されていない場合、コンテナーポートにはホストのポートがラン" +"ダムに割り当てられます。" + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "静的に設定された場合は IP アドレスを無視" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "静的に設定された場合は MAC アドレスを無視" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "イメージ" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "イメージ名は一意ではありません" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "イメージ名が必要です" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "イメージ選択のヘルプ" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "イメージ" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "CPU 共有を増やす" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "間隔を増やす" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "最大再試行回数を増やす" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "メモリーを増やす" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "再試行を増やす" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "開始期間を拡大する" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "タイムアウトを拡大する" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "インテグレーション" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "間隔" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "ヘルスチェックの実行頻度 (間隔)。" + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"無効な文字です。名前には文字、数字、および特定の句読点 (_ . -) のみを使用でき" +"ます。" + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "すべての一時的なチェックポイントファイルを維持" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "キー" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "キーは空欄にできません" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "過去 5 回の実行" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "最終チェックポイント" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "チェックポイントをディスクに書き込む後もそのまま実行したままにする" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "詳細をロード中..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "ログをロード中..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "ロード中..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "ローカル" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "ローカルのイメージ" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "ログ" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC アドレス" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "最大施行数" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "メモリ" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "メモリー制限" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "メモリーユニット" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "モード" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"このイメージには、複数のタグが存在します。削除するタグ付けされたイメージを選" +"択します。" + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "有効な IP アドレスにしてください" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "名前" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "名前はすでに使用中です" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "新しいコンテナー名" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "新しいイメージ名" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "いいえ" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "アクションなし" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "コンテナーなし" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "このイメージを使用するコンテナーはありません" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "この Pod 内のコンテナーはありません" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "現在のフィルターに一致するコンテナーがありません" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "環境変数が指定されていません" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "イメージなし" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "イメージが見つかりません" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "現在のフィルターに一致するイメージがありません" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "ラベルなし" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "開放されているポートはありません" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "$0 の結果なし" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "実行中のコンテナーはありません" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "指定されているボリュームはありません" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "障害発生時" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "実行のみ" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "オプション" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "所有者" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "所有者のヘルプ" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "合格したヘルスの実行" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"一括インポートのために、キー=値ペアからなる 1 つまたは複数の行を任意のフィー" +"ルドに貼り付けます" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "一時停止" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "イメージの作成時にコンテナーを一時停止します" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "一時停止" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Pod の作成に失敗しました" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Pod 名" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker コンテナー" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker サービスがアクティブではありません" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "ポートマッピング" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "ポート" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "1024 未満のポートをマッピングできます" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "プライベート" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "プロトコル" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "削除" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "使用していないコンテナーの削除" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "未使用イメージの削除" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "コンテナーに prune を実行中" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "イメージを削除中" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "最新イメージのプル" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "プル中" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "読み取り専用アクセス" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "読み書きアクセス" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "アイテムの削除" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "選択した実行中でないコンテナーを削除します" + +#: src/util.js:23 +msgid "Removing" +msgstr "削除中" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "名前変更" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "コンテナーの名前変更 $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "リソース制限を設定できます" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "再起動" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "再起動ポリシー" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "再起動ポリシーのヘルプ" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "コンテナーの終了時に従う再起動ポリシー。" + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"コンテナーの終了時に従う再起動ポリシー。コンテナーの自動起動に linger を使用" +"すると、ユーザーアカウントで ecryptfs、systemd-homed、NFS、または 2FA が使用" +"されている場合など、一部の状況では機能しない場合があります。" + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "復元" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "コンテナー $0 の復元" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "確立された TCP 接続での復元" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "ユーザーアカウントのパーミッションによって制限" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "再開" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "再試行回数" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "別の用語を再試行します。" + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "ヘルスチェックを実行する" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "実行中" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "名前または説明による検索" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "レジストリーで検索" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "検索" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "イメージの検索" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "検索文字列またはコンテナーのロケーション" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "検索中..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "検索中: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "共有" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "表示" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "イメージの表示" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "中間イメージの表示" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "簡易表示" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "詳細表示" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "サイズ" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "開始" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "開始期間" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Docker を起動" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "イメージを検索するために入力を開始します。" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "開始日時" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "状態" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "ステータス" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "停止" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "停止中" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "確立された TCP 接続の保持サポート" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "システム" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "システム Docker サービスも利用できます" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "タグ" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "タグ" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Docker コンテナーの Cockpit ユーザーインターフェイス。" + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "コンテナーのブートストラップに必要な初期化時間。" + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"間隔が失敗したとみなされる前に、ヘルスチェックを完了するために許容される最大" +"時間。" + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "ヘルスチェックが異常であると見なされるまでに許可される再試行の回数。" + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "タイムアウト" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "トラブルシュート" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "入力してフィルタリング…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "イメージ履歴をロードできません" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "異常" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "$0 から稼働中" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "レガシーの Docker フォーマットの使用" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "使用中" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "ユーザー" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "ユーザーの Docker サービスも利用できます" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "ユーザー:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "値" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "ボリューム" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "異常な場合" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "端末の使用" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "書き込み可能" + +#: src/manifest.json:0 +msgid "container" +msgstr "コンテナー" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "ダウンロード中" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "host[:port]/[user]/container[:tag]" + +#: src/manifest.json:0 +msgid "image" +msgstr "イメージ" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "場所" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "中間" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "中間イメージ" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "N/A" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "利用できません" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "Pod グループ" + +#: src/manifest.json:0 +msgid "docker" +msgstr "Docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "ポート" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "秒" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "システム" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "未使用" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "ユーザー:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "ボリューム" + +#~ msgid "Delete $0" +#~ msgstr "$0 の削除" + +#~ msgid "select all" +#~ msgstr "すべて選択" + +#~ msgid "Restarting" +#~ msgstr "再起動中" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "$0 の削除を確定する" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Pod $0 の削除を確定する" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Pod $0 の強制削除を確定する" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "$0 の強制削除を確定する" + +#~ msgid "Container is currently running." +#~ msgstr "コンテナーは現在実行中です。" + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "エクスポート時に root ファイルシステムの変更を含めないでください" + +#~ msgid "Default with single selectable" +#~ msgstr "単一項目のみ選択可能なデフォルト" + +#~ msgid "Start after creation" +#~ msgstr "作成後に開始" + +#, fuzzy +#~| msgid "Delete tagged images" +#~ msgid "Delete unused $0 images:" +#~ msgstr "タグ付けされたイメージの削除" + +#~ msgid "created" +#~ msgstr "作成済み" + +#~ msgid "exited" +#~ msgstr "終了" + +#~ msgid "paused" +#~ msgstr "一時停止" + +#~ msgid "running" +#~ msgstr "実行中" + +#~ msgid "stopped" +#~ msgstr "停止中" + +#, fuzzy +#~| msgid "user:" +#~ msgid "user" +#~ msgstr "ユーザー:" + +#~ msgid "Add on build variable" +#~ msgstr "ビルド変数の追加" + +#~ msgid "Commit image" +#~ msgstr "イメージのコミット" + +#~ msgid "Format" +#~ msgstr "フォーマット" + +#~ msgid "Message" +#~ msgstr "メッセージ" + +#~ msgid "Pause the container" +#~ msgstr "コンテナーの一時停止" + +#~ msgid "Remove on build variable" +#~ msgstr "ビルド変数の削除" + +#~ msgid "Set container on build variables" +#~ msgstr "ビルド変数にコンテナーを設定する" + +#~ msgid "Add item" +#~ msgstr "アイテムの追加" + +#~ msgid "Host port (optional)" +#~ msgstr "ホストポート (オプション)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (任意)" + +#~ msgid "ReadOnly" +#~ msgstr "読み取り専用" + +#~ msgid "IP prefix length" +#~ msgstr "IP プレフィックスの長さ" + +#~ msgid "Run" +#~ msgstr "実行" diff --git a/ui/cockpit-docker/po/ka.po b/ui/cockpit-docker/po/ka.po new file mode 100644 index 0000000..3737c90 --- /dev/null +++ b/ui/cockpit-docker/po/ka.po @@ -0,0 +1,1408 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-11-29 13:31+0000\n" +"Last-Translator: Temuri Doghonadze \n" +"Language-Team: Georgian \n" +"Language: ka\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"X-Generator: Weblate 5.2.1\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 ცალი კონტეინერი" +msgstr[1] "$0 კონტეინერი" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 ცალი გამოსახულება, $1" +msgstr[1] "$0 გამოსახულება, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 წამი" +msgstr[1] "$0 წამი" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 ცალი გამოუყენებელი გამოსახულება, $1" +msgstr[1] "$0 გამოუყენებელი გამოსახულება, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1-დან 65535-მდე" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "" +"ქმედება, რომელიც კონტეინერის არაჯანმრთელ მდომარეობაში გადასვლისას შესრულდება." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "პორტის ასახვის დამატება" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "ცვლადის დამატება" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "საცავის დამატება" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "ყველა" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "ყველა რეგისტრები" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "ყველთვის" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "შეცდომა" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "ავტორი" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "docker-ის გაშვება სისტემის ჩატვირთვისას" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "პროცესორი" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "პროცესორის გაზიარების დახმარება" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU გაზიარება" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU-ის ზიარები განსაზღვრავენ გაშვებულიკონტეინერების პრიორიტეტს. ნაგულისხმები " +"პრიორიტეტი 1024-ის ტოლია. რაც მეტია რიცხვი, მით მეტია პრიორიტეტი; რაც " +"ნაკლები -ნაკლები." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "გაუქმება" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "ჯანმრთელობის შემოწმება" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "საკონტროლო წერტილი" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "საკონტროლო წერტილის და აღდგენის მხარდაჭერა" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "საკონტროლო წერტილის კონტეინერი ($0)" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "დააწკაპუნეთ გამოჩენილი პორტების სანახავად" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "დააწკაპუნეთ ტომების სანახავად" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Cockpit-ის კომპონენტი Docker-ის კონტეინერებისთვის" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "ბრძანება" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "კომენტარები" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "გადაცემა" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "კონტეინერის გაგზავნა" + +#: src/util.js:23 +msgid "Configured" +msgstr "მორგებულია" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "კონსოლი" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "კონტეინერი" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "კონტეინერის შექმნის შეცდომა" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "კონტეინერის გაშვების შეცდომა" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "კონტეინერი გაშვებული არაა" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "კონტეინერის სახელი" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "კონტეინერის სახელი აუცილებელია." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "კონტეინერის ბილიკი" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "კონტეინერის ბილიკი არ შეიძლება ცარიელი იყოს" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "კონტეინერის პორტი" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "კონტეინერის პორტი არ შეიძლება ცარიელი იყოს" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "კონტეინერები" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "შექმნა" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "კონტეინერის ($0) მდგომარეობაზე დამყარებული ახალი გამოსახულების შექმნა." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "შექმნა და გაშვება" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "კონტეინერის შექმნა" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "$0-ში კონტეინერის შექმნა" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "pod-ში კონტეინერის შექმნა" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "pod-ის შექმნა" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "შექმნილია" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "ავტორი" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "CPU გაზიარებების შემცირება" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "ინტერვალის შემცირება" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "ცდების მაქსიმალური რაოდენობის შემცირება" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "მეხსიერების შემცირება" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "ცდების რაოდენობის შემცირება" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "გაშვების პერიოდის შემცირება" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "მოლოდინის დროის შემცირება" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "წაშლა" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "წავშალო $0 დისკის ასლი?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "წავშალო $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "დისკის ასლის წაშლა" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "წავშალო პოდი $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "ჭდეებიანი გამოსახულებების წაშლა" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "სისტემის გამოუყენებელი გამოსახულებების წაშლა:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "მომხმარებლის გამოუყენებელი გამოსახულებების წაშლა:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "კონტეინერის წაშლა მასში ყველა მონაცემს წაშლის." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "გაშვებული კონტეინერის წაშლა მასში ყველა მონაცემს წაშლის." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "ამ Pod-ის წაშლა ასევე წაშლის შემდეგ კონტეინერებს:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "დეტალები" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "ადგილი დისკზე" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Docker-ის ფორმატი ძალიან სასარგებლოა გამოსახულების Docker-თან ან Moby " +"Engline-სთან გაზიარებისთვის" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "გადმოწერა" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "ახალი გამოსახულების გადმოწერა" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "ცარიელი პოდი $0 სამუდამოდ წაიშლება." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "შესავალი წერტილი" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "გარემოს ცვლადები" + +#: src/util.js:26 +msgid "Error" +msgstr "შეცდომა" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "შეცდომის შეტყობინება" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "კონსოლთან დაკავშირების შეცდომა" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "მაგ. თქვენი სახელი " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "მაგალითად: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "გამოსული" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "ჯანმრთელობის შემოწმების შეცდომა" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "კონტეინერის ($0) საკონტროლო წერტილის შეცდომა" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "კონტეინერის გასუფთავების შეცდომა" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "კონტეინერის ($0) გადაცემის შეცდომა" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "კონტეინერის ($0) შექმნის შეცდომა" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "გამოსახულების ($0) გადმოწერის შეცდომა: $1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "კონტეინერის ($0) წაშლის შეცდომა" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "გამოსახულების ($0) ძალით წაშლა შეუძლებელია" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Pod-ის ($0) ძალით რესტარტის შეცდომა" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Pod-ის ($0) ძალით გაჩერების შეცდომა" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "კონტეინერის ($0) შეჩერების შეცდომა" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Pod-ის ($0) შეჩერების შეცდომა" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "გამოუყენებელი კონტეინერების წაკვეთის შეცდომა" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "გამოუყენებელი გამოსახულებების წაკვეთის შეცდომა" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "გამოსახულების ($0) გამოთხოვნის შეცდომა" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "კონტეინერის ($0) წაშლის შეცდომა" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "გამოსახულების ($0) წაშლის შეცდომა" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "კონტეინერის ($0) სახელის გადარქმევის შეცდომა" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "კონტეინერის ($0) რესტარტის შეცდომა" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Pod-ის ($0) რესტარტის შეცდომა" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "კონტეინერის ($0) აღდგენის შეცდომა" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "კონტეინერის ($0) გაგრძელების შეცდომა" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Pod-ის ($0) გაგრძელების შეცდომა" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "კონტეინერის ($0) გაშვების შეცდომა" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "კონტეინერის ($0) ჯანმრთელობის შემოწმების შეცდომა" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "გამოსახულებების ძებნის შეცდომა." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "გამოსახულების ძებნის შეცდომა: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "ახალი გამოსახულებების ძებნის შეცდომა" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "კონტეინერის ($0) გაშვების შეცდომა" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "pod-ს ($0) გაშვების შეცდომა" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "კონტეინერის ($0) გაჩერების შეცდომა" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "pod-ის ($0) გაჩერების შეცდომა" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "მრავალჯერადი წარუმატებლობა" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "ძალით გადაგზავნა" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "ძალით წაშლა" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "წავშლო ძალით პოდი $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "ძალით რესტარტი" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "ძალით გაჩერება" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "გბ" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "ნაგულისხმები რაუტერი" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "ჯანმრთელობის შემოწმება" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "ჯანმრთელობის შემოწმების ინტერვალის დახმარება" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "ჯანმრთელობის შემოწმების ცდების რაოდენობის დახმარება" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "ჯანმრთელობის შემოწმების გაშვების პერიოდის დახმარება" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "ჯანმრთელობის შემოწმების ვადის დახმარება" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "ჯანმრთელობის შემოწმების ქმედების დახმარება" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "ჯანმრთელი" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "გამოსახულებების დამალვა" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "შუალედური გამოსახულებების დამალვა" + +#: src/Images.jsx:158 +msgid "History" +msgstr "ისტორია" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "ჰოსტის ბილიკი" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "ჰოსტის პორტი" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "დახმარება ჰოსტის პორტის შესახებ" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP მისამართი" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "დახმარება IP მისამართის შესახებ" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "იდეალურია პროგრამირებისთვის" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "იდეალურია სერვისების გასაშვებად" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"თუ ჰოსტის IP დაყენებულია 0.0.0.0-ზე ან საერთოდ არაა დაყენებული, პორტი ჰოსტზე " +"არსებულ ყველა IP-ს მიებმება." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"თუ ჰოსტის პორტი დაყენებული არაა, კონტეინერის პორტი ჰოსტზე შემთხვევითად " +"იქნება არჩეული." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "სტატიკურად მინიჭებული IP მისამართის იგნორი" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "სტატიკურად მინიჭებული MAC მისამართის იგნორი" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "გამოსახულება" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "ასლის სახელი უნიკალური არაა" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "ასლის სახელი აუცილებელია" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "დახმარება გამოსახულების არჩევის შესახებ" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "გამოსახულებები" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "CPU გაზიარებების გაზრდა" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "ინტერვალის გაზრდა" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "ცდების მაქსიმალური რაოდენობის გაზრდა" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "მეხსიერების გაზრდა" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "ცდების რაოდენობის გაზრდა" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "გაშვების პერიოდის გაზრდა" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "მოლოდინის დროის გაზრდა" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "ინტეგრაცია" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "ინტერვალი" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "ჯანმრთელობის შემოწმების გაშვების ინტერვალი." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"არასწორი სიმბოლოები. სახელი მხოლოდ ასოებს, ციფრებს და ზოგიერთ პუნქტუაციის " +"ნიშანს (_,-) შეიძლება შეიცავდეს." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "კბ" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "საკონტროლო წერტილის ყველა დროებითი ფაილის შენახვა" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "გასაღები" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "გასაღები არ შეიძლება, ცარიელი იყოს" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "ბოლო 5 გაშვება" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "უახლესი საკონტროლო წერტილი" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "საკონტროლო წერტილის დისკზე ჩაწერის შემდეგ გაშვებულად დატოვება" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "დეტალების ჩატვირთვა..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "ჟურნალის ჩატვირთვა..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "ჩატვირთვა..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "ლოკალური" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "ლოკალური გამოსახულებები" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "ჟურნალი" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC მისამართი" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "მბ" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "ცდების მაქსიმალური რაოდენობა" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "მეხსიერება" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "მეხსიერების ლიმიტი" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "მეხსიერების ერთეული" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "რეჟიმი" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"ამ გამოსახულებას მრავალი ჭდე გააჩნია. წასაშლელად მონიშნეთ ჭდეებიანი " +"გამოსახულებები." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "უნდა იყოს სწორი IP მისამართი" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "სახელი" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "სახელი უკვე გამოიყენება" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "ახალი კონტეინერის სახელი" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "ახალი გამოსახულების სახელი" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "არა" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "ქმედების გარეშე" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "კონტეიენერების გარეშე" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "ამ გამოსახულებას არცერთი კონტეინერი არ იყენებს" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "ამ Pod-ში კონტეინერები არაა" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "მიმდინარე ფილტრს არცერთი კონტეინერი არ შეესაბამება" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "გარემოს ცვლადი მითითებული არაა" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "გამოსახულებების გარეშე" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "გამოსახულებების გარეშე" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "მიმდინარე ფილტრს არცერთი გამოსახულება არ შეესაბამება" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "ჭდეების გარეშე" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "პორტები გამოტანილი არაა" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "პასუხების გარეშე $0-თვის" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "გაშვებული კონტეინერების გარეშე" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "საცავი მითითებული არაა" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "შეცდომისას" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "მხოლოდ გაშვებული" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "მორგება" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "მფლობელი" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "მფლობელის დახმარება" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "ჯანმრთელობის შემოწმება წარმატებულია" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"მრავალი შემოტანისთვის ველებში ჩასვით ერთი ან მეტი გასაღები=მნიშვნელობა-ის " +"ტიპის წყვილები" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "პაუზა" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "კონტეინერის შეჩერება გამოსახულების შექმნისას" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "შეჩერებულია" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Pod-ის შექმნის შეცდომა" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Pod-ის სახელი" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker-ის კონტეინერები" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker-ის სერვისი აქტიური არაა" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "პორტების ასახვა" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "პორტები" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "შეგიძლიათ 1024-ზე ნაკლები ნომრის მქონე პორტის მიბმა" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "პირადი" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "პროტოკოლი" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "შეკვეცა" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "გამოუყენებელი კონტეინერების წაკვეთა" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "გამოუყენებელი გამოსახულებების წაკვეთა" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "კონტეინერების წაკვეთა" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "გამოსახულებების წაკვეთა" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "უახლესი გამოსახულების წამოღება" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "გამოწევა" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "მხოლოდ-კითხვის წვდომა" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "ჩაწერა/წაკითხვის წვდომა" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "ელემენტის წაშლა" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "მონიშნული არა-გაშვებული კონტეინერების წაშლა" + +#: src/util.js:23 +msgid "Removing" +msgstr "წაშლა" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "გადარქმევა" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "კონტეინერის სახელის გადარქმევა ($0)" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "შეგიძლიათ ლიმიტების დაყენება" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "გადატვირთვა" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "რესტარტის წესები" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "დახმარება რესტარტის წესების შესახებ" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "კონტეინერების მუშაობის დასასრულისას რესტარტის წესები." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"კონტეინერების მუშაობის დასრულებისას მისაყოლი გადატვირთის პოლიტიკა. " +"კონტეინერების ავტომატური გაშვებისთვის linger-მა ყოველთვის შეიძლება არ " +"იმუშაოს. მაგალითად, თუ მომხმარებელზე enccryptfs, systemd-homed, NFS ან 2FA " +"გამოიყენება." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "აღდგენა" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "კონტეინერის აღდგენა ($0)" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "დამყარებული TCP კავშირებით აღდგენა" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "შეზღუდულია მომხმარებლის ანგარიშის წვდომებით" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "გაგრძელება" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "თავიდან ცდები" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "სხვა სიტყვა სცადეთ." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "ჯანმრთელობის შემოწმების გაშვება" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "გაშვებულია" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "სახელით ან აღწერით ძებნა" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "რეგისტრის ძებნა" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "ძებნა" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "გამოსახულების ძებნა" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "სტრიქონის ან კონტეინერის მდებარეობის ძებნა" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "ძებნა..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "ძებნა: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "გაზიარებული" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "ჩვენება" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "გამოსახულებების ჩვენება" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "შუალედური გამოსახულებების ჩვენება" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "ნაკლების ჩვენება" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "მეტის ჩვენება" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "ზომა" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "დაწყება" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "გაშვების პერიოდი" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Docker-ის გაშვება" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "გამოსახულებების მოსაძებნად დაიწყეთ მისი სახელის კრეფა." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "გაშვების დრო" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "მდგომარეობა" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "სტატუსი" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "გაჩერება" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "გაჩერებულია" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "დამყარებული TCP კავშირების შენარჩუნების მხარდაჭერა" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "სისტემა" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "ასევე ხელმისაწვდომია Docker-ის სისტემური სერვისი" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "ჭდე" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "ჭდეები" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Cockpit-ის მომხმარებლის ინტერფეისი Docker-ის კონტეინერებისთვის." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "კონტეინერის მოსარგებად საჭირო ინიციალიზაციის დრო." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"მაქსიმალური დრო ჯანმრთელობის შესამოწმებლად. ამ ინტერვალის გასვლის შემდეგ " +"შემოწმება შეცდომის მქონედ ითვლება." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"ცდების რაოდენობა, რის შემდეგაც ჯანმრთელობის შემოწმება ავარიულად ითვლება." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "დროის ამოწურვა" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "პრობლემების პოვნა" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "გაფილტვრისთვის აკრიფეთ…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "გამოსახულების ისტორიის ჩატვირთვის შეცდომა" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "ჯანმრთელი არაა" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "$0 და ზემოთ" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Docker-ის ძველი ფორმატის გამოყენება" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "გამოიყენება" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "მომხმარებელი" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "ასევე ხელმისაწვდომია Docker-ის მომხმარებლის სერვისი" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "მომხმარებელი:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "მნიშვნელობა" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "საცავები" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "როცა ჯანმრთელი არაა" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "ტერმინალით" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "ჩაწერადი" + +#: src/manifest.json:0 +msgid "container" +msgstr "კონტეინერი" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "გადმოწერა" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "ჰოსტი[:პორტი]/[მომხმარებელი]/კონტეინერი[:ჭდე]" + +#: src/manifest.json:0 +msgid "image" +msgstr "გამოსახულება" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "-ში" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "შუალედური" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "შუალედური დისკის ასლი" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "ა/მ" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "ხელმიუწვდომელია" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "pod-ების ჯგუფი" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "პორტები" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "წამი" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "სისტემა" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "გამოუყენებელი" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "მომხმარებელი:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "ტომები" + +#~ msgid "Delete $0" +#~ msgstr "$0-ის წაშლა" + +#~ msgid "select all" +#~ msgstr "ყველას მონიშვნა" + +#~ msgid "Failure action" +#~ msgstr "ქმედება ავარიისას" + +#~ msgid "Restarting" +#~ msgstr "გადატვირთვა" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "დაადასტურეთ $0-ის წაშლა" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "დაადასტურეთ Pod-ის წაშლა: $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "დაადასტურეთ pod-ის ძალით წაშლა: $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "დაადასტურეთ ძალით წაშლა: $0" + +#~ msgid "Container is currently running." +#~ msgstr "ამჟამად კონტეინერი გაშვებულია." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "გატანისას ფაილური სისტემის ცვლილებების არ-გადატანა" diff --git a/ui/cockpit-docker/po/ko.po b/ui/cockpit-docker/po/ko.po new file mode 100644 index 0000000..e21ae85 --- /dev/null +++ b/ui/cockpit-docker/po/ko.po @@ -0,0 +1,1461 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2024-03-16 15:35+0000\n" +"Last-Translator: 김인수 \n" +"Language-Team: Korean \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"X-Generator: Weblate 5.4\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 컨테이너" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 이미지 총계, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 초" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 미사용 이미지, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 ~ 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "컨테이너가 비정상 상태로 전이되면 수행 할 작업." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "포트 대응을 추가합니다" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "변수를 추가합니다" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "볼륨 추가" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "모두" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "모든 레지스터리" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "항상" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "오류가 발생했습니다" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "작성자" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "부트시 자동으로 docker 시작" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "CPU 공유 도움말" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU 공유" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU 공유는 동작 중인 콘테이너 우선 순위를 결정합니다. 기본 우선순위는 1024입" +"니다. 숫자가 클 수록 이 컨테이너 우선순위를 갖습니다. 낮은 번호는 우선 순위" +"가 낮아집니다." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "취소" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "상태 점검 중" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "점검점" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "점검점과 복구 지원" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "점검점 컨테이너 $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "공개된 포트를 보려면 누르세요" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "볼륨을 보려면 누르세요" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "포드맨 컨테이너를 위한 cockpit 구성요소" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "명령" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "주석" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "수행" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "컨테이너 커밋" + +#: src/util.js:23 +msgid "Configured" +msgstr "구성됨" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "콘솔" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "컨테이너" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "컨테이너 생성에 실패했습니다" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "컨테이너 시작에 실패했습니다" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "컨테이너가 동작 중이 아닙니다" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "컨테이너 이름" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "컨테이너 이름이 필요합니다." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "컨테이너 경로" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "컨테이너 경로는 비워두면 안됩니다" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "컨테이너 포트" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "컨테이너 포트는 비워두면 안됩니다" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "컨테이너" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "생성" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "$0 컨테이너의 현재 상태에서 기반된 새로운 이미지를 생성합니다." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "생성과 실행" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "컨테이너 생성" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "$0에서 컨테이너 생성" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "포드에서 컨테이너 생성" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "포드 생성" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "생성일" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "생성됨" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "CPU 공유 감소" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "간격 감소" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "최대 재시도 감소" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "메모리 감소" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "재시도 감소" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "시작 기간 감소" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "시간종료 감소" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "삭제" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "$0 이미지를 삭제할까요?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "$0 삭제?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "이미지 삭제" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "pod $0 삭제?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "태그가 지정된 이미지 삭제" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "사용하지 않는 시스템 이미지 삭제:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "사용하지 않는 사용자 이미지 삭제:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "컨테이너를 삭제는 내부의 모든 자료도 제거됩니다." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "동작 중인 컨테이너 삭제는 내부의 모든 자료도 제거됩니다." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "이 pod의 삭제는 다음 컨테이너도 제거될 것입니다:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "상세정보" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "디스크 공간" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"도커 형식은 도커 또는 모비 엔진과 같은 이미지를 공유 할 때에 유용합니다" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "내려받기" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "신규 이미지 내려받기" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "빈 pod $0는 영구적으로 제거됩니다." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "시작점" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "환경 변수" + +#: src/util.js:26 +msgid "Error" +msgstr "오류" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "오류 메시지" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "오류가 콘솔 연결 중에 발생했습니다" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "예제, 당신의 이름 " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "예제: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "종료됨" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "상태 실행에 실패함" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "컨테이너 $0 점검점에 실패" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "컨테이너를 정리하는데 실패" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "컨테이너 $0 수행에 실패" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "컨테이너 $0 생성에 실패" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "이미지 $0:$1 내려받기에 실패" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "컨테이너 $0 강제 제거에 실패" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "이미지 $0 강제 제거에 실패" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "pod $0 강제로 재시작 하는데 실패" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "pod $0 강제 멈춤에 실패" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "컨테이너 $0를 일시 중지 하는 데 실패" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "pod $0 일시정지에 실패" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "사용하지 않는 컨테이너 정리 실패" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "사용하지 않는 이미지 정리 실패" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "이미지 $0를 가져오는 데 실패" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "컨테이너 $0 제거에 실패" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "이미지 $0 제거에 실패" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "컨테이너 $0의 이름을 변경하는데 실패함" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "컨테이너 $0 재시작에 실패" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "pod $0 재시작에 실패" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "컨테이너 $0 복구에 실패" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "컨테이너 $0를 다시 시작 하는 데 실패" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "pod $0 재개에 실패" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "컨테이너 $0를 실행하는 데 실패" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "컨테이너 $0에서 상태를 점검하는데 실패함" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "이미지 검색을 실패함." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "이미지를 위한 검색 실패: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "새로운 이미지 검색 실패" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "컨테이너 $0 시작에 실패" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "pod $0를 시작하는 데 실패" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "컨테이너 $0 멈춤에 실패" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "pod $0 멈춤에 실패" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "연속 실패" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "강제 커밋" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "강제 삭제" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "pod $0 강제 삭제?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "강제 재시작" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "강제 멈춤" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "게이트웨이" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "상태 점검" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "상태 점검 간격 도움말" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "상태 점검 재시도 도움말" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "상태 점검 시작 기간 도움말" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "상태 점검 시간종료 도움말" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "상태 장애 점검 작용 도움말" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "상태좋음" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "이미지 숨김" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "중간 이미지 숨기기" + +#: src/Images.jsx:158 +msgid "History" +msgstr "기록" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "호스트 경로" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "호스트 포트" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "호스트 포트 도움말" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP 주소" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "IP 주소 도움말" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "개발을 위해 이상적인" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "실행 중인 서비스에 이상적인" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"만약 호스트 IP가 0.0.0.0으로 설정되거나 또는 전혀 설정되지 않으면, 포트는 호" +"스트의 모든 IP에서 묶이게 됩니다." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"만약 호스트 포트가 컨테이너에 설정되어 있지 않으면, 포트는 호스트에서 임의 지" +"정된 포트가 됩니다." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "정적인 상태라면 IP 주소 무시" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "정적인 상태라면 맥 주소 무시" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "이미지" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "이미지 이름은 독특하지 않습니다" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "이미지 이름이 필요합니다" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "이미지 선택 도움말" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "이미지" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "CPU 공유 증가" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "간격 증가" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "최대 재시도 증가" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "메모리 증가" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "재시도 증가" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "시작 기간 증가" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "시간종료 증가" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "통합" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "간격" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "얼마나 자주 상태 점검을 실행하는 간격." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"잘못된 문자. 이름은 문자, 수자와 특정 구두점(_ . -)만 포함 될 수 있습니다." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "모든 임시 점검점 파일을 유지합니다" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "키" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "키는 비워두면 안됩니다" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "최근 5회 실행" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "최신 점검점" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "점검점을 디스크에 쓰기 후에 계속 진행" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "세부정보 적재 중..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "기록 적재 중..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "적재 중..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "로컬" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "로컬 이미지" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "기록" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "맥(mac) 주소" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "최대 재시도" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "메모리" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "메모리 제한" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "메모리 장치" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "모드" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "다중 태그는 이 이미지에 존재합니다. 삭제에 태그된 이미지를 선택합니다." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "유효한 IP 주소이어야 합니다" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "이름" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "이미 사용 중인 이름입니다" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "신규 컨테이너 이름" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "신규 이미지 이름" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "아니오" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "반응 없음" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "컨테이너 없음" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "이 이미지에 사용 중인 컨테이너가 없습니다" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "이 포드에는 컨테이너가 없습니다" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "현재 필터에 일치하는 컨테이너가 없습니다" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "지정된 환경 변수가 없습니다" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "이미지 없음" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "이미지를 찾지 못했습니다" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "현재 필터에 일치하는 이미지가 없습니다" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "이름표가 없습니다" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "노출된 포트가 없습니다" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "$0의 결과를 찾을 수 없습니다" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "실행 중인 컨테이너가 없습니다" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "지정된 볼륨이 없습니다" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "실패한 경우" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "실행 만" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "옵션" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "소유자" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "소유자 도움말" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "상태 실행 통과됨" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"대량으로 가져오기 위해 키=값 쌍의 하나 이상의 행에 입력부분에 붙여 넣습니다" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "일시정지" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "이미지에 생성 중인 컨테이너를 일시 중지합니다" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "일시정지됨" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "포드 생성에 실패했습니다" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "포드 이름" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "포드맨" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "포드맨 컨테이너" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "포드맨 서비스가 동작하지 않습니다" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "포트 대응" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "포트" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "1024 이하 포트는 대응 될 수 있습니다" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "비공개" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "통신규약" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "프룬" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "사용하지 않은 컨테이너 정리" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "프룬 사용하지 않은 이미지" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "컨테이너 정리 중" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "프루닝 이미지" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "최신 이미지 가져오기" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "당기기" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "읽기-전용 접근" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "읽기-쓰기 접근" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "항목 제거" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "선택된 비-실행 컨테이너를 제거합니다" + +#: src/util.js:23 +msgid "Removing" +msgstr "제거 중" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "이름변경" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "컨테이너 $0 이름변경" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "자원 한계가 설정 될 수 있습니다" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "재시작" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "재시작 정책" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "정책 도움말 재시작" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "컨테이너를 종료 할 경우에 따라야 할 정책을 재시작 합니다." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"컨테이너가 종료 될 때 따라야 할 정책을 재시작합니다. 자동으로 시작하는 컨테이" +"너를 위한 linger를 사용은 ecryptfs, systemd-homed, NFS, 또는 2FA가 사용자 계" +"정에서 사용되는 것과 같이 특정 상황에서 작동하지 않을 수 있습니다." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "복구" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "컨테이너$0에서 복구" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "설정된 TCP 연결로 복구" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "사용자 계졍 권한에 의해 제한됨" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "다시 시작" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "재시도" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "다른 용어를 재시도." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "상태 점검을 실행" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "작동중" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "이름 또는 설명으로 찾기" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "레지스터리로 검색" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "찾기" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "이미지로 찾기" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "문자열 또는 컨테이너 위치 검색" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "검색 중..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "검색 중: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "공유됨" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "보기" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "이미지 보여주기" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "중간 이미지 보기" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "덜 보기" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "더 보기" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "크기" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "시작" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "시작 주기" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "포드맨 시작" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "이미지를 찾으려면 입력을 시작하세요." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "시작 시간" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "상태" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "상태" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "중지" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "정지됨" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "설정된 TCP 연결 유지 지원" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "시스템" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "시스템 포드맨 서비스도 사용 할 수 있습니다" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "꼬리표" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "꼬리표" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "포드맨 컨테이너를 위한 cockpit 사용자 연결장치." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "부트스트랩에서 컨테이너를 위해 필요한 초기화 시간." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"간격이 실패한 것으로 간주되기 전에 상태 점검을 완료하도록 허용되는 최대 시간." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "상태점검이 좋지 않은 것으로 고려되기 전에 허용되는 재시도 수." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "시간종료" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "문제 해결" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "필터 입력…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "이미지 기록을 적재 할 수 없음" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "상태나쁨" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "$0 이후 상승" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "레거시 도커 형식을 사용합니다" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "사용되었습니다" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "사용자" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "사용자 포드맨 서비스도 사용 할 수 있습니다" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "사용자:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "값" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "볼륨" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "상태나쁨" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "터미널 포함" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "쓰기 가능" + +#: src/manifest.json:0 +msgid "container" +msgstr "컨테이너" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "내려받기 중" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "host[:포트]/[사용자]/컨테이너[:태그]" + +#: src/manifest.json:0 +msgid "image" +msgstr "이미지" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "in" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "중간" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "중간 이미지" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "해당 없음" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "사용할 수 없음" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "포드 그룹" + +#: src/manifest.json:0 +msgid "docker" +msgstr "포드맨" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "포트" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "초" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "systemd" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "미사용" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "사용자:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "볼륨" + +#~ msgid "Delete $0" +#~ msgstr "$0 삭제" + +#~ msgid "select all" +#~ msgstr "모두 선택" + +#~ msgid "Failure action" +#~ msgstr "장애 작용" + +#~ msgid "Restarting" +#~ msgstr "재시작하기" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "$0 삭제를 확인합니다" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "pod $0의 삭제를 확인합니다" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "pod $0의 강제 삭제를 확인합니다" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "$0의 강제된 삭제를 확인합니다" + +#~ msgid "Container is currently running." +#~ msgstr "컨테이너가 현재 실행 중입니다." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "내보내기 할 때에 root 파일-시스템 변경을 포함하지 마세요" + +#~ msgid "Default with single selectable" +#~ msgstr "단일 선택 가능한 기본값" + +#~ msgid "Start after creation" +#~ msgstr "생성 후에 시작" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "사용하지 않는 $0 이미지 삭제:" + +#~ msgid "created" +#~ msgstr "생성 됨" + +#~ msgid "exited" +#~ msgstr "종료됨" + +#~ msgid "paused" +#~ msgstr "일시 중지됨" + +#~ msgid "running" +#~ msgstr "실행 중" + +#~ msgid "stopped" +#~ msgstr "정지됨" + +#~ msgid "user" +#~ msgstr "사용자" + +#~ msgid "Add on build variable" +#~ msgstr "빌드 변수에 추가" + +#~ msgid "Commit image" +#~ msgstr "이미지 수행" + +#~ msgid "Format" +#~ msgstr "포멧" + +#~ msgid "Message" +#~ msgstr "메세지" + +#~ msgid "Pause the container" +#~ msgstr "컨테이너 일시중지" + +#~ msgid "Remove on build variable" +#~ msgstr "빌드 변수에서 제거" + +#~ msgid "Set container on build variables" +#~ msgstr "빌드 변수에 컨테이너 설정" + +#~ msgid "Add item" +#~ msgstr "항목 추가" + +#~ msgid "Host port (optional)" +#~ msgstr "호스트 경로(선택적)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (선택적)" + +#~ msgid "ReadOnly" +#~ msgstr "읽기 전용" + +#~ msgid "IP prefix length" +#~ msgstr "IP 프리픽스 길이" + +#~ msgid "Run" +#~ msgstr "실행" diff --git a/ui/cockpit-docker/po/pl.po b/ui/cockpit-docker/po/pl.po new file mode 100644 index 0000000..055a67b --- /dev/null +++ b/ui/cockpit-docker/po/pl.po @@ -0,0 +1,1508 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Piotr Drąg , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2024-02-23 19:36+0000\n" +"Last-Translator: Daviteusz \n" +"Language-Team: Polish \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 5.4\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 kontener" +msgstr[1] "$0 kontenery" +msgstr[2] "$0 kontenerów" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 obraz, $1" +msgstr[1] "$0 obrazy razem, $1" +msgstr[2] "$0 obrazów razem, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 sekunda" +msgstr[1] "$0 sekundy" +msgstr[2] "$0 sekund" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 nieużywany obraz, $1" +msgstr[1] "$0 nieużywane obrazy, $1" +msgstr[2] "$0 nieużywanych obrazów, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 do 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "Działanie podejmowane po przejściu kontenera do niezdrowego stanu." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Dodaj mapowanie portów" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Dodaj zmienną" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Dodaj wolumin" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Wszystko" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Wszystkie rejestry" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Zawsze" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Wystąpił błąd" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Autor" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Automatyczne włączanie usługi docker podczas uruchamiania" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "Procesor" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "Pomoc udziałów procesora" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "Udziały procesora" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"Udziały procesora ustalają priorytety uruchomionych kontenerów. Domyślny " +"priorytet to 1024. Wyższa liczba zwiększa priorytet danego kontenera. " +"Mniejsza liczba zmniejsza priorytet." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Anuluj" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Sprawdzanie zdrowia" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Punkt kontrolny" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Obsługa punktu kontrolnego i przywracania" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Kontener punktu kontrolnego $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Kliknięcie wyświetli opublikowane porty" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Kliknięcie wyświetli woluminy" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Składnik Cockpit do kontenerów Docker" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Polecenie" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Komentarze" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Zatwierdź" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Zatwierdź kontener" + +#: src/util.js:23 +msgid "Configured" +msgstr "Skonfigurowane" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konsola" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Kontener" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Utworzenie kontenera się nie powiodło" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Uruchomienie kontenera się nie powiodło" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Kontener nie jest uruchomiony" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Nazwa kontenera" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Wymagana jest nazwa kontenera." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Ścieżka do kontenera" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "Ścieżka do kontenera nie może być pusta" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Port kontenera" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "Port kontenera nie może być pusty" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Kontenery" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Utwórz" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Utwórz nowy obraz na podstawie obecnego stanu kontenera $0." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Utwórz i uruchom" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Utwórz kontener" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Utwórz kontener w $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Utwórz kontener w pojemniku" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Utwórz pojemnik" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Utworzono" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Utworzony przez" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Zmniejsz udziały procesora" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Zmniejsz odstęp" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Zmniejsz maksymalną liczbę ponownych prób" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Zmniejsz pamięć" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Zmniejsz liczbę ponownych prób" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Zmniejsz okres uruchamiania" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Zmniejsz czas oczekiwania" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Usuń" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "Usunąć obraz $0?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "Usunąć $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "Usuń obraz" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Usunąć pojemnik $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Usuń oznaczone obrazy" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Usunięcie nieużywanych obrazów systemowych:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Usunięcie nieużywanych obrazów użytkownika:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "" +"Usunięcie kontenera spowoduje usunięcie wszystkich zawartych na nim danych." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "" +"Usunięcie uruchomionego kontenera spowoduje usunięcie wszystkich zawartych " +"na nim danych." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Usunięcie tego pojemnika spowoduje usunięcie tych kontenerów:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Szczegóły" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Miejsce na dysku" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Format Docker jest przydatny podczas udostępniania obrazu za pomocą Dockera " +"lub Moby Engine" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Pobierz" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Pobierz nowy obraz" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Pusty pojemnik $0 zostanie trwale usunięty." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Punkt wejścia" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Zmienne środowiskowe" + +#: src/util.js:26 +msgid "Error" +msgstr "Błąd" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Komunikat o błędzie" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Wystąpił błąd podczas łączenia konsoli" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Przykład, Imię Nazwisko " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Przykład: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Zakończono" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Niepomyślny wynik sprawdzania zdrowia" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Punkt kontrolny kontenera $0 się nie powiódł" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Wyczyszczenie kontenera się nie powiodło" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Zatwierdzenie kontenera $0 się nie powiodło" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Utworzenie kontenera $0 się nie powiodło" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Pobranie obrazu $0:$1 się nie powiodło" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Wymuszenie usunięcia kontenera $0 się nie powiodło" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Wymuszenie usunięcia obrazu $0 się nie powiodło" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Wymuszenie ponownego uruchomienia pojemnika $0 się nie powiodło" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Wymuszenie zatrzymania pojemnika $0 się nie powiodło" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Wstrzymanie kontenera $0 się nie powiodło" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Wstrzymanie pojemnika $0 się nie powiodło" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Wyczyszczenie nieużywanych kontenerów się nie powiodło" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Wyczyszczenie nieużywanych obrazów się nie powiodło" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Pobranie obrazu $0 się nie powiodło" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Usunięcie kontenera $0 się nie powiodło" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Usunięcie obrazu $0 się nie powiodło" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Zmiana nazwy kontenera $0 się nie powiodła" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Ponowne uruchomienie kontenera $0 się nie powiodło" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Ponowne uruchomienie pojemnika $0 się nie powiodło" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Przywrócenie kontenera $0 się nie powiodło" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Wznowienie kontenera $0 się nie powiodło" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Wznowienie pojemnika $0 się nie powiodło" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Uruchomienie kontenera $0 się nie powiodło" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Wykonanie sprawdzania zdrowia na kontenerze $0 się nie powiodło" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Wyszukanie obrazów się nie powiodło." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Wyszukanie obrazów się nie powiodło: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Wyszukanie nowych obrazów się nie powiodło" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Uruchomienie kontenera $0 się nie powiodło" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Uruchomienie pojemnika $0 się nie powiodło" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Zatrzymanie kontenera $0 się nie powiodło" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Zatrzymanie pojemnika $0 się nie powiodło" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Wielokrotne niepowodzenia" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Wymuś zatwierdzenie" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Wymuś usunięcie" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Wymusić usunięcie pojemnika $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Wymuś ponowne uruchomienie" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Wymuś zatrzymanie" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Brama" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Sprawdzanie zdrowia" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Pomoc odstępów między sprawdzaniem zdrowia" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Pomoc ponownych prób sprawdzania zdrowia" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Pomoc okresu uruchamiania sprawdzania zdrowia" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Pomoc czasu oczekiwania sprawdzania zdrowia" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Pomoc działania niepowodzenia sprawdzania zdrowia" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Zdrowy" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Ukryj obrazy" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Ukryj pośrednie obrazy" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Historia" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Ścieżka do hosta" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Port hosta" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Pomoc portu hosta" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "Identyfikator" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "Adres IP" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Pomoc adresu IP" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Doskonałe dla programistów" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Doskonałe do uruchamiania usług" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Jeśli adres IP hosta jest ustawiony na 0.0.0.0 lub nie jest ustawiony, to " +"port będzie dowiązany do wszystkich adresów IP na hoście." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Jeśli port hosta nie jest ustawiony, to do portu kontenera będzie losowo " +"przydzielany port na hoście." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ignorowanie adresu IP, jeśli jest ustawiony statycznie" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ignorowanie adresu MAC, jeśli jest ustawiony statycznie" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Obraz" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Nazwa obrazu nie jest unikalna" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Nazwa obrazu jest wymagana" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Pomoc przy wyborze obrazu" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Obrazy" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Zwiększ udziały procesora" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Zwiększ odstęp" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Zwiększ maksymalną liczbę ponownych prób" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Zwiększ pamięć" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Zwiększ liczbę ponownych prób" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Zwiększ okres uruchamiania" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Zwiększ czas oczekiwania" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Integracja" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Odstęp" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Odstęp między wykonywaniem sprawdzania zdrowia." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Nieprawidłowe znaki. Nazwa może zawierać tylko litery, cyfry i część znaków " +"interpunkcyjnych (_ . -)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Przechowywanie wszystkich tymczasowych plików punktów kontrolnych" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Klucz" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "Klucz nie może być pusty" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Ostatnie 5 razy" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Najnowszy punkt kontrolny" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Bez wyłączania po zapisaniu punktu kontrolnego na dysku" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Wczytywanie szczegółów…" + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Wczytywanie dzienników…" + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Wczytywanie…" + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Lokalne" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Lokalne obrazy" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Dzienniki" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "Adres MAC" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Maksymalna liczba ponownych prób" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Pamięć" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Ograniczenie pamięci" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Jednostka pamięci" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Tryb" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Dla tego obrazu istnieje wiele etykiet. Proszę wybrać oznaczone obrazy do " +"usunięcia." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "Musi być prawidłowym adresem IP" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Nazwa" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "Nazwa jest już używana" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Nowa nazwa kontenera" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Nazwa nowego obrazu" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Nie" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Brak działania" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Brak kontenerów" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Żadne kontenery nie używają tego obrazu" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "Brak kontenerów w tym pojemniku" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Żadne kontenery nie pasują do obecnego filtru" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Nie podano zmiennych środowiskowych" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Brak obrazów" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Nie odnaleziono obrazów" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Żadne obrazy nie pasują do obecnego filtru" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Brak etykiety" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Brak eksponowanych portów" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Brak wyników dla zapytania „$0”" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Brak uruchomionych kontenerów" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Nie podano woluminów" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Przy niepowodzeniu" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Tylko uruchomione" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Opcje" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Właściciel" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Pomoc na temat właściciela" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Pomyślny wynik sprawdzania zdrowia" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Należy wkleić jeden lub więcej wierszy par klucz=wartość do dowolnego pola, " +"aby zaimportować hurtowo" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Wstrzymaj" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Wstrzymaj kontener podczas tworzenia obrazu" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Wstrzymane" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Utworzenie pojemnika się nie powiodło" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Nazwa pojemnika" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Kontenery Docker" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Usługa Docker nie jest aktywna" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Mapowanie portów" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Porty" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Można mapować porty poniżej 1024" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Prywatne" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokół" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Wyczyść" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Wyczyść nieużywane kontenery" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Wyczyść nieużywane obrazy" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Czyszczenie kontenerów" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Czyszczenie obrazów" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Pobierz najnowszy obraz" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Pobieranie" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Dostęp tylko do odczytu" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Dostęp do odczytu i zapisu" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Usuń element" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Usuwa zaznaczone nieuruchomione kontenery" + +#: src/util.js:23 +msgid "Removing" +msgstr "Usuwanie" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Zmień nazwę" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Zmień nazwę kontenera $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Można ustawić ograniczenia zasobów" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Uruchom ponownie" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Zasada ponownego uruchamiania" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Pomoc zasady ponownego uruchamiania" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Zasada ponownego uruchamiania używana podczas wyłączania kontenerów." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Zasada ponownego uruchamiania używana podczas wyłączania kontenerów. " +"Używanie zwlekania do automatycznego uruchamiania kontenerów może nie " +"działać w pewnych warunkach, takich jak podczas używania eCryptfs, systemd-" +"homed, NFS lub uwierzytelniania dwuskładnikowego na koncie użytkownika." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Przywróć" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Przywróć kontener $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Przywróć z nawiązanymi połączeniami TCP" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Ograniczone przez uprawnienia konta użytkownika" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Wznów" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Ponowne próby" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Spróbuj innych słów." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Wykonaj sprawdzanie zdrowia" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Uruchomione" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Szukaj według nazwy lub opisu" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Szukaj według rejestru" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Szukaj" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Znajdź obraz" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Szukaj ciągu lub położenia kontenera" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Wyszukiwanie…" + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Wyszukiwanie: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Współdzielone" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Wyświetl" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Wyświetl obrazy" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Wyświetl pośrednie obrazy" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Wyświetl mniej" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Wyświetl więcej" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Rozmiar" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Uruchom" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Okres uruchamiania" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Uruchom usługę docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Zacznij pisać, aby wyszukać obrazy." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Uruchomiono" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Stan" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Stan" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Zatrzymaj" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Zatrzymane" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Obsługa zachowywania nawiązanych połączeń TCP" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "System" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Dostępna jest także systemowa usługa Docker" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Etykieta" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Etykiety" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Interfejs Cockpit do kontenerów Docker." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Czas inicjacji wymagany do uruchomienia kontenera." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Maksymalny dozwolony czas na ukończenie sprawdzania zdrowia, zanim odstęp " +"jest uważany za niepomyślny." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Dozwolona liczba ponownych prób, zanim wynik sprawdzania zdrowia jest " +"uważany za niepomyślny." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Czas oczekiwania" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Rozwiąż problem" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Wyszukiwanie…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Nie można wczytać historii obrazu" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Niezdrowy" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Uruchomione od $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Przestarzały format Docker" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Używane przez" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Użytkownik" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Dostępna jest także usługa Docker użytkownika" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Użytkownik:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Wartość" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Woluminy" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "Kiedy jest niezdrowy" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Z terminalem" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Zapisywalny" + +#: src/manifest.json:0 +msgid "container" +msgstr "kontener" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "pobieranie" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "komputer[:port]/[użytkownik]/kontener[:etykieta]" + +#: src/manifest.json:0 +msgid "image" +msgstr "obraz" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "w" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "pośredni" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "pośredni obraz" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "niedostępne" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "niedostępne" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "grupa pojemników" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "porty" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "s" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "systemowa" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "nieużywane" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "użytkownik:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "woluminy" + +#~ msgid "Delete $0" +#~ msgstr "Usuń $0" + +#~ msgid "select all" +#~ msgstr "zaznacz wszystko" + +#~ msgid "Failure action" +#~ msgstr "Działanie niepowodzenia" + +#~ msgid "Restarting" +#~ msgstr "Uruchamianie ponownie" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Potwierdź usunięcie $0" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Potwierdź usunięcie pojemnika $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Potwierdź wymuszenie usunięcia pojemnika $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Potwierdź wymuszenie usunięcia $0" + +#~ msgid "Container is currently running." +#~ msgstr "Kontener jest obecnie uruchomiony." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Bez dołączania zmian głównego systemu plików podczas eksportowania" + +#~ msgid "Default with single selectable" +#~ msgstr "Domyślne z jednym wyborem" + +#~ msgid "Start after creation" +#~ msgstr "Uruchom po utworzeniu" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "Usunięcie nieużywanych obrazów $0:" + +#~ msgid "created" +#~ msgstr "utworzone" + +#~ msgid "exited" +#~ msgstr "zakończone" + +#~ msgid "paused" +#~ msgstr "wstrzymane" + +#~ msgid "running" +#~ msgstr "uruchomione" + +#~ msgid "stopped" +#~ msgstr "zatrzymane" + +#~ msgid "user" +#~ msgstr "użytkownika" + +#~ msgid "Add on build variable" +#~ msgstr "Dodaj na zmiennej budowania" + +#~ msgid "Commit image" +#~ msgstr "Zatwierdź obraz" + +#~ msgid "Format" +#~ msgstr "Format" + +#~ msgid "Message" +#~ msgstr "Komunikat" + +#~ msgid "Pause the container" +#~ msgstr "Wstrzymaj kontener" + +#~ msgid "Remove on build variable" +#~ msgstr "Usuń na zmiennej budowania" + +#~ msgid "Set container on build variables" +#~ msgstr "Ustaw kontener na zmiennych budowania" + +#~ msgid "Add item" +#~ msgstr "Dodaj element" + +#~ msgid "Host port (optional)" +#~ msgstr "Port gospodarza (opcjonalnie)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (opcjonalnie)" + +#~ msgid "ReadOnly" +#~ msgstr "Tylko do odczytu" + +#~ msgid "IP prefix length" +#~ msgstr "Długość przedrostka IP" + +#~ msgid "Get new image" +#~ msgstr "Pobierz nowy obraz" + +#~ msgid "Run" +#~ msgstr "Uruchom" + +#~ msgid "On build" +#~ msgstr "Podczas budowania" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Na pewno usunąć ten obraz?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Nie można dołączyć do tego kontenera: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Nie można otworzyć kanału: $0" + +#~ msgid "Everything" +#~ msgstr "Wszystko" + +#~ msgid "Security" +#~ msgstr "Zabezpieczenia" + +#~ msgid "The scan from $time ($type) found no vulnerabilities." +#~ msgstr "Wyszukiwanie z $time ($type) nie znalazło żadnych zagrożeń." + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "Ta wersja konsoli internetowej nie obsługuje terminala." diff --git a/ui/cockpit-docker/po/sk.po b/ui/cockpit-docker/po/sk.po new file mode 100644 index 0000000..657498e --- /dev/null +++ b/ui/cockpit-docker/po/sk.po @@ -0,0 +1,1553 @@ +# Matej Marusak , 2019. #zanata, 2020. +# Matej Marusak , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-11-13 13:37+0000\n" +"Last-Translator: Jose Riha \n" +"Language-Team: Slovak \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" +"X-Generator: Weblate 5.1.1\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 kontajner" +msgstr[1] "$0 kontajnery" +msgstr[2] "$0 kontajnerov" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 obrazov dohromady, $1" +msgstr[1] "$0 obrazy dohromady, $1" +msgstr[2] "$0 obrazov dohromady, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 nepoužitých obrazov, $1" +msgstr[1] "$0 nepoužité obrazy, $1" +msgstr[2] "$0 nepoužitých obrazov, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "" + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Pridať mapovanie portov" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Pridať premennú" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Pridať zväzok" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Všetky" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Všetky registre" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Vždy" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Vyskytla sa chyba" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Autor" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Spúšťať docker pri zavádzaní systému" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +#, fuzzy +#| msgid "IP address" +msgid "CPU Shares help" +msgstr "IP adresa" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU podiely" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Zrušiť" + +#: src/Containers.jsx:286 +#, fuzzy +#| msgid "Checkpoint" +msgid "Checking health" +msgstr "Vytvoriť kontrolný bod" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Vytvoriť kontrolný bod" + +#: src/ImageRunModal.jsx:775 +#, fuzzy +#| msgid "Checkpoint container $0" +msgid "Checkpoint and restore support" +msgstr "Vytvoriť kontrolný bod pre kontajner $0" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Vytvoriť kontrolný bod pre kontajner $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "" + +#: org.cockpit-project.docker.metainfo.xml:6 +#, fuzzy +#| msgid "Docker containers" +msgid "Cockpit component for Docker containers" +msgstr "Docker kontajnery" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Príkaz" + +#: src/ImageHistory.jsx:33 +#, fuzzy +#| msgid "Commit" +msgid "Comments" +msgstr "Vytvoriť" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Vytvoriť" + +#: src/ContainerCommitModal.jsx:136 +#, fuzzy +#| msgid "No containers" +msgid "Commit container" +msgstr "Žiadne kontajnery" + +#: src/util.js:23 +msgid "Configured" +msgstr "Nakonfigurovaný" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konzola" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Kontajner" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Kontajner sa nepodarilo vytvoriť" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Kontajner sa nepodarilo spustiť" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Kontajner nebeží" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Názov kontajneru" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +#, fuzzy +#| msgid "Container name" +msgid "Container name is required." +msgstr "Názov kontajneru" + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Cesta v kontajneri" + +#: src/Volume.jsx:23 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container path must not be empty" +msgstr "Kontajner sa nepodarilo vytvoriť" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Port kontajneru" + +#: src/PublishPort.jsx:37 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container port must not be empty" +msgstr "Kontajner sa nepodarilo vytvoriť" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Kontajnery" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Vytvoriť" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "" + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Vytvoriť a spustiť" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Vytvoriť kontajner" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Vytvoriť kontajner v $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Vytvoriť kontajner v skupine" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +#, fuzzy +#| msgid "Created" +msgid "Create pod" +msgstr "Vytvorený" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Vytvorený" + +#: src/ImageHistory.jsx:33 +#, fuzzy +#| msgid "Created" +msgid "Created by" +msgstr "Vytvorený" + +#: src/ImageRunModal.jsx:939 +#, fuzzy +#| msgid "CPU shares" +msgid "Decrease CPU shares" +msgstr "CPU podiely" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "" + +#: src/ImageRunModal.jsx:978 +#, fuzzy +#| msgid "Maximum retries" +msgid "Decrease maximum retries" +msgstr "Maximum pokusov" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "" + +#: src/ImageRunModal.jsx:1099 +#, fuzzy +#| msgid "Start docker" +msgid "Decrease start period" +msgstr "Spustiť docker" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Odstrániť" + +#: src/ImageDeleteModal.jsx:92 +#, fuzzy +#| msgid "Delete $0" +msgid "Delete $0 image?" +msgstr "Odstrániť $0" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +#, fuzzy +#| msgid "Delete $0" +msgid "Delete $0?" +msgstr "Odstrániť $0" + +#: src/ImageDeleteModal.jsx:96 +#, fuzzy +#| msgid "Delete tagged images" +msgid "Delete image" +msgstr "Zmazať označené obrazy" + +#: src/PodActions.jsx:43 +#, fuzzy +#| msgid "Delete $0" +msgid "Delete pod $0?" +msgstr "Odstrániť $0" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Zmazať označené obrazy" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Zmazať nepoužívané systémové obrazy:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Zmazať nepoužívané užívateľské obrazy:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Zmazaním kontajneru sa zmažú všetky dáta v ňom." + +#: src/Containers.jsx:70 +#, fuzzy +#| msgid "Deleting a container will erase all data in it." +msgid "Deleting a running container will erase all data in it." +msgstr "Zmazaním kontajneru sa zmažú všetky dáta v ňom." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Zmazanie tohto podu zmaže nasledujúce kontajnery:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Podrobnosti" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Stiahnuť" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Stiahnuť nový obraz" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "" + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Vstupný bod" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Premenné prostredia" + +#: src/util.js:26 +msgid "Error" +msgstr "Chyba" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Chybová správa" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Príklad, Vaše Meno " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Príklad: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Skončený" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Nepodarilo sa vytvoriť kontrolný bod pre kontajner $0" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Nepodarilo sa zmazať kontajner" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Nepodarilo sa vytvoriť kontajner $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Nepodarilo sa stiahnuť obraz $0:$1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Nepodarilo sa vynútiť zmazanie kontajneru $0" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Nepodarilo sa vynútiť zmazanie obrazu $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Nepodarilo sa nútene reštartovať pod $0" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Nepodarilo sa vynútiť zmazanie podu $0" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Nepodarilo sa zastaviť kontajner $0" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Nepodarilo sa zastaviť pod $0" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Nepodarilo sa vyčistiť nepoužívané kontajnery" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Nepodarilo sa vyčistiť nepoužívané obrazy" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Nepodarilo sa stiahnuť obraz $0" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Nepodarilo sa zmazať kontajner $0" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Nepodarilo sa zmazať obraz $0" + +#: src/ContainerRenameModal.jsx:54 +#, fuzzy +#| msgid "Failed to resume container $0" +msgid "Failed to rename container $0" +msgstr "Nepodarilo sa spustiť kontajner $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Nepodarilo sa reštartovať kontajner $0" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Nepodarilo sa reštartovať pod $0" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Nepodarilo sa obnoviť kontajner $0" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Nepodarilo sa spustiť kontajner $0" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Nepodarilo sa znovuspustiť pod $0" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Nepodarilo sa spustiť kontajner $0" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +#, fuzzy +#| msgid "Failed to checkpoint container $0" +msgid "Failed to run health check on container $0" +msgstr "Nepodarilo sa vytvoriť kontrolný bod pre kontajner $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +#, fuzzy +#| msgid "Failed to search for images: $0" +msgid "Failed to search for images." +msgstr "Nepodarilo sa nájsť obrazy: $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Nepodarilo sa nájsť obrazy: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Nepodarilo sa nájsť nové obrazy" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Nepodarilo sa spustiť kontajner $0" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Nepodarilo sa spustiť pod $0" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Nepodarilo sa zastaviť kontajner $0" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Nepodarilo sa zastaviť pod $0" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "" + +#: src/ContainerCommitModal.jsx:151 +#, fuzzy +#| msgid "Force stop" +msgid "Force commit" +msgstr "Vynútiť zastavenie" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Vynútiť odstránenie" + +#: src/PodActions.jsx:42 +#, fuzzy +#| msgid "Force delete" +msgid "Force delete pod $0?" +msgstr "Vynútiť odstránenie" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Vynútiť reštartovanie" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Vynútiť zastavenie" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Brána" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Skryť obrazy" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Skryť dočasné obrazy" + +#: src/Images.jsx:158 +msgid "History" +msgstr "" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Cesta na hostiteľovi" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Port na hostiteľovi" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Nápoveda k portu na hostiteľovi" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP adresa" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Nápoveda k IP adrese" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ignorovať staticky nastavené IP adresy" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ignorovať staticky nastavené MAC adresy" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Obraz" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "" + +#: src/ContainerCommitModal.jsx:35 +#, fuzzy +#| msgid "Container name" +msgid "Image name is required" +msgstr "Názov kontajneru" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Nápoveda k výberu obrazu" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Obrazy" + +#: src/ImageRunModal.jsx:940 +#, fuzzy +#| msgid "CPU shares" +msgid "Increase CPU shares" +msgstr "CPU podiely" + +#: src/ImageRunModal.jsx:1050 +#, fuzzy +#| msgid "Integration" +msgid "Increase interval" +msgstr "Integrácia" + +#: src/ImageRunModal.jsx:979 +#, fuzzy +#| msgid "Maximum retries" +msgid "Increase maximum retries" +msgstr "Maximum pokusov" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "" + +#: src/ImageRunModal.jsx:1100 +#, fuzzy +#| msgid "Start docker" +msgid "Increase start period" +msgstr "Spustiť docker" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Integrácia" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +#, fuzzy +#| msgid "Integration" +msgid "Interval" +msgstr "Integrácia" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "" + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Kľúč" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "" + +#: src/ContainerDetails.jsx:71 +#, fuzzy +#| msgid "Checkpoint" +msgid "Latest checkpoint" +msgstr "Vytvoriť kontrolný bod" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +#, fuzzy +#| msgid "Loading logs..." +msgid "Loading details..." +msgstr "Načítanie záznamov udalostí..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Načítanie záznamov udalostí..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Načítanie..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Miestne" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Miestne obrazy" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Záznamy udalostí" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC adresa" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Maximum pokusov" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Pamäť" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Pamäťový limit" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Pamäťová jednotka" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Mód" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Názov" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "" + +#: src/ContainerRenameModal.jsx:68 +#, fuzzy +#| msgid "Container name" +msgid "New container name" +msgstr "Názov kontajneru" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Názov nového obrazu" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Nie" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Žiadne kontajnery" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Tento obraz nepoužívajú žiadne kontajnery" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "V tomto pode nie sú žiadne kontajnery" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Žiadne kontajneri nevyhovujú danému filtru" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Neboli definované žiadne premenné prostredia" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Žiadne obrazy" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Žiadne obrazy neboli nájdené" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Žiadne obrazy nevyhovujú danému filtru" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Žiaden výsledok pre $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Žiadne spustené kontajnery" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Žiadne špecifikované zväzky" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Pri chybe" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Iba bežiace" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Možnosti" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Vlastník" + +#: src/ImageRunModal.jsx:761 +#, fuzzy +#| msgid "Owner" +msgid "Owner help" +msgstr "Vlastník" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Pozastaviť" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Zastaviť kontajner keď sa vytvára obraz" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Pozastavený" + +#: src/PodCreateModal.jsx:89 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Pod failed to be created" +msgstr "Kontajner sa nepodarilo vytvoriť" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker kontajnery" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Služba Docker nie je aktívna" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Mapovanie portov" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Porty" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Súkromný" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokol" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Vyčistiť" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Vyčistiť nepoužívané kontajnery" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Vyčistiť nepoužívané obrazy" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +#, fuzzy +#| msgid "No running containers" +msgid "Pruning containers" +msgstr "Žiadne spustené kontajnery" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Prerezávanie obrazov" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Stiahnúť najnovší obraz" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Sťahuje sa" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Odstrániť položku" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Odstráni vybrané nespustené kontajnery" + +#: src/util.js:23 +msgid "Removing" +msgstr "Odstraňuje sa" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "" + +#: src/ContainerRenameModal.jsx:85 +#, fuzzy +#| msgid "Restore container $0" +msgid "Rename container $0" +msgstr "Obnovenie kontajneru $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Reštartovať" + +#: src/ImageRunModal.jsx:948 +#, fuzzy +#| msgid "Restart" +msgid "Restart policy" +msgstr "Reštartovať" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +#, fuzzy +#| msgid "Host path" +msgid "Restart policy help" +msgstr "Cesta na hostiteľovi" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "" + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Obnoviť" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Obnovenie kontajneru $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "" + +#: src/ImageSearchModal.jsx:190 +#, fuzzy +#| msgid "Please retry another term." +msgid "Retry another term." +msgstr "Skúste iný pojem." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Hľadať podľa mena alebo popisu" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Hľadanie obrazu" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Hľadá sa..." + +#: src/ImageRunModal.jsx:822 +#, fuzzy +#| msgid "Loading..." +msgid "Searching: $0" +msgstr "Načítanie..." + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Zdielaný" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Zobraziť obrazy" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "" + +#: src/ContainerIntegration.jsx:82 +#, fuzzy +#| msgid "Show images" +msgid "Show less" +msgstr "Zobraziť obrazy" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Zobraziť viac" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Veľkosť" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Spustiť" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +#, fuzzy +#| msgid "Start docker" +msgid "Start period" +msgstr "Spustiť docker" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Spustiť docker" + +#: src/ImageSearchModal.jsx:185 +#, fuzzy +#| msgid "Please start typing to look for images." +msgid "Start typing to look for images." +msgstr "Začnite písať na vyhľadanie obrazov." + +#: src/ContainerHealthLogs.jsx:105 +#, fuzzy +#| msgid "Start" +msgid "Started at" +msgstr "Spustiť" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Stav" + +#: src/ContainerHealthLogs.jsx:56 +#, fuzzy +#| msgid "State" +msgid "Status" +msgstr "Stav" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Zastaviť" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Zastavený" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Systém" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Systémový docker je tiež dostupný" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Tag" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Tagy" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "" + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "" + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Riešiť problém" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +#, fuzzy +#| msgid "Failed to download image $0:$1" +msgid "Unable to load image history" +msgstr "Nepodarilo sa stiahnuť obraz $0:$1" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Aktívny od $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Využívaný s" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Užívateľský docker je tiež dostupný" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Používateľ:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Hodnota" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Zväzky" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +#, fuzzy +#| msgid "Checkpoint" +msgid "When unhealthy" +msgstr "Vytvoriť kontrolný bod" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "S terminálom" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "" + +#: src/manifest.json:0 +msgid "container" +msgstr "kontajner" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "sťahuje sa" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "" + +#: src/manifest.json:0 +msgid "image" +msgstr "obraz" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "" + +#: src/ImageDeleteModal.jsx:79 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate" +msgstr "Skryť dočasné obrazy" + +#: src/ImageDeleteModal.jsx:59 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate image" +msgstr "Skryť dočasné obrazy" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "Nedostupné" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "nedostupné" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +#, fuzzy +#| msgid "Ports" +msgid "ports" +msgstr "Porty" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "systém" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "nepoužitý" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "používateľ:" + +#: src/Containers.jsx:547 +#, fuzzy +#| msgid "Volumes" +msgid "volumes" +msgstr "Zväzky" + +#~ msgid "Delete $0" +#~ msgstr "Odstrániť $0" + +#, fuzzy +#~| msgid "Restart" +#~ msgid "Restarting" +#~ msgstr "Reštartovať" + +#, fuzzy +#~| msgid "Please confirm deletion of $0" +#~ msgid "Confirm deletion of $0" +#~ msgstr "Potvrďte zmazanie $0" + +#, fuzzy +#~| msgid "Please confirm deletion of pod $0" +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Potvrďte zmazanie podu $0" + +#, fuzzy +#~| msgid "Please confirm force deletion of pod $0" +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Potvrďte vynútené zmazanie podu $0" + +#, fuzzy +#~| msgid "Please confirm forced deletion of $0" +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Potvrďte nútené zmazanie $0" + +#~ msgid "Container is currently running." +#~ msgstr "Kontajner momentálne beží." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Do exportu nezahŕnať zmeny v koreňovom súborovovom systéme" + +#, fuzzy +#~| msgid "Delete tagged images" +#~ msgid "Delete unused $0 images:" +#~ msgstr "Zmazať označené obrazy" + +#~ msgid "created" +#~ msgstr "vytvorený" + +#~ msgid "exited" +#~ msgstr "skončený" + +#~ msgid "paused" +#~ msgstr "pozastavený" + +#, fuzzy +#~| msgid "user" +#~ msgid "user" +#~ msgstr "používateľ" + +#~ msgid "Commit image" +#~ msgstr "Vytvoriť obraz" + +#~ msgid "Format" +#~ msgstr "Formát" + +#~ msgid "Message" +#~ msgstr "Správa" + +#~ msgid "Pause the container" +#~ msgstr "Pozastaviť kontajner" + +#~ msgid "Add item" +#~ msgstr "Pridať položku" + +#, fuzzy +#~| msgid "Host port" +#~ msgid "Host port (optional)" +#~ msgstr "Port na hostiteľovi" + +#~ msgid "IP prefix length" +#~ msgstr "Dĺžka predpony IP adresy" + +#~ msgid "Run" +#~ msgstr "Spustiť" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Ste si istý/istá, že chcete odstrániť tento obraz?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Nepodarilo sa pripojiť k tomuto kontajneru: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Nepodarilo sa otvoriť kanál: $0" + +#~ msgid "Everything" +#~ msgstr "Všetko" + +#~ msgid "Security" +#~ msgstr "Bezpečnosť" diff --git a/ui/cockpit-docker/po/sv.po b/ui/cockpit-docker/po/sv.po new file mode 100644 index 0000000..7bf540f --- /dev/null +++ b/ui/cockpit-docker/po/sv.po @@ -0,0 +1,1484 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Gleb Vassiljev , 2020. +# Göran Uddeborg , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-11-29 13:31+0000\n" +"Last-Translator: Luna Jernberg \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"X-Generator: Weblate 5.2.1\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 behållare" +msgstr[1] "$0 behållare" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 avbild, total, $1" +msgstr[1] "$0 avbilder, totalt, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 sekund" +msgstr[1] "$0 sekunder" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 oanvänd avbild, $1" +msgstr[1] "$0 oanvända avbilder, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 till 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "Åtgärd att ta när behållaren övergår till ett ohälsosamt tillstånd." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Lägg till portmappning" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Lägg till variabel" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Lägg till volym" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Alla" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Alla register" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Alltid" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Ett fel uppstod" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Upphovsman" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Kör igång docker automatiskt vid uppstart" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "CPU-andelar hjälp" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU-andelar" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU-andelar avgör prioriteten på körande behållare. Standardprioriteten är " +"1024. Ett högre tal prioriterar denna behållare. Ett lägre tal sänker " +"prioriteten." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Avbryt" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Kontrollerar hälsa" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Checkpunkt" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "checkpunkt och återställnings stöd" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Ta checkpunkt på behållare $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Klicka för att se publicerade portar" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Klicka för att se volymer" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Cockpit komponent för Docker-behållare" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Kommando" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Kommentarer" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Fastställ" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Commit behållare" + +#: src/util.js:23 +msgid "Configured" +msgstr "Konfigurerad" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konsol" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Behållare" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Behållaren misslyckades att skapas" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Behållaren misslyckades att startas" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Behållaren kör inte" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Behållarnamn" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Behållarnamn krävs." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Behållarsökväg" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "Behållarens sökväg får inte vara tom" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Behållarport" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "Behållarporten får inte vara tom" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Behållare" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Skapa" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Skapa en ny avbild baserad på det aktuella läget för $0 behållaren." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Skapa och kör" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Skapa behållare" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Skapa behållare i $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Skapa behållare i kapsel" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Skapa pod" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Skapad" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Skapad av" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Minska CPU-andelar" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Minska intervallet" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Minska maximalt antal försök igen" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Minska minne" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Minska återförsök" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Minska startintervallet" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Minska timeout" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Radera" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "Radera $0 avbild?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "Radera $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "Radera avbild" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Radera podd $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Radera taggade avbilder" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Ta bort oanvända systemavbilder:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Ta bort oanvända användaravbilder:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "När en behållare raderas försvinner även all data i den." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "När en behållare som körs raderas försvinner även all data i den." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Att ta bort denna kapsel kommer ta bort följande behållare:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Detaljer" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Disk utrymme" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Docker-format är användbart när du delar avbilden med Docker eller Moby " +"Engine" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Ladda ner" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Ladda ner ny avbild" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Tom podd $0 kommer att tas bort permanent." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Ingångspunkt" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Miljövariabler" + +#: src/util.js:26 +msgid "Error" +msgstr "Fel" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Felmeddelande" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Ett fel uppstod vid anslutning till konsolen" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Exempel, Ditt Namn " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Exempel: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Avslutats" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Misslyckad hälsokörning" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Kunde inte ta checkpunkt av behållare $0" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Misslyckades med att rensa upp behållaren" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Kunde inte fastställa behållaren $0" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Misslyckades att skapa behållaren $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Kunde inte ladda ner avbild $0:$1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Misslyckades att tvingande ta bort behållare $0" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Misslyckades att tvingande ta bort avbilden $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Misslyckades med tvingad omstart av kapseln $0" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Misslyckades att tvinga stopp av kapsel $0" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Misslyckades med att pausa behållaren $0" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Misslyckades att pausa kapseln $0" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Misslyckades att rensa oanvända behållare" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Misslyckades att rensa oanvända avbilder" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Misslyckades med att hämta avbilden $0" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Misslyckades att ta bort behållaren $0" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Misslyckades att ta bort avbilden $0" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Misslyckades att byta namn på behållaren $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Misslyckades att starta om behållaren $0" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Misslyckades att starta om kapseln $0" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Misslyckades att återställa behållaren $0" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Misslyckades att återuppta behållaren $0" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Misslyckades att återuppta kapseln $0" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Misslyckades att köra behållaren $0" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Misslyckades att köra hälsokontrollen på behållare $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Misslyckades att söka efter avbilder." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Misslyckades att söka efter avbilder: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Misslyckades att söka efter nya avbilder" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Misslyckades att starta behållaren $0" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Misslyckades att starta kapseln $0" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Misslyckades att stoppa behållaren $0" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Misslyckades att stoppa kapseln $0" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Misslyckanden i följd" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Framtvinga commit" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Framtvinga borttagande" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Framtvinga borttagande av podd $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Framtvinga omstart" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Framtvinga stopp" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Gateway" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Hälsokontroll" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Hälsokontrollens intervallhjälp" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Hälsokontrollens återförsökshjälp" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Hälsokontrollens startintervallshjälp" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Hälsokontrollens tidsgränshjälp" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Hälsokontrollens checkåtgärd hjälp" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Hälsosam" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Dölj avbilder" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Dölj mellanliggande avbilder" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Historik" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Värdsökväg" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Värdport" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Värdport hjälp" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP-adress" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "IP-adress hjälp" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Ideal för utveckling" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Ideal för att köra tjänster" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Om värd-IP är inställd på 0.0.0.0 eller inte alls, kommer porten att bindas " +"till alla IP-adresser på värden." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Om värdporten inte är inställd kommer behållareporten att slumpmässigt " +"tilldelas en port på värden." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ignorera IP-adressen om den är statiskt satt" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ignorera MAC-adressen om den är statiskt satt" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Avbild" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Avbildsnamn är inte unikt" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Avbildsnamn krävs" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Avbildsval hjälp" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Avbilder" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Öka CPU-andelar" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Öka intervallet" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Öka maximalt antal försök igen" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Öka minne" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Öka återförsöken" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Öka startintervallet" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Öka timeout" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Integration" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Intervall" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Intervallet hur ofta hälsokontroller körs." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Ogiltiga tecken. Namn kan bara innehålla bokstäver, siffror och vissa " +"skiljetecken (_ . -)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Behåll alla tillfälliga checkpunktsfiler" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Nyckel" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "Nyckel får inte vara tom" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Senaste 5 körningarna" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Senaste checkpunkt" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Låt fortsätta köra efter att skriva checkpunkt till disk" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Läser in detaljer …" + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Läser in loggar …" + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Läser in …" + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Lokal" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Lokala avbilder" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Loggar" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC-adress" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Maximalt antal försök igen" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Minne" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Minnesgräns" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Minnesenhet" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Läge" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Flera taggar finns för denna avbild. Välj vilka taggade avbilder som skall " +"raderas." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "Måste vara en giltig IP adress" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Namn" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "Namn används redan" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Nytt behållarnamn" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Nytt Avbildsnamn" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Nej" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Ingen åtgärd" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Inga behållare" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Inga behållare använder denna avbild" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "Inga behållare i denna kapsel" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Inga behållare som stämmer med det aktuella filtret" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Inga miljövariabler specificerade" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Inga avbilder" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Inga avbilder funna" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Inga avbilder som stämmer med det aktuella filtret" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Ingen Etikett" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Inga portar exponerade" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Inga resultat för $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Inga körande behållare" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Inga volymer specificerade" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Vid misslyckande" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Endast körande" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Alternativ" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Ägare" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Ägare hjälp" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Lyckad hälsokontrollskörning" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Klistra in en eller flera rader med nyckel=värdepar i valfritt fält för " +"massimport" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Pausa" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Pausa behållaren när du skapar en avbild" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Pausad" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Podden kunde inte skapas" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Pod namn" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker-behållare" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker-tjänsten är inte aktiv" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Portkartering" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Portar" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Portar under 1024 kan inte mappas" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Privat" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokoll" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Rensa" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Rensa oanvända behållare" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Rensa oanvända avbilder" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Rensar behållare" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Rensar avbilder" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Hämta senaste avbild" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Hämtar" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Skrivskyddad åtkomst" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Läs och skrivåtkomst" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Ta bort post" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Tar bort valda icke-körande behållare" + +#: src/util.js:23 +msgid "Removing" +msgstr "Tar bort" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Byt namn" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Byt namn på behållaren $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Resursgränser kan ställas in" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Starta om" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Starta om policy" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Starta om policy hjälp" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Starta om policy att följa när behållare avslutas." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Starta om policyn till att följa när behållare avslutar. Att använda " +"fortlevande (linger) för automatstartande behållare fungerar kanske inte i " +"vissa situationer, som när ecryptfs, systemd-homed, NFS eller 2FA används " +"för ett användarkonto." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Återställ" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Återställ behållaren $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Återställ med etablerade TCP-förbindelser" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Begränsat av användarkontobehörigheter" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Återuppta" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Omförsök" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Försök igen med en annan term." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Kör hälsokontroll" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Kör" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Sök efter namn eller beskrivning" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Sök efter register" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Sök efter" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Sök efter en avbild" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Söksträng eller behållareplats" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Söker …" + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Söker: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Delad" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Visa" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Visa avbilder" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Visa mellanliggande avbilder" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Visa mindre" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Visa mer" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Storlek" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Starta" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Startperiod" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Starta docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Börja skriva för att leta efter avbilder." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Startad vid" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Tillstånd" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Status" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Stoppa" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Stoppad" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Stöd att bevara etablerade TCP-förbindelser" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "System" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "System-docker-tjänsten är också tillgänglig" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Tagg" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Taggar" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Cockpit-användargränssnittet för Docker-behållare." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Initieringstiden sombehövs för att en behållare skall komma igång." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Den maximala tiden som tillåts för att klara av hälsokontrollen före ett " +"intervall betraktas som misslyckat." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Antalet återförsök som tillåts före en hälsokontroll betraktas som ohälsosam." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Tidsgräns" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Felsök" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Skriv för att filtrera …" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Kunde inte ladda avbildshistoriken" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Ohälsosam" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Uppe sedan $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Använd gammalt Docker-format" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Används av" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Användare" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Användar-docker-tjänsten är också tillgänglig" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Användare:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Värde" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Volymer" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "När ohälsosam" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Med terminal" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Skrivbar" + +#: src/manifest.json:0 +msgid "container" +msgstr "behållare" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "hämtar" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "värd[:port]/[användare]/behållare[:tagg]" + +#: src/manifest.json:0 +msgid "image" +msgstr "avbild" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "i" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "mellanliggande" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "mellanliggande avbild" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "ej tillämpligt" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "inte tillgängligt" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "kapselgrupp" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "portar" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "sekunder" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "system" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "oanvänd" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "användare:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "volymer" + +#~ msgid "Delete $0" +#~ msgstr "Radera $0" + +#~ msgid "select all" +#~ msgstr "välj alla" + +#~ msgid "Failure action" +#~ msgstr "Misslyckad åtgärd" + +#~ msgid "Restarting" +#~ msgstr "Startar om" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Bekräfta borttagning av $0" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Bekräfta borttagning av kapsel $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Bekräfta tvångsradering av kapsel $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Bekräfta tvångsradering av $0" + +#~ msgid "Container is currently running." +#~ msgstr "Behållaren kör för närvarande." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Inkludera inte rotfilsystemsändringar vid export" + +#~ msgid "Default with single selectable" +#~ msgstr "Standard med enkel valbar" + +#~ msgid "Start after creation" +#~ msgstr "Starta efter skapande" + +#, fuzzy +#~| msgid "Delete tagged images" +#~ msgid "Delete unused $0 images:" +#~ msgstr "Radera taggade avbilder" + +#~ msgid "created" +#~ msgstr "skapad" + +#~ msgid "exited" +#~ msgstr "avslutad" + +#~ msgid "paused" +#~ msgstr "pausad" + +#~ msgid "running" +#~ msgstr "kör" + +#~ msgid "stopped" +#~ msgstr "stoppad" + +#~ msgid "user" +#~ msgstr "användare" + +#~ msgid "Add on build variable" +#~ msgstr "Lägg till byggvariabel" + +#~ msgid "Commit image" +#~ msgstr "Fastställningsavbild" + +#~ msgid "Format" +#~ msgstr "Format" + +#~ msgid "Message" +#~ msgstr "Meddelande" + +#~ msgid "Pause the container" +#~ msgstr "Pausa behållaren" + +#~ msgid "Remove on build variable" +#~ msgstr "Ta bort byggvariabel" + +#~ msgid "Set container on build variables" +#~ msgstr "Sätt behållare på byggvariabler" + +#~ msgid "Add item" +#~ msgstr "Lägg till post" + +#~ msgid "Host port (optional)" +#~ msgstr "Värdport (valfri)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (valfri)" + +#~ msgid "ReadOnly" +#~ msgstr "LäsEndast" + +#~ msgid "IP prefix length" +#~ msgstr "IP-prefixlängd" + +#~ msgid "Get new image" +#~ msgstr "Hämta ny avbild" + +#~ msgid "Run" +#~ msgstr "Kör" + +#~ msgid "On build" +#~ msgstr "Vid bygge" + +#~ msgid "Everything" +#~ msgstr "Allting" diff --git a/ui/cockpit-docker/po/tr.po b/ui/cockpit-docker/po/tr.po new file mode 100644 index 0000000..5d77909 --- /dev/null +++ b/ui/cockpit-docker/po/tr.po @@ -0,0 +1,1501 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Oğuz Ersen , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-12-01 18:43+0000\n" +"Last-Translator: Weblate Translation Memory \n" +"Language-Team: Turkish \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"X-Generator: Weblate 5.2.1\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 kapsayıcı" +msgstr[1] "$0 kapsayıcı" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "Toplam $0 kalıp, $1" +msgstr[1] "Toplam $0 kalıp, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 saniye" +msgstr[1] "$0 saniye" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 kullanılmayan kalıp, $1" +msgstr[1] "$0 kullanılmayan kalıp, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1'den 65535'e" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "" +"Kapsayıcı sağlıksız bir duruma geçtikten sonra gerçekleştirilecek eylem." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Bağlantı noktası eşlemesi ekle" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Değişken ekle" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Birim ekle" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Tümü" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Tüm kayıtlar" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Her zaman" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Bir hata meydana geldi" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Hazırlayan" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Docker'ı önyüklemede otomatik olarak başlat" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "CPU Paylaşımları yardımı" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU paylaşımları" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU paylaşımları, kapsayıcıları çalıştırmanın önceliğini belirler. " +"Varsayılan öncelik 1024'dür. Daha yüksek bir sayı bu kapsayıcıya öncelik " +"verir. Daha düşük bir sayı önceliği azaltır." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "İptal" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Sağlık denetleniyor" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Denetim noktası" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Denetim noktası ve geri yükleme desteği" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "$0 kapsayıcısı denetim noktası" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Yayınlanan bağlantı noktalarını görmek için tıklayın" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Birimleri görmek için tıklayın" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Docker kapsayıcıları için Cockpit bileşeni" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Komut" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Açıklamalar" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "İşle" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Kapsayıcı işle" + +#: src/util.js:23 +msgid "Configured" +msgstr "Yapılandırıldı" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Konsol" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Kapsayıcı" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Kapsayıcının oluşturulması başarısız oldu" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Kapsayıcının başlatılması başarısız oldu" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Kapsayıcı çalışmıyor" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Kapsayıcı adı" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Kapsayıcı adı gerekli." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Kapsayıcı yolu" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "Kapsayıcı yolu boş olmamak zorundadır" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Kapsayıcı bağlantı noktası" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "Kapsayıcı bağlantı noktası boş olmamak zorundadır" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Kapsayıcılar" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Oluştur" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "$0 kapsayıcısının şu anki durumuna göre yeni bir kalıp oluşturun." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Oluştur ve çalıştır" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Kapsayıcı oluştur" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "$0 içinde kapsayıcı oluştur" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Bölme içinde kapsayıcı oluştur" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Bölme oluştur" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Oluşturuldu" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Oluşturan" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "CPU paylaşımlarını azalt" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Aralığı azalt" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "En fazla yeniden denemeyi azalt" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Belleği azalt" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Yeniden denemeleri azalt" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Başlangıç süresini azalt" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Zaman aşımını azalt" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Sil" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "$0 kalıbı silinsin mi?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "$0 silinsin mi?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "Kalıbı sil" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "$0 bölmesi silinsin mi?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Etiketli kalıpları sil" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Kullanılmayan sistem kalıplarını sil:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Kullanılmayan kullanıcı kalıplarını sil:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "Bir kapsayıcıyı silmek içindeki tüm verileri silecek." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "Çalışan bir kapsayıcıyı silmek içindeki tüm verileri silecek." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Bu bölmeyi silmek aşağıdaki kapsayıcıları kaldıracak:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Ayrıntılar" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Disk alanı" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Docker biçimi, kalıbı Docker veya Moby Engine ile paylaşırken kullanışlıdır" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "İndir" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Yeni kalıbı indir" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Boş bölme $0 kalıcı olarak kaldırılacaktır." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Giriş noktası" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Ortam değişkenleri" + +#: src/util.js:26 +msgid "Error" +msgstr "Hata" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Hata iletisi" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Konsola bağlanırken hata meydana geldi" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Örnek, Adınız " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Örnek: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Çıkıldı" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Sağlık işlemini çalıştırma başarısız oldu" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "$0 kapsayıcısını denetleme noktası başarısız oldu" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Kapsayıcıyı temizleme başarısız oldu" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "$0 kapsayıcısını işleme başarısız oldu" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "$0 kapsayıcısını oluşturma başarısız oldu" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "$0:$1 kalıbını indirme başarısız oldu" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "$0 kapsayıcısını zorla kaldırma başarısız oldu" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "$0 kalıbını zorla kaldırma başarısız oldu" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "$0 bölmesini yeniden başlatmaya zorlama başarısız oldu" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "$0 bölmesini zorla durdurma başarısız oldu" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "$0 kapsayıcısını duraklatma başarısız oldu" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "$0 bölmesini duraklatma başarısız oldu" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Kullanılmayan kapsayıcıları ayıklama başarısız oldu" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Kullanılmayan kalıpları ayıklama başarısız oldu" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "$0 kalıbını çekme başarısız oldu" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "$0 kapsayıcısını kaldırma başarısız oldu" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "$0 kalıbını kaldırma başarısız oldu" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "$0 kapsayıcısını yeniden adlandırma başarısız oldu" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "$0 kapsayıcısını yeniden başlatma başarısız oldu" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "$0 bölmesini yeniden başlatma başarısız oldu" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "$0 kapsayıcısını geri yükleme başarısız oldu" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "$0 kapsayıcısını sürdürme başarısız oldu" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "$0 bölmesini sürdürme başarısız oldu" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "$0 kapsayıcısını çalıştırma başarısız oldu" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "$0 kapsayıcısında sağlık denetimi çalıştırma başarısız oldu" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Kalıpları arama başarısız oldu." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Kalıpları arama başarısız oldu: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Yeni kalıpları arama başarısız oldu" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "$0 kapsayıcısını başlatma başarısız oldu" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "$0 bölmesini başlatma başarısız oldu" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "$0 kapsayıcısını durdurma başarısız oldu" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "$0 bölmesini durdurma başarısız oldu" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Başarısız olan seri" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "İşlemeye zorla" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Silmeye zorla" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "$0 bölmesi silmeye zorlansın mı?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Yeniden başlatmaya zorla" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Durdurmaya zorla" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Ağ geçidi" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Sağlık denetimi" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Sağlık denetimi aralığı yardımı" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Sağlık denetimi yeniden denemeleri yardımı" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Sağlık denetimi başlangıç dönemi yardımı" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Sağlık denetimi zaman aşımı yardımı" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Sağlık denetimi hatası eylem yardımı" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Sağlıklı" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Kalıpları gizle" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Ara kalıpları gizle" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Geçmiş" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Anamakine yolu" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Anamakine bağlantı noktası" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Anamakine b.noktası yardım" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "Kimlik" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP adresi" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "IP adresi yardım" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Geliştirme için ideal" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Çalışan hizmetler için ideal" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Eğer anamakine IP'si 0.0.0.0 olarak ayarlanırsa veya hiç ayarlanmazsa, " +"bağlantı noktası anamakinedeki tüm IP'lere bağlanır." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Eğer anamakine bağlantı noktası ayarlanmazsa, kapsayıcı bağlantı noktası " +"anamakinede rastgele bir bağlantı noktasına atanacaktır." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Sabit olarak ayarlanmışsa IP adresini yoksay" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Sabit olarak ayarlanmışsa MAC adresini yoksay" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Kalıp" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Kalıp adı benzersiz değil" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Kalıp adı gerekli" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Kalıp seçim yardımı" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Kalıplar" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "CPU paylaşımlarını artır" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Aralığı artır" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "En fazla yeniden denemeyi artır" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Belleği artır" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Yeniden denemeleri artır" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Başlangıç süresini artır" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Zaman aşımını artır" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Bütünleştirme" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Aralık" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Sağlık denetiminin ne sıklıkta çalıştırıldığı aralığı." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Geçersiz karakterler. Ad sadece harf, sayı ve belirli noktalama işaretlerini " +"(_ . -) içerebilir." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Tüm geçici denetim noktası dosyalarını sakla" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Anahtar" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "Anahtar boş olmamak zorundadır" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Son 5 çalıştırma" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Son denetim noktası" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Denetim noktasını diske yazdıktan sonra çalışır durumda bırak" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Ayrıntılar yükleniyor..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Günlükler yükleniyor..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Yükleniyor..." + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Yerel" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Yerel kalıplar" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Günlükler" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC adresi" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "En fazla yeniden deneme" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Bellek" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Bellek sınırı" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Bellek birimi" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Mod" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Bu kalıp için birden fazla etiket var. Silinecek etiketlenmiş kalıpları " +"seçin." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "Geçerli bir IP adresi olmak zorundadır" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Ad" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "Ad zaten kullanımda" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Yeni kapsayıcı adı" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Yeni kalıp adı" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Hayır" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Eylem yok" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Kapsayıcılar yok" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Bu kalıbı hiçbir kapsayıcı kullanmıyor" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "Bu bölmede kapsayıcılar yok" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Şu anki süzgeçle eşleşen kapsayıcılar yok" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Belirtilen ortam değişkenleri yok" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Kalıplar yok" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Bulunan kalıplar yok" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Şu anki süzgeçle eşleşen kalıplar yok" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Etiket yok" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Açığa çıkan bağlantı noktaları yok" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "$0 için sonuçlar yok" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Çalışan kapsayıcılar yok" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Belirtilen birimler yok" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "Başarısızlıkla" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Sadece çalışanlar" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Seçenekler" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Sahibi" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Sahibi yardımı" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Sağlık çalıştırması geçti" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Toplu içe aktarma için herhangi bir alana bir veya daha fazla anahtar=değer " +"çifti satırı yapıştırın" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Duraklat" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Kalıp oluştururken kapsayıcıyı duraklatın" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Duraklatıldı" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Bölmenin oluşturulması başarısız oldu" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Bölme adı" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker kapsayıcıları" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker hizmeti etkin değil" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Bağlantı noktası eşleme" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Bağlantı noktaları" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "1024 altındaki bağlantı noktaları eşlenebilir" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Özel" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Protokol" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Ayıkla" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Kullanılmayan kapsayıcıları ayıkla" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Kullanılmayan kalıpları ayıkla" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Kapsayıcılar ayıklanıyor" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Kalıplar ayıklanıyor" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Son kalıbı çek" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Çekiliyor" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Salt-okunur erişim" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Okuma-yazma erişimi" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Öğeyi kaldır" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Seçilen çalışmayan kapsayıcıları kaldırır" + +#: src/util.js:23 +msgid "Removing" +msgstr "Kaldırılıyor" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Yeniden adlandır" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "$0 kapsayıcısını yeniden adlandır" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Kaynak sınırları ayarlanabilir" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Yeniden başlat" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Yeniden başlatma ilkesi" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Yeniden başlatma ilkesi yardımı" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Kapsayıcılardan çıkıldığında izlenecek ilkeyi yeniden başlatın." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Kapsayıcılar çıktığında izlenecek ilkeyi yeniden başlatın. Otomatik başlatma " +"kapsayıcıları için geciktirme kullanılması, bir kullanıcı hesabında " +"ecryptfs, systemd-homed, NFS veya 2FA kullanıldığında olduğu gibi bazı " +"durumlarda çalışmayabilir." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Geri yükle" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "$0 kapsayıcısını geri yükle" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Kurulu TCP bağlantıları ile geri yükle" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Kullanıcı hesabı izinleri tarafından kısıtlanmış" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Sürdür" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Yeniden denemeler" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Başka bir terimi yeniden deneyin." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Sağlık denetimini çalıştır" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Çalışıyor" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Ada veya açıklamaya göre ara" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Kayıt defterine göre ara" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Ara" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Kalıp ara" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Arama dizgisi veya kapsayıcı konumu" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Aranıyor..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Aranan: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Paylaşılan" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Göster" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Kalıpları göster" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Ara kalıpları göster" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Daha az göster" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Daha fazlasını göster" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Boyut" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Başlat" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Başlangıç süresi" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Docker'ı başlat" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Kalıpları aramak için yazmaya başlayın." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Başlama zamanı" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Durum" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Durum" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Durdur" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Durduruldu" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Kurulu TCP bağlantılarını korumayı destekle" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Sistem" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Sistem Docker hizmeti de kullanılabilir" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Etiket" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Etiketler" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Docker kapsayıcıları için Cockpit kullanıcı arayüzü." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Bir kapsayıcının önyükleme yapması için gereken başlatma süresi." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Bir aralığın başarısız olduğu kabul edilmeden önce sağlık denetimini " +"tamamlanması için izin verilen en fazla süre." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Bir sağlık denetiminden önce izin verilen yeniden deneme sayısı sağlıksız " +"olarak kabul edilir." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Zaman aşımı" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Sorun Giderme" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Süzmek için yazın…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Kalıp geçmişini yükleme başarısız oldu" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Sağlıksız" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "$0'dan beri aktif" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Eski Docker biçimini kullan" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Kullanan" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Kullanıcı" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Kullanıcı Docker hizmeti de kullanılabilir" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Kullanıcı:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Değer" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Birimler" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "Sağlıksız olduğunda" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "Terminal ile" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Yazılabilir" + +#: src/manifest.json:0 +msgid "container" +msgstr "kapsayıcı" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "indiriliyor" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "anamakine[:b.noktası]/[kullanıcı]/kapsayıcı[:etiket]" + +#: src/manifest.json:0 +msgid "image" +msgstr "kalıp" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "şurada" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "orta seviye" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "orta seviye kalıp" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "yok" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "kullanılabilir değil" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "bölme grubu" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "bağlantı noktaları" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "saniye" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "sistem" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "kullanılmayan" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "kullanıcı:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "birimler" + +#~ msgid "Delete $0" +#~ msgstr "$0 sil" + +#~ msgid "select all" +#~ msgstr "tümünü seç" + +#~ msgid "Failure action" +#~ msgstr "Başarısız eylem" + +#~ msgid "Restarting" +#~ msgstr "Yeniden başlatılıyor" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "$0 için silme işlemini onaylayın" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "$0 bölmesinin silme işlemini onaylayın" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "$0 bölmesinin zorla silme işlemini onaylayın" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "$0 için zorla silme işlemini onaylayın" + +#~ msgid "Container is currently running." +#~ msgstr "Kapsayıcı şu anda çalışıyor." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Dışa aktarırken kök dosya sistemi değişikliklerini dahil etme" + +#~ msgid "Default with single selectable" +#~ msgstr "Tek seçilebilir ile varsayılan" + +#~ msgid "Start after creation" +#~ msgstr "Oluşturmadan sonra başlat" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "Kullanılmayan $0 kalıplarını sil:" + +#~ msgid "created" +#~ msgstr "oluşturuldu" + +#~ msgid "exited" +#~ msgstr "çıkıldı" + +#~ msgid "paused" +#~ msgstr "duraklatıldı" + +#~ msgid "running" +#~ msgstr "çalışıyor" + +#~ msgid "stopped" +#~ msgstr "durduruldu" + +#~ msgid "user" +#~ msgstr "kullanıcı" + +#~ msgid "Add on build variable" +#~ msgstr "Yapım değişkeninde ekle" + +#~ msgid "Commit image" +#~ msgstr "Kalıbı işle" + +#~ msgid "Format" +#~ msgstr "Biçim" + +#~ msgid "Message" +#~ msgstr "İleti" + +#~ msgid "Pause the container" +#~ msgstr "Konteyneri duraklat" + +#~ msgid "Remove on build variable" +#~ msgstr "Yapım değişkeninde kaldır" + +#~ msgid "Set container on build variables" +#~ msgstr "Yapım değişkenlerinde kapsayıcıyı ayarla" + +#~ msgid "Add item" +#~ msgstr "Öğe ekle" + +#~ msgid "Host port (optional)" +#~ msgstr "Anamakine bağlantı noktası (isteğe bağlı)" + +#~ msgid "IP (optional)" +#~ msgstr "IP (isteğe bağlı)" + +#~ msgid "ReadOnly" +#~ msgstr "SadeceOku" + +#~ msgid "IP prefix length" +#~ msgstr "IP ön ek uzunluğu" + +#~ msgid "Get new image" +#~ msgstr "Yeni kalıp al" + +#~ msgid "Run" +#~ msgstr "Çalıştır" + +#~ msgid "On build" +#~ msgstr "Yapım anında" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Bu kalıbı silmek istediğinizden emin misiniz?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Bu konteynere iliştirilemedi: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Kanal açılamadı: $0" + +#~ msgid "Everything" +#~ msgstr "Her şey" + +#~ msgid "Security" +#~ msgstr "Güvenlik" + +#~ msgid "The scan from $time ($type) found no vulnerabilities." +#~ msgstr "$time ($type) taraması hiçbir güvenlik açığı bulamadı." + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "Web Konsolu'nun bu sürümü bir terminali desteklememektedir." diff --git a/ui/cockpit-docker/po/uk.po b/ui/cockpit-docker/po/uk.po new file mode 100644 index 0000000..7bb2894 --- /dev/null +++ b/ui/cockpit-docker/po/uk.po @@ -0,0 +1,1522 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Yuri Chornoivan , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-08-07 10:58+0000\n" +"Last-Translator: Yuri Chornoivan \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.18.2\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0 контейнер" +msgstr[1] "$0 контейнери" +msgstr[2] "$0 контейнерів" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "$0 образ загалом, $1" +msgstr[1] "$0 образи загалом, $1" +msgstr[2] "$0 образів загалом, $1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 секунда" +msgstr[1] "$0 секунди" +msgstr[2] "$0 секунд" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0 невикористаний образ, $1" +msgstr[1] "$0 невикористані образи, $1" +msgstr[2] "$0 невикористаних образів, $1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "Дія, яку слід виконати після переходу контейнера у небезпечний стан." + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "Додати прив'язку портів" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "Додати змінну" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "Додати том" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "Усі" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "Усі реєстри" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "Завжди" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "Сталася помилка" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "Автор" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "Автоматично запускати docker під час завантаження" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "Процесор" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "Довідка щодо спільних процесорів" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "Спільне використання процесора" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"Спільні процесори визначають пріоритетність запуску контейнерів. Типовою " +"пріоритетністю є 1024. Більші числа роблять контейнер пріоритетнішим. Менші " +"числа зменшують пріоритетність." + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "Скасувати" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "Перевіряємо працездатність" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "Контрольна точка" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "Підтримка контрольних точок і відновлення" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "Контрольна точка контейнера $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "Натисніть, щоб переглянути оприлюднені порти" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "Натисніть, щоб переглянути томи" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Компонент Cockpit для контейнерів Docker" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "Команда" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "Коментарі" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "Надіслати" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "Внести контейнер" + +#: src/util.js:23 +msgid "Configured" +msgstr "Налаштовано" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "Консоль" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "Контейнер" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "Не вдалося створити контейнер" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "Не вдалося запустити контейнер" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "Контейнер не запущено" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "Назва контейнера" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "Слід вказати назву контейнера." + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "Шлях до контейнера" + +#: src/Volume.jsx:23 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container path must not be empty" +msgstr "Не вдалося створити контейнер" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "Порт контейнера" + +#: src/PublishPort.jsx:37 +#, fuzzy +#| msgid "Container failed to be created" +msgid "Container port must not be empty" +msgstr "Не вдалося створити контейнер" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "Контейнери" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "Створити" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "Створити образ на основі поточного стану контейнера $0." + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "Створити і запустити" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "Створити контейнер" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "Створити контейнер у $0" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "Створити контейнер у стручку" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "Створити стручок" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "Створено" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "Створено" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "Зменшити спільне використання процесора" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "Зменшити інтервал" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "Зменшити максимум повторних спроб" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "Зменшити пам'ять" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "Зменшити кількість повторних спроб" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "Зменшити період запуску" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "Зменшити час очікування" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "Вилучити" + +#: src/ImageDeleteModal.jsx:92 +#, fuzzy +#| msgid "Delete $0?" +msgid "Delete $0 image?" +msgstr "Вилучити $0?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "Вилучити $0?" + +#: src/ImageDeleteModal.jsx:96 +#, fuzzy +#| msgid "Delete tagged images" +msgid "Delete image" +msgstr "Вилучити позначені міткою образи" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "Вилучити кокон $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "Вилучити позначені міткою образи" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "Вилучити невикористані образи системи:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "Вилучити невикористані образи користувача:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "" +"Вилучення контейнера призведе до витирання усіх даних, що на ньому " +"зберігаються." + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "" +"Вилучення запущеного контейнера призведе до витирання усіх даних, що на " +"ньому зберігаються." + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "Вилучення цього кокону призведе до вилучення таких контейнерів:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "Подробиці" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "Місце на диску" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "" +"Формат Docker корисний, якщо ви захочете використовувати образ спільно у " +"середовищах Docker або Moby Engine" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "Отримати" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "Отримати новий образ" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "Порожній кокон $0 буде остаточно вилучено." + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "Точка входження" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "Змінні середовища" + +#: src/util.js:26 +msgid "Error" +msgstr "Помилка" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "Повідомлення про помилку" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "Під час спроби встановити з'єднання з консоллю сталася помилка" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "Приклад: Ваше Ім'я " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "Приклад: $0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "Вийшов" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "Не вдалося запустити перевірку працездатності" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "Не вдалося створити контрольну точку контейнера $0" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "Не вдалося очистити контейнер" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "Не вдалося надіслати на обробку контейнер $0" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "Не вдалося створити контейнер $0" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "Не вдалося отримати образ $0:$1" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "Не вдалося примусово вилучити контейнер $0" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "Не вдалося примусово вилучити образ $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "Не вдалося примусово перезапустити кокон $0" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "Не вдалося примусово зупинити кокон $0" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "Не вдалося призупинити роботу контейнера $0" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "Не вдалося призупинити кокон $0" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "Не вдалося позбутися невикористаних контейнерів" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "Не вдалося позбутися невикористаних образів" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "Не вдалося отримати образ $0" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "Не вдалося вилучити контейнер $0" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "Не вдалося вилучити образ $0" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "Не вдалося перейменувати контейнер $0" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "Не вдалося перезапустити контейнер $0" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "Не вдалося перезапустити кокон $0" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "Не вдалося відновити контейнер $0" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "Не вдалося відновити роботу контейнера $0" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "Не вдалося відновити кокон $0" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "Не вдалося запустити контейнер $0" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "Не вдалося запустити перевірку працездатності контейнера $0" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "Не вдалося виконати пошук образів." + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "Не вдалося виконати пошук образів: $0" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "Не вдалося виконати пошук нових образів" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "Не вдалося запустити роботу контейнера $0" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "Не вдалося запустити кокон $0" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "Не вдалося зупинити роботу контейнера $0" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "Не вдалося зупинити кокон $0" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "Помилкова смужка" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "Примусово внести" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "Примусове вилучення" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "Примусово вилучити кокон $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "Примусовий перезапуск" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "Примусово зупинити" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "ГБ" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "Шлюз" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "Перевірка працездатності" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "Довідка з інтервалу перевірки працездатності" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "Довідка з повторних спроб перевірки працездатності" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "Довідка із початкового періоду перевірки працездатності" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "Довідка з часу очікування перевірки працездатності" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "Довідка щодо дії при перевірці небезпечності стану" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "Працездатний" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "Приховати образи" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "Приховати проміжні образи" + +#: src/Images.jsx:158 +msgid "History" +msgstr "Журнал" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "Шлях у основній системі" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "Порт в основній системі" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "Довідка щодо порту в основній системі" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "Ід." + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP-адреса" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "Довідка щодо IP-адреси" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "Ідеальне для розробки" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "Ідеальне для запуску служб" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "" +"Якщо встановлено IP-адресу основної системи 0.0.0.0 або адресу не " +"встановлено взагалі, порт буде пов'язано із усіма IP-адресами в основній " +"системі." + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "" +"Якщо порт в основній системі не встановлено, порт контейнера буде випадковим " +"чином пов'язано із портом в основній системі." + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "Ігнорувати IP-адресу, якщо її встановлено статично" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "Ігнорувати MAC-адресу, якщо її встановлено статично" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "Образ" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "Назва образу не є унікальною" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "Слід вказати назву образу" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "Довідка щодо вибору образу" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "Образи" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "Збільшити спільне використання процесора" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "Збільшити інтервал" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "Збільшити максимум повторних спроб" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "Збільшити пам'ять" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "Збільшити кількість повторних спроб" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "Збільшити початковий період" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "Збільшити час очікування" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "Інтеграція" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "Інтервал" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "Частота запуску перевірки працездатності." + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "" +"Некоректні символи. Назва може складатися лише з літер, цифр та деяких " +"символів пунктуації (_ . -)." + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "кБ" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "Зберігати усі тимчасові файли контрольних точок" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "Ключ" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "Останні 5 запусків" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "Найсвіжіша контрольна точка" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "Лишати запущеним після запису контрольної точки на диск" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "Завантаження подробиць…" + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "Завантаження журналу…" + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "Завантаження…" + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "Локальний" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "Локальні образи" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "Журнал" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC-адреса" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "МБ" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "Максимум повторних спроб" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "Пам'ять" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "Обмеження пам’яті" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "Одиниця пам’яті" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "Режим" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "" +"Для цього образу існує декілька міток. Виберіть позначені міткою образи для " +"вилучення." + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "Назва" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "Назва нового контейнера" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "Назва нового образу" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "Ні" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "Без дії" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "Немає контейнерів" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "Цей образ не використовує жоден контейнер" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "У цьому коконі немає контейнерів" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "Немає контейнерів, які проходять поточні умови фільтрування" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "Змінних середовища не визначено" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "Немає образів" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "Образів не знайдено" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "Немає образів, які проходять поточні умови фільтрування" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "Немає мітки" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "Не відкрито жодного порту" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "Немає результатів, що відповідають $0" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "Немає запущених контейнерів" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "Томів не визначено" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "При помилці" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "Лише запущені" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "Параметри" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "Власник" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "Довідка щодо власника" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "Перевірку працездатності пройдено" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "" +"Вставте один або декілька рядків у форматі парт «ключ=значення» до будь-" +"якого поля для пакетного імпортування" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "Призупинити" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "Призупинити роботу контейнера при створенні образу" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "Призупинено" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "Не вдалося створити стручок" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Назва стручка" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Контейнери Docker" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Служба Docker є неактивною" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "Прив'язка портів" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "Порти" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "Можна прив'язувати порти нижче 1024" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "Приватний" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "Протокол" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "Позбутися" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "Позбутися невикористаних контейнерів" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "Позбутися невикористаних образів" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "Очищуємо контейнери" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "Позбуваємося образів" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "Отримати найсвіжіший образ" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "Отримання даних" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "Доступ лише до читання" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "Доступ до читання і запису" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "Вилучити запис" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "Вилучає позначені незапущені контейнери" + +#: src/util.js:23 +msgid "Removing" +msgstr "Вилучення" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "Перейменувати" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "Перейменувати контейнер $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "Можна встановлювати обмеження на ресурси" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "Перезапустити" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "Правила перезапуску" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "Довідка щодо правил перезапуску" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "Правила перезапуску, які слід виконувати при виході з контейнерів." + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"Перезапускати правила після виходу з контейнерів. Використання очікування " +"для автозапуску контейнерів може за певних обставин не працювати, зокрема " +"воно не працює, якщо для облікового запису користувача використано ecryptfs, " +"systemd-homed, NFS або 2FA." + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "Відновити" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "Відновити контейнер $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "Відновити із встановленими з'єднаннями TCP" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "Обмежено правами доступу до облікового запису користувача" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "Продовжити" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "Повторні спроби" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "Повторіть спробу із іншим ключем пошуку." + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "Виконати перевірку працездатності" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "Запущено" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "Шукати за назвою і описом" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "Шукати за реєстром" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "Шукати" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "Шукати образ" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "Рядок для пошуку або розташування контейнера" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "Пошук…" + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "Шукаємо: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "Спільний" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "Показати" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "Показати образи" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "Показати проміжні образи" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "Стислий показ" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "Додаткові відомості" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "Розмір" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "Запустити" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "Початковий період" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "Запустити docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "Почніть щось вводити, щоб виконати пошук образів." + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "Запущено" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "Стан" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "Стан" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "Зупинити" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "Зупинено" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "Підтримка збереження встановлених з'єднань TCP" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "Система" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "Також доступна загальносистемна служба Docker" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "Мітка" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "Мітки" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Інтерфейс користувача Cockpit для контейнерів Docker." + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "Час ініціалізації, потрібний контейнеру для самозапуску." + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "" +"Максимальний припустимий час для завершення перевірки працездатності до " +"моменту реєстрації помилки." + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "" +"Кількість повторних спроб, якими можна скористатися, доки перевірка " +"працездатності вважатиметься непройденою." + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "Час очікування" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "Діагностика проблем" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "Введіть щось для фільтрування…" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "Не вдалося завантажити журнал образу" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "Непрацездатний" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "Працює з $0" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "Скористатися застарілим форматом Docker" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "Використовується" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "Користувач" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "Також доступна служба користувачів Docker" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "Користувач:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "Значення" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "Томи" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "Якщо непрацездатні" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "За допомогою термінала" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "Придатний до запису" + +#: src/manifest.json:0 +msgid "container" +msgstr "контейнер" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "отримання" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "вузол[:порт]/[користувач]/контейнер[:мітка]" + +#: src/manifest.json:0 +msgid "image" +msgstr "образ" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "у" + +#: src/ImageDeleteModal.jsx:79 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate" +msgstr "Приховати проміжні образи" + +#: src/ImageDeleteModal.jsx:59 +#, fuzzy +#| msgid "Hide intermediate images" +msgid "intermediate image" +msgstr "Приховати проміжні образи" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "н/д" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "не доступне" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "група коконів" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "порти" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "секунд" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "система" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "не використано" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "користувач:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "томи" + +#~ msgid "Delete $0" +#~ msgstr "Вилучити $0" + +#~ msgid "select all" +#~ msgstr "вибрати все" + +#~ msgid "Failure action" +#~ msgstr "Дія при критичній помилці" + +#~ msgid "Restarting" +#~ msgstr "Перезапуск" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "Підтвердьте вилучення $0" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "Підтвердьте вилучення кокона $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "Підтвердьте примусове вилучення кокона $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "Підтвердьте примусове вилучення $0" + +#~ msgid "Container is currently running." +#~ msgstr "Контейнер працює." + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "Не включати зміни у кореневій файловій системі при експортуванні" + +#~ msgid "Default with single selectable" +#~ msgstr "Типове із одним варіантом вибору" + +#~ msgid "Start after creation" +#~ msgstr "Запустити після створення" + +#~ msgid "Delete unused $0 images:" +#~ msgstr "Вилучити невикористані $0 образів:" + +#~ msgid "created" +#~ msgstr "створено" + +#~ msgid "exited" +#~ msgstr "здійснено вихід" + +#~ msgid "paused" +#~ msgstr "призупинено" + +#~ msgid "running" +#~ msgstr "працює" + +#~ msgid "stopped" +#~ msgstr "зупинився" + +#~ msgid "user" +#~ msgstr "користувач" + +#~ msgid "Add on build variable" +#~ msgstr "Додати змінну збирання" + +#~ msgid "Commit image" +#~ msgstr "Надіслати образ" + +#~ msgid "Format" +#~ msgstr "Формат" + +#~ msgid "Message" +#~ msgstr "Повідомлення" + +#~ msgid "Pause the container" +#~ msgstr "Призупинити роботу контейнера" + +#~ msgid "Remove on build variable" +#~ msgstr "Встановити змінну збирання" + +#~ msgid "Set container on build variables" +#~ msgstr "Встановити змінні збирання контейнера" + +#~ msgid "Add item" +#~ msgstr "Додати запис" + +#~ msgid "Host port (optional)" +#~ msgstr "Порт основної системи (необов'язковий)" + +#~ msgid "IP (optional)" +#~ msgstr "IP-адреса (необов'язкова)" + +#~ msgid "ReadOnly" +#~ msgstr "Лише читання" + +#~ msgid "IP prefix length" +#~ msgstr "Довжина префікса IP" + +#~ msgid "Get new image" +#~ msgstr "Отримати новий образ" + +#~ msgid "Run" +#~ msgstr "Запустити" + +#~ msgid "On build" +#~ msgstr "При збиранні" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "Ви справді хочете вилучити цей образ?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "Не вдалося долучитися до цього контейнера: $0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "Не вдалося відкрити канал: $0" + +#~ msgid "Everything" +#~ msgstr "Все" + +#~ msgid "Security" +#~ msgstr "Безпека" + +#~ msgid "The scan from $time ($type) found no vulnerabilities." +#~ msgstr "Скануванням від $time ($type) вразливостей не знайдено." + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "У цій версії Web Console не передбачено підтримки терміналів." diff --git a/ui/cockpit-docker/po/zh_CN.po b/ui/cockpit-docker/po/zh_CN.po new file mode 100644 index 0000000..37ac1bc --- /dev/null +++ b/ui/cockpit-docker/po/zh_CN.po @@ -0,0 +1,1479 @@ +# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Pany , 2020. +# Harry Chen , 2020. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE_VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-11 02:46+0000\n" +"PO-Revision-Date: 2023-12-22 22:18+0000\n" +"Last-Translator: Jingge Chen \n" +"Language-Team: Chinese (Simplified) \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"X-Generator: Weblate 5.3\n" + +#: src/Images.jsx:89 +msgid "$0 container" +msgid_plural "$0 containers" +msgstr[0] "$0容器" + +#: src/Images.jsx:271 +msgid "$0 image total, $1" +msgid_plural "$0 images total, $1" +msgstr[0] "共$0个镜像,$1" + +#: src/ContainerHealthLogs.jsx:35 +msgid "$0 second" +msgid_plural "$0 seconds" +msgstr[0] "$0 秒" + +#: src/Images.jsx:275 +msgid "$0 unused image, $1" +msgid_plural "$0 unused images, $1" +msgstr[0] "$0个未使用镜像,$1" + +#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 +msgid "1 to 65535" +msgstr "1 到 65535" + +#: src/ImageRunModal.jsx:1134 +msgid "Action to take once the container transitions to an unhealthy state." +msgstr "容器转换到不健康状态后要执行的操作。" + +#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 +msgid "Add port mapping" +msgstr "添加端口映射" + +#: src/ImageRunModal.jsx:1017 +msgid "Add variable" +msgstr "添加变量" + +#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 +msgid "Add volume" +msgstr "添加卷" + +#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 +#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 +msgid "All" +msgstr "所有" + +#: src/ImageSearchModal.jsx:176 +msgid "All registries" +msgstr "所有 registry" + +#: src/ImageRunModal.jsx:965 +msgid "Always" +msgstr "总是" + +#: src/PodActions.jsx:57 +msgid "An error occurred" +msgstr "发生了错误" + +#: src/ContainerCommitModal.jsx:105 +msgid "Author" +msgstr "作者" + +#: src/app.jsx:641 +msgid "Automatically start docker on boot" +msgstr "开机自动启动 docker" + +#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 +msgid "CPU" +msgstr "CPU" + +#: src/ImageRunModal.jsx:918 +msgid "CPU Shares help" +msgstr "CPU 份额帮助" + +#: src/ImageRunModal.jsx:916 +msgid "CPU shares" +msgstr "CPU 份额" + +#: src/ImageRunModal.jsx:920 +msgid "" +"CPU shares determine the priority of running containers. Default priority is " +"1024. A higher number prioritizes this container. A lower number decreases " +"priority." +msgstr "" +"CPU 份额决定了运行容器的优先级。默认优先级为 1024。数字越大,容器的优先级越" +"高。数字越小,优先级越低。" + +#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 +#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 +#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 +#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 +#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 +#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 +#: src/ContainerCheckpointModal.jsx:50 +msgid "Cancel" +msgstr "取消" + +#: src/Containers.jsx:286 +msgid "Checking health" +msgstr "检查健康状况" + +#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 +msgid "Checkpoint" +msgstr "检查点" + +#: src/ImageRunModal.jsx:775 +msgid "Checkpoint and restore support" +msgstr "检查点和恢复支持" + +#: src/ContainerCheckpointModal.jsx:41 +msgid "Checkpoint container $0" +msgstr "检查点容器 $0" + +#: src/Containers.jsx:523 +msgid "Click to see published ports" +msgstr "点击以查看公布的端口" + +#: src/Containers.jsx:538 +msgid "Click to see volumes" +msgstr "点击以查看卷" + +#: org.cockpit-project.docker.metainfo.xml:6 +msgid "Cockpit component for Docker containers" +msgstr "Docker 容器的 Cockpit 组件" + +#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 +#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 +#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 +msgid "Command" +msgstr "命令" + +#: src/ImageHistory.jsx:33 +msgid "Comments" +msgstr "注释" + +#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 +msgid "Commit" +msgstr "提交" + +#: src/ContainerCommitModal.jsx:136 +msgid "Commit container" +msgstr "提交容器" + +#: src/util.js:23 +msgid "Configured" +msgstr "已配置" + +#: src/Containers.jsx:432 +msgid "Console" +msgstr "控制台" + +#: src/Containers.jsx:565 +msgid "Container" +msgstr "容器" + +#: src/ImageRunModal.jsx:258 +msgid "Container failed to be created" +msgstr "容器创建失败" + +#: src/ImageRunModal.jsx:241 +msgid "Container failed to be started" +msgstr "容器启动失败" + +#: src/ContainerTerminal.jsx:259 +msgid "Container is not running" +msgstr "容器未运行" + +#: src/ImageRunModal.jsx:742 +msgid "Container name" +msgstr "容器名称" + +#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 +msgid "Container name is required." +msgstr "容器名称是必需的。" + +#: src/Volume.jsx:50 +msgid "Container path" +msgstr "容器路径" + +#: src/Volume.jsx:23 +msgid "Container path must not be empty" +msgstr "容器路径不能为空" + +#: src/PublishPort.jsx:105 +msgid "Container port" +msgstr "容器端口" + +#: src/PublishPort.jsx:37 +msgid "Container port must not be empty" +msgstr "容器端口不能为空" + +#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 +msgid "Containers" +msgstr "容器" + +#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 +msgid "Create" +msgstr "创建" + +#: src/ContainerCommitModal.jsx:137 +msgid "Create a new image based on the current state of the $0 container." +msgstr "根据 $0 容器的当前状态创建一个新镜像。" + +#: src/ImageRunModal.jsx:1169 +msgid "Create and run" +msgstr "创建并运行" + +#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 +#: src/Images.jsx:411 +msgid "Create container" +msgstr "创建容器" + +#: src/ImageRunModal.jsx:1166 +msgid "Create container in $0" +msgstr "在 $0 中创建容器" + +#: src/Containers.jsx:830 +msgid "Create container in pod" +msgstr "在 pod 中创建容器" + +#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 +msgid "Create pod" +msgstr "创建 pod" + +#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 +#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 +msgid "Created" +msgstr "已创建" + +#: src/ImageHistory.jsx:33 +msgid "Created by" +msgstr "创建" + +#: src/ImageRunModal.jsx:939 +msgid "Decrease CPU shares" +msgstr "减少 CPU 共享" + +#: src/ImageRunModal.jsx:1049 +msgid "Decrease interval" +msgstr "缩短间隔" + +#: src/ImageRunModal.jsx:978 +msgid "Decrease maximum retries" +msgstr "减小最大重试次数" + +#: src/ImageRunModal.jsx:897 +msgid "Decrease memory" +msgstr "减少内存" + +#: src/ImageRunModal.jsx:1123 +msgid "Decrease retries" +msgstr "减少重试" + +#: src/ImageRunModal.jsx:1099 +msgid "Decrease start period" +msgstr "减少启动周期" + +#: src/ImageRunModal.jsx:1074 +msgid "Decrease timeout" +msgstr "减少超时" + +#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 +#: src/Containers.jsx:261 src/Images.jsx:417 +msgid "Delete" +msgstr "删除" + +#: src/ImageDeleteModal.jsx:92 +msgid "Delete $0 image?" +msgstr "删除 $0 图片?" + +#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 +msgid "Delete $0?" +msgstr "删除 $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete image" +msgstr "删除镜像" + +#: src/PodActions.jsx:43 +msgid "Delete pod $0?" +msgstr "删除 pod $0?" + +#: src/ImageDeleteModal.jsx:96 +msgid "Delete tagged images" +msgstr "删除标记的镜像" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused system images:" +msgstr "删除未使用的系统镜像:" + +#: src/PruneUnusedImagesModal.jsx:32 +msgid "Delete unused user images:" +msgstr "删除未使用的用户镜像:" + +#: src/ContainerDeleteModal.jsx:37 +msgid "Deleting a container will erase all data in it." +msgstr "删除容器会清空其中的全部数据。" + +#: src/Containers.jsx:70 +msgid "Deleting a running container will erase all data in it." +msgstr "删除正在运行的容器将会清除其中的所有数据。" + +#: src/PodActions.jsx:63 +msgid "Deleting this pod will remove the following containers:" +msgstr "删除这个 Pod 将会移除这些容器:" + +#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 +msgid "Details" +msgstr "详情" + +#: src/Images.jsx:182 +msgid "Disk space" +msgstr "磁盘空间" + +#: src/ContainerCommitModal.jsx:126 +msgid "" +"Docker format is useful when sharing the image with Docker or Moby Engine" +msgstr "当与 Docker 或 Moby Engine 共享镜像时,Docker 格式非常有用" + +#: src/ImageSearchModal.jsx:149 +msgid "Download" +msgstr "下载" + +#: src/Images.jsx:339 +msgid "Download new image" +msgstr "现在新镜像" + +#: src/PodActions.jsx:59 +msgid "Empty pod $0 will be permanently removed." +msgstr "空 pod $0 将被永久删除。" + +#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 +msgid "Entrypoint" +msgstr "入口点" + +#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 +msgid "Environment variables" +msgstr "环境变量" + +#: src/util.js:26 +msgid "Error" +msgstr "错误" + +#: src/Images.jsx:58 src/Notification.jsx:42 +msgid "Error message" +msgstr "错误信息" + +#: src/ContainerTerminal.jsx:263 +msgid "Error occurred while connecting console" +msgstr "连接到控制台时出现错误" + +#: src/ContainerCommitModal.jsx:107 +msgid "Example, Your Name " +msgstr "示例,您的名字 " + +#: src/ImageRunModal.jsx:821 +msgid "Example: $0" +msgstr "示例:$0" + +#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 +msgid "Exited" +msgstr "已退出" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Failed health run" +msgstr "失败的健康运行" + +#: src/ContainerCheckpointModal.jsx:28 +msgid "Failed to checkpoint container $0" +msgstr "检查点容器 $0 失败" + +#: src/ImageRunModal.jsx:247 +msgid "Failed to clean up container" +msgstr "清理容器失败" + +#: src/ContainerCommitModal.jsx:81 +msgid "Failed to commit container $0" +msgstr "提交容器 $0 失败" + +#: src/ImageRunModal.jsx:312 +msgid "Failed to create container $0" +msgstr "创建容器 $0 失败" + +#: src/Images.jsx:55 +msgid "Failed to download image $0:$1" +msgstr "下载镜像 $0:$1 失败" + +#: src/Containers.jsx:59 +msgid "Failed to force remove container $0" +msgstr "强制移除容器 $0 失败" + +#: src/ImageDeleteModal.jsx:49 +msgid "Failed to force remove image $0" +msgstr "强制删除镜像失败 $0" + +#: src/PodActions.jsx:117 +msgid "Failed to force restart pod $0" +msgstr "强制重启 pod $0 失败" + +#: src/PodActions.jsx:95 +msgid "Failed to force stop pod $0" +msgstr "强制停止 Pod $0 失败" + +#: src/Containers.jsx:108 +msgid "Failed to pause container $0" +msgstr "暂停容器 $0 失败" + +#: src/PodActions.jsx:162 +msgid "Failed to pause pod $0" +msgstr "暂停 Pod $0 失败" + +#: src/PruneUnusedContainersModal.jsx:57 +msgid "Failed to prune unused containers" +msgstr "删除未使用的容器失败" + +#: src/PruneUnusedImagesModal.jsx:73 +msgid "Failed to prune unused images" +msgstr "删除未使用的映像失败" + +#: src/ImageRunModal.jsx:318 +msgid "Failed to pull image $0" +msgstr "拉取镜像 $0 失败" + +#: src/ContainerDeleteModal.jsx:21 +msgid "Failed to remove container $0" +msgstr "移除容器 $0 失败" + +#: src/ImageDeleteModal.jsx:73 +msgid "Failed to remove image $0" +msgstr "删除镜像 $0 失败" + +#: src/ContainerRenameModal.jsx:54 +msgid "Failed to rename container $0" +msgstr "重命名容器 $0 失败" + +#: src/Containers.jsx:133 +msgid "Failed to restart container $0" +msgstr "重启容器 $0 失败" + +#: src/PodActions.jsx:106 +msgid "Failed to restart pod $0" +msgstr "重启 pod $0 失败" + +#: src/ContainerRestoreModal.jsx:31 +msgid "Failed to restore container $0" +msgstr "恢复容器 $0 失败" + +#: src/Containers.jsx:100 +msgid "Failed to resume container $0" +msgstr "恢复容器 $0 失败" + +#: src/PodActions.jsx:147 +msgid "Failed to resume pod $0" +msgstr "恢复 Pod $0 失败" + +#: src/ImageRunModal.jsx:305 +msgid "Failed to run container $0" +msgstr "运行容器 $0 失败" + +#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 +msgid "Failed to run health check on container $0" +msgstr "在容器 $0 上运行健康检查失败" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images." +msgstr "搜索镜像失败。" + +#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 +msgid "Failed to search for images: $0" +msgstr "搜索镜像 $0 失败" + +#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 +msgid "Failed to search for new images" +msgstr "搜索新镜像失败" + +#: src/Containers.jsx:92 +msgid "Failed to start container $0" +msgstr "启动容器 $0 失败" + +#: src/PodActions.jsx:132 +msgid "Failed to start pod $0" +msgstr "启动 Pod $0 失败" + +#: src/Containers.jsx:84 +msgid "Failed to stop container $0" +msgstr "停止容器 $0 失败" + +#: src/PodActions.jsx:84 +msgid "Failed to stop pod $0" +msgstr "停止 Pod $0 失败" + +#: src/ContainerHealthLogs.jsx:84 +msgid "Failing streak" +msgstr "streak 失败" + +#: src/ContainerCommitModal.jsx:151 +msgid "Force commit" +msgstr "强制提交" + +#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 +msgid "Force delete" +msgstr "强制删除" + +#: src/PodActions.jsx:42 +msgid "Force delete pod $0?" +msgstr "强制删除 pod $0?" + +#: src/PodActions.jsx:121 src/Containers.jsx:182 +msgid "Force restart" +msgstr "强制重启" + +#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 +#: src/ImageRunModal.jsx:61 +msgid "Force stop" +msgstr "强制停止" + +#: src/ImageRunModal.jsx:908 +msgid "GB" +msgstr "GB" + +#: src/ContainerDetails.jsx:51 +msgid "Gateway" +msgstr "网关" + +#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 +msgid "Health check" +msgstr "健康检查" + +#: src/ImageRunModal.jsx:1034 +msgid "Health check interval help" +msgstr "健康检查间隔帮助" + +#: src/ImageRunModal.jsx:1109 +msgid "Health check retries help" +msgstr "健康检查重试帮助" + +#: src/ImageRunModal.jsx:1084 +msgid "Health check start period help" +msgstr "健康检查启动周期帮助" + +#: src/ImageRunModal.jsx:1059 +msgid "Health check timeout help" +msgstr "健康检查超时帮助" + +#: src/ImageRunModal.jsx:1132 +msgid "Health failure check action help" +msgstr "健康检查失败操作帮助" + +#: src/Containers.jsx:282 +msgid "Healthy" +msgstr "健康" + +#: src/Images.jsx:302 +msgid "Hide images" +msgstr "隐藏镜像" + +#: src/Images.jsx:252 +msgid "Hide intermediate images" +msgstr "隐藏中间镜像" + +#: src/Images.jsx:158 +msgid "History" +msgstr "历史" + +#: src/Volume.jsx:36 +msgid "Host path" +msgstr "主机路径" + +#: src/PublishPort.jsx:78 +msgid "Host port" +msgstr "主机端口" + +#: src/PublishPort.jsx:81 +msgid "Host port help" +msgstr "主机端口帮助" + +#: src/Images.jsx:181 src/ContainerDetails.jsx:31 +msgid "ID" +msgstr "ID" + +#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 +msgid "IP address" +msgstr "IP 地址" + +#: src/PublishPort.jsx:58 +msgid "IP address help" +msgstr "IP 地址帮助" + +#: src/ImageRunModal.jsx:786 +msgid "Ideal for development" +msgstr "非常适合开发" + +#: src/ImageRunModal.jsx:769 +msgid "Ideal for running services" +msgstr "非常适合运行服务" + +#: src/PublishPort.jsx:60 +msgid "" +"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " +"all IPs on the host." +msgstr "如果主机 IP 设置为 0.0.0.0 或没有设置,端口将被绑定到主机上的所有 IP。" + +#: src/PublishPort.jsx:83 +msgid "" +"If the host port is not set the container port will be randomly assigned a " +"port on the host." +msgstr "如果主机端口没有设置,容器端口将被随机分配到主机上的一个端口。" + +#: src/ContainerRestoreModal.jsx:63 +msgid "Ignore IP address if set statically" +msgstr "如果以静态方式设置,则忽略 IP 地址" + +#: src/ContainerRestoreModal.jsx:66 +msgid "Ignore MAC address if set statically" +msgstr "忽略被静态设定的 MAC 地址" + +#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 +msgid "Image" +msgstr "镜像" + +#: src/ContainerCommitModal.jsx:44 +msgid "Image name is not unique" +msgstr "镜像名称不是唯一的" + +#: src/ContainerCommitModal.jsx:35 +msgid "Image name is required" +msgstr "镜像名称是必需的" + +#: src/ImageRunModal.jsx:816 +msgid "Image selection help" +msgstr "镜像选择帮助" + +#: src/Images.jsx:258 src/Images.jsx:288 +msgid "Images" +msgstr "镜像" + +#: src/ImageRunModal.jsx:940 +msgid "Increase CPU shares" +msgstr "增加 CPU 共享" + +#: src/ImageRunModal.jsx:1050 +msgid "Increase interval" +msgstr "增加间隔" + +#: src/ImageRunModal.jsx:979 +msgid "Increase maximum retries" +msgstr "增加最大重试次数" + +#: src/ImageRunModal.jsx:898 +msgid "Increase memory" +msgstr "增加内存" + +#: src/ImageRunModal.jsx:1124 +msgid "Increase retries" +msgstr "增加重试" + +#: src/ImageRunModal.jsx:1100 +msgid "Increase start period" +msgstr "增加开始周期" + +#: src/ImageRunModal.jsx:1075 +msgid "Increase timeout" +msgstr "增加超时" + +#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 +msgid "Integration" +msgstr "集成" + +#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 +msgid "Interval" +msgstr "间隔" + +#: src/ImageRunModal.jsx:1036 +msgid "Interval how often health check is run." +msgstr "健康检查运行的频率间隔。" + +#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 +msgid "" +"Invalid characters. Name can only contain letters, numbers, and certain " +"punctuation (_ . -)." +msgstr "无效的字符。名称只能包含字母、数字和某些标点符号 (_ . -)。" + +#: src/ImageRunModal.jsx:906 +msgid "KB" +msgstr "KB" + +#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 +msgid "Keep all temporary checkpoint files" +msgstr "保留所有临时检查点文件" + +#: src/Env.jsx:56 +msgid "Key" +msgstr "键" + +#: src/Env.jsx:18 +msgid "Key must not be empty" +msgstr "键不能为空" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Last 5 runs" +msgstr "最后 5 个运行" + +#: src/ContainerDetails.jsx:71 +msgid "Latest checkpoint" +msgstr "最新的检查点" + +#: src/ContainerCheckpointModal.jsx:57 +msgid "Leave running after writing checkpoint to disk" +msgstr "在将检查点写入磁盘后保持运行" + +#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 +msgid "Loading details..." +msgstr "加载详细信息..." + +#: src/ContainerLogs.jsx:54 +msgid "Loading logs..." +msgstr "正在加载日志..." + +#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 +msgid "Loading..." +msgstr "加载中……" + +#: src/ImageRunModal.jsx:711 +msgid "Local" +msgstr "本地" + +#: src/ImageRunModal.jsx:502 +msgid "Local images" +msgstr "本地镜像" + +#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 +msgid "Logs" +msgstr "日志" + +#: src/ContainerDetails.jsx:55 +msgid "MAC address" +msgstr "MAC 地址" + +#: src/ImageRunModal.jsx:907 +msgid "MB" +msgstr "MB" + +#: src/ImageRunModal.jsx:971 +msgid "Maximum retries" +msgstr "最大重试次数" + +#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 +msgid "Memory" +msgstr "内存" + +#: src/ImageRunModal.jsx:884 +msgid "Memory limit" +msgstr "内存限制" + +#: src/ImageRunModal.jsx:901 +msgid "Memory unit" +msgstr "内存单元" + +#: src/Volume.jsx:64 +msgid "Mode" +msgstr "模式" + +#: src/ImageDeleteModal.jsx:102 +msgid "Multiple tags exist for this image. Select the tagged images to delete." +msgstr "此镜像存在多个标签。选择标记的镜像以删除。" + +#: src/PublishPort.jsx:24 +msgid "Must be a valid IP address" +msgstr "必须是有效的 IP 地址" + +#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 +#: src/ImageRunModal.jsx:739 +msgid "Name" +msgstr "名称" + +#: src/ImageRunModal.jsx:612 +msgid "Name already in use" +msgstr "名称已被使用" + +#: src/ContainerRenameModal.jsx:68 +msgid "New container name" +msgstr "新容器名称" + +#: src/ContainerCommitModal.jsx:90 +msgid "New image name" +msgstr "新镜像名称" + +#: src/ImageRunModal.jsx:963 +msgid "No" +msgstr "否" + +#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 +msgid "No action" +msgstr "无操作" + +#: src/Containers.jsx:576 +msgid "No containers" +msgstr "没有容器" + +#: src/ImageUsedBy.jsx:14 +msgid "No containers are using this image" +msgstr "没有使用该镜像的容器" + +#: src/Containers.jsx:577 +msgid "No containers in this pod" +msgstr "此 pod 中没有容器" + +#: src/Containers.jsx:581 +msgid "No containers that match the current filter" +msgstr "没有符合当前筛选条件的容器" + +#: src/ImageRunModal.jsx:1014 +msgid "No environment variables specified" +msgstr "没有指定环境变量" + +#: src/Images.jsx:185 +msgid "No images" +msgstr "没有镜像" + +#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 +msgid "No images found" +msgstr "没有找到镜像" + +#: src/Images.jsx:189 +msgid "No images that match the current filter" +msgstr "没有符合当前筛选条件的镜像" + +#: src/Volume.jsx:75 +msgid "No label" +msgstr "无标签" + +#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 +msgid "No ports exposed" +msgstr "没有公开的端口" + +#: src/ImageSearchModal.jsx:189 +msgid "No results for $0" +msgstr "没有 $0 的结果" + +#: src/Containers.jsx:583 +msgid "No running containers" +msgstr "没有正在运行的容器" + +#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 +msgid "No volumes specified" +msgstr "没有指定卷" + +#: src/ImageRunModal.jsx:964 +msgid "On failure" +msgstr "失败时" + +#: src/Containers.jsx:731 +msgid "Only running" +msgstr "仅运行" + +#: src/ContainerCommitModal.jsx:118 +msgid "Options" +msgstr "选项" + +#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 +#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 +#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 +msgid "Owner" +msgstr "所有者" + +#: src/ImageRunModal.jsx:761 +msgid "Owner help" +msgstr "所有者帮助" + +#: src/ContainerHealthLogs.jsx:115 +msgid "Passed health run" +msgstr "通过的健康运行" + +#: src/ImageRunModal.jsx:1022 +msgid "" +"Paste one or more lines of key=value pairs into any field for bulk import" +msgstr "将一个或多个 key=value 对行粘贴到批量导入的任何字段" + +#: src/PodActions.jsx:166 src/Containers.jsx:190 +msgid "Pause" +msgstr "暂停" + +#: src/ContainerCommitModal.jsx:122 +msgid "Pause container when creating image" +msgstr "创建镜像时暂停容器" + +#: src/util.js:23 src/util.js:26 +msgid "Paused" +msgstr "已暂停" + +#: src/PodCreateModal.jsx:89 +msgid "Pod failed to be created" +msgstr "创建 Pod 失败" + +#: src/PodCreateModal.jsx:147 +msgid "Pod name" +msgstr "Pod 名称" + +#: org.cockpit-project.docker.metainfo.xml:5 +msgid "Docker" +msgstr "Docker" + +#: src/index.html:20 src/manifest.json:0 +msgid "Docker containers" +msgstr "Docker 容器" + +#: src/app.jsx:637 +msgid "Docker service is not active" +msgstr "Docker 服务未激活" + +#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 +msgid "Port mapping" +msgstr "端口映射" + +#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 +msgid "Ports" +msgstr "端口" + +#: src/ImageRunModal.jsx:778 +msgid "Ports under 1024 can be mapped" +msgstr "1024 以下的端口可以映射" + +#: src/Volume.jsx:77 +msgid "Private" +msgstr "私有" + +#: src/PublishPort.jsx:122 +msgid "Protocol" +msgstr "协议" + +#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 +msgid "Prune" +msgstr "删除" + +#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 +msgid "Prune unused containers" +msgstr "删除未使用的容器" + +#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 +msgid "Prune unused images" +msgstr "删除未使用的镜像" + +#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 +msgid "Pruning containers" +msgstr "正在删除容器" + +#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 +msgid "Pruning images" +msgstr "删除镜像" + +#: src/ImageRunModal.jsx:860 +msgid "Pull latest image" +msgstr "拉取最新的镜像" + +#: src/Images.jsx:325 +msgid "Pulling" +msgstr "正在拉取" + +#: src/ContainerIntegration.jsx:42 +msgid "Read-only access" +msgstr "只读访问" + +#: src/ContainerIntegration.jsx:41 +msgid "Read-write access" +msgstr "读写访问" + +#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 +msgid "Remove item" +msgstr "删除项目" + +#: src/PruneUnusedContainersModal.jsx:99 +msgid "Removes selected non-running containers" +msgstr "删除选择的、没有在运行的容器" + +#: src/util.js:23 +msgid "Removing" +msgstr "删除" + +#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 +msgid "Rename" +msgstr "重命名" + +#: src/ContainerRenameModal.jsx:85 +msgid "Rename container $0" +msgstr "重命名容器 $0" + +#: src/ImageRunModal.jsx:772 +msgid "Resource limits can be set" +msgstr "可以设置资源限制" + +#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 +#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 +msgid "Restart" +msgstr "重启" + +#: src/ImageRunModal.jsx:948 +msgid "Restart policy" +msgstr "重启策略" + +#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 +msgid "Restart policy help" +msgstr "重启策略帮助" + +#: src/ImageRunModal.jsx:952 +msgid "Restart policy to follow when containers exit." +msgstr "容器退出时遵循重启策略。" + +#: src/ImageRunModal.jsx:952 +msgid "" +"Restart policy to follow when containers exit. Using linger for auto-" +"starting containers may not work in some circumstances, such as when " +"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." +msgstr "" +"容器退出时重启策略。在某些情况下,使用 linger 进行自动启动容器可能无法正常工" +"作,如在用户账户中使用了 ecryptfs、systemd-homed、NFS 或 2FA。" + +#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 +msgid "Restore" +msgstr "恢复" + +#: src/ContainerRestoreModal.jsx:44 +msgid "Restore container $0" +msgstr "恢复容器 $0" + +#: src/ContainerRestoreModal.jsx:60 +msgid "Restore with established TCP connections" +msgstr "使用已建立的 TCP 连接恢复" + +#: src/ImageRunModal.jsx:789 +msgid "Restricted by user account permissions" +msgstr "受用户帐户权限限制" + +#: src/PodActions.jsx:151 src/Containers.jsx:197 +msgid "Resume" +msgstr "继续" + +#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 +msgid "Retries" +msgstr "重试" + +#: src/ImageSearchModal.jsx:190 +msgid "Retry another term." +msgstr "重试另一个项。" + +#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 +msgid "Run health check" +msgstr "运行健康检查" + +#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 +msgid "Running" +msgstr "正在运行" + +#: src/Volume.jsx:71 +msgid "SELinux" +msgstr "SELinux" + +#: src/ImageSearchModal.jsx:167 +msgid "Search by name or description" +msgstr "按名称或描述搜索" + +#: src/ImageRunModal.jsx:701 +msgid "Search by registry" +msgstr "按照注册表搜索" + +#: src/ImageSearchModal.jsx:164 +msgid "Search for" +msgstr "搜索" + +#: src/ImageSearchModal.jsx:136 +msgid "Search for an image" +msgstr "搜索镜像" + +#: src/ImageRunModal.jsx:844 +msgid "Search string or container location" +msgstr "搜索字符串或容器位置" + +#: src/ImageSearchModal.jsx:183 +msgid "Searching..." +msgstr "搜索中..." + +#: src/ImageRunModal.jsx:822 +msgid "Searching: $0" +msgstr "搜索: $0" + +#: src/Volume.jsx:76 +msgid "Shared" +msgstr "共享" + +#: src/Containers.jsx:726 +msgid "Show" +msgstr "显示" + +#: src/Images.jsx:302 +msgid "Show images" +msgstr "显示镜像" + +#: src/Images.jsx:252 +msgid "Show intermediate images" +msgstr "显示中间镜像" + +#: src/ContainerIntegration.jsx:82 +msgid "Show less" +msgstr "显示更少" + +#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 +msgid "Show more" +msgstr "显示更多" + +#: src/ImageHistory.jsx:33 +msgid "Size" +msgstr "大小" + +#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 +msgid "Start" +msgstr "启动" + +#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 +msgid "Start period" +msgstr "开始期间" + +#: src/app.jsx:644 +msgid "Start docker" +msgstr "启动 docker" + +#: src/ImageSearchModal.jsx:185 +msgid "Start typing to look for images." +msgstr "开始键入来查找镜像。" + +#: src/ContainerHealthLogs.jsx:105 +msgid "Started at" +msgstr "开始于" + +#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 +msgid "State" +msgstr "状态" + +#: src/ContainerHealthLogs.jsx:56 +msgid "Status" +msgstr "状态" + +#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 +#: src/ImageRunModal.jsx:60 +msgid "Stop" +msgstr "停止" + +#: src/util.js:23 src/util.js:26 +msgid "Stopped" +msgstr "已停止" + +#: src/ContainerCheckpointModal.jsx:60 +msgid "Support preserving established TCP connections" +msgstr "支持保留已建立的 TCP 连接" + +#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 +#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 +msgid "System" +msgstr "系统" + +#: src/app.jsx:690 +msgid "System Docker service is also available" +msgstr "系统 Docker 服务同样可用" + +#: src/PublishPort.jsx:128 +msgid "TCP" +msgstr "TCP" + +#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 +msgid "Tag" +msgstr "标签" + +#: src/ImageDetails.jsx:27 +msgid "Tags" +msgstr "标签" + +#: org.cockpit-project.docker.metainfo.xml:10 +msgid "The Cockpit user interface for Docker containers." +msgstr "Docker 容器的 Cockpit 用户界面。" + +#: src/ImageRunModal.jsx:1086 +msgid "The initialization time needed for a container to bootstrap." +msgstr "容器进行 bootstrap 所需的初始化时间。" + +#: src/ImageRunModal.jsx:1061 +msgid "" +"The maximum time allowed to complete the health check before an interval is " +"considered failed." +msgstr "当间隔被视为失败前,允许完成健康检查的最长时间。" + +#: src/ImageRunModal.jsx:1111 +msgid "" +"The number of retries allowed before a healthcheck is considered to be " +"unhealthy." +msgstr "在健康检查被视为不健康前,允许的重试次数。" + +#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 +msgid "Timeout" +msgstr "超时" + +#: src/app.jsx:649 +msgid "Troubleshoot" +msgstr "故障排除" + +#: src/ContainerHeader.jsx:28 +msgid "Type to filter…" +msgstr "输入筛选条件……" + +#: src/PublishPort.jsx:129 +msgid "UDP" +msgstr "UDP" + +#: src/ImageHistory.jsx:59 +msgid "Unable to load image history" +msgstr "无法加载镜像历史记录" + +#: src/Containers.jsx:284 +msgid "Unhealthy" +msgstr "不健康" + +#: src/ContainerDetails.jsx:12 +msgid "Up since $0" +msgstr "自 $0 开始运行" + +#: src/ContainerCommitModal.jsx:127 +msgid "Use legacy Docker format" +msgstr "使用旧的 Docker 格式" + +#: src/Images.jsx:183 src/ImageDetails.jsx:33 +msgid "Used by" +msgstr "使用者" + +#: src/app.jsx:67 src/app.jsx:528 +msgid "User" +msgstr "用户" + +#: src/app.jsx:697 +msgid "User Docker service is also available" +msgstr "用户 Docker 服务同样可用" + +#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 +#: src/ImageRunModal.jsx:807 +msgid "User:" +msgstr "用户:" + +#: src/Env.jsx:72 +msgid "Value" +msgstr "值" + +#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 +#: src/ImageRunModal.jsx:1004 +msgid "Volumes" +msgstr "卷" + +#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 +msgid "When unhealthy" +msgstr "当不健康时" + +#: src/ImageRunModal.jsx:880 +msgid "With terminal" +msgstr "使用终端" + +#: src/Volume.jsx:66 +msgid "Writable" +msgstr "可写入" + +#: src/manifest.json:0 +msgid "container" +msgstr "容器" + +#: src/ImageRunModal.jsx:289 +msgid "downloading" +msgstr "下载" + +#: src/ImageRunModal.jsx:820 +msgid "host[:port]/[user]/container[:tag]" +msgstr "host[:port]/[user]/container[:tag]" + +#: src/manifest.json:0 +msgid "image" +msgstr "镜像" + +#: src/ImageSearchModal.jsx:172 +msgid "in" +msgstr "于" + +#: src/ImageDeleteModal.jsx:79 +msgid "intermediate" +msgstr "中间体" + +#: src/ImageDeleteModal.jsx:59 +msgid "intermediate image" +msgstr "中间镜像" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "n/a" +msgstr "不适用" + +#: src/Containers.jsx:353 src/Containers.jsx:354 +msgid "not available" +msgstr "不可用" + +#: src/Containers.jsx:847 +msgid "pod group" +msgstr "pod 组" + +#: src/manifest.json:0 +msgid "docker" +msgstr "docker" + +#: src/Containers.jsx:532 +msgid "ports" +msgstr "端口" + +#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 +#: src/ImageRunModal.jsx:1104 +msgid "seconds" +msgstr "秒" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 +msgid "system" +msgstr "系统" + +#: src/Images.jsx:85 src/Images.jsx:92 +msgid "unused" +msgstr "未使用" + +#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 +#: src/Images.jsx:134 +msgid "user:" +msgstr "用户:" + +#: src/Containers.jsx:547 +msgid "volumes" +msgstr "卷" + +#~ msgid "Delete $0" +#~ msgstr "删除 $0" + +#~ msgid "select all" +#~ msgstr "全选" + +#~ msgid "Restarting" +#~ msgstr "正在重启" + +#~ msgid "Confirm deletion of $0" +#~ msgstr "确认删除 $0" + +#~ msgid "Confirm deletion of pod $0" +#~ msgstr "确认删除 pod $0" + +#~ msgid "Confirm force deletion of pod $0" +#~ msgstr "确认强制删除 pod $0" + +#~ msgid "Confirm forced deletion of $0" +#~ msgstr "确认强制删除 $0" + +#~ msgid "Container is currently running." +#~ msgstr "容器正在运行。" + +#~ msgid "Do not include root file-system changes when exporting" +#~ msgstr "导出时不包含 root 文件系统更改" + +#~ msgid "Default with single selectable" +#~ msgstr "默认使用单选" + +#~ msgid "Start after creation" +#~ msgstr "创建后启动" + +#, fuzzy +#~| msgid "Delete tagged images" +#~ msgid "Delete unused $0 images:" +#~ msgstr "删除标记的镜像" + +#~ msgid "created" +#~ msgstr "创建" + +#~ msgid "exited" +#~ msgstr "退出" + +#~ msgid "paused" +#~ msgstr "已暂停" + +#~ msgid "running" +#~ msgstr "正在运行" + +#~ msgid "stopped" +#~ msgstr "已停止" + +#, fuzzy +#~| msgid "user:" +#~ msgid "user" +#~ msgstr "用户:" + +#~ msgid "Add on build variable" +#~ msgstr "添加构建变量" + +#~ msgid "Commit image" +#~ msgstr "提交镜像" + +#~ msgid "Format" +#~ msgstr "格式" + +#~ msgid "Message" +#~ msgstr "消息" + +#~ msgid "Pause the container" +#~ msgstr "暂停该容器" + +#~ msgid "Remove on build variable" +#~ msgstr "删除构建变量" + +#~ msgid "Set container on build variables" +#~ msgstr "设置容器构建时的变量" + +#~ msgid "Add item" +#~ msgstr "添加项目" + +#~ msgid "Host port (optional)" +#~ msgstr "主机端口(可选)" + +#~ msgid "IP (optional)" +#~ msgstr "IP(可选)" + +#~ msgid "ReadOnly" +#~ msgstr "只读" + +#~ msgid "IP prefix length" +#~ msgstr "IP 前缀长度" + +#~ msgid "Get new image" +#~ msgstr "获取新镜像" + +#~ msgid "Run" +#~ msgstr "运行" + +#~ msgid "On build" +#~ msgstr "构建时" + +#~ msgid "Are you sure you want to delete this image?" +#~ msgstr "您确定要删除该镜像吗?" + +#~ msgid "Could not attach to this container: $0" +#~ msgstr "无法附加到该容器:$0" + +#~ msgid "Could not open channel: $0" +#~ msgstr "无法打开通道:$0" + +#~ msgid "Everything" +#~ msgstr "全部" + +#~ msgid "Security" +#~ msgstr "安全性" + +#~ msgid "The scan from $time ($type) found no vulnerabilities." +#~ msgstr "$time ($type) 发起的扫描未发现漏洞。" + +#~ msgid "This version of the Web Console does not support a terminal." +#~ msgstr "该版本的网页控制台不支持终端。" diff --git a/ui/cockpit-docker/pyproject.toml b/ui/cockpit-docker/pyproject.toml new file mode 100644 index 0000000..462e002 --- /dev/null +++ b/ui/cockpit-docker/pyproject.toml @@ -0,0 +1,51 @@ +[tool.ruff] +exclude = [ + ".git/", + "modules/", + "node_modules/", +] +line-length = 118 +preview = true +src = [] + +[tool.ruff.lint] +select = [ + "A", # flake8-builtins + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "D300", # pydocstyle: Forbid ''' in docstrings + "DTZ", # flake8-datetimez + "E", # pycodestyle + "EXE", # flake8-executable + "F", # pyflakes + "FBT", # flake8-boolean-trap + "G", # flake8-logging-format + "I", # isort + "ICN", # flake8-import-conventions + "ISC", # flake8-implicit-str-concat + "PLE", # pylint errors + "PGH", # pygrep-hooks + "RSE", # flake8-raise + "RUF", # ruff rules + "T10", # flake8-debugger + "TCH", # flake8-type-checking + "UP032", # f-string + "W", # warnings (mostly whitespace) + "YTT", # flake8-2020 +] +ignore = [ + "FBT002", # Boolean default value in function definition + "FBT003", # Boolean positional value in function call +] + +[tool.ruff.lint.flake8-pytest-style] +fixture-parentheses = false +mark-parentheses = false + +[tool.ruff.lint.isort] +known-first-party = ["cockpit"] + +[tool.vulture] +ignore_names = [ + "test[A-Z0-9]*", +] diff --git a/ui/cockpit-docker/src/ContainerCheckpointModal.jsx b/ui/cockpit-docker/src/ContainerCheckpointModal.jsx new file mode 100644 index 0000000..11bae17 --- /dev/null +++ b/ui/cockpit-docker/src/ContainerCheckpointModal.jsx @@ -0,0 +1,68 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; +import { Form } from "@patternfly/react-core/dist/esm/components/Form"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { useDialogs } from "dialogs.jsx"; +import cockpit from 'cockpit'; + +import * as client from './client.js'; + +const _ = cockpit.gettext; + +const ContainerCheckpointModal = ({ containerWillCheckpoint, onAddNotification }) => { + const Dialogs = useDialogs(); + const [inProgress, setProgress] = useState(false); + const [keep, setKeep] = useState(false); + const [leaveRunning, setLeaveRunning] = useState(false); + const [tcpEstablished, setTcpEstablished] = useState(false); + + const handleCheckpointContainer = () => { + setProgress(true); + client.postContainer("checkpoint", containerWillCheckpoint.Id, { + keep, + leaveRunning, + tcpEstablished, + }) + .catch(ex => { + const error = cockpit.format(_("Failed to checkpoint container $0"), containerWillCheckpoint.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + setProgress(false); + }) + .finally(() => { + Dialogs.close(); + }); + }; + + return ( + + + + } + > +
+ setKeep(val)} /> + setLeaveRunning(val)} /> + setTcpEstablished(val) } /> + +
+ ); +}; + +export default ContainerCheckpointModal; diff --git a/ui/cockpit-docker/src/ContainerCommitModal.jsx b/ui/cockpit-docker/src/ContainerCommitModal.jsx new file mode 100644 index 0000000..4e02100 --- /dev/null +++ b/ui/cockpit-docker/src/ContainerCommitModal.jsx @@ -0,0 +1,158 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; +import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import cockpit from 'cockpit'; + +import { FormHelper } from 'cockpit-components-form-helper.jsx'; +import * as utils from './util.js'; +import * as client from './client.js'; +import { ErrorNotification } from './Notification.jsx'; +import { fmt_to_fragments } from 'utils.jsx'; +import { useDialogs } from "dialogs.jsx"; + +const _ = cockpit.gettext; + +const ContainerCommitModal = ({ container, localImages }) => { + const Dialogs = useDialogs(); + + const [imageName, setImageName] = useState(""); + const [tag, setTag] = useState(""); + const [author, setAuthor] = useState(""); + const [command, setCommand] = useState(utils.quote_cmdline(container.Config.Cmd)); + const [pause, setPause] = useState(false); + + const [dialogError, setDialogError] = useState(""); + const [dialogErrorDetail, setDialogErrorDetail] = useState(""); + const [commitInProgress, setCommitInProgress] = useState(false); + const [nameError, setNameError] = useState(""); + + const handleCommit = (force) => { + if (!force && !imageName) { + setNameError(_("Image name is required")); + return; + } + + let full_name = imageName + ":" + (tag !== "" ? tag : "latest"); + if (full_name.indexOf("/") < 0) + full_name = "localhost/" + full_name; + + if (!force && localImages.some(image => image.Name === full_name)) { + setNameError(_("Image name is not unique")); + return; + } + + function quote(word) { + word = word.replace(/"/g, '\\"'); + return '"' + word + '"'; + } + + const commitData = {}; + commitData.container = container.Id; + commitData.repo = imageName; + commitData.author = author; + commitData.pause = pause; + commitData.format = 'docker'; + + if (tag) + commitData.tag = tag; + + commitData.changes = []; + if (command.trim() !== "") { + let cmdData = ""; + const words = utils.unquote_cmdline(command.trim()); + const cmdStr = words.map(quote).join(", "); + cmdData = "CMD [" + cmdStr + "]"; + commitData.changes.push(cmdData); + } + + setCommitInProgress(true); + setNameError(""); + setDialogError(""); + setDialogErrorDetail(""); + client.commitContainer(commitData) + .then(() => Dialogs.close()) + .catch(ex => { + setDialogError(cockpit.format(_("Failed to commit container $0"), container.Name)); + setDialogErrorDetail(cockpit.format("$0: $1", ex.message, ex.reason)); + setCommitInProgress(false); + }); + }; + + const commitContent = ( +
+ {dialogError && setDialogError("")} />} + + { setNameError(""); setImageName(value) }} /> + + + + + { setNameError(""); setTag(value) }} /> + + + + ")} + value={author} + onChange={(_, value) => setAuthor(value)} /> + + + + setCommand(value)} /> + + + + setPause(val)} + label={_("Pause container when creating image")} /> + + + ); + + return ( + {container.Name})} + footer={<> + + {nameError && } + + } + > + {commitContent} + + ); +}; + +export default ContainerCommitModal; diff --git a/ui/cockpit-docker/src/ContainerDeleteModal.jsx b/ui/cockpit-docker/src/ContainerDeleteModal.jsx new file mode 100644 index 0000000..ce2087d --- /dev/null +++ b/ui/cockpit-docker/src/ContainerDeleteModal.jsx @@ -0,0 +1,42 @@ +import React from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { useDialogs } from "dialogs.jsx"; +import cockpit from 'cockpit'; + +import * as client from './client.js'; + +const _ = cockpit.gettext; + +const ContainerDeleteModal = ({ containerWillDelete, onAddNotification }) => { + const Dialogs = useDialogs(); + + const handleRemoveContainer = () => { + const container = containerWillDelete; + const id = container ? container.Id : ""; + + Dialogs.close(); + client.delContainer(id, false) + .catch(ex => { + const error = cockpit.format(_("Failed to remove container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + }; + + return ( + + {' '} + + } + > + {_("Deleting a container will erase all data in it.")} + + ); +}; + +export default ContainerDeleteModal; diff --git a/ui/cockpit-docker/src/ContainerDetails.jsx b/ui/cockpit-docker/src/ContainerDetails.jsx new file mode 100644 index 0000000..96549ae --- /dev/null +++ b/ui/cockpit-docker/src/ContainerDetails.jsx @@ -0,0 +1,80 @@ +import React from 'react'; +import cockpit from 'cockpit'; +import * as utils from './util.js'; + +import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; +import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; + +const _ = cockpit.gettext; + +const render_container_state = (container) => { + if (container.State.Status === "running") { + return cockpit.format(_("Up since $0"), utils.localize_time(Date.parse(container.State.StartedAt) / 1000)); + } + return cockpit.format(_("Exited")); +}; + +const ContainerDetails = ({ container }) => { + const networkOptions = ( + [ + container.NetworkSettings?.IPAddress, + container.NetworkSettings?.Gateway, + container.NetworkSettings?.MacAddress, + ].some(itm => !!itm) + ); + + return ( + + + + + {_("ID")} + {utils.truncate_id(container.Id)} + + + {_("Image")} + {container.Config.Image} + + + {_("Command")} + {utils.quote_cmdline(container.Config?.Cmd)} + + + + + {networkOptions && + {container.NetworkSettings?.IPAddress && + {_("IP address")} + {container.NetworkSettings.IPAddress} + } + {container.NetworkSettings?.Gateway && + {_("Gateway")} + {container.NetworkSettings.Gateway} + } + {container.NetworkSettings?.MacAddress && + {_("MAC address")} + {container.NetworkSettings.MacAddress} + } + } + + + + + {_("Created")} + {utils.localize_time(new Date(container.Created) / 1000)} + + + {_("State")} + {render_container_state(container)} + + {container.State?.Checkpointed && + {_("Latest checkpoint")} + {utils.localize_time(Date.parse(container.State.CheckpointedAt) / 1000)} + } + + + + ); +}; + +export default ContainerDetails; diff --git a/ui/cockpit-docker/src/ContainerHeader.jsx b/ui/cockpit-docker/src/ContainerHeader.jsx new file mode 100644 index 0000000..f7ecacc --- /dev/null +++ b/ui/cockpit-docker/src/ContainerHeader.jsx @@ -0,0 +1,22 @@ +import React from 'react'; +import cockpit from 'cockpit'; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import { Toolbar, ToolbarContent, ToolbarItem } from "@patternfly/react-core/dist/esm/components/Toolbar"; +const _ = cockpit.gettext; + +const ContainerHeader = ({ textFilter, handleFilterChanged }) => { + return ( + + + + handleFilterChanged(value)} /> + + + + ); +}; + +export default ContainerHeader; diff --git a/ui/cockpit-docker/src/ContainerHealthLogs.jsx b/ui/cockpit-docker/src/ContainerHealthLogs.jsx new file mode 100644 index 0000000..1d9b354 --- /dev/null +++ b/ui/cockpit-docker/src/ContainerHealthLogs.jsx @@ -0,0 +1,158 @@ +/* + * This file is part of Cockpit. + * + * Copyright (C) 2022 Red Hat, Inc and 2023 Jewish Education Media. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Cockpit; If not, see . + */ + +import React from 'react'; +import cockpit from 'cockpit'; +import * as utils from './util.js'; + +import { ListingTable } from "cockpit-components-table.jsx"; +import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; +import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { CheckCircleIcon, ErrorCircleOIcon } from "@patternfly/react-icons"; +import { CodeBlock, CodeBlockAction, CodeBlockCode } from '@patternfly/react-core/dist/esm/components/CodeBlock'; +import { ClipboardCopyButton } from '@patternfly/react-core/dist/esm/components/ClipboardCopy'; +import { ExpandableSection, ExpandableSectionToggle } from '@patternfly/react-core/dist/esm/components/ExpandableSection'; +const _ = cockpit.gettext; + +const format_nanoseconds = (ns) => { + const seconds = ns / 1000000000; + return cockpit.format(cockpit.ngettext("$0 second", "$0 seconds", seconds), seconds); +}; + +const HealthcheckOnFailureActionText = { + none: _("No action"), + restart: _("Restart"), + stop: _("Stop"), + kill: _("Force stop"), +}; + +const HealthLogBlock = ({ log }) => { + const [expanded, setExpanded] = React.useState(false); + const toggleExpanded = () => setExpanded(!expanded); + + const actions = ( + <> + + + + + ); + + let output = log.Output.split("\n"); + let extra = null; + if (output.length > 10) { + extra = output.slice(10).join("\n"); + output = output.slice(0, 10).join("\n"); + } else { + output = output.join("\n"); + } + + return ( + + + {output} + {extra && + {extra} + } + + { extra && + {expanded ? 'Show Less' : 'Show More'} + } + + ); +}; + +const ContainerHealthLogs = ({ container, onAddNotification, state }) => { + const healthCheck = container.Config?.Healthcheck ?? container.Config?.Health ?? {}; // not-covered: only on old version + const healthState = container.State?.Healthcheck ?? container.State?.Health ?? {}; // not-covered: only on old version + const logs = [...(healthState.Log || [])].reverse(); // not-covered: Log should always exist, belt-and-suspenders + + return ( + <> + + + + + {_("Status")} + {state} + + + {_("Command")} + {utils.quote_cmdline(healthCheck.Test)} + + {healthCheck.Interval && + {_("Interval")} + {format_nanoseconds(healthCheck.Interval)} + } + {healthCheck.Retries && + {_("Retries")} + {healthCheck.Retries} + } + {healthCheck.StartPeriod && + {_("Start period")} + {format_nanoseconds(healthCheck.StartPeriod)} + } + {healthCheck.Timeout && + {_("Timeout")} + {format_nanoseconds(healthCheck.Timeout)} + } + {container.Config?.HealthcheckOnFailureAction && + {_("When unhealthy")} + {HealthcheckOnFailureActionText[container.Config.HealthcheckOnFailureAction]} + } + {healthState.FailingStreak && + {_("Failing streak")} + {healthState.FailingStreak} + } + + + + { + const id = "hc" + log.Start + container.Id; + return { + expandedContent: log.Output ? : null, + columns: [ + { + title: + {log.ExitCode === 0 ? : } + {log.ExitCode === 0 ? _("Passed health run") : _("Failed health run")} + + }, + { + title:
{log.ExitCode}
+ }, + utils.localize_time(Date.parse(log.Start) / 1000) + ], + props: { + key: id, + "data-row-id": id, + }, + }; + }) + } /> + + ); +}; + +export default ContainerHealthLogs; diff --git a/ui/cockpit-docker/src/ContainerIntegration.jsx b/ui/cockpit-docker/src/ContainerIntegration.jsx new file mode 100644 index 0000000..999bead --- /dev/null +++ b/ui/cockpit-docker/src/ContainerIntegration.jsx @@ -0,0 +1,125 @@ +import React, { useState } from 'react'; +import cockpit from 'cockpit'; + +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; +import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List"; +import { Tooltip } from "@patternfly/react-core/dist/esm/components/Tooltip"; + +import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; + +const _ = cockpit.gettext; + +// ports is a mapping like { "5000/tcp": [{"HostIp": "", "HostPort": "6000"}] } +export const renderContainerPublishedPorts = ports => { + if (!ports) + return null; + + const items = []; + Object.entries(ports).forEach(([containerPort, hostBindings]) => { + (hostBindings ?? []).forEach(binding => { // not-covered: null was observed in the wild, but unknown how to reproduce + items.push( + + { binding.HostIp || "0.0.0.0" }:{ binding.HostPort } → { containerPort } + + ); + }); + }); + + return {items}; +}; + +export const renderContainerVolumes = (volumes) => { + if (!volumes.length) + return null; + + const result = volumes.map(volume => { + let source = volume.Source; + if (volume.Source.includes(`docker/volumes/${volume.Name}`)) { + source = volume.Name; + } + return ( + + {source} + {volume.RW + ? + : } + {volume.Destination} + + ); + }); + + return {result}; +}; + +const ContainerEnv = ({ containerEnv, imageEnv }) => { + // filter out some Environment variables set by docker or by image + const toRemoveEnv = [...imageEnv, 'container=docker']; + let toShow = containerEnv.filter(variable => { + if (toRemoveEnv.includes(variable)) { + return false; + } + + return !variable.match(/(HOME|TERM)=.*/); + }); + + // append filtered out variables to always shown variables when 'show more' is clicked + const [showMore, setShowMore] = useState(false); + if (showMore) + toShow = toShow.concat(containerEnv.filter(variable => !toShow.includes(variable))); + + if (!toShow.length) + return null; + + const result = toShow.map(variable => { + return ( + + {variable} + + ); + }); + + result.push( + + + + ); + + return {result}; +}; + +const ContainerIntegration = ({ container, localImages }) => { + if (localImages === null) { // not-covered: not a stable UI state + return ( + + ); + } + + const ports = renderContainerPublishedPorts(container.NetworkSettings.Ports); + const volumes = renderContainerVolumes(container.Mounts); + + const image = localImages.filter(img => img.Id === container.Image)[0]; + const env = ; + + return ( + + {ports && + {_("Ports")} + {ports} + } + {volumes && + {_("Volumes")} + {volumes} + } + {env && + {_("Environment variables")} + {env} + } + + ); +}; + +export default ContainerIntegration; diff --git a/ui/cockpit-docker/src/ContainerLogs.jsx b/ui/cockpit-docker/src/ContainerLogs.jsx new file mode 100644 index 0000000..7bcf0a7 --- /dev/null +++ b/ui/cockpit-docker/src/ContainerLogs.jsx @@ -0,0 +1,174 @@ +/* + * This file is part of Cockpit. + * + * Copyright (C) 2020 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Cockpit; If not, see . + */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import { Terminal } from "xterm"; +import { CanvasAddon } from 'xterm-addon-canvas'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; + +import cockpit from 'cockpit'; +import rest from './rest.js'; +import * as client from './client.js'; +import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; + +import "./ContainerTerminal.css"; + +const _ = cockpit.gettext; + +class ContainerLogs extends React.Component { + constructor(props) { + super(props); + + this.onStreamClose = this.onStreamClose.bind(this); + this.onStreamMessage = this.onStreamMessage.bind(this); + this.connectStream = this.connectStream.bind(this); + + this.view = new Terminal({ + cols: 80, + rows: 24, + convertEol: true, + cursorBlink: false, + disableStdin: true, + fontSize: 12, + fontFamily: 'Menlo, Monaco, Consolas, monospace', + screenReaderMode: true + }); + this.view._core.cursorHidden = true; + this.view.write(_("Loading logs...")); + + this.logRef = React.createRef(); + + this.state = { + opened: false, + loading: true, + errorMessage: "", + streamer: null, + }; + } + + componentDidMount() { + this._ismounted = true; + this.connectStream(); + } + + componentDidUpdate(prevProps, prevState) { + // Connect channel when there is none and container started + if (!this.state.streamer && this.props.containerStatus === "running" && prevProps.containerStatus !== "running") + this.connectStream(); + if (prevProps.width !== this.props.width) { + this.resize(this.props.width); + } + } + + resize(width) { + // 24 PF padding * 4 + // 3 line border + // 21 inner padding of xterm.js + // xterm.js scrollbar 20 + const padding = 24 * 4 + 3 + 21 + 20; + const realWidth = this.view._core._renderService.dimensions.css.cell.width; + const cols = Math.floor((width - padding) / realWidth); + this.view.resize(cols, 24); + } + + componentWillUnmount() { + this._ismounted = false; + if (this.state.streamer) + this.state.streamer.close(); + this.view.dispose(); + } + + connectStream() { + if (this.state.streamer !== null) + return; + + // Show the terminal. Once it was shown, do not show it again but reuse the previous one + if (!this.state.opened) { + this.view.open(this.logRef.current); + this.view.loadAddon(new CanvasAddon()); + this.setState({ opened: true }); + } + this.resize(this.props.width); + + const connection = rest.connect(client.getAddress()); + const options = { + method: "GET", + path: client.VERSION + "/containers/" + this.props.containerId + "/logs", + body: "", + binary: true, + params: { + follow: true, + stdout: true, + stderr: true, + }, + }; + + connection.monitor(options, this.onStreamMessage, true) + .then(this.onStreamClose) + .catch(e => { + const error = JSON.parse(new TextDecoder().decode(e.message)); + this.setState({ + errorMessage: error.message, + streamer: null, + }); + }); + this.setState({ + streamer: connection, + errorMessage: "", + }); + } + + onStreamMessage(data) { + if (data) { + if (this.state.loading) { + this.view.reset(); + this.view._core.cursorHidden = true; + this.setState({ loading: false }); + } + // First 8 bytes encode information about stream and frame + // See 'Stream format' on https://docs.docker.com/engine/api/v1.40/#operation/ContainerAttach + this.view.writeln(data.slice(8)); + } + } + + onStreamClose() { + if (this._ismounted) { + this.setState({ + streamer: null, + }); + this.view.write("Streaming disconnected"); + } + } + + render() { + let element =
; + if (this.state.errorMessage) + element = ; + + return element; + } +} + +ContainerLogs.propTypes = { + containerId: PropTypes.string.isRequired, + width: PropTypes.number.isRequired +}; + +export default ContainerLogs; diff --git a/ui/cockpit-docker/src/ContainerRenameModal.jsx b/ui/cockpit-docker/src/ContainerRenameModal.jsx new file mode 100644 index 0000000..c81c0f2 --- /dev/null +++ b/ui/cockpit-docker/src/ContainerRenameModal.jsx @@ -0,0 +1,107 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import cockpit from 'cockpit'; + +import * as client from './client.js'; +import * as utils from './util.js'; +import { ErrorNotification } from './Notification.jsx'; +import { useDialogs } from "dialogs.jsx"; +import { FormHelper } from 'cockpit-components-form-helper.jsx'; + +const _ = cockpit.gettext; + +const ContainerRenameModal = ({ container, updateContainer }) => { + const Dialogs = useDialogs(); + const [name, setName] = useState(container.Name.replace(/^\//, "")); + const { version } = utils.useDockerInfo(); + const [nameError, setNameError] = useState(null); + const [dialogError, setDialogError] = useState(null); + const [dialogErrorDetail, setDialogErrorDetail] = useState(null); + + const handleInputChange = (targetName, value) => { + if (targetName === "name") { + setName(value); + if (value === "") { + setNameError(_("Container name is required.")); + } else if (utils.is_valid_container_name(value)) { + setNameError(null); + } else { + setNameError(_("Invalid characters. Name can only contain letters, numbers, and certain punctuation (_ . -).")); + } + } + }; + + const handleRename = () => { + if (!name) { + setNameError(_("Container name is required.")); + return; + } + + setNameError(null); + setDialogError(null); + client.renameContainer(container.Id, { name }) + .then(() => { + Dialogs.close(); + // HACK: This is a workaround for missing API rename event in docker versions less than 4.1. + if (version.localeCompare("4.1", undefined, { numeric: true, sensitivity: 'base' }) < 0) { + updateContainer(container.Id); // not-covered: only on old version + } + }) + .catch(ex => { + setDialogError(cockpit.format(_("Failed to rename container $0"), container.Name)); // not-covered: OS error + setDialogErrorDetail(cockpit.format("$0: $1", ex.message, ex.reason)); + }); + }; + + const handleKeyDown = (event) => { + if (event.key === "Enter") { + event.preventDefault(); + handleRename(); + } + }; + + const renameContent = ( +
+ + handleInputChange("name", value)} /> + + +
+ ); + + return ( + + + + } + > + {dialogError && setDialogError(null)} />} + {renameContent} + + ); +}; + +export default ContainerRenameModal; diff --git a/ui/cockpit-docker/src/ContainerRestoreModal.jsx b/ui/cockpit-docker/src/ContainerRestoreModal.jsx new file mode 100644 index 0000000..c3575bb --- /dev/null +++ b/ui/cockpit-docker/src/ContainerRestoreModal.jsx @@ -0,0 +1,74 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; +import { Form } from "@patternfly/react-core/dist/esm/components/Form"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { useDialogs } from "dialogs.jsx"; +import cockpit from 'cockpit'; + +import * as client from './client.js'; + +const _ = cockpit.gettext; + +const ContainerRestoreModal = ({ containerWillRestore, onAddNotification }) => { + const Dialogs = useDialogs(); + + const [inProgress, setInProgress] = useState(false); + const [keep, setKeep] = useState(false); + const [tcpEstablished, setTcpEstablished] = useState(false); + const [ignoreStaticIP, setIgnoreStaticIP] = useState(false); + const [ignoreStaticMAC, setIgnoreStaticMAC] = useState(false); + + const handleRestoreContainer = () => { + setInProgress(true); + client.postContainer("restore", containerWillRestore.Id, { + keep, + tcpEstablished, + ignoreStaticIP, + ignoreStaticMAC, + }) + .catch(ex => { + const error = cockpit.format(_("Failed to restore container $0"), containerWillRestore.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + setInProgress(false); + }) + .finally(() => { + Dialogs.close(); + }); + }; + + return ( + + + + } + > +
+ setKeep(val)} /> + setTcpEstablished(val)} /> + setIgnoreStaticIP(val)} /> + setIgnoreStaticMAC(val)} /> + +
+ ); +}; + +export default ContainerRestoreModal; diff --git a/ui/cockpit-docker/src/ContainerTerminal.css b/ui/cockpit-docker/src/ContainerTerminal.css new file mode 100644 index 0000000..27d2f5b --- /dev/null +++ b/ui/cockpit-docker/src/ContainerTerminal.css @@ -0,0 +1,7 @@ +@import "xterm/css/xterm.css"; + +.terminal { + /* 5px all around and on right +11 since the scrollbar is 11px wide */ + padding-block: 5px; + padding-inline: 5px 16px; +} diff --git a/ui/cockpit-docker/src/ContainerTerminal.jsx b/ui/cockpit-docker/src/ContainerTerminal.jsx new file mode 100644 index 0000000..8840456 --- /dev/null +++ b/ui/cockpit-docker/src/ContainerTerminal.jsx @@ -0,0 +1,265 @@ +/* + * This file is part of Cockpit. + * + * Copyright (C) 2019 Red Hat, Inc and 2023 Jewish Education Media. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Cockpit; If not, see . + */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import cockpit from 'cockpit'; +import { Terminal } from "xterm"; +import { CanvasAddon } from 'xterm-addon-canvas'; +import { ErrorNotification } from './Notification.jsx'; + +import * as client from './client.js'; +import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; + +import "./ContainerTerminal.css"; + +const _ = cockpit.gettext; +const decoder = cockpit.utf8_decoder(); +const encoder = cockpit.utf8_encoder(); + +function sequence_find(seq, find) { + let f; + const fl = find.length; + let s; + const sl = (seq.length - fl) + 1; + for (s = 0; s < sl; s++) { + for (f = 0; f < fl; f++) { + if (seq[s + f] !== find[f]) + break; + } + if (f == fl) + return s; + } + + return -1; +} + +class ContainerTerminal extends React.Component { + constructor(props) { + super(props); + + this.onChannelClose = this.onChannelClose.bind(this); + this.onChannelMessage = this.onChannelMessage.bind(this); + this.disconnectChannel = this.disconnectChannel.bind(this); + this.connectChannel = this.connectChannel.bind(this); + this.resize = this.resize.bind(this); + this.connectToTty = this.connectToTty.bind(this); + this.execAndConnect = this.execAndConnect.bind(this); + this.setUpBuffer = this.setUpBuffer.bind(this); + + this.terminalRef = React.createRef(); + + this.term = new Terminal({ + cols: 80, + rows: 24, + screenKeys: true, + cursorBlink: true, + fontSize: 12, + fontFamily: 'Menlo, Monaco, Consolas, monospace', + screenReaderMode: true + }); + + this.state = { + container: props.containerId, + sessionId: props.containerId, + channel: null, + buffer: null, + opened: false, + errorMessage: "", + }; + } + + componentDidMount() { + this.connectChannel(); + } + + componentDidUpdate(prevProps, prevState) { + // Connect channel when there is none and either container started or tty was resolved + if (!this.state.channel && ( + (this.props.containerStatus === "running" && prevProps.containerStatus !== "running") || + (this.props.tty !== undefined && prevProps.tty === undefined))) + this.connectChannel(); + if (prevProps.width !== this.props.width) { + this.resize(this.props.width); + } + } + + resize(width) { + // 24 PF padding * 4 + // 3 line border + // 21 inner padding of xterm.js + // xterm.js scrollbar 20 + const padding = 24 * 4 + 3 + 21 + 20; + const realWidth = this.term._core._renderService.dimensions.css.cell.width; + const cols = Math.floor((width - padding) / realWidth); + this.term.resize(cols, 24); + client.resizeContainersTTY(this.state.sessionId, this.props.tty, cols, 24) + .catch(e => this.setState({ errorMessage: e.message })); + } + + connectChannel() { + if (this.state.channel) + return; + + if (this.props.containerStatus !== "running") + return; + + if (this.props.tty === undefined) + return; + + if (this.props.tty) + this.connectToTty(); + else + this.execAndConnect(); + } + + setUpBuffer(channel) { + const buffer = channel.buffer(); + + // Parse the full HTTP response + buffer.callback = (data) => { + let ret = 0; + let pos = 0; + // let headers = ""; + + // Double line break separates header from body + pos = sequence_find(data, [13, 10, 13, 10]); + if (pos == -1) + return ret; + + if (data.subarray) { + data = data.subarray(pos + 4); + ret += pos + 4; + } else { + data = data.slice(pos + 4); + ret += pos + 4; + } + // Set up callback for new incoming messages and if the first response + // contained any body, pass it into the callback + buffer.callback = this.onChannelMessage; + const consumed = this.onChannelMessage(data); + return ret + consumed; + }; + + channel.addEventListener('close', this.onChannelClose); + + // Show the terminal. Once it was shown, do not show it again but reuse the previous one + if (!this.state.opened) { + this.term.open(this.terminalRef.current); + this.term.loadAddon(new CanvasAddon()); + this.setState({ opened: true }); + + this.term.onData((data) => { + if (this.state.channel) + this.state.channel.send(encoder.encode(data)); + }); + } + channel.send(String.fromCharCode(12)); // Send SIGWINCH to show prompt on attaching + + return buffer; + } + + execAndConnect() { + client.execContainer(this.state.container) + .then(r => { + const channel = cockpit.channel({ + payload: "stream", + unix: client.getAddress(), + binary: true + }); + + const body = JSON.stringify({ Detach: false, Tty: false }); + channel.send("POST " + client.VERSION + "/exec/" + encodeURIComponent(r.Id) + + "/start HTTP/1.0\r\n" + + "Content-Type: application/json; charset=utf-8\r\n" + + "Content-Length: " + body.length + "\r\n\r\n" + body); + + const buffer = this.setUpBuffer(channel); + this.setState({ channel, errorMessage: "", buffer, sessionId: r.Id }, () => { console.log(this.props.width); this.resize(this.props.width) }); + }) + .catch(e => this.setState({ errorMessage: e.message })); + } + + connectToTty() { + const channel = cockpit.channel({ + payload: "stream", + unix: client.getAddress(), + binary: true + }); + + channel.send("POST " + client.VERSION + "/containers/" + encodeURIComponent(this.state.container) + + "/attach?stdin=true&stdout=true&stderr=true&stream=true HTTP/1.0\r\n" + + "Upgrade: tcp\r\nConnection: Upgrade\r\n\r\n"); + + const buffer = this.setUpBuffer(channel); + this.setState({ channel, errorMessage: "", buffer }); + this.resize(this.props.width); + } + + componentWillUnmount() { + this.disconnectChannel(); + if (this.state.channel) + this.state.channel.close(); + this.term.dispose(); + } + + onChannelMessage(buffer) { + if (buffer) + this.term.write(decoder.decode(buffer)); + return buffer.length; + } + + onChannelClose(event, options) { + this.term.write('\x1b[31m disconnected \x1b[m\r\n'); + this.disconnectChannel(); + this.setState({ channel: null }); + this.term.cursorHidden = true; + } + + disconnectChannel() { + if (this.state.buffer) + this.state.buffer.callback = null; // eslint-disable-line react/no-direct-mutation-state + if (this.state.channel) { + this.state.channel.removeEventListener('close', this.onChannelClose); + } + } + + render() { + let element =
; + + if (this.props.containerStatus !== "running" && !this.state.opened) + element = ; + + return ( + <> + {this.state.errorMessage && this.setState({ errorMessage: "" })} />} + {element} + + ); + } +} + +ContainerTerminal.propTypes = { + containerId: PropTypes.string.isRequired, + containerStatus: PropTypes.string.isRequired, + width: PropTypes.number.isRequired, + tty: PropTypes.bool, +}; + +export default ContainerTerminal; diff --git a/ui/cockpit-docker/src/Containers.jsx b/ui/cockpit-docker/src/Containers.jsx new file mode 100644 index 0000000..b9a0cf2 --- /dev/null +++ b/ui/cockpit-docker/src/Containers.jsx @@ -0,0 +1,611 @@ +import React from 'react'; +import { Badge } from "@patternfly/react-core/dist/esm/components/Badge"; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Card, CardBody, CardHeader, CardTitle } from "@patternfly/react-core/dist/esm/components/Card"; +import { Divider } from "@patternfly/react-core/dist/esm/components/Divider"; +import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/index.js'; +import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { LabelGroup } from "@patternfly/react-core/dist/esm/components/Label"; +import { Text, TextVariants } from "@patternfly/react-core/dist/esm/components/Text"; +import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; +import { Toolbar, ToolbarContent, ToolbarItem } from "@patternfly/react-core/dist/esm/components/Toolbar"; +import { cellWidth, SortByDirection } from '@patternfly/react-table'; + +import cockpit from 'cockpit'; +import { ListingTable } from "cockpit-components-table.jsx"; +import { ListingPanel } from 'cockpit-components-listing-panel.jsx'; +import ContainerDetails from './ContainerDetails.jsx'; +import ContainerIntegration from './ContainerIntegration.jsx'; +import ContainerTerminal from './ContainerTerminal.jsx'; +import ContainerLogs from './ContainerLogs.jsx'; +import ContainerHealthLogs from './ContainerHealthLogs.jsx'; +import ContainerDeleteModal from './ContainerDeleteModal.jsx'; +import ForceRemoveModal from './ForceRemoveModal.jsx'; +import * as utils from './util.js'; +import * as client from './client.js'; +import ContainerCommitModal from './ContainerCommitModal.jsx'; +import ContainerRenameModal from './ContainerRenameModal.jsx'; +import { useDialogs, DialogsContext } from "dialogs.jsx"; + +import './Containers.scss'; +import '@patternfly/patternfly/utilities/Accessibility/accessibility.css'; +import { ImageRunModal } from './ImageRunModal.jsx'; +import PruneUnusedContainersModal from './PruneUnusedContainersModal.jsx'; + +import { KebabDropdown } from "cockpit-components-dropdown.jsx"; + +const _ = cockpit.gettext; + +const ContainerActions = ({ container, healthcheck, onAddNotification, localImages, updateContainer }) => { + const Dialogs = useDialogs(); + const { version } = utils.useDockerInfo(); + const isRunning = container.State.Status === "running"; + const isPaused = container.State.Status === "paused"; + const isRestarting = container.State.Status === "restarting"; + + const deleteContainer = (event) => { + if (container.State.Status == "running") { + const handleForceRemoveContainer = () => { + const id = container ? container.Id : ""; + + return client.delContainer(id, true) + .catch(ex => { + const error = cockpit.format(_("Failed to force remove container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + throw ex; + }) + .finally(() => { + Dialogs.close(); + }); + }; + + Dialogs.show(); + } else { + Dialogs.show(); + } + }; + + const stopContainer = (force) => { + const args = {}; + + if (force) + args.t = 0; + client.postContainer("stop", container.Id, args) + .catch(ex => { + const error = cockpit.format(_("Failed to stop container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + }; + + const startContainer = () => { + client.postContainer("start", container.Id, {}) + .catch(ex => { + const error = cockpit.format(_("Failed to start container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + }; + + const resumeContainer = () => { + client.postContainer("unpause", container.Id, {}) + .catch(ex => { + const error = cockpit.format(_("Failed to resume container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + }; + + const pauseContainer = () => { + client.postContainer("pause", container.Id, {}) + .catch(ex => { + const error = cockpit.format(_("Failed to pause container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + }; + + const commitContainer = () => { + Dialogs.show(); + }; + + const restartContainer = (force) => { + const args = {}; + + if (force) + args.t = 0; + client.postContainer("restart", container.Id, args) + .catch(ex => { + const error = cockpit.format(_("Failed to restart container $0"), container.Name); // not-covered: OS error + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + }; + + const renameContainer = () => { + if (container.State.Status !== "running" || + version.localeCompare("3.0.1", undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + Dialogs.show(); + } + }; + + const addRenameAction = () => { + actions.push( + renameContainer()}> + {_("Rename")} + + ); + }; + + const actions = []; + if (isRunning || isPaused || isRestarting) { + actions.push( + stopContainer()}> + {_("Stop")} + , + stopContainer(true)}> + {_("Force stop")} + , + restartContainer()}> + {_("Restart")} + , + restartContainer(true)}> + {_("Force restart")} + + ); + + if (!isPaused) { + actions.push( + pauseContainer()}> + {_("Pause")} + + ); + } else { + actions.push( + resumeContainer()}> + {_("Resume")} + + ); + } + } + + if (!isRunning && !isPaused) { + actions.push( + startContainer()}> + {_("Start")} + + ); + actions.push(); + if (version.localeCompare("3", undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + addRenameAction(); + } + } else { // running or paused + actions.push(); + if (version.localeCompare("3.0.1", undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + addRenameAction(); + } + } + + actions.push(); + actions.push( + commitContainer()}> + {_("Commit")} + + ); + + actions.push(); + actions.push( + + {_("Delete")} + + ); + + return ; +}; + +export let onDownloadContainer = function funcOnDownloadContainer(container) { + this.setState(prevState => ({ + downloadingContainers: [...prevState.downloadingContainers, container] + })); +}; + +export let onDownloadContainerFinished = function funcOnDownloadContainerFinished(container) { + this.setState(prevState => ({ + downloadingContainers: prevState.downloadingContainers.filter(entry => entry.name !== container.name), + })); +}; + +const localize_health = (state) => { + if (state === "healthy") + return _("Healthy"); + else if (state === "unhealthy") + return _("Unhealthy"); + else if (state === "starting") + return _("Checking health"); + else + console.error("Unexpected health check status", state); + return null; +}; + +const ContainerOverActions = ({ handlePruneUnusedContainers, unusedContainers }) => { + const actions = [ + handlePruneUnusedContainers()} + isDisabled={unusedContainers.length === 0}> + {_("Prune unused containers")} + , + ]; + + return ; +}; + +class Containers extends React.Component { + static contextType = DialogsContext; + + constructor(props) { + super(props); + this.state = { + width: 0, + downloadingContainers: [], + showPruneUnusedContainersModal: false, + }; + this.renderRow = this.renderRow.bind(this); + this.onWindowResize = this.onWindowResize.bind(this); + + this.cardRef = React.createRef(); + + onDownloadContainer = onDownloadContainer.bind(this); + onDownloadContainerFinished = onDownloadContainerFinished.bind(this); + + window.addEventListener('resize', this.onWindowResize); + } + + componentDidMount() { + this.onWindowResize(); + } + + componentWillUnmount() { + window.removeEventListener('resize', this.onWindowResize); + } + + renderRow(containersStats, container, localImages) { + const containerStats = containersStats[container.Id]; + // if (containerStats?.name === "/build-jaeger-1") { + // console.log(container); + // console.log(containerStats); + // } + const image = container.Config?.Image || container.Image; + const isToolboxContainer = container.Config?.Labels?.["com.github.containers.toolbox"] === "true"; + const isDistroboxContainer = container.Config?.Labels?.manager === "distrobox"; + let localized_health = null; + + // this needs to get along with stub containers from image run dialog, where most properties don't exist yet + const healthcheck = container.State?.Health?.Status ?? container.State?.Healthcheck?.Status; // not-covered: only on old version + const status = container.State?.Status ?? ""; // not-covered: race condition + + let proc_text = ""; + let mem_text = ""; + let proc = 0; + let mem = 0; + if (this.props.cgroupVersion === 'v1' && status === 'running') { // not-covered: only on old version + proc_text =
{_("n/a")}
; + mem_text =
{_("n/a")}
; + } + if (containerStats && status === "running") { + [proc_text, proc] = utils.format_cpu_usage(containerStats); + [mem_text, mem] = utils.format_memory_and_limit(containerStats); + } + + const info_block = ( +
+ + {container.Name} + {isToolboxContainer && toolbox} + {isDistroboxContainer && distrobox} + + {image.includes("sha256:") ? utils.truncate_id(image) : image} + {utils.quote_cmdline(container.Config?.Cmd)} +
+ ); + + let containerStateClass = "ct-badge-container-" + status.toLowerCase(); + if (container.isDownloading) + containerStateClass += " downloading"; + + const containerState = status.charAt(0).toUpperCase() + status.slice(1); + + const state = [{_(containerState)}]; // States are defined in util.js + if (healthcheck) { + localized_health = localize_health(healthcheck); + if (localized_health) + state.push({localized_health}); + } + + const columns = [ + { title: info_block, sortKey: container.Name }, + { title: proc_text, props: { modifier: "nowrap" }, sortKey: containerState === "Running" ? proc ?? -1 : -1 }, + { title: mem_text, props: { modifier: "nowrap" }, sortKey: mem ?? -1 }, + { title: {state}, sortKey: containerState }, + ]; + + if (!container.isDownloading) { + columns.push({ + title: , + props: { className: "pf-v5-c-table__action" } + }); + } + + const tty = !!container.Config?.Tty; + + const tabs = []; + if (container.State) { + tabs.push({ + name: _("Details"), + renderer: ContainerDetails, + data: { container } + }); + + if (!container.isDownloading) { + tabs.push({ + name: _("Integration"), + renderer: ContainerIntegration, + data: { container, localImages } + }); + tabs.push({ + name: _("Logs"), + renderer: ContainerLogs, + data: { containerId: container.Id, containerStatus: container.State.Status, width: this.state.width } + }); + tabs.push({ + name: _("Console"), + renderer: ContainerTerminal, + data: { containerId: container.Id, containerStatus: container.State?.Status, width: this.state.width, tty } + }); + } + } + + if (healthcheck) { + tabs.push({ + name: _("Health check"), + renderer: ContainerHealthLogs, + data: { container, onAddNotification: this.props.onAddNotification, state: localized_health } + }); + } + + return { + expandedContent: , + columns, + initiallyExpanded: document.location.hash.substr(1) === container.Id, + props: { + key: container.Id, + "data-row-id": container.Id, + "data-started-at": container.StartedAt, + }, + }; + } + + onWindowResize() { + this.setState({ width: this.cardRef.current.clientWidth }); + } + + onOpenPruneUnusedContainersDialog = () => { + this.setState({ showPruneUnusedContainersModal: true }); + }; + + render() { + const Dialogs = this.context; + const columnTitles = [ + { title: _("Container"), transforms: [cellWidth(20)], sortable: true }, + { title: _("CPU"), sortable: true }, + { title: _("Memory"), sortable: true }, + { title: _("State"), sortable: true }, + '' + ]; + let filtered = []; + const unusedContainers = []; + + let emptyCaption = _("No containers"); + if (this.props.containers === null) + emptyCaption = _("Loading..."); + else if (this.props.textFilter.length > 0) + emptyCaption = _("No containers that match the current filter"); + else if (this.props.filter === "running") + emptyCaption = _("No running containers"); + + if (this.props.containers !== null) { + filtered = Object.keys(this.props.containers).filter(id => !(this.props.filter === "running") || ["running", "restarting"].includes(this.props.containers[id].State?.Status)); + + const getHealth = id => { + const state = this.props.containers[id]?.State; + return state?.Health?.Status || state?.Healthcheck?.Status; + }; + + filtered.sort((a, b) => { + // Show unhealthy containers first + const a_health = getHealth(a); + const b_health = getHealth(b); + if (a_health !== b_health) { + if (a_health === "unhealthy") + return -1; + if (b_health === "unhealthy") + return 1; + } + return this.props.containers[a].Name > this.props.containers[b].Name ? 1 : -1; + }); + + const prune_states = ["created", "configured", "stopped", "exited"]; + for (const containerid of Object.keys(this.props.containers)) { + const container = this.props.containers[containerid]; + // Ignore pods and running containers + if (!prune_states.includes(container.State)) + continue; + + unusedContainers.push({ + id: container.Id, + name: container.Name, + created: container.Created, + }); + } + } + + // Convert to the search result output + let localImages = null; + let nonIntermediateImages = null; + if (this.props.images) { + localImages = Object.keys(this.props.images).map(id => { + const img = this.props.images[id]; + img.Index = img.RepoTags?.[0] ? img.RepoTags[0].split('/')[0] : ""; + img.Name = utils.image_name(img); + img.toString = function imgToString() { return this.Name }; + return img; + }, []); + nonIntermediateImages = localImages.filter(img => img.Index !== ""); + } + + const createContainer = (inPod) => { + if (nonIntermediateImages) + Dialogs.show( + + {(dockerInfo) => ( + + {(Dialogs) => ( + + )} + + )} + ); + }; + + const filterRunning = ( + + + + {_("Show")} + + + this.props.handleFilterChange(value)}> + + + + + + + + + + + + + + ); + + const sortRows = (rows, direction, idx) => { + // CPU / Memory /States + const isNumeric = idx == 1 || idx == 2 || idx == 3; + const stateOrderMapping = {}; + utils.states.forEach((elem, index) => { + stateOrderMapping[elem] = index; + }); + const sortedRows = rows.sort((a, b) => { + let aitem = a.columns[idx].sortKey ?? a.columns[idx].title; + let bitem = b.columns[idx].sortKey ?? b.columns[idx].title; + // Sort the states based on the order defined in utils. so Running first. + if (idx === 3) { + aitem = stateOrderMapping[aitem]; + bitem = stateOrderMapping[bitem]; + } + if (isNumeric) { + return bitem - aitem; + } else { + return aitem.localeCompare(bitem); + } + }); + return direction === SortByDirection.asc ? sortedRows : sortedRows.reverse(); + }; + + const card = ( + + + {_("Containers")} + + + + {(this.props.containers === null) + ? + : + {/* {caption && */} + {/* */} + {/* */} + {/*

{caption}

*/} + {/* {_("pod group")} */} + {/*
*/} + {/*
*/} + {/*
} */} + { + return this.renderRow(this.props.containersStats, this.props.containers[container], + localImages); + })} + aria-label={_("Containers")} /> +
+ } +
+ {this.state.showPruneUnusedContainersModal && + this.setState({ showPruneUnusedContainersModal: false })} + unusedContainers={unusedContainers} + onAddNotification={this.props.onAddNotification} + serviceAvailable={this.props.serviceAvailable} + user={this.props.user} /> } +
+
+ ); + + return
{card}
; + } +} + +export default Containers; diff --git a/ui/cockpit-docker/src/Containers.scss b/ui/cockpit-docker/src/Containers.scss new file mode 100644 index 0000000..309c7a2 --- /dev/null +++ b/ui/cockpit-docker/src/Containers.scss @@ -0,0 +1,93 @@ +@import "global-variables"; + +.container-pod { + .pf-v5-c-card__header { + border-color: #ddd; + padding-block-start: var(--pf-v5-global--spacer--md); + } + + .pod-header-details { + border-color: #ddd; + margin-block-start: var(--pf-v5-global--spacer--md); + margin-inline: var(--pf-v5-global--spacer--md); + } + + .pod-details-button { + padding-inline: 0; + margin-inline-end: var(--pf-v5-global--spacer--md); + } + + .pod-details-button-color { + color: var(--pf-v5-c-button--m-secondary--Color); + } + + .pf-v5-c-card__title { + padding: 0; + font-weight: var(--pf-v5-global--FontWeight--normal); + font-size: var(--pf-v5-global--FontSize--sm); + + .pod-name { + font-weight: var(--pf-v5-global--FontWeight--bold); + font-size: var(--pf-v5-global--FontSize--md); + padding-inline-end: 1rem; + } + } + + > .pf-v5-c-card__header { + &:not(:last-child) { + padding-block-end: var(--pf-v5-global--spacer-sm); + } + + // Reduce vertical padding of pod header items + > .pf-v5-c-card__title > .pf-l-flex { + row-gap: var(--pf-v5-global--spacer--sm); + } + } +} + +// override ct-card font size, so cpu/ram don't look absurdly big +#app .pf-v5-c-card.container-pod div.pf-v5-c-card__title-text { + font-weight: normal; + font-size: var(--pf-v5-global--FontSize--md); +} + +.pod-stat { + @media (max-width: $pf-v5-global--breakpoint--sm - 1) { + // Place each pod stat on its own row + flex-basis: 100%; + display: grid; + // Give labels to the same space + grid-template-columns: minmax(auto, 4rem) 1fr; + + > svg { + // Hide icons in mobile to be consistent with container lists + display: none; + } + } + + // Center the icons for proper vertical alignment + > svg { + align-self: center; + } +} + +.ct-table-empty td { + padding-block: var(--pf-v5-global--spacer--sm) var(--pf-v5-global--spacer--lg); + padding-inline: var(--pf-v5-global--spacer--md); +} + +/* HACK - force DescriptionList to wrap but not fill the width */ +#container-details-healthcheck { + display: flex; + flex-wrap: wrap; +} + +/* Upstream issue https://github.com/patternfly/patternfly/pull/3714 */ +.containers-containers .pf-v5-c-toolbar__content-section { + gap: var(--pf-v5-global--spacer--sm); +} + +/* Drop the excessive margin for a Dropdown button */ +.containers-containers .pf-v5-c-toolbar__content-section > :nth-last-child(2) { + margin-inline-end: 0; +} diff --git a/ui/cockpit-docker/src/Env.jsx b/ui/cockpit-docker/src/Env.jsx new file mode 100644 index 0000000..e36b658 --- /dev/null +++ b/ui/cockpit-docker/src/Env.jsx @@ -0,0 +1,96 @@ +import React from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; +import { FormHelper } from "cockpit-components-form-helper.jsx"; +import { Grid } from "@patternfly/react-core/dist/esm/layouts/Grid"; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import { TrashIcon } from '@patternfly/react-icons'; +import cockpit from 'cockpit'; + +import * as utils from './util.js'; + +const _ = cockpit.gettext; + +export function validateEnvVar(env, key) { + switch (key) { + case "envKey": + if (!env) + return _("Key must not be empty"); + break; + case "envValue": + break; + default: + console.error(`Unknown key "${key}"`); // not-covered: unreachable assertion + } +} + +const handleEnvValue = (key, value, idx, onChange, additem, itemCount, companionField) => { + // Allow the input of KEY=VALUE separated value pairs for bulk import only if the other + // field is not empty. + if (value.includes('=') && !companionField) { + const parts = value.trim().split(" "); + let index = idx; + for (const part of parts) { + const [envKey, ...envVar] = part.split('='); + if (!envKey || !envVar) { + continue; + } + + if (index !== idx) { + additem(); + } + onChange(index, 'envKey', envKey); + onChange(index, 'envValue', envVar.join('=')); + index++; + } + } else { + onChange(idx, key, value); + } +}; + +export const EnvVar = ({ id, item, onChange, idx, removeitem, additem, itemCount, validationFailed, onValidationChange }) => + ( + + + { + utils.validationClear(validationFailed, "envKey", onValidationChange); + utils.validationDebounce(() => onValidationChange({ ...validationFailed, envKey: validateEnvVar(value, "envKey") })); + handleEnvValue('envKey', value, idx, onChange, additem, itemCount, item.envValue); + }} /> + + + + { + utils.validationClear(validationFailed, "envValue", onValidationChange); + utils.validationDebounce(() => onValidationChange({ ...validationFailed, envValue: validateEnvVar(value, "envValue") })); + handleEnvValue('envValue', value, idx, onChange, additem, itemCount, item.envValue); + }} /> + + + + + + } + > + {reason} + + ); +}; + +export default ForceRemoveModal; diff --git a/ui/cockpit-docker/src/ImageDeleteModal.jsx b/ui/cockpit-docker/src/ImageDeleteModal.jsx new file mode 100644 index 0000000..2e97c80 --- /dev/null +++ b/ui/cockpit-docker/src/ImageDeleteModal.jsx @@ -0,0 +1,121 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; +import { List, ListItem } from '@patternfly/react-core/dist/esm/components/List'; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { Stack, StackItem } from "@patternfly/react-core/dist/esm/layouts/Stack"; +import { useDialogs } from "dialogs.jsx"; + +import cockpit from 'cockpit'; + +import ForceRemoveModal from './ForceRemoveModal.jsx'; +import * as client from './client.js'; + +const _ = cockpit.gettext; + +function sortTags(a, b) { + if (a.endsWith(":latest")) + return -1; + if (b.endsWith(":latest")) + return 1; + return a.localeCompare(b); +} + +export const ImageDeleteModal = ({ imageWillDelete, onAddNotification }) => { + const Dialogs = useDialogs(); + const repoTags = imageWillDelete.RepoTags ? imageWillDelete.RepoTags : []; + const isIntermediateImage = repoTags.length === 0; + + const [tags, setTags] = useState(repoTags.sort(sortTags).reduce((acc, item, i) => { + acc[item] = (i === 0); + return acc; + }, {})); + + const checkedTags = Object.keys(tags).sort(sortTags) + .filter(x => tags[x]); + + const onValueChanged = (item, value) => { + setTags(prevState => ({ + ...prevState, + [item]: value, + })); + }; + + const handleRemoveImage = (tags, all) => { + const handleForceRemoveImage = () => { + Dialogs.close(); + return client.delImage(imageWillDelete.Id, true) + .catch(ex => { + const error = cockpit.format(_("Failed to force remove image $0"), imageWillDelete.RepoTags[0]); + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + throw ex; + }); + }; + + Dialogs.close(); + if (all) + client.delImage(imageWillDelete.Id, false) + .catch(ex => { + Dialogs.show(); + }); + else { + // Call another untag once previous one resolved. Calling all at once can result in undefined behavior + const tag = tags.shift(); + const i = tag.lastIndexOf(":"); + client.untagImage(imageWillDelete.Id, tag.substring(0, i), tag.substring(i + 1, tag.length)) + .then(() => { + if (tags.length > 0) + handleRemoveImage(tags, all); + }) + .catch(ex => { + const error = cockpit.format(_("Failed to remove image $0"), tag); + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + } + }; + + const imageName = repoTags[0]?.split(":")[0].split("/").at(-1) ?? _("intermediate"); + + let isAllSelected = null; + if (checkedTags.length === repoTags.length) + isAllSelected = true; + else if (checkedTags.length === 0) + isAllSelected = false; + + return ( + + + + } + > + + { repoTags.length > 1 && {_("Multiple tags exist for this image. Select the tagged images to delete.")} } + + {repoTags.length > 1 && repoTags.forEach(item => onValueChanged(item, checked))} + body={ + repoTags.map(x => ( + -1} + id={"delete-" + x} + aria-label={x} + key={x} + label={x} + onChange={(_event, checked) => onValueChanged(x, checked)} /> + )) + } />} + {repoTags.length === 1 && {repoTags[0]}} + + + + ); +}; diff --git a/ui/cockpit-docker/src/ImageDetails.jsx b/ui/cockpit-docker/src/ImageDetails.jsx new file mode 100644 index 0000000..6266243 --- /dev/null +++ b/ui/cockpit-docker/src/ImageDetails.jsx @@ -0,0 +1,47 @@ +import React from 'react'; +import cockpit from 'cockpit'; +import * as utils from './util.js'; + +import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; + +import ImageUsedBy from './ImageUsedBy.jsx'; +const _ = cockpit.gettext; + +const ImageDetails = ({ containers, image, showAll }) => { + return ( + + {image.Command !== "" && + + {_("Command")} + {utils.quote_cmdline(image.Command)} + + } + {image.Entrypoint && + + {_("Entrypoint")} + {image.Entrypoint.join(" ")} + + } + {image.RepoTags && + + {_("Tags")} + {image.RepoTags ? image.RepoTags.join(" ") : ""} + + } + {containers && + + {_("Used by")} + + + } + {image.Ports.length !== 0 && + + {_("Ports")} + {image.Ports.join(', ')} + + } + + ); +}; + +export default ImageDetails; diff --git a/ui/cockpit-docker/src/ImageHistory.jsx b/ui/cockpit-docker/src/ImageHistory.jsx new file mode 100644 index 0000000..585dff8 --- /dev/null +++ b/ui/cockpit-docker/src/ImageHistory.jsx @@ -0,0 +1,64 @@ +import React, { useState, useEffect } from 'react'; +import cockpit from 'cockpit'; +import * as utils from './util.js'; +import * as client from './client.js'; + +import { ListingTable } from "cockpit-components-table.jsx"; + +const _ = cockpit.gettext; + +const IdColumn = Id => { + Id = utils.truncate_id(Id); + // Not an id but or something else + if (/<[a-z]+>/.test(Id)) { + return
{Id}
; + } + return Id; +}; + +const ImageDetails = ({ image }) => { + const [history, setHistory] = useState([]); + const [error, setError] = useState(null); + const id = image.Id; + + useEffect(() => { + client.imageHistory(id).then(setHistory) + .catch(ex => { + console.error("Cannot get image history", ex); + setError(true); + }); + }, [id]); + + const columns = ["ID", _("Created"), _("Created by"), _("Size"), _("Comments")]; + let showComments = false; + const rows = history.map(layer => { + const row = { + columns: [ + { title: IdColumn(layer.Id), props: { className: "ignore-pixels" } }, + { title: utils.localize_time(layer.Created), props: { className: "ignore-pixels" } }, + { title: layer.CreatedBy, props: { className: "ignore-pixels" } }, + { title: cockpit.format_bytes(layer.Size), props: { className: "ignore-pixels" } }, + { title: layer.Comment, props: { className: "ignore-pixels" } }, + ] + }; + if (layer.Comment) { + showComments = true; + } + return row; + }); + + if (!showComments) { + columns.pop(); + } + + return ( + + ); +}; + +export default ImageDetails; diff --git a/ui/cockpit-docker/src/ImageRunModal.jsx b/ui/cockpit-docker/src/ImageRunModal.jsx new file mode 100644 index 0000000..9baff84 --- /dev/null +++ b/ui/cockpit-docker/src/ImageRunModal.jsx @@ -0,0 +1,1114 @@ +import React from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; +import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; +import { FormHelper } from "cockpit-components-form-helper.jsx"; +import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; +import { Grid, GridItem } from "@patternfly/react-core/dist/esm/layouts/Grid"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { Radio } from "@patternfly/react-core/dist/esm/components/Radio"; +import { Select, SelectGroup, SelectOption, SelectVariant } from "@patternfly/react-core/dist/esm/deprecated/components/Select"; +import { NumberInput } from "@patternfly/react-core/dist/esm/components/NumberInput"; +import { InputGroup, InputGroupText } from "@patternfly/react-core/dist/esm/components/InputGroup"; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import { Tab, TabTitleText, Tabs } from "@patternfly/react-core/dist/esm/components/Tabs"; +import { Text, TextContent, TextList, TextListItem, TextVariants } from "@patternfly/react-core/dist/esm/components/Text"; +import { ToggleGroup, ToggleGroupItem } from "@patternfly/react-core/dist/esm/components/ToggleGroup"; +import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { Popover } from "@patternfly/react-core/dist/esm/components/Popover"; +import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; +import * as dockerNames from 'docker-names'; + +import { ErrorNotification } from './Notification.jsx'; +import * as utils from './util.js'; +import * as client from './client.js'; +import rest from './rest.js'; +import cockpit from 'cockpit'; +import { onDownloadContainer, onDownloadContainerFinished } from './Containers.jsx'; +import { PublishPort, validatePublishPort } from './PublishPort.jsx'; +import { DynamicListForm } from 'cockpit-components-dynamic-list.jsx'; +import { validateVolume, Volume } from './Volume.jsx'; +import { EnvVar, validateEnvVar } from './Env.jsx'; + +import { debounce } from 'throttle-debounce'; + +import "./ImageRunModal.scss"; + +const _ = cockpit.gettext; + +const units = { + KB: { + name: "KB", + baseExponent: 1, + }, + MB: { + name: "MB", + baseExponent: 2, + }, + GB: { + name: "GB", + baseExponent: 3, + }, +}; + +// healthchecks.go HealthCheckOnFailureAction +const HealthCheckOnFailureActionOrder = [ + { value: 0, label: _("No action") }, + { value: 3, label: _("Restart") }, + { value: 4, label: _("Stop") }, + { value: 2, label: _("Force stop") }, +]; + +export class ImageRunModal extends React.Component { + constructor(props) { + super(props); + + let command = ""; + if (this.props.image && this.props.image.Command) { + command = utils.quote_cmdline(this.props.image.Command); + } + + const entrypoint = utils.quote_cmdline(this.props.image?.Entrypoint); + + let selectedImage = ""; + if (this.props.image) { + selectedImage = utils.image_name(this.props.image); + } + + this.state = { + command, + containerName: dockerNames.getRandomName(), + entrypoint, + env: [], + hasTTY: true, + publish: [], + image: props.image, + memory: 512, + cpuShares: 1024, + memoryConfigure: false, + cpuSharesConfigure: false, + memoryUnit: 'MB', + validationFailed: {}, + volumes: [], + restartPolicy: "no", + restartTries: 5, + pullLatestImage: false, + activeTabKey: 0, + /* image select */ + selectedImage, + searchFinished: false, + searchInProgress: false, + searchText: "", + imageResults: {}, + isImageSelectOpen: false, + searchByRegistry: 'all', + /* health check */ + healthcheck_command: "", + healthcheck_shell: false, + healthcheck_interval: 30, + healthcheck_timeout: 30, + healthcheck_start_period: 0, + healthcheck_retries: 3, + healthcheck_action: 0, + }; + this.getCreateConfig = this.getCreateConfig.bind(this); + this.onValueChanged = this.onValueChanged.bind(this); + } + + componentDidMount() { + this._isMounted = true; + this.onSearchTriggered(this.state.searchText); + } + + componentWillUnmount() { + this._isMounted = false; + + if (this.activeConnection) + this.activeConnection.close(); + } + + getCreateConfig() { + const createConfig = {}; + createConfig.HostConfig = {}; + + if (this.state.image) { + createConfig.image = this.state.image.RepoTags.length > 0 ? this.state.image.RepoTags[0] : ""; + } else { + let img = this.state.selectedImage.Name; + // Make implicit :latest + if (!img.includes(":")) { + img += ":latest"; + } + createConfig.image = img; + } + + if (this.state.containerName) + createConfig.name = this.state.containerName; + + if (this.state.command) + createConfig.command = utils.unquote_cmdline(this.state.command); + + if (this.state.memoryConfigure && this.state.memory) { + const memorySize = this.state.memory * (1000 ** units[this.state.memoryUnit].baseExponent); + createConfig.HostConfig.Memory = memorySize; + } + + if (this.state.cpuSharesConfigure && parseInt(this.state.cpuShares) !== 0) + createConfig.HostConfig.CpuShares = parseInt(this.state.cpuShares); + + createConfig.terminal = this.state.hasTTY; + if (this.state.publish.some(port => port !== undefined)) { + const PortBindings = {}; + const ExposedPorts = {}; + this.state.publish.filter(port => port?.containerPort).forEach(item => { + ExposedPorts[item.containerPort + "/" + item.protocol] = {}; + const mapping = { HostPort: item.hostPort }; + if (item.IP) + mapping.HostIp = item.hostIp; + PortBindings[item.containerPort + "/" + item.protocol] = [mapping]; + }); + + createConfig.HostConfig.PortBindings = PortBindings; + createConfig.ExposedPorts = ExposedPorts; + } + if (this.state.env.some(item => item !== undefined)) { + const envs = []; + this.state.env.forEach(item => { + if (item !== undefined) + envs.push(item.envKey + "=" + item.envValue); + }); + createConfig.Env = envs; + } + if (this.state.volumes.some(volume => volume !== undefined)) { + createConfig.HostConfig.mounts = this.state.volumes + .filter(volume => volume?.hostPath && volume?.containerPath) + .map(volume => { + return { + Source: volume.hostPath, + Target: volume.containerPath, + Type: "bind", + ReadOnly: volume.ReadOnly + }; + }); + } + + if (this.state.restartPolicy !== "no") { + createConfig.HostConfig.RestartPolicy = { Name: this.state.restartPolicy }; + if (this.state.restartPolicy === "on-failure" && this.state.restartTries !== null) { + createConfig.HostConfig.RestartPolicy.MaximumRetryCount = parseInt(this.state.restartTries); + } + if (this.state.restartPolicy === "always" && (this.props.serviceAvailable)) { + this.enableDockerRestartService(); + } + } + + if (this.state.healthcheck_command !== "") { + const test = utils.unquote_cmdline(this.state.healthcheck_command); + if (this.state.healthcheck_shell) { + test.unshift("CMD-SHELL"); + } else { + test.unshift("CMD"); + } + createConfig.Healthcheck = { + Interval: parseInt(this.state.healthcheck_interval) * 1000000000, + Retries: this.state.healthcheck_retries, + StartPeriod: parseInt(this.state.healthcheck_start_period) * 1000000000, + Test: test, + Timeout: parseInt(this.state.healthcheck_timeout) * 1000000000, + }; + createConfig.health_check_on_failure_action = parseInt(this.state.healthcheck_action); + } + + console.log("createConfig", createConfig); + + return createConfig; + } + + createContainer = (createConfig, runImage) => { + const Dialogs = this.props.dialogs; + client.createContainer(createConfig) + .then(reply => { + if (runImage) { + client.postContainer("start", reply.Id, {}) + .then(() => Dialogs.close()) + .catch(ex => { + // If container failed to start remove it, so a user can fix the settings and retry and + // won't get another error that the container name is already taken. + client.delContainer(reply.Id, true) + .then(() => { + this.setState({ + dialogError: _("Container failed to be started"), + dialogErrorDetail: cockpit.format("$0: $1", ex.reason, ex.message) + }); + }) + .catch(ex => { + this.setState({ + dialogError: _("Failed to clean up container"), + dialogErrorDetail: cockpit.format("$0: $1", ex.reason, ex.message) + }); + }); + }); + } else { + Dialogs.close(); + } + }) + .catch(ex => { + this.setState({ + dialogError: _("Container failed to be created"), + dialogErrorDetail: cockpit.format("$0: $1", ex.reason, ex.message) + }); + }); + }; + + async onCreateClicked(runImage = false) { + if (!await this.validateForm()) + return; + + const Dialogs = this.props.dialogs; + const createConfig = this.getCreateConfig(); + const { pullLatestImage } = this.state; + let imageExists = true; + + try { + await client.imageExists(createConfig.image); + } catch (error) { + imageExists = false; + } + + if (imageExists && !pullLatestImage) { + this.createContainer(createConfig, runImage); + } else { + Dialogs.close(); + const tempImage = { ...createConfig }; + + // Assign temporary properties to allow rendering + tempImage.Id = tempImage.name; + tempImage.State = { Status: _("downloading") }; + tempImage.Created = new Date(); + tempImage.Name = [tempImage.name]; + tempImage.Image = createConfig.image; + tempImage.isDownloading = true; + + onDownloadContainer(tempImage); + + client.pullImage(createConfig.image).then(reply => { + client.createContainer(createConfig) + .then(reply => { + if (runImage) { + client.postContainer("start", reply.Id, {}) + .then(() => onDownloadContainerFinished(createConfig)) + .catch(ex => { + onDownloadContainerFinished(createConfig); + const error = cockpit.format(_("Failed to run container $0"), tempImage.name); + this.props.onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + } + }) + .catch(ex => { + onDownloadContainerFinished(createConfig); + const error = cockpit.format(_("Failed to create container $0"), tempImage.name); + this.props.onAddNotification({ type: 'danger', error, errorDetail: ex.reason }); + }); + }) + .catch(ex => { + onDownloadContainerFinished(createConfig); + const error = cockpit.format(_("Failed to pull image $0"), tempImage.image); + this.props.onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + }); + } + } + + onValueChanged(key, value) { + this.setState({ [key]: value }); + } + + onPlusOne(key) { + this.setState(state => ({ [key]: parseInt(state[key]) + 1 })); + } + + onMinusOne(key) { + this.setState(state => ({ [key]: parseInt(state[key]) - 1 })); + } + + handleTabClick = (event, tabIndex) => { + // Prevent the form from being submitted. + event.preventDefault(); + this.setState({ + activeTabKey: tabIndex, + }); + }; + + onSearchTriggered = value => { + // Do not call the SearchImage API if the input string is not at least 2 chars, + // The comparison was done considering the fact that we miss always one letter due to delayed setState + if (value.length < 2) + return; + + // Don't search for a value with a tag specified + const patt = /:[\w|\d]+$/; + if (patt.test(value)) { + return; + } + + if (this.activeConnection) + this.activeConnection.close(); + + this.setState({ searchFinished: false, searchInProgress: true }); + this.activeConnection = rest.connect(client.getAddress()); + let searches = []; + + // If there are registries configured search in them, or if a user searches for `docker.io/cockpit` let + // docker search in the user specified registry. + if (Object.keys(this.props.dockerInfo.registries).length !== 0 || value.includes('/')) { + searches.push(this.activeConnection.call({ + method: "GET", + path: client.VERSION + "/images/search", + body: "", + params: { + term: value, + } + })); + } else { + searches = searches.concat(utils.fallbackRegistries.map(registry => + this.activeConnection.call({ + method: "GET", + path: client.VERSION + "/images/search", + body: "", + params: { + term: registry + "/" + value + } + }))); + } + + Promise.allSettled(searches) + .then(reply => { + if (reply && this._isMounted) { + let imageResults = []; + let dialogError = ""; + let dialogErrorDetail = ""; + + for (const result of reply) { + if (result.status === "fulfilled") { + imageResults = imageResults.concat(JSON.parse(result.value)); + } else { + dialogError = _("Failed to search for new images"); + // TODO: add registry context, docker does not include it in the reply. + dialogErrorDetail = result.reason ? cockpit.format(_("Failed to search for images: $0"), result.reason.message) : _("Failed to search for images."); + } + } + // Group images on registry + const images = {}; + imageResults.forEach(image => { + // Add Tag is it's there + image.toString = function imageToString() { + if (this.Tag) { + return this.Name + ':' + this.Tag; + } + return this.Name; + }; + + let index = image.Index; + + // listTags results do not return the registry Index. + // https://github.com/containers/common/pull/803 + if (!index) { + index = image.Name.split('/')[0]; + } + + if (index in images) { + images[index].push(image); + } else { + images[index] = [image]; + } + }); + this.setState({ + imageResults: images || {}, + searchFinished: true, + searchInProgress: false, + dialogError, + dialogErrorDetail, + }); + } + }); + }; + + clearImageSelection = () => { + // Reset command if it was prefilled + let command = this.state.command; + if (this.state.command === utils.quote_cmdline(this.state.selectedImage?.Command)) + command = ""; + + this.setState({ + selectedImage: "", + image: "", + isImageSelectOpen: false, + imageResults: {}, + searchText: "", + searchFinished: false, + command, + entrypoint: "", + }); + }; + + onImageSelectToggle = (_, isOpen) => { + this.setState({ + isImageSelectOpen: isOpen, + }); + }; + + onImageSelect = (event, value, placeholder) => { + if (event === undefined) + return; + + let command = this.state.command; + if (value.Command && !command) + command = utils.quote_cmdline(value.Command); + + const entrypoint = utils.quote_cmdline(value?.Entrypoint); + + this.setState({ + selectedImage: value, + isImageSelectOpen: false, + command, + entrypoint, + }); + }; + + handleImageSelectInput = value => { + this.setState({ + searchText: value, + // Reset searchFinished status when text input changes + searchFinished: false, + selectedImage: "", + }); + this.onSearchTriggered(value); + }; + + debouncedInputChanged = debounce(300, this.handleImageSelectInput); + + handleOwnerSelect = (event) => { + const value = event.currentTarget.value; + this.setState({ + owner: value + }); + }; + + filterImages = () => { + const { localImages } = this.props; + const { imageResults, searchText } = this.state; + const local = _("Local images"); + const images = { ...imageResults }; + + let imageRegistries = []; + if (this.state.searchByRegistry == 'local' || this.state.searchByRegistry == 'all') { + imageRegistries.push(local); + images[local] = localImages; + + if (this.state.searchByRegistry == 'all') + imageRegistries = imageRegistries.concat(Object.keys(imageResults)); + } else { + imageRegistries.push(this.state.searchByRegistry); + } + + // Strip out all non-allowed container image characters when filtering. + let regexString = searchText.replace(/[^\w_.:-]/g, ""); + // Strip image registry option if set for comparing results for docker.io searching for docker.io/fedora + // returns docker.io/$username/fedora for example. + if (regexString.includes('/')) { + regexString = searchText.replace(searchText.split('/')[0], ''); + } + const input = new RegExp(regexString, 'i'); + + const results = imageRegistries + .map((reg, index) => { + const filtered = (reg in images ? images[reg] : []) + .filter(image => { + return image.Name.search(input) !== -1; + }) + .map((image, index) => { + return ( + + ); + }); + + if (filtered.length === 0) { + return []; + } else { + return ( + + {filtered} + + ); + } + }) + .filter(group => group.length !== 0); // filter out empty groups + + // Remove when there is a filter selected. + if (this.state.searchByRegistry !== 'all' && imageRegistries.length === 1 && results.length === 1) { + return results[0].props.children; + } + + return results; + }; + + // Similar to the output of docker search and docker's //images/search endpoint only show the root domain. + truncateRegistryDomain = (domain) => { + const parts = domain.split('.'); + if (parts.length > 2) { + return parts[parts.length - 2] + "." + parts[parts.length - 1]; + } + return domain; + }; + + enableDockerRestartService = () => { + const argv = ["systemctl", "enable", "docker.service"]; + + cockpit.spawn(argv, { superuser: "require", err: "message" }) + .catch(err => { + console.warn("Failed to enable docker.service:", JSON.stringify(err)); + }); + }; + + isFormInvalid = validationFailed => { + const groupHasError = row => row && Object.values(row) + .filter(val => val) // Filter out empty/undefined properties + .length > 0; // If one field has error, the whole group (dynamicList) is invalid + + // If at least one group is invalid, then the whole form is invalid + return validationFailed.publish?.some(groupHasError) || + validationFailed.volumes?.some(groupHasError) || + validationFailed.env?.some(groupHasError) || + !!validationFailed.containerName; + }; + + async validateContainerName(containerName) { + try { + await client.containerExists(containerName); + } catch (error) { + return; + } + return _("Name already in use"); + } + + async validateForm() { + const { publish, volumes, env, containerName } = this.state; + const validationFailed = { }; + + const publishValidation = publish.map(a => { + if (a === undefined) + return undefined; + + return { + IP: validatePublishPort(a.IP, "IP"), + hostPort: validatePublishPort(a.hostPort, "hostPort"), + containerPort: validatePublishPort(a.containerPort, "containerPort"), + }; + }); + if (publishValidation.some(entry => entry && Object.keys(entry).length > 0)) + validationFailed.publish = publishValidation; + + const volumesValidation = volumes.map(a => { + if (a === undefined) + return undefined; + + return { + hostPath: validateVolume(a.hostPath, "hostPath"), + containerPath: validateVolume(a.containerPath, "containerPath"), + }; + }); + if (volumesValidation.some(entry => entry && Object.keys(entry).length > 0)) + validationFailed.volumes = volumesValidation; + + const envValidation = env.map(a => { + if (a === undefined) + return undefined; + + return { + envKey: validateEnvVar(a.envKey, "envKey"), + envValue: validateEnvVar(a.envValue, "envValue"), + }; + }); + if (envValidation.some(entry => entry && Object.keys(entry).length > 0)) + validationFailed.env = envValidation; + + const containerNameValidation = await this.validateContainerName(containerName); + + if (containerNameValidation) + validationFailed.containerName = containerNameValidation; + + this.setState({ validationFailed }); + + return !this.isFormInvalid(validationFailed); + } + + /* Updates a validation object of the whole dynamic list's form (e.g. the whole port-mapping form) + * + * Arguments + * - key: [publish/volumes/env] - Specifies the validation of which dynamic form of the Image run dialog is being updated + * - value: An array of validation errors of the form. Each item of the array represents a row of the dynamic list. + * Index needs to corellate with a row number + */ + dynamicListOnValidationChange = (key, value) => { + const validationFailedDelta = { ...this.state.validationFailed }; + + validationFailedDelta[key] = value; + + if (validationFailedDelta[key].every(a => a === undefined)) + delete validationFailedDelta[key]; + + this.onValueChanged('validationFailed', validationFailedDelta); + }; + + render() { + const Dialogs = this.props.dialogs; + const { registries, dockerRestartAvailable, selinuxAvailable, version } = this.props.dockerInfo; + const { image } = this.props; + const dialogValues = this.state; + const { activeTabKey, selectedImage } = this.state; + + let imageListOptions = []; + if (!image) { + imageListOptions = this.filterImages(); + } + + const localImage = this.state.image || (selectedImage && this.props.localImages.some(img => img.Id === selectedImage.Id)); + const dockerRegistries = registries && registries.search ? registries.search : utils.fallbackRegistries; + + // Add the search component + const footer = ( + + { + ev.stopPropagation(); + this.setState({ searchByRegistry: 'all' }); + }} + // Ignore SelectToggle's touchstart's default behaviour + onTouchStart={ev => { + ev.stopPropagation(); + }} + /> + { + ev.stopPropagation(); + this.setState({ searchByRegistry: 'local' }); + }} + onTouchStart={ev => { + ev.stopPropagation(); + }} + /> + {dockerRegistries.map(registry => { + const index = this.truncateRegistryDomain(registry); + return ( + { + ev.stopPropagation(); + this.setState({ searchByRegistry: index }); + } } + onTouchStart={ ev => ev.stopPropagation() } + /> + ); + })} + + ); + + const defaultBody = ( +
+ {this.state.dialogError && } + + { + utils.validationClear(dialogValues.validationFailed, "containerName", (value) => this.onValueChanged("validationFailed", value)); + utils.validationDebounce(async () => { + const delta = await this.validateContainerName(value); + if (delta) + this.onValueChanged("validationFailed", { ...dialogValues.validationFailed, containerName: delta }); + }); + this.onValueChanged('containerName', value); + }} /> + + + + {_("Details")}} className="pf-v5-c-form pf-m-horizontal"> + + {_("host[:port]/[user]/container[:tag]")} + {cockpit.format(_("Example: $0"), "quay.io//busybox")} + {cockpit.format(_("Searching: $0"), "quay.io/busybox")} + + }> + + + } + > + + + + {(image || localImage) && + + this.onValueChanged('pullLatestImage', value)} label={_("Pull latest image")} + /> + + } + + {dialogValues.entrypoint && + + {dialogValues.entrypoint} + + } + + + this.onValueChanged('command', value)} /> + + + + this.onValueChanged('hasTTY', checked)} /> + + + + + this.onValueChanged('memoryConfigure', checked)} /> + !this.state.memoryConfigure && this.onValueChanged('memoryConfigure', true)} + onPlus={() => this.onPlusOne('memory')} + onMinus={() => this.onMinusOne('memory')} + minusBtnAriaLabel={_("Decrease memory")} + plusBtnAriaLabel={_("Increase memory")} + onChange={ev => this.onValueChanged('memory', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> + this.onValueChanged('memoryUnit', value)}> + + + + + + + + + + + }> + + this.onValueChanged('cpuSharesConfigure', checked)} /> + !this.state.cpuSharesConfigure && this.onValueChanged('cpuSharesConfigure', true)} + min={2} + max={262144} + isDisabled={!this.state.cpuSharesConfigure} + onPlus={() => this.onPlusOne('cpuShares')} + onMinus={() => this.onMinusOne('cpuShares')} + minusBtnAriaLabel={_("Decrease CPU shares")} + plusBtnAriaLabel={_("Increase CPU shares")} + onChange={ev => this.onValueChanged('cpuShares', parseInt(ev.target.value) < 2 ? 2 : ev.target.value)} /> + + + {(dockerRestartAvailable) && + + + + + + } + > + this.onValueChanged('restartPolicy', value)}> + + + + + + + {dialogValues.restartPolicy === "on-failure" && + + this.onMinusOne('restartTries')} + onPlus={() => this.onPlusOne('restartTries')} + onChange={ev => this.onValueChanged('restartTries', parseInt(ev.target.value) < 1 ? 1 : ev.target.value)} + /> + + } + + } + + {_("Integration")}} id="create-image-dialog-tab-integration" className="pf-v5-c-form"> + + this.dynamicListOnValidationChange('publish', value)} + onChange={value => this.onValueChanged('publish', value)} + default={{ IP: null, containerPort: null, hostPort: null, protocol: 'tcp' }} + itemcomponent={ } /> + this.dynamicListOnValidationChange('volumes', value)} + onChange={value => this.onValueChanged('volumes', value)} + default={{ containerPath: null, hostPath: null, readOnly: false }} + options={{ selinuxAvailable }} + itemcomponent={ } /> + + this.dynamicListOnValidationChange('env', value)} + onChange={value => this.onValueChanged('env', value)} + default={{ envKey: null, envValue: null }} + helperText={_("Paste one or more lines of key=value pairs into any field for bulk import")} + itemcomponent={ } /> + + {_("Health check")}} id="create-image-dialog-tab-healthcheck" className="pf-v5-c-form pf-m-horizontal"> + + this.onValueChanged('healthcheck_command', value)} /> + + + + this.onValueChanged('healthcheck_shell', checked)} /> + + + + + + }> + + this.onMinusOne('healthcheck_interval')} + onPlus={() => this.onPlusOne('healthcheck_interval')} + onChange={ev => this.onValueChanged('healthcheck_interval', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> + {_("seconds")} + + + + + + }> + + this.onMinusOne('healthcheck_timeout')} + onPlus={() => this.onPlusOne('healthcheck_timeout')} + onChange={ev => this.onValueChanged('healthcheck_timeout', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> + {_("seconds")} + + + + + + }> + + this.onMinusOne('healthcheck_start_period')} + onPlus={() => this.onPlusOne('healthcheck_start_period')} + onChange={ev => this.onValueChanged('healthcheck_start_period', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> + {_("seconds")} + + + + + + }> + this.onMinusOne('healthcheck_retries')} + onPlus={() => this.onPlusOne('healthcheck_retries')} + onChange={ev => this.onValueChanged('healthcheck_retries', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> + + {version.localeCompare("4.3", undefined, { numeric: true, sensitivity: 'base' }) >= 0 && + + + + }> + {HealthCheckOnFailureActionOrder.map(item => + this.onValueChanged('healthcheck_action', item.value)} /> + )} + + } + + + + ); + return ( + { + if (this.state.isImageSelectOpen) { + this.onImageSelectToggle(!this.state.isImageSelectOpen); + } else { + Dialogs.close(); + } + }} + title={_("Create container")} + footer={<> + + + + } + > + {defaultBody} + + ); + } +} diff --git a/ui/cockpit-docker/src/ImageRunModal.scss b/ui/cockpit-docker/src/ImageRunModal.scss new file mode 100644 index 0000000..6a5399d --- /dev/null +++ b/ui/cockpit-docker/src/ImageRunModal.scss @@ -0,0 +1,47 @@ +@import "global-variables"; + +// Ensure the width fits within the screen boundaries (with padding on the sides) +.pf-v5-c-select__menu { + // 3xl is the left+right padding for an iPhone SE; + // this works on other screen sizes as well + max-inline-size: calc(100vw - var(--pf-v5-global--spacer--3xl)); +} + +// Make sure the footer is visible with more then 5 results. +.pf-c-select__menu-list { + // 35% viewport height is for 1280x720; + // since it picks the min of the two, it works everywhere + max-block-size: min(20rem, 35vh); + overflow: hidden scroll; +} + +// Fix the dot next to spinner: https://github.com/patternfly/patternfly-react/issues/6383 +.pf-v5-c-select__list-item.pf-m-loading { + list-style-type: none; +} + +.image-search-footer { + flex-wrap: wrap; + + .pf-v5-c-toggle-group__text { + word-wrap: break-word; + } +} + + // PF4 does not yet support multiple form fields for the same label +.ct-input-group-spacer-sm.pf-v5-l-flex { + // Limit width for select entries and inputs in the input groups otherwise they take up the whole space + > .pf-v5-c-select, .pf-v5-c-form-control:not(.pf-v5-c-select__toggle-typeahead) { + max-inline-size: 8ch; + } +} + +// HACK: A local copy of pf-m-horizontal (as ct-m-horizontal), +// but applied at the FormGroup level instead of Form +@media (min-width: $pf-v5-global--breakpoint--md) { + .pf-v5-c-form__group.ct-m-horizontal { + display: grid; + grid-column-gap: var(--pf-v5-c-form--m-horizontal__group-label--md--GridColumnGap); + grid-template-columns: var(--pf-v5-c-form--m-horizontal__group-label--md--GridColumnWidth) var(--pf-v5-c-form--m-horizontal__group-control--md--GridColumnWidth); + } +} diff --git a/ui/cockpit-docker/src/ImageSearchModal.css b/ui/cockpit-docker/src/ImageSearchModal.css new file mode 100644 index 0000000..ff09dff --- /dev/null +++ b/ui/cockpit-docker/src/ImageSearchModal.css @@ -0,0 +1,59 @@ +.docker-search .pf-v5-c-modal-box__body { + display: grid; + grid-auto-flow: row; + overflow: hidden; + grid-template-rows: auto auto 1fr; + grid-gap: var(--pf-v5-global--spacer--sm); +} + +.image-list-item { + display: grid; + grid-gap: 0 1rem; +} + +.image-list-item + .image-list-item { + border-block-start: 1px solid var(--pf-v5-global--BorderColor--200); +} + +.image-list-item > .image-name { + color: var(--pf-v5-global--Color--100); +} + +@media (min-width: 768px) { + .image-list-item { + grid-template-columns: 1fr max-content; + } +} + +.docker-search .image-search-modal-footer-grid { + display: grid; + grid-template-columns: 1fr auto auto; + grid-gap: 0.25rem; +} + +.image-tag-entry { + max-inline-size: 15rem; +} + +@media (max-width: 340px) { + /* Shrink buttons to accommodate iPhone 5/SE */ + .docker-search .modal-footer > .btn { + padding-inline: 0.25rem; + } +} + +.image-search-tag-form { + margin-block-end: var(--pf-v5-global--spacer--md); +} + +.docker-search .pf-v5-c-modal-box__footer { + display: initial; +} + +.docker-search .pf-v5-c-data-list { + overflow-y: auto; +} + +.docker-search .pf-v5-l-flex .pf-v5-c-form__group:nth-child(2) { + grid-template-columns: 2rem var(--pf-v5-c-form--m-horizontal__group-control--md--GridColumnWidth); +} diff --git a/ui/cockpit-docker/src/ImageSearchModal.jsx b/ui/cockpit-docker/src/ImageSearchModal.jsx new file mode 100644 index 0000000..8ebec49 --- /dev/null +++ b/ui/cockpit-docker/src/ImageSearchModal.jsx @@ -0,0 +1,212 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { DataList, DataListCell, DataListItem, DataListItemCells, DataListItemRow } from "@patternfly/react-core/dist/esm/components/DataList"; +import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; +import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { Radio } from "@patternfly/react-core/dist/esm/components/Radio"; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; + +import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; +import { ErrorNotification } from './Notification.jsx'; +import cockpit from 'cockpit'; +import rest from './rest.js'; +import * as client from './client.js'; +import { fallbackRegistries, useDockerInfo } from './util.js'; +import { useDialogs } from "dialogs.jsx"; + +import './ImageSearchModal.css'; + +const _ = cockpit.gettext; + +export const ImageSearchModal = ({ downloadImage }) => { + const [searchInProgress, setSearchInProgress] = useState(false); + const [searchFinished, setSearchFinished] = useState(false); + const [imageIdentifier, setImageIdentifier] = useState(''); + const [imageList, setImageList] = useState([]); + const [imageTag, setImageTag] = useState(""); + const [selectedRegistry, setSelectedRegistry] = useState(""); + const [selected, setSelected] = useState(""); + const [dialogError, setDialogError] = useState(""); + const [dialogErrorDetail, setDialogErrorDetail] = useState(""); + const [typingTimeout, setTypingTimeout] = useState(null); + + let activeConnection = null; + const { registries } = useDockerInfo(); + const Dialogs = useDialogs(); + // Registries to use for searching + const searchRegistries = registries.search && registries.length !== 0 ? registries.search : fallbackRegistries; + + // Don't use on selectedRegistry state variable for finding out the + // registry to search in as with useState we can only call something after a + // state update with useEffect but as onSearchTriggered also changes state we + // can't use that so instead we pass the selected registry. + const onSearchTriggered = (searchRegistry = "", forceSearch = false) => { + // When search re-triggers close any existing active connection + activeConnection = rest.connect(client.getAddress()); + if (activeConnection) + activeConnection.close(); + setSearchFinished(false); + + // Do not call the SearchImage API if the input string is not at least 2 chars, + // unless Enter is pressed, which should force start the search. + // The comparison was done considering the fact that we miss always one letter due to delayed setState + if (imageIdentifier.length < 2 && !forceSearch) + return; + + setSearchInProgress(true); + + let queryRegistries = searchRegistries; + if (searchRegistry !== "") { + queryRegistries = [searchRegistry]; + } + // if a user searches for `docker.io/cockpit` let docker search in the user specified registry. + if (imageIdentifier.includes('/')) { + queryRegistries = [""]; + } + + const searches = queryRegistries.map(rr => { + const registry = rr.length < 1 || rr[rr.length - 1] === "/" ? rr : rr + "/"; + return activeConnection.call({ + method: "GET", + path: client.VERSION + "/images/search", + body: "", + params: { + term: registry + imageIdentifier + } + }); + }); + + Promise.allSettled(searches) + .then(reply => { + if (reply) { + let results = []; + + for (const result of reply) { + if (result.status === "fulfilled") { + results = results.concat(JSON.parse(result.value)); + // console.log(results); + } else { + setDialogError(_("Failed to search for new images")); + setDialogErrorDetail(result.reason ? cockpit.format(_("Failed to search for images: $0"), result.reason.message) : _("Failed to search for images.")); + } + } + + setImageList(results || []); + setSearchInProgress(false); + setSearchFinished(true); + } + }); + }; + + const onKeyDown = (e) => { + if (e.key != ' ') { // Space should not trigger search + const forceSearch = e.key == 'Enter'; + if (forceSearch) { + e.preventDefault(); + } + + // Reset the timer, to make the http call after 250MS + clearTimeout(typingTimeout); + setTypingTimeout(setTimeout(() => onSearchTriggered(selectedRegistry, forceSearch), 250)); + } + }; + + const onDownloadClicked = () => { + const selectedImageName = imageList[selected].name; + if (activeConnection) + activeConnection.close(); + Dialogs.close(); + downloadImage(selectedImageName, imageTag); + }; + + const handleClose = () => { + if (activeConnection) + activeConnection.close(); + Dialogs.close(); + }; + + return ( + +
+ + setImageTag(value)} /> + +
+ + + } + > +
+ {dialogError && } + + + setImageIdentifier(value)} /> + + + { setSelectedRegistry(value); clearTimeout(typingTimeout); onSearchTriggered(value, false) }}> + + {(searchRegistries || []).map(r => )} + + + + + + {searchInProgress && } + + {((!searchInProgress && !searchFinished) || imageIdentifier == "") && } + + {searchFinished && imageIdentifier !== '' && <> + {imageList.length == 0 && } + {imageList.length > 0 && + setSelected(key.split('-').slice(-1)[0])}> + {imageList.map((image, iter) => { + return ( + + + + {image.name} + , + + {image.description} + + ]} + /> + + + ); + })} + } + } +
+ ); +}; diff --git a/ui/cockpit-docker/src/ImageUsedBy.jsx b/ui/cockpit-docker/src/ImageUsedBy.jsx new file mode 100644 index 0000000..6db307b --- /dev/null +++ b/ui/cockpit-docker/src/ImageUsedBy.jsx @@ -0,0 +1,44 @@ +import React from 'react'; +import cockpit from 'cockpit'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Badge } from "@patternfly/react-core/dist/esm/components/Badge"; +import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List"; + +const _ = cockpit.gettext; + +const ImageUsedBy = ({ containers, showAll }) => { + if (containers === null) + return _("Loading..."); + if (containers === undefined) + return _("No containers are using this image"); + + return ( + + {containers.map(c => { + const container = c.container; + const isRunning = container.State?.Status === "running"; + return ( + + + + {isRunning && {_("Running")}} + + + ); + })} + + ); +}; + +export default ImageUsedBy; diff --git a/ui/cockpit-docker/src/Images.css b/ui/cockpit-docker/src/Images.css new file mode 100644 index 0000000..b93b2ac --- /dev/null +++ b/ui/cockpit-docker/src/Images.css @@ -0,0 +1,23 @@ +#containers-images div.download-in-progress { + color: grey; + font-weight: bold; +} + +/* Danger dropdown items should be red */ +.pf-v5-c-dropdown__menu-item.pf-m-danger:not(.pf-m-disabled, .pf-m-aria-disabled) { + color: var(--pf-v5-global--danger-color--200); +} + +#containers-images .pf-v5-c-table.pf-m-compact .pf-v5-c-table__action { + --pf-v5-c-table__action--PaddingTop: 0.5rem; + --pf-v5-c-table__action--PaddingBottom: 0.5rem; +} + +.containers-images .pf-v5-c-expandable-section__content { + margin-block-start: 0; +} + +/* Override font-size due to h2 being wrapped in a Flex */ +.containers-images-title { + font-size: var(--pf-v5-global--FontSize--2xl); +} diff --git a/ui/cockpit-docker/src/Images.jsx b/ui/cockpit-docker/src/Images.jsx new file mode 100644 index 0000000..7f6b6a6 --- /dev/null +++ b/ui/cockpit-docker/src/Images.jsx @@ -0,0 +1,398 @@ +import React from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Card, CardBody, CardFooter, CardHeader, CardTitle } from "@patternfly/react-core/dist/esm/components/Card"; +import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/index.js'; +import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { ExpandableSection } from "@patternfly/react-core/dist/esm/components/ExpandableSection"; +import { Text, TextVariants } from "@patternfly/react-core/dist/esm/components/Text"; +import { cellWidth } from '@patternfly/react-table'; + +import cockpit from 'cockpit'; +import { ListingTable } from "cockpit-components-table.jsx"; +import { ListingPanel } from 'cockpit-components-listing-panel.jsx'; +import ImageDetails from './ImageDetails.jsx'; +import ImageHistory from './ImageHistory.jsx'; +import { ImageRunModal } from './ImageRunModal.jsx'; +import { ImageSearchModal } from './ImageSearchModal.jsx'; +import { ImageDeleteModal } from './ImageDeleteModal.jsx'; +import PruneUnusedImagesModal from './PruneUnusedImagesModal.jsx'; +import * as client from './client.js'; +import * as utils from './util.js'; +import { useDialogs, DialogsContext } from "dialogs.jsx"; + +import './Images.css'; +import '@patternfly/react-styles/css/utilities/Sizing/sizing.css'; + +import { KebabDropdown } from "cockpit-components-dropdown.jsx"; + +const _ = cockpit.gettext; + +class Images extends React.Component { + static contextType = DialogsContext; + + constructor(props) { + super(props); + this.state = { + intermediateOpened: false, + isExpanded: false, + }; + + this.downloadImage = this.downloadImage.bind(this); + this.renderRow = this.renderRow.bind(this); + } + + downloadImage(imageName, imageTag) { + let pullImageId = imageName; + if (!imageTag) + imageTag = "latest"; + + pullImageId += ":" + imageTag; + + this.setState({ imageDownloadInProgress: imageName }); + client.pullImage(pullImageId) + .then(() => { + this.setState({ imageDownloadInProgress: undefined }); + }) + .catch(ex => { + const error = cockpit.format(_("Failed to download image $0:$1"), imageName, imageTag || "latest"); + const errorDetail = ( +

{_("Error message")}: + {cockpit.format("$0 $1", ex.message, ex.reason)} +

+ ); + this.setState({ imageDownloadInProgress: undefined }); + this.props.onAddNotification({ type: 'danger', error, errorDetail }); + }); + } + + onOpenNewImagesDialog = () => { + const Dialogs = this.context; + Dialogs.show( + + ); + }; + + onOpenPruneUnusedImagesDialog = () => { + this.setState({ showPruneUnusedImagesModal: true }); + }; + + getUsedByText(image) { + const { imageContainerList } = this.props; + if (imageContainerList === null) { + return { title: _("unused"), count: 0 }; + } + const containers = imageContainerList[image.Id]; + if (containers !== undefined) { + const title = cockpit.format(cockpit.ngettext("$0 container", "$0 containers", containers.length), containers.length); + return { title, count: containers.length }; + } else { + return { title: _("unused"), count: 0 }; + } + } + + calculateStats = () => { + const { images, imageContainerList } = this.props; + const unusedImages = []; + const imageStats = { + imagesTotal: 0, + imagesSize: 0, + unusedTotal: 0, + unusedSize: 0, + }; + + if (imageContainerList === null) { + return { imageStats, unusedImages }; + } + + if (images !== null) { + Object.keys(images).forEach(id => { + const image = images[id]; + imageStats.imagesTotal += 1; + imageStats.imagesSize += image.Size; + + const usedBy = imageContainerList[image.Id]; + if (image.Containers === 0 || usedBy === undefined) { + imageStats.unusedTotal += 1; + imageStats.unusedSize += image.Size; + unusedImages.push(image); + } + }); + } + + return { imageStats, unusedImages }; + }; + + renderRow(image) { + const tabs = []; + const { title: usedByText, count: usedByCount } = this.getUsedByText(image); + + const columns = [ + { title: utils.image_name(image), header: true, props: { modifier: "breakWord" } }, + { title: utils.localize_time(image.Created), props: { className: "ignore-pixels" } }, + { title: utils.truncate_id(image.Id), props: { className: "ignore-pixels" } }, + { title: cockpit.format_bytes(image.Size), props: { className: "ignore-pixels", modifier: "nowrap" } }, + { title: {usedByText}, props: { className: "ignore-pixels", modifier: "nowrap" } }, + { + title: , + props: { className: 'pf-v5-c-table__action content-action' } + }, + ]; + + tabs.push({ + name: _("Details"), + renderer: ImageDetails, + data: { + image, + containers: this.props.imageContainerList !== null ? this.props.imageContainerList[image.Id] : null, + showAll: this.props.showAll, + } + }); + tabs.push({ + name: _("History"), + renderer: ImageHistory, + data: { + image, + } + }); + return { + expandedContent: , + columns, + props: { + key: image.Id, + "data-row-id": image.Id, + }, + }; + } + + render() { + const columnTitles = [ + { title: _("Image"), transforms: [cellWidth(20)] }, + { title: _("Created"), props: { className: "ignore-pixels", width: 15 } }, + { title: _("ID"), props: { className: "ignore-pixels" } }, + { title: _("Disk space"), props: { className: "ignore-pixels" } }, + { title: _("Used by"), props: { className: "ignore-pixels" } }, + ]; + let emptyCaption = _("No images"); + if (this.props.images === null) + emptyCaption = "Loading..."; + else if (this.props.textFilter.length > 0) + emptyCaption = _("No images that match the current filter"); + + const intermediateOpened = this.state.intermediateOpened; + + let filtered = []; + if (this.props.images !== null) { + filtered = Object.keys(this.props.images).filter(id => { + const tags = this.props.images[id].RepoTags || []; + if (!intermediateOpened && tags.length < 1) + return false; + if (this.props.textFilter.length > 0) + return tags.some(tag => tag.toLowerCase().indexOf(this.props.textFilter.toLowerCase()) >= 0); + return true; + }); + } + + filtered.sort((a, b) => { + const name_a = this.props.images[a].RepoTags.length > 0 ? this.props.images[a].RepoTags[0] : ""; + const name_b = this.props.images[b].RepoTags.length > 0 ? this.props.images[b].RepoTags[0] : ""; + if (name_a === "") + return 1; + if (name_b === "") + return -1; + return name_a > name_b ? 1 : -1; + }); + + const imageRows = filtered.map(id => this.renderRow(this.props.images[id])); + + const interim = this.props.images && Object.keys(this.props.images).some(id => { + // Intermediate image does not have any tags + if (this.props.images[id].RepoTags && this.props.images[id].RepoTags.length > 0) + return false; + + // Any text filter hides all images + if (this.props.textFilter.length > 0) + return false; + + return true; + }); + + let toggleIntermediate = ""; + if (interim) { + toggleIntermediate = ( + + + + ); + } + const cardBody = ( + <> + + {toggleIntermediate} + + ); + + const { imageStats, unusedImages } = this.calculateStats(); + const imageTitleStats = ( + <> + + {cockpit.format(cockpit.ngettext("$0 image total, $1", "$0 images total, $1", imageStats.imagesTotal), imageStats.imagesTotal, cockpit.format_bytes(imageStats.imagesSize))} + + {imageStats.unusedTotal !== 0 && + + {cockpit.format(cockpit.ngettext("$0 unused image, $1", "$0 unused images, $1", imageStats.unusedTotal), imageStats.unusedTotal, cockpit.format_bytes(imageStats.unusedSize))} + + } + + ); + + return ( + + + + + + + {_("Images")} + + {imageTitleStats} + + + + + + + + + {this.props.images && Object.keys(this.props.images).length + ? this.setState(prevState => ({ isExpanded: !prevState.isExpanded }))} + isExpanded={this.state.isExpanded}> + {cardBody} + + : cardBody} + + {/* The PruneUnusedImagesModal dialog needs to keep + * its list of unused images in sync with reality at + * all times since the API call will delete whatever + * is unused at the exact time of call, and the + * dialog better be showing the correct list of + * unused images at that time. Thus, we can't use + * Dialog.show for it but include it here in the + * DOM. */} + {this.state.showPruneUnusedImagesModal && + this.setState({ showPruneUnusedImagesModal: false })} + unusedImages={unusedImages} + onAddNotification={this.props.onAddNotification} /> } + {this.state.imageDownloadInProgress && +
{_("Pulling")} {this.state.imageDownloadInProgress}...
+
} +
+ ); + } +} + +const ImageOverActions = ({ handleDownloadNewImage, handlePruneUsedImages, unusedImages }) => { + const actions = [ + handleDownloadNewImage()} + > + {_("Download new image")} + , + handlePruneUsedImages()} + isDisabled={unusedImages.length === 0} + isAriaDisabled={unusedImages.length === 0} + > + {_("Prune unused images")} + + ]; + + return ( + + ); +}; + +const ImageActions = ({ image, onAddNotification }) => { + const Dialogs = useDialogs(); + + const runImage = () => { + Dialogs.show( + + {(dockerInfo) => ( + + {(Dialogs) => ( + + )} + + )} + ); + }; + + const removeImage = () => { + Dialogs.show(); + }; + + const runImageAction = ( + + ); + + const dropdownActions = [ + + {_("Create container")} + , + + {_("Delete")} + + ]; + + return ( + <> + {runImageAction} + + + ); +}; + +export default Images; diff --git a/ui/cockpit-docker/src/Notification.jsx b/ui/cockpit-docker/src/Notification.jsx new file mode 100644 index 0000000..3fc3ff2 --- /dev/null +++ b/ui/cockpit-docker/src/Notification.jsx @@ -0,0 +1,45 @@ +/* + * This file is part of Cockpit. + * + * Copyright (C) 2019 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Cockpit; If not, see . + */ +import React from 'react'; +import { Alert, AlertActionCloseButton } from "@patternfly/react-core/dist/esm/components/Alert"; + +import cockpit from 'cockpit'; + +const _ = cockpit.gettext; + +let last_error = ""; + +function log_error_if_changed(error) { + // Put the error in the browser log, for easier debugging and + // matching of known issues in the integration tests. + if (error != last_error) { + last_error = error; + console.error(error); + } +} + +export const ErrorNotification = ({ errorMessage, errorDetail, onDismiss }) => { + log_error_if_changed(errorMessage + (errorDetail ? ": " + errorDetail : "")); + return ( + : null}> + { errorDetail &&

{_("Error message")}: {errorDetail}

} +
+ ); +}; diff --git a/ui/cockpit-docker/src/PruneUnusedContainersModal.jsx b/ui/cockpit-docker/src/PruneUnusedContainersModal.jsx new file mode 100644 index 0000000..263482d --- /dev/null +++ b/ui/cockpit-docker/src/PruneUnusedContainersModal.jsx @@ -0,0 +1,96 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import { SortByDirection } from "@patternfly/react-table"; +import cockpit from 'cockpit'; +import { ListingTable } from 'cockpit-components-table.jsx'; + +import * as client from './client.js'; +import * as utils from './util.js'; + +const _ = cockpit.gettext; + +const getContainerRow = (container, selected) => { + const columns = [ + { + title: container.name, + sortKey: container.name, + props: { width: 25, }, + }, + { + title: utils.localize_time(Date.parse(container.created) / 1000), + props: { width: 20, }, + }, + ]; + return { columns, selected, props: { key: container.id } }; +}; + +const PruneUnusedContainersModal = ({ close, unusedContainers, onAddNotification }) => { + const [isPruning, setPruning] = useState(false); + const [selectedContainerIds, setSelectedContainerIds] = React.useState(unusedContainers.map(u => u.id)); + + const handlePruneUnusedContainers = () => { + setPruning(true); + + const actions = []; + + for (const id of selectedContainerIds) { + if (id.endsWith("true")) { + actions.push(client.delContainer(true, id.replace(/true$/, ""), true)); + } else { + actions.push(client.delContainer(false, id.replace(/false$/, ""), true)); + } + } + Promise.all(actions).then(close) + .catch(ex => { + const error = _("Failed to prune unused containers"); + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + close(); + }); + }; + + const columns = [ + { title: _("Name"), sortable: true }, + { title: _("Created"), sortable: true }, + ]; + + const selectAllContainers = isSelecting => setSelectedContainerIds(isSelecting ? unusedContainers.map(c => c.id) : []); + const isContainerSelected = container => selectedContainerIds.includes(container.id); + const setContainerSelected = (container, isSelecting) => setSelectedContainerIds(prevSelected => { + const otherSelectedContainerName = prevSelected.filter(r => r !== container.id); + return isSelecting ? [...otherSelectedContainerName, container.id] : otherSelectedContainerName; + }); + + const onSelectContainer = (id, _rowIndex, isSelecting) => { + const container = unusedContainers.filter(u => u.id === id)[0]; + setContainerSelected(container, isSelecting); + }; + + return ( + + + + } + > +

{_("Removes selected non-running containers")}

+ onSelectContainer(rowData.props.id, rowIndex, isSelecting)} + onHeaderSelect={(_event, isSelecting) => selectAllContainers(isSelecting)} + id="unused-container-list" + rows={unusedContainers.map(container => getContainerRow(container, isContainerSelected(container))) } + variant="compact" sortBy={{ index: 0, direction: SortByDirection.asc }} /> +
+ ); +}; + +export default PruneUnusedContainersModal; diff --git a/ui/cockpit-docker/src/PruneUnusedImagesModal.jsx b/ui/cockpit-docker/src/PruneUnusedImagesModal.jsx new file mode 100644 index 0000000..3c46506 --- /dev/null +++ b/ui/cockpit-docker/src/PruneUnusedImagesModal.jsx @@ -0,0 +1,101 @@ +import React, { useState } from 'react'; +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; +import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; +import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List"; +import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; +import cockpit from 'cockpit'; + +import * as client from './client.js'; +import * as utils from './util.js'; + +import "@patternfly/patternfly/utilities/Spacing/spacing.css"; + +const _ = cockpit.gettext; + +function ImageOptions({ images, checked, handleChange, name, showCheckbox }) { + const [isExpanded, onToggle] = useState(false); + let shownImages = images; + if (!isExpanded) { + shownImages = shownImages.slice(0, 5); + } + + if (shownImages.length === 0) { + return null; + } + const listNameId = "list-" + name; + + return ( + + {showCheckbox && + handleChange(val)} + aria-owns={listNameId} + /> + } + + {shownImages.map((image, index) => + + {utils.image_name(image)} + + )} + {!isExpanded && images.length > 5 && + + } + + + ); +} + +const PruneUnusedImagesModal = ({ close, unusedImages, onAddNotification }) => { + const [isPruning, setPruning] = useState(false); + const [deleteImages, setDeleteImages] = React.useState(true); + + const handlePruneUnusedImages = () => { + setPruning(true); + + client.pruneUnusedImages().then(close) + .catch(ex => { + const error = _("Failed to prune unused images"); + onAddNotification({ type: 'danger', error, errorDetail: ex.message }); + close(); + }); + }; + + const showCheckboxes = unusedImages.length > 0; + + return ( + + + + } + > + + + + + ); +}; + +export default PruneUnusedImagesModal; diff --git a/ui/cockpit-docker/src/PublishPort.jsx b/ui/cockpit-docker/src/PublishPort.jsx new file mode 100644 index 0000000..92a36cd --- /dev/null +++ b/ui/cockpit-docker/src/PublishPort.jsx @@ -0,0 +1,142 @@ +import React from 'react'; + +import { Button } from "@patternfly/react-core/dist/esm/components/Button"; +import { FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; +import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; +import { Grid } from "@patternfly/react-core/dist/esm/layouts/Grid"; +import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; +import { Popover } from "@patternfly/react-core/dist/esm/components/Popover"; +import { OutlinedQuestionCircleIcon, TrashIcon } from '@patternfly/react-icons'; +import cockpit from 'cockpit'; +import ipaddr from "ipaddr.js"; + +import { FormHelper } from "cockpit-components-form-helper.jsx"; +import * as utils from './util.js'; + +const _ = cockpit.gettext; + +const MAX_PORT = 65535; + +export function validatePublishPort(value, key) { + switch (key) { + case "IP": + if (value && !ipaddr.isValid(value)) + return _("Must be a valid IP address"); + break; + case "hostPort": { + if (value) { + const hostPort = parseInt(value); + if (hostPort < 1 || hostPort > MAX_PORT) + return _("1 to 65535"); + } + + break; + } + case "containerPort": { + if (!value) + return _("Container port must not be empty"); + + const containerPort = parseInt(value); + if (containerPort < 1 || containerPort > MAX_PORT) + return _("1 to 65535"); + + break; + } + default: + console.error(`Unknown key "${key}"`); // not-covered: unreachable assertion + } +} + +export const PublishPort = ({ id, item, onChange, idx, removeitem, itemCount, validationFailed, onValidationChange }) => + ( + + + + + }> + { + utils.validationClear(validationFailed, "IP", onValidationChange); + utils.validationDebounce(() => onValidationChange({ ...validationFailed, IP: validatePublishPort(value, "IP") })); + onChange(idx, 'IP', value); + }} /> + + + + + + }> + { + utils.validationClear(validationFailed, "hostPort", onValidationChange); + utils.validationDebounce(() => onValidationChange({ ...validationFailed, hostPort: validatePublishPort(value, "hostPort") })); + onChange(idx, 'hostPort', value); + }} /> + + + + { + utils.validationClear(validationFailed, "containerPort", onValidationChange); + utils.validationDebounce(() => onValidationChange({ ...validationFailed, containerPort: validatePublishPort(value, "containerPort") })); + onChange(idx, 'containerPort', value); + }} /> + + + + onChange(idx, 'protocol', value)}> + + + + + + + + + + + ); + } + + if (this.state.serviceAvailable === null) // not detected yet + return ( + + + + {/* loading spinner */} + + + + + + ); + + if (!this.state.serviceAvailable) { + return ( + + + + } headingLevel="h2" /> + + this.setState({ enableService: checked }) } /> + + { cockpit.manifests.system && + + + + } + + + + + ); + } + + let imageContainerList = {}; + if (this.state.containers !== null) { + Object.keys(this.state.containers).forEach(c => { + const container = this.state.containers[c]; + const image = container.Image; + if (imageContainerList[image]) { + imageContainerList[image].push({ + container, + stats: this.state.containersStats[container.Id], + }); + } else { + imageContainerList[image] = [{ + container, + stats: this.state.containersStats[container.Id] + }]; + } + }); + } else + imageContainerList = null; + + let startService = ""; + const action = ( + <> + {_("Start")} + this.setState({ showStartService: false })} /> + + ); + if (!this.state.serviceAvailable && this.state.privileged) { + startService = ( + + ); + } + + const imageList = ( + this.setState({ containersFilter: "all" }) } + user={this.state.currentUser} + serviceAvailable={this.state.serviceAvailable} + /> + ); + const containerList = ( + + ); + + const notificationList = ( + + {this.state.notifications.map((notification, index) => { + return ( + this.onDismissNotification(notification.index)} />}> + {notification.errorDetail} + + ); + })} + + ); + + const contextInfo = { + cgroupVersion: this.state.cgroupVersion, + registries: this.state.registries, + selinuxAvailable: this.state.selinuxAvailable, + dockerRestartAvailable: this.state.dockerRestartAvailable, + version: this.state.version, + }; + + return ( + + + + {notificationList} + + + + + + { this.state.showStartService ? startService : null } + {imageList} + {containerList} + + + + + + ); + } +} + +export default Application; diff --git a/ui/cockpit-docker/src/client.js b/ui/cockpit-docker/src/client.js new file mode 100644 index 0000000..22d11ad --- /dev/null +++ b/ui/cockpit-docker/src/client.js @@ -0,0 +1,172 @@ +import rest from './rest.js'; + +const DOCKER_ADDRESS = "/var/run/docker.sock"; +export const VERSION = "/v1.43"; + +export function getAddress() { + return DOCKER_ADDRESS; +} + +function dockerCall(name, method, args, body) { + const options = { + method, + path: VERSION + name, + body: body || "", + params: args, + }; + + if (method === "POST" && body) + options.headers = { "Content-Type": "application/json" }; + + // console.log("dockerCall", options); + + return rest.call(getAddress(), options); +} + +const dockerJson = (name, method, args, body) => dockerCall(name, method, args, body) + .then(reply => JSON.parse(reply)); + +function dockerMonitor(name, method, args, callback) { + const options = { + method, + path: VERSION + name, + body: "", + params: args, + }; + + // console.log("dockerMonitor", options); + + const connection = rest.connect(getAddress()); + return connection.monitor(options, callback); +} + +export const streamEvents = (callback) => dockerMonitor("/events", "GET", {}, callback); + +export function getInfo() { + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error("timeout")), 15000); + dockerJson("/info", "GET", {}) + .then(reply => resolve(reply)) + .catch(reject) + .finally(() => clearTimeout(timeout)); + }); +} + +export const getContainers = () => dockerJson("/containers/json", "GET", { all: true }); + +export const streamContainerStats = (id, callback) => dockerMonitor("/containers/" + id + "/stats", "GET", { stream: true }, callback); + +export function inspectContainer(id) { + const options = { + size: false // set true to display filesystem usage + }; + return dockerJson("/containers/" + id + "/json", "GET", options); +} + +export const delContainer = (id, force) => dockerCall("/containers/" + id, "DELETE", { force }); + +export const renameContainer = (id, config) => dockerCall("/containers/" + id + "/rename", "POST", config); + +export const createContainer = (config) => dockerJson("/containers/create", "POST", {}, JSON.stringify(config)); + +export const commitContainer = (commitData) => dockerCall("/commit", "POST", commitData); + +export const postContainer = (action, id, args) => dockerCall("/containers/" + id + "/" + action, "POST", args); + +export function execContainer(id) { + const args = { + AttachStderr: true, + AttachStdout: true, + AttachStdin: true, + Tty: true, + Cmd: ["/bin/sh"], + }; + + return dockerJson("/containers/" + id + "/exec", "POST", {}, JSON.stringify(args)); +} + +export function resizeContainersTTY(id, exec, width, height) { + const args = { + h: height, + w: width, + }; + + let point = "containers/"; + if (!exec) + point = "exec/"; + + console.log("resizeContainersTTY", point + id + "/resize", args); + return dockerCall("/" + point + id + "/resize", "POST", args); +} + +function parseImageInfo(info) { + const image = {}; + + if (info.Config) { + image.Entrypoint = info.Config.Entrypoint; + image.Command = info.Config.Cmd; + image.Ports = Object.keys(info.Config.ExposedPorts || {}); + image.Env = info.Config.Env; + } + image.Author = info.Author; + + return image; +} + +export function getImages(id) { + const options = {}; + if (id) + options.filters = JSON.stringify({ id: [id] }); + return dockerJson("/images/json", "GET", options) + .then(reply => { + const images = {}; + const promises = []; + + for (const image of reply) { + images[image.Id] = image; + promises.push(dockerJson("/images/" + image.Id + "/json", "GET", {})); + } + + return Promise.all(promises) + .then(replies => { + for (const info of replies) { + images[info.Id] = Object.assign(images[info.Id], parseImageInfo(info)); + } + return images; + }); + }); +} + +export const delImage = (id, force) => dockerJson("/images/" + id, "DELETE", { force }); + +export const untagImage = (id, repo, tag) => dockerCall("/images/" + id + "/untag", "POST", { repo, tag }); + +export function pullImage(reference) { + return new Promise((resolve, reject) => { + const options = { + fromImage: reference, + }; + dockerCall("/images/create", "POST", options) + .then(r => { + // Need to check the last response if it contains error + const responses = r.trim().split("\n"); + const response = JSON.parse(responses[responses.length - 1]); + if (response.error) { + response.message = response.error; + reject(response); + } else if (response.cause) // present for 400 and 500 errors + reject(response); + else + resolve(); + }) + .catch(reject); + }); +} + +export const pruneUnusedImages = () => dockerJson("/images/prune", "POST", {}); + +export const imageHistory = (id) => dockerJson(`/images/${id}/history`, "GET", {}); + +export const imageExists = (id) => dockerCall("/images/" + id + "/json", "GET", {}); + +export const containerExists = (id) => dockerCall("/containers/" + id + "/json", "GET", {}); diff --git a/ui/cockpit-docker/src/docker.scss b/ui/cockpit-docker/src/docker.scss new file mode 100644 index 0000000..6db864c --- /dev/null +++ b/ui/cockpit-docker/src/docker.scss @@ -0,0 +1,149 @@ +@use "ct-card.scss"; +@use "page.scss"; +@import "global-variables"; +// For pf-v5-line-clamp +@import "@patternfly/patternfly/sass-utilities/mixins.scss"; +// For pf-u-disabled-color-100 +@import "@patternfly/patternfly/utilities/Text/text.css"; + +#app .pf-v5-c-card.containers-containers, #app .pf-v5-c-card.containers-images { + @extend .ct-card; +} + +.pf-v5-c-modal-box__title-text { + white-space: break-spaces; +} + +#containers-images, #containers-containers { + // Decrease padding for the image/container toggle button list + .pf-v5-c-table.pf-m-compact .pf-v5-c-table__toggle { + padding-inline-start: 0; + } +} + +@media screen and (max-width: 768px) { + // Badges should not stretch in mobile mode + .pf-v5-c-table [data-label] > .pf-v5-c-badge { + justify-self: start; + } +} + +.container-block { + display: flex; + flex-direction: column; + word-break: break-all; +} + +.container-block small { + @include pf-v5-line-clamp("1"); + color: var(--pf-v5-global--Color--200); +} + +.container-name { + font-size: var(--pf-v5-global--FontSize--lg); + font-weight: 400; +} + +.containers-run-onbuildvarclaim input { + max-inline-size: 15em; +} + +.pf-v5-c-alert__description { + overflow-wrap: anywhere; +} + +.listing-action { + inline-size: 100%; + display: flex; + justify-content: space-around; +} + +.ct-badge-container-running, .ct-badge-pod-running { + background-color: var(--pf-v5-global--info-color--100); + color: white; +} + +.ct-badge-container-healthy { + background-color: var(--pf-v5-global--success-color--100); + color: white; +} + +.ct-badge-container-unhealthy { + background-color: var(--pf-v5-global--danger-color--100); + color: white; +} + +.ct-badge-toolbox { + background-color: var(--pf-v5-global--palette--purple-100); + color: var(--pf-v5-global--palette--purple-600); + + .pf-v5-theme-dark & { + background-color: var(--pf-v5-global--palette--purple-500); + color: white; + } +} + +.ct-badge-distrobox { + background-color: var(--pf-v5-global--palette--gold-100); + color: var(--pf-v5-global--palette--gold-600); + + .pf-v5-theme-dark & { + background-color: var(--pf-v5-global--palette--gold-500); + color: white; + } +} + +.green { + color: var(--pf-v5-global--success-color--100); +} + +.red { + color: var(--pf-v5-global--danger-color--100); +} + +// Hide the header nav from the expandable rows - this should be better done with JS but the current cockpit-listing-panel implementation does not support this variant +#containers-images .ct-listing-panel-head { + display: none; +} + +.ct-grey-text { + color: var(--pf-v5-global--Color--200); +} + +.content-action { + text-align: end; + white-space: nowrap !important; +} + +// Remove doubled-up padding and borders on nested tables in mobile +.ct-listing-panel-body .ct-table tr { + --pf-v5-c-table-tr--responsive--PaddingTop: 0; + --pf-v5-c-table-tr--responsive--PaddingRight: 0; + --pf-v5-c-table-tr--responsive--PaddingBottom: 0; + --pf-v5-c-table-tr--responsive--PaddingLeft: 0; +} + +@media (max-width: $pf-v5-global--breakpoint--md - 1) { + .show-only-when-wide { + display: none; + } +} + +@media (min-width: $pf-v5-global--breakpoint--md) { + .show-only-when-narrow { + display: none; + } + + // Add borders to no pod containers list and images list + .container-pod.pf-m-plain tbody, + .containers-images tbody { + border: var(--pf-v5-c-card--m-flat--BorderWidth) solid var(--pf-v5-c-card--m-flat--BorderColor); + } +} + +// Override table padding on mobile +@media (max-width: $pf-v5-global--breakpoint--md) { + .health-logs.pf-m-grid-md.pf-v5-c-table tr:where(.pf-v5-c-table__tr):not(.pf-v5-c-table__expandable-row) { + padding: 0; + } +} diff --git a/ui/cockpit-docker/src/index.html b/ui/cockpit-docker/src/index.html new file mode 100644 index 0000000..a0d703f --- /dev/null +++ b/ui/cockpit-docker/src/index.html @@ -0,0 +1,36 @@ + + + + + docker containers + + + + + + + + + + + + +
+
+ + diff --git a/ui/cockpit-docker/src/index.js b/ui/cockpit-docker/src/index.js new file mode 100644 index 0000000..7d8bc18 --- /dev/null +++ b/ui/cockpit-docker/src/index.js @@ -0,0 +1,30 @@ +/* + * This file is part of Cockpit. + * + * Copyright (C) 2017 Red Hat, Inc. + * + * Cockpit is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * Cockpit is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Cockpit; If not, see . + */ + +import "cockpit-dark-theme"; +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import 'patternfly/patternfly-5-cockpit.scss'; +import Application from './app.jsx'; +import './docker.scss'; + +document.addEventListener("DOMContentLoaded", function () { + const root = createRoot(document.getElementById('app')); + root.render(); +}); diff --git a/ui/cockpit-docker/src/manifest.json b/ui/cockpit-docker/src/manifest.json new file mode 100644 index 0000000..6f0aec2 --- /dev/null +++ b/ui/cockpit-docker/src/manifest.json @@ -0,0 +1,16 @@ +{ + "conditions": [ + {"path-exists": "/lib/systemd/system/docker.socket"} + ], + "menu": { + "index": { + "label": "Docker containers", + "order": 50, + "keywords": [ + { + "matches": ["docker", "container", "image"] + } + ] + } + } +} diff --git a/ui/cockpit-docker/src/rest.js b/ui/cockpit-docker/src/rest.js new file mode 100644 index 0000000..5f07c29 --- /dev/null +++ b/ui/cockpit-docker/src/rest.js @@ -0,0 +1,100 @@ +import cockpit from "cockpit"; +import { debug } from "./util.js"; + +function manage_error(reject, error, content) { + let content_o = {}; + if (content) { + try { + content_o = JSON.parse(content); + } catch { + content_o.message = content; + } + } + const c = { ...error, ...content_o }; + reject(c); +} + +// calls are async, so keep track of a call counter to associate a result with a call +let call_id = 0; + +function connect(address) { + /* This doesn't create a channel until a request */ + const http = cockpit.http(address, { superuser: null }); + const connection = {}; + + connection.monitor = function(options, callback, return_raw) { + return new Promise((resolve, reject) => { + let buffer = ""; + + http.request(options) + .stream(data => { + if (return_raw) + callback(data); + else { + buffer += data; + const chunks = buffer.split("\n"); + buffer = chunks.pop(); + + chunks.forEach(chunk => { + debug("monitor", chunk); + callback(JSON.parse(chunk)); + }); + } + }) + .catch((error, content) => { + manage_error(reject, error, content); + }) + .then(resolve); + }); + }; + + connection.call = function (options) { + const id = call_id++; + debug(`call ${id}:`, JSON.stringify(options)); + return new Promise((resolve, reject) => { + options = options || {}; + http.request(options) + .then(result => { + debug(`call ${id} result:`, JSON.stringify(result)); + resolve(result); + }) + .catch((error, content) => { + debug(`call ${id} error:`, JSON.stringify(error), "content", JSON.stringify(content)); + manage_error(reject, error, content); + }); + }); + }; + + connection.close = function () { + http.close(); + }; + + return connection; +} + +/* + * Connects to the docker service, performs a single call, and closes the + * connection. + */ +async function call (address, parameters) { + const connection = connect(address); + const result = await connection.call(parameters); + connection.close(); + // if (parameters.method === "GET") + // return result; + + // let p = {}; + // try { + // p = JSON.parse(result); + // } catch { + // p = result; + // } + // console.log("call", { method: parameters.method, path: parameters.path, parameters, result: p }); + + return result; +} + +export default { + connect, + call +}; diff --git a/ui/cockpit-docker/src/util.js b/ui/cockpit-docker/src/util.js new file mode 100644 index 0000000..deff036 --- /dev/null +++ b/ui/cockpit-docker/src/util.js @@ -0,0 +1,214 @@ +import React, { useContext } from "react"; + +import cockpit from 'cockpit'; + +import { debounce } from 'throttle-debounce'; +import * as dfnlocales from 'date-fns/locale'; +import { formatRelative } from 'date-fns'; +const _ = cockpit.gettext; + +export const DockerInfoContext = React.createContext(); +export const useDockerInfo = () => useContext(DockerInfoContext); + +export const WithDockerInfo = ({ value, children }) => { + return ( + + {children} + + ); +}; + +// https://github.com/containers/podman/blob/main/libpod/define/containerstate.go +// "Restarting" comes from special handling of restart case in Application.updateContainer() +export const states = [_("Exited"), _("Paused"), _("Stopped"), _("Removing"), _("Configured"), _("Created"), _("Restart"), _("Running")]; + +export const fallbackRegistries = ["docker.io", "quay.io"]; + +export function debug(...args) { + if (window.debugging === "all" || window.debugging?.includes("docker")) + console.debug("docker", ...args); +} + +export function truncate_id(id) { + if (!id) { + return ""; + } + + if (id.indexOf(":") !== -1) + id = id.split(":")[1]; + + return id.substr(0, 12); +} + +export function localize_time(unix_timestamp) { + if (unix_timestamp === undefined || isNaN(unix_timestamp)) + return ""; + const locale = (cockpit.language == "en") ? dfnlocales.enUS : dfnlocales[cockpit.language.replace('_', '')]; + return formatRelative(unix_timestamp * 1000, Date.now(), { locale }); +} + +export function format_cpu_usage(stats) { + const cpu_usage = stats?.cpu_stats?.cpu_usage?.total_usage; + const system_cpu_usage = stats?.cpu_stats?.system_cpu_usage; + const precpu_usage = stats?.precpu_stats?.cpu_usage?.total_usage; + const precpu_system_cpu_usage = stats?.precpu_stats?.system_cpu_usage; + + if (cpu_usage === undefined || isNaN(cpu_usage)) + return ""; + + let cpu_percent = 0; + if (precpu_usage !== undefined && precpu_system_cpu_usage !== undefined) { + const cpu_delta = cpu_usage - precpu_usage; + const system_delta = system_cpu_usage - precpu_system_cpu_usage; + if (system_delta > 0 && cpu_delta > 0) + cpu_percent = (cpu_delta / system_delta) * stats.cpu_stats.online_cpus * 100; + } + + return [cpu_percent.toFixed(2) + "%", cpu_percent]; +} + +export function format_memory_and_limit(stats) { + const usage = stats?.memory_stats?.usage; + const limit = stats?.memory_stats?.limit; + + if (usage === undefined || isNaN(usage)) + return ""; + + let mtext = ""; + let unit; + let parts; + if (limit) { + parts = cockpit.format_bytes(limit, undefined, { separate: true }); + mtext = " / " + parts.join(" "); + unit = parts[1]; + } + + if (usage) { + parts = cockpit.format_bytes(usage, unit, { separate: true }); + if (mtext) + return [_(parts[0] + mtext), usage]; + else + return [_(parts.join(" ")), usage]; + } else { + return ["", -1]; + } +} + +/* + * The functions quote_cmdline and unquote_cmdline implement + * a simple shell-like quoting syntax. They are used when letting the + * user edit a sequence of words as a single string. + * + * When parsing, words are separated by whitespace. Single and double + * quotes can be used to protect a sequence of characters that + * contains whitespace or the other quote character. A backslash can + * be used to protect any character. Quotes can appear in the middle + * of a word. + */ + +export function quote_cmdline(words) { + words = words || []; + + if (typeof words === 'string') + words = words.split(' '); + + function is_whitespace(c) { + return c == ' '; + } + + function quote(word) { + let text = ""; + let quote_char = ""; + let i; + for (i = 0; i < word.length; i++) { + if (word[i] == '\\' || word[i] == quote_char) + text += '\\'; + else if (quote_char === "") { + if (word[i] == "'" || is_whitespace(word[i])) + quote_char = '"'; + else if (word[i] == '"') + quote_char = "'"; + } + text += word[i]; + } + + return quote_char + text + quote_char; + } + + return words.map(quote).join(' '); +} + +export function unquote_cmdline(text) { + const words = []; + let next; + + function is_whitespace(c) { + return c == ' '; + } + + function skip_whitespace() { + while (next < text.length && is_whitespace(text[next])) + next++; + } + + function parse_word() { + let word = ""; + let quote_char = null; + + while (next < text.length) { + if (text[next] == '\\') { + next++; + if (next < text.length) { + word += text[next]; + } + } else if (text[next] == quote_char) { + quote_char = null; + } else if (quote_char) { + word += text[next]; + } else if (text[next] == '"' || text[next] == "'") { + quote_char = text[next]; + } else if (is_whitespace(text[next])) { + break; + } else + word += text[next]; + next++; + } + return word; + } + + next = 0; + skip_whitespace(); + while (next < text.length) { + words.push(parse_word()); + skip_whitespace(); + } + + return words; +} + +export function image_name(image) { + return image.RepoTags.length > 0 ? image.RepoTags[0] : ":"; +} + +export function is_valid_container_name(name) { + return /^[a-zA-Z0-9][a-zA-Z0-9_\\.-]*$/.test(name); +} + +/* Clears a single field in validationFailed object. + * + * Arguments: + * - validationFailed (object): Object containing list of fields with validation error + * - key (string): Specified which field from validationFailed object is clear + * - onValidationChange (func) + */ +export const validationClear = (validationFailed, key, onValidationChange) => { + if (!validationFailed) + return; + + const delta = { ...validationFailed }; + delete delta[key]; + onValidationChange(delta); +}; + +// This method needs to be outside of component as re-render would create a new instance of debounce +export const validationDebounce = debounce(500, (validationHandler) => validationHandler()); diff --git a/ui/cockpit-docker/test/browser/browser.sh b/ui/cockpit-docker/test/browser/browser.sh new file mode 100755 index 0000000..b612914 --- /dev/null +++ b/ui/cockpit-docker/test/browser/browser.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +set -eux +cd "${0%/*}/../.." + +# HACK: ensure that critical components are up to date: https://github.com/psss/tmt/issues/682 +dnf update -y docker crun conmon criu + +# if we run during cross-project testing against our main-builds COPR, then let that win +# even if Fedora has a newer revision +main_builds_repo="$(ls /etc/yum.repos.d/*cockpit*main-builds* 2>/dev/null || true)" +if [ -n "$main_builds_repo" ]; then + echo 'priority=0' >> "$main_builds_repo" + dnf distro-sync -y --repo 'copr*' cockpit-docker +fi + +# Show critical package versions +rpm -q runc crun docker criu passt kernel-core selinux-policy cockpit-docker cockpit-bridge || true + +# Show network information, for pasta debugging +ip address show +ip -4 route show +ip -6 route show + +# allow test to set up things on the machine +mkdir -p /root/.ssh +curl https://raw.githubusercontent.com/cockpit-project/bots/main/machine/identity.pub >> /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys + +# create user account for logging in +if ! id admin 2>/dev/null; then + useradd -c Administrator -G wheel admin + echo admin:foobar | chpasswd +fi + +# set root's password +echo root:foobar | chpasswd + +# avoid sudo lecture during tests +su -c 'echo foobar | sudo --stdin whoami' - admin + +# disable core dumps, we rather investigate them upstream where test VMs are accessible +echo core > /proc/sys/kernel/core_pattern + +# grab a few images to play with; tests run offline, so they cannot download images +docker rmi --all + +# set up our expected images, in the same way that we do for upstream CI +# this sometimes runs into network issues, so retry a few times +for retry in $(seq 5); do + if curl https://raw.githubusercontent.com/cockpit-project/bots/main/images/scripts/lib/podman-images.setup | sh -eux; then + break + fi + sleep $((5 * retry * retry)) +done + +CONTAINER="$(cat .cockpit-ci/container)" + +# import the test CONTAINER image as a directory tree for nspawn +mkdir /var/tmp/tasks +podman export "$(podman create --name tasks-import $CONTAINER)" | tar -x -C /var/tmp/tasks +podman rm tasks-import +podman rmi $CONTAINER + +# image setup, shared with upstream tests +sh -x test/vm.install + +systemctl enable --now cockpit.socket docker.socket + +# Run tests in the cockpit tasks container, as unprivileged user +# Use nspawn to avoid the tests killing the tasks container itself +chown -R 1111:1111 "${TMT_TEST_DATA}" . + +SYSTEMD_SECCOMP=0 systemd-nspawn \ + -D /var/tmp/tasks/ \ + --ephemeral \ + --user user \ + --setenv=TEST_AUDIT_NO_SELINUX="${TEST_AUDIT_NO_SELINUX:-}" \ + --bind="${TMT_TEST_DATA}":/logs --setenv=LOGS=/logs \ + --bind="$(pwd)":/source --setenv=SOURCE=/source \ + --bind-ro=/usr/lib/os-release:/run/host/usr/lib/os-release \ + sh /source/test/browser/run-test.sh "$@" diff --git a/ui/cockpit-docker/test/browser/main.fmf b/ui/cockpit-docker/test/browser/main.fmf new file mode 100644 index 0000000..8d12fe4 --- /dev/null +++ b/ui/cockpit-docker/test/browser/main.fmf @@ -0,0 +1,20 @@ +require: + - cockpit-docker + - cockpit-ws + - cockpit-system + - criu + # HACK: https://bugzilla.redhat.com/show_bug.cgi?id=2269485 + - slirp4netns +duration: 30m + +/system: + test: ./browser.sh system + summary: Run *System tests + +/user: + test: ./browser.sh user + summary: Run *User tests + +/other: + test: ./browser.sh other + summary: Run all other tests diff --git a/ui/cockpit-docker/test/browser/run-test.sh b/ui/cockpit-docker/test/browser/run-test.sh new file mode 100644 index 0000000..fe794b2 --- /dev/null +++ b/ui/cockpit-docker/test/browser/run-test.sh @@ -0,0 +1,54 @@ +set -eux + +PLAN="$1" + +cd "${SOURCE}" + +# tests need cockpit's bots/ libraries and test infrastructure +rm -f bots # common local case: existing bots symlink +make bots test/common + +if [ -e .git ]; then + tools/node-modules checkout + # disable detection of affected tests; testing takes too long as there is no parallelization + mv .git dot-git +else + # upstream tarballs ship test dependencies; print version for debugging + grep '"version"' node_modules/chrome-remote-interface/package.json +fi + +. /run/host/usr/lib/os-release +export TEST_OS="${ID}-${VERSION_ID/./-}" + +if [ "$TEST_OS" = "centos-8" ] || [ "$TEST_OS" = "centos-9" ]; then + TEST_OS="${TEST_OS}-stream" +fi + +# Chromium sometimes gets OOM killed on testing farm +export TEST_BROWSER=firefox + +# select subset of tests according to plan +TESTS="$(test/common/run-tests -l)" +case "$PLAN" in + system) TESTS="$(echo "$TESTS" | grep 'System$')" ;; + user) TESTS="$(echo "$TESTS" | grep 'User$')" ;; + other) TESTS="$(echo "$TESTS" | grep -vE '(System|User)$')" ;; + *) echo "Unknown test plan: $PLAN" >&2; exit 1 ;; +esac + +EXCLUDES="" + +# make it easy to check in logs +echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}" +echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}" + +RC=0 +./test/common/run-tests \ + --nondestructive \ + --machine localhost:22 \ + --browser localhost:9090 \ + $TESTS \ + $EXCLUDES \ +|| RC=$? +cp --verbose Test* "$LOGS" || true +exit $RC diff --git a/ui/cockpit-docker/test/check-application b/ui/cockpit-docker/test/check-application new file mode 100755 index 0000000..9525ab0 --- /dev/null +++ b/ui/cockpit-docker/test/check-application @@ -0,0 +1,2714 @@ +#!/usr/bin/python3 -cimport os, sys; os.execv(os.path.dirname(sys.argv[1]) + "/common/pywrap", sys.argv) +# Run this with --help to see available options for tracing and debugging +# See https://github.com/cockpit-project/cockpit/blob/main/test/common/testlib.py +# "class Browser" and "class MachineCase" for the available API. + +import os +import sys +import time + +import testlib +from machine.machine_core import ssh_connection + +REGISTRIES_CONF = """ +[registries.search] +registries = ['localhost:5000', 'localhost:6000'] + +[registries.insecure] +registries = ['localhost:5000', 'localhost:6000'] +""" + +NOT_RUNNING = ["Exited", "Stopped"] + +# image names used in tests +IMG_ALPINE = "localhost/test-alpine" +IMG_ALPINE_LATEST = IMG_ALPINE + ":latest" +IMG_BUSYBOX = "localhost/test-busybox" +IMG_BUSYBOX_LATEST = IMG_BUSYBOX + ":latest" +IMG_REGISTRY = "localhost/test-registry" +IMG_REGISTRY_LATEST = IMG_REGISTRY + ":latest" + + +def docker_version(cls): + version = cls.execute(False, "docker -v").strip().split(' ')[-1] + # HACK: handle possible rc versions such as 4.4.0-rc2 + return tuple(int(v.split('-')[0]) for v in version.split('.')) + + +def showImages(browser): + if browser.attr("#containers-images button.pf-v5-c-expandable-section__toggle", "aria-expanded") == 'false': + browser.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + +def checkImage(browser, name, owner): + showImages(browser) + browser.wait_visible("#containers-images table") + browser.wait_js_func("""(function (first, last) { + let items = ph_select("#containers-images table tbody"); + for (i = 0; i < items.length; i++) + if (items[i].innerText.trim().startsWith(first) && items[i].innerText.trim().includes(last)) + return true; + return false; + })""", name, owner) + + +@testlib.nondestructive +class TestApplication(testlib.MachineCase): + + def setUp(self): + super().setUp() + m = self.machine + m.execute(""" + systemctl stop docker.service; systemctl stop containerd.service; systemctl --now enable docker.socket + # Ensure docker is really stopped, otherwise it keeps the containers/ directory busy + pkill -e -9 docker || true + while pgrep docker; do sleep 0.1; done + pkill -e -9 containerd || true + while pgrep containerd; do sleep 0.1; done + findmnt --list -otarget | grep /var/lib/docker/. | xargs -r umount + sync + """) + + # backup/restore pristine docker state, so that tests can run on existing testbeds + self.restore_dir("/var/lib/docker") + + # HACK: sometimes docker leaks mounts + self.addCleanup(m.execute, """ + systemctl stop docker.service containerd.service docker.socket + + systemctl reset-failed docker.service docker.socket + docker system reset --force + pkill -e -9 docker || true + while pgrep docker; do sleep 0.1; done + pkill -e -9 containerd || true + while pgrep containerd; do sleep 0.1; done + + # HACK: sometimes docker leaks mounts + findmnt --list -otarget | grep /var/lib/docker/. | xargs -r umount + sync + """) + + # Create admin session + m.execute(""" + if [ ! -d /home/admin/.ssh ]; then + mkdir /home/admin/.ssh + cp /root/.ssh/* /home/admin/.ssh + chown -R admin:admin /home/admin/.ssh + chmod -R go-wx /home/admin/.ssh + fi + """) + self.admin_s = ssh_connection.SSHConnection(user="admin", + address=m.ssh_address, + ssh_port=m.ssh_port, + identity_file=m.identity_file) + + # HACK: system reset has 10s timeout, make that faster with an extra `stop` + # https://github.com/containers/podman/issues/21874 + # Ubuntu 22.04 has old podman that does not know about rm --time + if m.image == 'ubuntu-2204': + self.addCleanup(self.admin_s.execute, "docker rm --force --all", timeout=300) + self.addCleanup(self.admin_s.execute, "docker pod rm --force --all", timeout=300) + else: + self.addCleanup(self.admin_s.execute, "docker rm --force --time 0 --all") + self.addCleanup(self.admin_s.execute, "docker pod rm --force --time 0 --all") + + # But disable it globally so that "systemctl --user disable" does what we expect + m.execute("systemctl --global disable docker.socket") + + self.allow_journal_messages("/run.*/docker/docker: couldn't connect.*") + self.allow_journal_messages(".*/run.*/docker/docker.*Connection reset by peer") + + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008249 + self.has_criu = "debian" not in m.image and "ubuntu" not in m.image + self.has_selinux = "arch" not in m.image and "debian" not in m.image and "ubuntu" not in m.image + self.has_cgroupsV2 = m.image not in ["centos-8-stream"] and not m.image.startswith('rhel-8') + + self.system_images_count = int(self.execute(True, "docker images -n | wc -l").strip()) + self.user_images_count = int(self.execute(False, "docker images -n | wc -l").strip()) + + # allow console.error + self.allow_browser_errors( + ".*couldn't search registry \".*\": pinging container registry .*", + ".*Error occurred while connecting console: cannot resize session: cannot resize container.*", + ) + + def tearDown(self): + if self.getError(): + # dump container logs for debugging + for auth in [False, True]: + print(f"----- {'system' if auth else 'user'} containers -----", file=sys.stderr) + self.execute(auth, "docker ps -a >&2") + self.execute(auth, 'for c in $(docker ps -aq); do echo "---- $c ----" >&2; docker logs $c >&2; done') + + super().tearDown() + + def getRestartPolicy(self, auth, container_name): + cmd = f"docker inspect --format '{{{{.HostConfig.RestartPolicy}}}}' {container_name}" + return self.execute(auth, cmd).strip() + + def waitNumImages(self, expected): + self.browser.wait_js_func("ph_count_check", "#containers-images table[aria-label='Images'] > tbody", expected) + + def waitNumContainers(self, expected, auth): + if auth and self.machine.ostree_image: + extra = 1 # cockpit/ws + else: + extra = 0 + + self.browser.wait_js_func("ph_count_check", "#containers-containers tbody", expected + extra) + + def performContainerAction(self, container, cmd): + b = self.browser + b.click(f"#containers-containers tbody tr:contains('{container}') .pf-v5-c-menu-toggle") + b.click(f"#containers-containers tbody tr:contains('{container}') button.pf-v5-c-menu__item:contains({cmd})") + + def getContainerAction(self, container, cmd): + return f"#containers-containers tbody tr:contains('{container}') button.pf-v5-c-menu__item:contains({cmd})" + + def toggleExpandedContainer(self, container): + b = self.browser + b.click(f"#containers-containers tbody tr:contains('{container}') .pf-v5-c-table__toggle button") + + def getContainerAttr(self, container, key, selector=""): + b = self.browser + return b.text(f"#containers-containers tbody tr:contains('{container}') > td[data-label={key}] {selector}") + + def execute(self, system, cmd): + if system: + return self.machine.execute(cmd) + else: + return self.admin_s.execute(cmd) + + def login(self, system=True): + # HACK: The first rootless call often gets stuck or fails + # In such case we have alert banner to start the service (or just empty state) + # A real user would just hit the button so lets do the same as this is always getting + # back to us and we waste too much time reporting to docker with mixed results. + # Examples: + # https://github.com/containers/docker/issues/8762 + # https://github.com/containers/docker/issues/9251 + # https://github.com/containers/docker/issues/6660 + + b = self.browser + + self.login_and_go("/docker", superuser=system) + b.wait_visible("#app") + + with self.browser.wait_timeout(30): + try: + b.wait_not_in_text("#containers-containers", "Loading") + b.wait_not_present("#overview div.pf-v5-c-alert") + except testlib.Error: + if system: + b.click("#overview div.pf-v5-c-alert .pf-v5-c-alert__action > button:contains(Start)") + b.wait_not_present("#overview div.pf-v5-c-alert") + else: + b.click("#app .pf-v5-c-empty-state button.pf-m-primary") + b.wait_not_present("#app .pf-v5-c-empty-state button") + + def waitPodRow(self, podName, present=False): + if present: + self.browser.wait_visible("#table-" + podName) + else: + self.browser.wait_not_present("#table-" + podName) + + def waitPodContainer(self, podName, containerList, system=True): + if len(containerList): + for container in containerList: + self.waitContainer(container["id"], system, name=container["name"], image=container["image"], + cmd=container["command"], state=container["state"], pod=podName) + else: + if self.browser.val("#containers-containers-filter") == "all": + self.browser.wait_in_text("#table-" + podName + " .pf-v5-c-empty-state", "No containers in this pod") + else: + self.browser.wait_in_text("#table-" + podName + " .pf-v5-c-empty-state", + "No running containers in this pod") + + def waitContainerRow(self, container, present=True): + b = self.browser + if present: + b.wait_visible(f'#containers-containers td[data-label="Container"]:contains("{container}")') + else: + b.wait_not_present(f'#containers-containers td[data-label="Container"]:contains("{container}")') + + def performPodAction(self, podName, podOwner, action): + b = self.browser + + b.click(f"#pod-{podName}-{podOwner}-action-toggle") + b.click(f"ul.pf-v5-c-menu__list li > button.pod-action-{action.lower()}") + b.wait_not_present("ul.pf-v5-c-menu__list") + + def getStartTime(self, container: str, *, auth: bool) -> str: + # don't format the raw time strings from the API, force json format + out = self.execute(auth, "docker inspect --format '{{json .State.StartedAt}}' " + container) + return out.strip().replace('"', '') + + def waitRestart(self, container: str, old_start: str, *, auth: bool) -> int: + for _ in range(10): + new_start = self.getStartTime(container, auth=auth) + if new_start > old_start: + return new_start + time.sleep(1) + else: + self.fail("Timed out waiting for StartedAt change") + + # def testPods(self): + # b = self.browser + + # self.login() + + # self.filter_containers("running") + # if not self.machine.ostree_image: + # b.wait_in_text("#containers-containers", "No running containers") + + # # Run a pods as system + # self.machine.execute("docker pod create --infra=false --name pod-1") + + # self.waitPodRow("pod-1", False) + # self.filter_containers("all") + # self.waitPodContainer("pod-1", []) + + # def get_pod_cpu_usage(pod_name): + # cpu = self.browser.text(f"#table-{pod_name}-title .pod-cpu") + # self.assertIn('%', cpu) + # return float(cpu[:-1]) + + # def get_pod_memory(pod_name): + # memory = self.browser.text(f"#table-{pod_name}-title .pod-memory") + # try: + # value, unit = memory.split(' ') + # self.assertIn(unit, ["GB", "MB", "kB", "B"]) + # return float(value) + # except ValueError: + # # no unit → only for 0 or not initialized yet + # self.assertIn(memory, ["0", ""]) + # return 0 + + # run_cmd = f"docker run -d --pod pod-1 --name test-pod-1-system --stop-timeout 0 {IMG_ALPINE} sleep 100" + # containerId = self.machine.execute(run_cmd).strip() + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": "Running", "id": containerId}]) + # cpu = get_pod_cpu_usage("pod-1") + # b.wait(lambda: get_pod_memory("pod-1") > 0) + + # # Test that cpu usage increases + # self.machine.execute("docker exec -di test-pod-1-system sh -c 'dd bs=1024 < /dev/urandom > /dev/null'") + # b.wait(lambda: get_pod_cpu_usage("pod-1") > cpu) + + # self.machine.execute("docker pod stop -t0 pod-1") # disable timeout, so test doesn't wait endlessly + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) + # self.filter_containers("running") + # self.waitPodRow("pod-1", False) + + # self.filter_containers("all") + # b.set_input_text('#containers-filter', 'pod-1') + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) + # b.set_input_text('#containers-filter', 'test-pod-1-system') + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) + # # TODO add pixel test when this is again reachable - https://github.com/cockpit-project/bots/issues/2463 + + # # Check Pod Actions + # self.performPodAction("pod-1", "system", "Start") + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": "Running", "id": containerId}]) + + # self.performPodAction("pod-1", "system", "Pause") + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": "Paused", "id": containerId}]) + + # self.performPodAction("pod-1", "system", "Unpause") + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": "Running", "id": containerId}]) + + # self.performPodAction("pod-1", "system", "Stop") + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) + + # self.machine.execute("docker pod start pod-1") + # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": "Running", "id": containerId}]) + + # old_start = self.getStartTime("test-pod-1-system", auth=True) + # self.performPodAction("pod-1", "system", "Restart") + # self.waitRestart("test-pod-1-system", old_start, auth=True) + + # self.performPodAction("pod-1", "system", "Delete") + # b.click(".pf-v5-c-modal-box button:contains(Delete)") + # # Alert should be shown, that running pods need to be force deleted. + # b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-list", "test-pod-1-system") + # b.click(".pf-v5-c-modal-box button:contains('Force delete')") + # self.waitPodRow("pod-1", False) + + # HACK: there is some race here which steals the focus from the filter input and selects the page text instead + # for _ in range(3): + # b.focus('#containers-filter') + # time.sleep(1) + # if b.eval_js('document.activeElement == document.querySelector("#containers-filter")'): + # break + # b.set_input_text('#containers-filter', '') + # self.machine.execute("podman pod create --infra=false --name pod-2") + # self.waitPodContainer("pod-2", []) + # run_cmd = f"podman run -d --pod pod-2 --name test-pod-2-system --stop-timeout 0 {IMG_ALPINE} sleep 100" + # containerId = self.machine.execute(run_cmd).strip() + # self.waitPodContainer("pod-2", [{"name": "test-pod-2-system", "image": IMG_ALPINE, + # "command": "sleep 100", "state": "Running", "id": containerId}]) + # self.machine.execute("podman rm --force -t0 test-pod-2-system") + # self.waitPodContainer("pod-2", []) + # self.performPodAction("pod-2", "system", "Delete") + # b.wait_not_in_text(".pf-v5-c-modal-box__body", "test-pod-2-system") + # b.click(".pf-v5-c-modal-box button:contains('Delete')") + # self.waitPodRow("pod-2", False) + + # # Volumes / mounts + # self.machine.execute("docker pod create -p 9999:9999 -v /tmp:/app --name pod-3") + # self.machine.execute("docker pod start pod-3") + + # self.waitPodContainer("pod-3", []) + # # Verify 1 port mapping + # b.wait_in_text("#table-pod-3-title .pod-details-ports-btn", "1") + # b.click("#table-pod-3-title .pod-details-ports-btn") + # b.wait_in_text(".pf-v5-c-popover__content", "0.0.0.0:9999 → 9999/tcp") + # # Verify 1 mount + # b.wait_in_text("#table-pod-3-title .pod-details-volumes-btn", "1") + # b.click("#table-pod-3-title .pod-details-volumes-btn") + # b.wait_in_text(".pf-v5-c-popover__content", "/tmp ↔ /app") + + def testBasicSystem(self): + self._testBasic(True) + + b = self.browser + + # Test dropping and gaining privileges + b.set_val("#containers-containers-owner", "all") + self.filter_containers("all") + self.execute(False, "docker pod create --infra=false --name pod_user") + self.execute(True, "docker pod create --infra=false --name pod_system") + + checkImage(b, IMG_REGISTRY, "system") + checkImage(b, IMG_REGISTRY, "admin") + b.wait_visible("#containers-containers .pod-name:contains('pod_user')") + b.wait_visible("#containers-containers .pod-name:contains('pod_system')") + b.wait_visible("#containers-containers .container-name:contains('a')") + b.wait_visible("#containers-containers .container-name:contains('b')") + + # Drop privileges - all system things should disappear + b.drop_superuser() + b.wait_not_present("#containers-containers .pod-name:contains('pod_system')") + b.wait_not_present("#containers-containers .container-name:contains('a')") + b.wait_visible("#containers-containers .pod-name:contains('pod_user')") + b.wait_visible("#containers-containers .container-name:contains('b')") + # Checking images is harder but if there would be more than one this would fail + b.wait_visible(f"#containers-images:contains('{IMG_REGISTRY}')") + + # Owner select should disappear + b.wait_not_present("#containers-containers-owner") + + # Also user selection in image download should not be visible + b.click("#image-actions-dropdown") + b.click("button:contains(Download new image)") + + b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') + b.wait_visible("div.pf-v5-c-modal-box footer button:contains(Download):disabled") + b.wait_not_present("#as-user") + b.click(".pf-v5-c-modal-box button:contains('Cancel')") + b.wait_not_present('div.pf-v5-c-modal-box header:contains("Search for an image")') + + # Gain privileges + b.become_superuser(passwordless=self.machine.image == "rhel4edge") + + # We are notified that we can also start the system one + b.wait_in_text("#overview div.pf-v5-c-alert .pf-v5-c-alert__title", "Docker service is available") + b.click("#overview div.pf-v5-c-alert .pf-v5-c-alert__action > button:contains(Start)") + b.wait_not_present("#overview div.pf-v5-c-alert .pf-v5-c-alert__title") + + checkImage(b, IMG_REGISTRY, "system") + checkImage(b, IMG_REGISTRY, "admin") + b.wait_visible("#containers-containers .pod-name:contains('pod_user')") + b.wait_visible("#containers-containers .pod-name:contains('pod_system')") + b.wait_visible("#containers-containers .container-name:contains('a')") + b.wait_visible("#containers-containers .container-name:contains('b')") + + # Owner select should appear + b.wait_visible("#containers-containers-owner") + + # Also user selection in image download should be visible + b.click("#image-actions-dropdown") + b.click("button:contains(Download new image)") + b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') + b.wait_visible("div.pf-v5-c-modal-box footer button:contains(Download):disabled") + b.wait_visible("#as-user") + b.click(".pf-v5-c-modal-box button:contains('Cancel')") + b.wait_not_present('div.pf-v5-c-modal-box header:contains("Search for an image")') + + # Check that when we filter only system stuff an then drop privileges that we show user stuff + b.set_val("#containers-containers-owner", "system") + b.wait_not_present("#containers-containers .pod-name:contains('pod_user')") + b.wait_not_present("#containers-containers .container-name:contains('b')") + # Checking images is harder but if there would be more than one this would fail + b.wait_visible(f"#containers-images:contains('{IMG_REGISTRY}')") + + b.drop_superuser() + b.wait_visible("#containers-containers .pod-name:contains('pod_user')") + b.wait_visible("#containers-containers .container-name:contains('b')") + # Checking images is harder but if there would be more than one this would fail + b.wait_visible(f"#containers-images:contains('{IMG_REGISTRY}')") + + # Check showing of entrypoint + b.click("#containers-containers-create-container-btn") + b.click("#create-image-image-select-typeahead") + b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_REGISTRY}")') + b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yml') + b.wait_text("#run-image-dialog-entrypoint", '/entrypoint.sh') + + # Deleting image will cleanup both command and entrypoint + b.click("button.pf-v5-c-select__toggle-clear") + b.wait_val("#run-image-dialog-command", '') + b.wait_not_present("#run-image-dialog-entrypoint") + + # Edited command will not be cleared + b.click("#create-image-image-select-typeahead") + b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_REGISTRY}")') + b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yml') + b.set_input_text("#run-image-dialog-command", '/etc/docker/registry/config.yaml') + b.click("button.pf-v5-c-select__toggle-clear") + b.wait_not_present("#run-image-dialog-entrypoint") + b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yaml') + + # Setting a new image will still keep the old command and not prefill it + b.click("#create-image-image-select-typeahead") + b.click(f'button.pf-v5-c-select__menu-item:contains({IMG_ALPINE})') + b.wait_visible("#run-image-dialog-pull-latest-image") + b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yaml') + + b.logout() + + if self.machine.ostree_image: + self.machine.execute("echo foobar | passwd --stdin root") + self.write_file("/etc/ssh/sshd_config.d/99-root-password.conf", "PermitRootLogin yes", + post_restore_action="systemctl try-restart sshd") + self.machine.execute("systemctl try-restart sshd") + + # Test that when root is logged in we don't present "user" and "system" + self.login_and_go("/docker", user="root", enable_root_login=True) + b.wait_visible("#app") + + # `User Service is also available` banner should not be present + b.wait_not_present("#overview div.pf-v5-c-alert") + # There should not be any duplicate images listed + # The "busybox" and "alpine" images have been deleted by _testBasic. + showImages(b) + self.waitNumImages(self.system_images_count - 2) + # There should not be 'owner' selector + b.wait_not_present("#containers-containers-owner") + + # Test the isSystem boolean for searching + # https://github.com/cockpit-project/cockpit-podman/pull/891 + b.click("#containers-containers-create-container-btn") + b.set_input_text("#create-image-image-select-typeahead", "registry") + b.wait_visible('button.pf-v5-c-select__menu-item:contains("registry")') + + def testBasicUser(self): + self._testBasic(False) + + def _testBasic(self, auth): + b = self.browser + + def clickDeleteImage(image_sel): + b.click(f'{image_sel} .pf-v5-c-menu-toggle') + b.click(image_sel + " button.btn-delete") + + if not auth: + self.allow_browser_errors("Failed to start system docker.socket.*") + + expected_ws = "" + if auth and self.machine.ostree_image: + expected_ws += "ws" + + self.login(auth) + + # Check all containers + if auth: + checkImage(b, IMG_ALPINE, "system") + checkImage(b, IMG_BUSYBOX, "system") + checkImage(b, IMG_REGISTRY, "system") + + checkImage(b, IMG_ALPINE, "admin") + checkImage(b, IMG_BUSYBOX, "admin") + checkImage(b, IMG_REGISTRY, "admin") + + # Check order of images + text = b.text("#containers-images table") + if auth: + # all user images before all system images + self.assertRegex(text, ".*admin.*system.*") + self.assertNotRegex(text, ".*system.*admin.*") + else: + self.assertNotIn("system", text) + # images are sorted alphabetically + self.assertRegex(text, ".*/test-alpine.*/test-busybox.*/test-registry") + + # build a dummy image so that the timestamp is "today" (for predictable pixel tests) + # ensure that CMD neither comes first (docker rmi leaves that layer otherwise) + # nor last (then the topmost layer does not match the image ID) + IMG_HELLO_LATEST = "localhost/test-hello:latest" + self.machine.execute(f"""set -eu; D={self.vm_tmpdir}/hello; + mkdir $D + printf 'FROM scratch\\nCOPY test.txt /\\nCMD ["/run.sh"]\\nCOPY test.txt /test2.txt\\n' > $D/Containerfile + echo hello > $D/test.txt""") + self.execute(auth, f"docker build -t {IMG_HELLO_LATEST} {self.vm_tmpdir}/hello") + + # prepare image ids - much easier to pick a specific container + images = {} + for image in self.execute(auth, "docker images --noheading --no-trunc").strip().split("\n"): + # sha256: + items = image.split() + images[f"{items[0]}:{items[1]}"] = items[2].split(":")[-1] + + # show image listing toggle + hello_sel = f"#containers-images tbody tr[data-row-id=\"{images[IMG_HELLO_LATEST]}{auth}\"]".lower() + b.wait_visible(hello_sel) + b.click(hello_sel + " td.pf-v5-c-table__toggle button") + b.click(hello_sel + " .pf-v5-c-menu-toggle") + b.wait_visible(hello_sel + " button.btn-delete") + b.wait_in_text("#containers-images tbody.pf-m-expanded tr .image-details:first-child", "Command/run.sh") + # Show history + b.click("#containers-images tbody.pf-m-expanded .pf-v5-c-tabs__list li:nth-child(2) button") + first_row_sel = "#containers-images .pf-v5-c-table__expandable-row.pf-m-expanded tbody:first-of-type" + b.wait_in_text(f"{first_row_sel} td[data-label=\"ID\"]", + images[IMG_HELLO_LATEST][:12]) + created_sel = f"{first_row_sel} td[data-label=\"Created\"]" + b.wait_in_text(f"{created_sel}", "today at") + # topmost (last) layer + created_sel = f"{first_row_sel} td[data-label=\"Created by\"]" + b.wait_in_text(f"{created_sel}", "COPY") + b.wait_in_text(f"{created_sel}", "in /test2.txt") + # initial (first) layer + last_row_sel = "#containers-images .pf-v5-c-table__expandable-row.pf-m-expanded tbody:last-of-type" + b.wait_in_text(f"{last_row_sel} td[data-label=\"Created by\"]", "COPY") + + self.execute(auth, f"docker rmi {IMG_HELLO_LATEST}") + b.wait_not_present(hello_sel) + + # make sure no running containers shown; on CoreOS there's the cockpit/ws container + self.filter_containers('running') + if auth and self.machine.ostree_image: + self.waitContainerRow("ws") + else: + b.wait_in_text("#containers-containers", "No running containers") + + if auth: + # Run two containers as system (first exits immediately) + self.execute(auth, f"docker run -d --name test-sh-system --stop-timeout 0 {IMG_ALPINE} sh") + self.execute(auth, f"docker run -d --name swamped-crate-system --stop-timeout 0 {IMG_BUSYBOX} sleep 1000") + + # Test owner filtering + if auth: + self.waitNumImages(self.user_images_count + self.system_images_count) + self.waitNumContainers(2, True) + + def verify_system(): + self.waitNumImages(self.system_images_count) + b.wait_in_text("#containers-images", "system") + self.waitNumContainers(1, True) + b.wait_in_text("#containers-containers", "system") + + b.set_val("#containers-containers-owner", "system") + verify_system() + b.set_val("#containers-containers-owner", "all") + b.go("#/?owner=system") + verify_system() + + def verify_user(): + self.waitNumImages(self.user_images_count) + b.wait_in_text("#containers-images", "admin") + self.waitNumContainers(1, False) + b.wait_in_text("#containers-containers", "admin") + + b.set_val("#containers-containers-owner", "user") + verify_user() + b.set_val("#containers-containers-owner", "all") + b.go("#/?owner=user") + verify_user() + + b.set_val("#containers-containers-owner", "all") + self.waitNumImages(self.user_images_count + self.system_images_count) + self.waitNumContainers(2, True) + else: # No 'owner' selector when not privileged + b.wait_not_present("#containers-containers-owner") + + system_containers = {} + for container in self.execute(True, "docker ps --all --no-trunc").strip().split("\n")[1:]: + # + items = container.split() + system_containers[items[-1]] = items[0] + # running busybox shown + if auth: + self.waitContainerRow("swamped-crate-system") + self.waitContainer(system_containers["swamped-crate-system"], True, name='swamped-crate-system', + image=IMG_BUSYBOX, cmd="sleep 1000", state='Running') + + # exited alpine not shown + b.wait_not_in_text("#containers-containers", "alpine") + + # show all containers and check status + b.go("#/?container=all") + + # exited alpine under everything list + b.wait_visible("#containers-containers") + if auth: + self.waitContainer(system_containers["test-sh-system"], True, name='test-sh-system', image=IMG_ALPINE, + cmd='sh', state=NOT_RUNNING) + + if auth: + self.performContainerAction("swamped-crate-system", "Delete") + self.confirm_modal("Cancel") + + # Checked order of containers + expected = ["swamped-crate-user"] + if auth: + expected.extend(["swamped-crate-system", "test-sh-system"]) + expected.extend([expected_ws]) + b.wait_collected_text("#containers-containers .container-name", ''.join(sorted(expected))) + + # show running container + self.filter_containers('running') + if auth: + self.waitContainer(system_containers["swamped-crate-system"], True, name='swamped-crate-system', + image=IMG_BUSYBOX, cmd="sleep 1000", state='Running') + # check exited alpine not in running list + b.wait_not_in_text("#containers-containers", "alpine") + + # delete running container busybox using force delete + if auth: + self.performContainerAction("swamped-crate-system", "Delete") + self.confirm_modal("Force delete") + self.waitContainerRow("swamped-crate-system", False) + + self.filter_containers("all") + + if auth: + self.waitContainerRow("test-sh-system") + self.performContainerAction("test-sh-system", "Delete") + self.confirm_modal("Delete") + b.wait_not_in_text("#containers-containers", "test-sh-system") + + # delete image busybox that hasn't been used + # First try to just untag and then remove with more tags + self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:1") + self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:2") + self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:3") + self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:4") + + busybox_sel = f"#containers-images tbody tr[data-row-id=\"{images[IMG_BUSYBOX_LATEST]}{auth}\"]".lower() + b.click(busybox_sel + " td.pf-v5-c-table__toggle button") + + b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:1") + b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:2") + b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:3") + b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:4") + + clickDeleteImage(busybox_sel) + self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX_LATEST}']")) + b.set_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:1']", True) + b.set_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:3']", True) + b.set_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX_LATEST}']", False) + self.confirm_modal("Delete") + b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX_LATEST}") + b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:2") + b.wait_not_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:1") + b.wait_not_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:3") + + clickDeleteImage(busybox_sel) + b.click("#delete-all") + self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX_LATEST}']")) + self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:2']")) + self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:4']")) + self.confirm_modal("Delete") + self.confirm_modal("Force delete") + b.wait_not_present(busybox_sel) + + # Check that we correctly show networking information + # Rootless don't have this info + if auth: + self.execute(auth, f"docker run -dt --name net_check --stop-timeout 0 {IMG_ALPINE}") + self.toggleExpandedContainer("net_check") + b.wait_in_text(".pf-m-expanded .container-details-networking", + self.execute(auth, """ + docker inspect --format '{{.NetworkSettings.Gateway}}' net_check""").strip()) + b.wait_in_text(".pf-m-expanded .container-details-networking", + self.execute(auth, """ + docker inspect --format '{{.NetworkSettings.IPAddress}}' net_check""").strip()) + b.wait_in_text(".pf-m-expanded .container-details-networking", + self.execute(auth, """ + docker inspect --format '{{.NetworkSettings.MacAddress}}' net_check""").strip()) + self.execute(auth, "docker stop net_check") + b.wait(lambda: self.execute(True, "docker ps --all | grep -e net_check -e Exited")) + self.toggleExpandedContainer("net_check") + sha = self.execute(auth, "docker inspect --format '{{.Id}}' net_check").strip() + self.waitContainer(sha, auth, state='Exited') + + # delete image alpine that has been used by a container + self.execute(auth, f"docker run -d --name test-sh4 --stop-timeout 0 {IMG_ALPINE} sh") + # our pixel test expects both containers to be in state "Exited" + sha = self.execute(auth, "docker inspect --format '{{.Id}}' test-sh4").strip() + self.waitContainer(sha, auth, name="test-sh4", state='Exited') + if auth: + b.assert_pixels('#app', "overview", ignore=[".ignore-pixels"], skip_layouts=["rtl", "mobile"]) + alpine_sel = f"#containers-images tbody tr[data-row-id=\"{images[IMG_ALPINE_LATEST]}{auth}\"]".lower() + b.wait_visible(alpine_sel) + b.click(alpine_sel + " td.pf-v5-c-table__toggle button") + clickDeleteImage(alpine_sel) + self.confirm_modal("Delete") + self.confirm_modal("Force delete") + b.wait_not_present(alpine_sel) + + b.wait_collected_text("#containers-containers .container-name", expected_ws) + self.execute(auth, f"docker run -d --name c --stop-timeout 0 {IMG_REGISTRY} sh") + b.wait_collected_text("#containers-containers .container-name", "c" + expected_ws) + self.execute(auth, f"docker run -d --name a --stop-timeout 0 {IMG_REGISTRY} sh") + b.wait_collected_text("#containers-containers .container-name", "ac" + expected_ws) + + self.execute(False, f"docker run -d --name b --stop-timeout 0 {IMG_REGISTRY} sh") + if auth: + b.wait_collected_text("#containers-containers .container-name", "abc" + expected_ws) + self.execute(False, f"docker run -d --name doremi --stop-timeout 0 {IMG_REGISTRY} sh") + b.wait_collected_text("#containers-containers .container-name", "abcdoremi" + expected_ws) + b.wait(lambda: self.getContainerAttr("doremi", "State") in NOT_RUNNING) + else: + b.wait_collected_text("#containers-containers .container-name", "abc") + + # Test intermediate images + b.wait_not_present(".listing-action") + tmpdir = self.execute(auth, "mktemp -d").strip() + self.execute(auth, f"echo 'FROM {IMG_REGISTRY}\nRUN ls' > {tmpdir}/Dockerfile") + self.execute(auth, f"docker build {tmpdir}") + + b.wait_not_in_text("#containers-images", ":") + b.click(".listing-action button:contains('Show intermediate images')") + b.wait_in_text("#containers-images", ":") + b.wait_in_text("#containers-images tbody:last-child td[data-label=Created]", "today at") + + b.click(".listing-action button:contains('Hide intermediate images')") + b.wait_not_in_text("#containers-images", ":") + + # Intermediate images are not shown in create container dialog + b.click("#containers-containers-create-container-btn") + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + b.click("#create-image-image-select-typeahead") + b.wait_visible(f".pf-v5-c-select__menu-item:contains('{IMG_REGISTRY}')") + b.wait_not_present(".pf-v5-c-select__menu-item:contains('none')") + b.click(".pf-v5-c-modal-box .btn-cancel") + b.wait_not_present(".pf-v5-c-modal-box") + + # Delete intermediate images + intermediate_image_sel = "#containers-images tbody:last-child:contains(':')" + b.click(".listing-action button:contains('Show intermediate images')") + clickDeleteImage(intermediate_image_sel) + self.confirm_modal("Delete") + b.wait_not_present(intermediate_image_sel) + + # Create intermediate image and use it in a container + tmpdir = self.execute(auth, "mktemp -d").strip() + self.execute(auth, f"echo 'FROM {IMG_REGISTRY}\nRUN ls' > {tmpdir}/Dockerfile") + IMG_INTERMEDIATE = 'localhost/test-intermediate' + self.execute(auth, f"docker build -t {IMG_INTERMEDIATE} {tmpdir}") + b.click(f'#containers-images tbody tr:contains("{IMG_INTERMEDIATE}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + b.click("#create-image-create-btn") + b.wait_not_present("div.pf-v5-c-modal-box") + self.waitContainerRow(IMG_INTERMEDIATE) + + # Integration tab should not crash with an intermediate image + self.toggleExpandedContainer(IMG_INTERMEDIATE) + b.click(".pf-m-expanded button:contains('Integration')") + + # Delete intermediate image which is in use + self.execute(auth, f"docker untag {IMG_INTERMEDIATE}") + clickDeleteImage(intermediate_image_sel) + self.confirm_modal("Delete") + self.confirm_modal("Force delete") + b.wait_not_in_text("#containers-images", ":") + b.wait_not_in_text("#containers-containers", IMG_INTERMEDIATE) + + def testCommitUser(self): + self._testCommit(False) + + def testCommitSystem(self): + self._testCommit(True) + + def _testCommit(self, auth): + b = self.browser + self.allow_browser_errors("Failed to commit container .* repository name must be lowercase") + + self.login(auth) + + # run a container (will exit immediately) and test the display of commit modal + self.execute(auth, f"docker run -d --name test-sh0 --stop-timeout 0 {IMG_ALPINE} sh -c 'ls -a'") + + self.filter_containers("all") + self.waitContainerRow("test-sh0") + self.toggleExpandedContainer("test-sh0") + + self.performContainerAction("test-sh0", "Commit") + b.wait_visible(".pf-v5-c-modal-box") + + b.wait_in_text(".pf-v5-c-modal-box__description", "state of the test-sh0 container") + + # Empty name yields warning + b.click("button:contains(Commit)") + b.wait_text("#commit-dialog-image-name-helper", "Image name is required") + b.wait_visible("button:contains(Commit):disabled") + b.wait_visible("button:contains('Force commit')") + # Warning should be cleaned when updating name + b.set_input_text("#commit-dialog-image-name", "foobar") + b.wait_not_present("button:contains('Force commit')") + b.wait_not_present("#commit-dialog-image-name-helper") + + # Existing name yields warning + b.set_input_text("#commit-dialog-image-name", IMG_ALPINE) + b.click("button:contains(Commit)") + b.wait_text("#commit-dialog-image-name-helper", "Image name is not unique") + b.wait_visible("button:contains(Commit):disabled") + b.wait_visible("button:contains('Force commit')") + # Warning should be cleaned when updating tag + b.set_input_text("#commit-dialog-image-tag", "foobar") + b.wait_not_present("button:contains('Force commit')") + b.wait_not_present("#commit-dialog-image-name-helper") + + # Check failing commit + b.set_input_text("#commit-dialog-image-name", "TEST") + b.click("button:contains(Commit)") + b.wait_in_text(".pf-v5-c-alert", "Failed to commit container test-sh0") + b.wait_in_text(".pf-v5-c-alert", "repository name must be lowercase") + + # Test cancel + self.confirm_modal("Cancel") + + # Force commit empty container + self.performContainerAction("test-sh0", "Commit") + b.wait_visible(".pf-v5-c-modal-box") + # We prefill command + b.wait_val("#commit-dialog-command", 'sh -c "ls -a"') + # Test docker format + b.set_checked("#commit-dialog-docker", True) + b.click("button:contains(Commit)") + self.confirm_modal("Force commit") + + # don't use waitNumImages() here, as we want to include anonymous images + def waitImageCount(expected): + if auth: + expected += self.system_images_count + + b.wait_in_text("#containers-images", f"{expected} images") + + waitImageCount(self.user_images_count + 1) + image_id = self.execute(auth, "docker images --sort created --format '{{.Id}}' | head -n 1").strip() + manifest_type = self.execute(auth, "docker inspect --format '{{.ManifestType}}' " + image_id).strip() + cmd = self.execute(auth, "docker inspect --format '{{.Config.Cmd}}' " + image_id).strip() + self.assertIn("docker.distribution.manifest", manifest_type) + self.assertEqual("[sh -c ls -a]", cmd) + + # Commit with name, tag, author and edited command + self.performContainerAction("test-sh0", "Commit") + b.wait_visible(".pf-v5-c-modal-box") + b.set_input_text("#commit-dialog-image-name", "newname") + b.set_input_text("#commit-dialog-image-tag", "24") + b.set_input_text("#commit-dialog-author", "MM") + b.set_input_text("#commit-dialog-command", "sh -c 'ps'") + + if auth: + b.assert_pixels(".pf-v5-c-modal-box", "commit", skip_layouts=["rtl"]) + + self.confirm_modal("Commit") + + waitImageCount(self.user_images_count + 2) + self.assertEqual(self.execute(auth, "docker inspect --format '{{.Author}}' newname:24").strip(), "MM") + self.assertEqual(self.execute(auth, "docker inspect --format '{{.Config.Cmd}}' newname:24").strip(), + "[sh -c ps]") + self.assertIn("vnd.oci.image.manifest", + self.execute(auth, "docker inspect --format '{{.ManifestType}}' newname:24").strip()) + + # Test commit of running container + self.execute(auth, f"docker run -d --name test-sh2 --stop-timeout 0 {IMG_BUSYBOX} sleep 1000") + self.performContainerAction("test-sh2", "Commit") + b.wait_visible(".pf-v5-c-modal-box") + b.set_input_text("#commit-dialog-image-name", "newname") + self.confirm_modal("Commit") + waitImageCount(self.user_images_count + 3) + self.assertEqual(self.execute(auth, + "docker inspect --format '{{.Config.Cmd}}' newname:latest").strip(), + "[sleep 1000]") + + # Test commit of running container with pause (also conflicting name through :latest) + # This only works on rootless with cgroupsv2 + if auth or self.has_cgroupsV2: + self.performContainerAction("test-sh2", "Commit") + b.wait_visible(".pf-v5-c-modal-box") + b.set_input_text("#commit-dialog-image-name", "newname") + b.set_checked("#commit-dialog-pause", True) + b.click("button:contains(Commit)") + self.confirm_modal("Force commit") + waitImageCount(self.user_images_count + 4) + + def testDownloadImage(self): + b = self.browser + execute = self.execute + + def prepare(): + # Create and start registry containers + self.execute(True, f"docker run -d -p 5000:5000 --name registry --stop-timeout 0 {IMG_REGISTRY}") + self.execute(True, f"docker run -d -p 6000:5000 --name registry_alt --stop-timeout 0 {IMG_REGISTRY}") + # Add local insecure registry into registries conf + self.machine.write("/etc/containers/registries.conf", REGISTRIES_CONF) + self.execute(True, "systemctl stop docker.service") + # Push busybox image to the local registries + self.execute(True, + f"docker tag {IMG_BUSYBOX} localhost:5000/my-busybox; docker push localhost:5000/my-busybox") + self.execute(True, + f"docker tag {IMG_BUSYBOX} localhost:6000/my-busybox; docker push localhost:6000/my-busybox") + # Untag busybox image which duplicates the image we are about to download + self.execute(True, f"docker rmi -f {IMG_BUSYBOX} localhost:5000/my-busybox localhost:6000/my-busybox") + self.execute(False, f"docker rmi -f {IMG_BUSYBOX}") + + class DownloadImageDialog(): + def __init__(self, test_obj, imageName, imageTag=None, user="system"): + self.imageName = imageName + self.imageTag = imageTag + self.user = user + self.imageSha = "" + self.assertTrue = test_obj.assertTrue + + def openDialog(self): + # Open get new image modal + b.click("#image-actions-dropdown") + b.click("button:contains(Download new image)") + b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') + b.wait_visible("div.pf-v5-c-modal-box footer button:contains(Download):disabled") + + return self + + def fillDialog(self): + # Search for image specified with self.imageName and self.imageTag + b.click(f"#{self.user}") + b.set_val('#registry-select', "localhost:5000") + # HACK: Sometimes the value is not shown fully. FIXME + b.set_input_text("#search-image-dialog-name", self.imageName, value_check=False) + if self.imageTag: + b.set_input_text(".image-tag-entry input", self.imageTag) + + return self + + def selectImageAndDownload(self): + # Select and download the self.imageName image + b.click(f".pf-v5-c-data-list .image-name:contains({self.imageName})") + b.click("div.pf-v5-c-modal-box footer button:contains(Download)") + b.wait_not_present("div.pf-v5-c-modal-box") + + return self + + def expectDownloadErrorForNonExistingTag(self): + title = f"Danger alert:Failed to download image localhost:5000/{self.imageName}:{self.imageTag}" + b.wait_visible(f'h4.pf-v5-c-alert__title:contains("{title}")') + + return self + + def expectSearchErrorForNotExistingImage(self): + b.wait_visible(f".pf-v5-c-modal-box__body:contains(No results for {self.imageName})") + b.click(".pf-v5-c-modal-box button.btn-cancel") + b.wait_not_present(".pf-v5-c-modal-box__body") + + return self + + def expectDownloadSuccess(self): + # Confirm that the modal dialog is not open anymore + b.wait_not_present('div.pf-v5-c-modal-box') + # Confirm that the image got downloaded + checkImage(b, + f"localhost:5000/{self.imageName}:{self.imageTag or 'latest'}", + "system" if self.user == "system" else "admin") + + # Confirm that no error has happened + b.wait_not_present('h4.pf-v5-c-alert__title:contains("Failed to download image")') + + # Find out this image ID + container_name = f"localhost:5000/{self.imageName}:{self.imageTag or 'latest'}" + self.imageSha = execute(self.user == "system", + f"docker inspect --format '{{{{.Id}}}}' {container_name}").strip() + + return self + + def deleteImage(self, force=False, another=None): + imageTagSuffix = ":" + (self.imageTag or 'latest') + + # Select the image row + + # show image listing toggle + imageId = f"{self.imageSha}{'true' if self.user == 'system' else 'false'}" + sel = f"#containers-images tbody tr[data-row-id=\"{imageId}\"]" + b.wait_visible(sel) + b.click(sel + " td.pf-v5-c-table__toggle button") + + # Click the delete icon on the image row + b.click(sel + " .pf-v5-c-menu-toggle") + b.click(sel + ' button.btn-delete') + + if another: + b.click("#delete-all") + sel = f".pf-v5-c-check__input[aria-label='localhost:5000/{self.imageName}{imageTagSuffix}']" + self.assertTrue(b.get_checked(sel)) + self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{another}']")) + b.click("#delete-all") + b.wait_visible("#btn-img-delete:disabled") + + b.set_checked( + f".pf-v5-c-check__input[aria-label='localhost:5000/{self.imageName}{imageTagSuffix}']", True) + b.set_checked(f".pf-v5-c-check__input[aria-label='{another}']", True) + + # Confirm deletion in the delete dialog + b.click(".pf-v5-c-modal-box #btn-img-delete") + + if force: + # Confirm force delete + b.click(".pf-v5-c-modal-box button:contains('Force delete')") + + b.wait_not_present(sel) + + return self + + prepare() + + self.login() + + # Test registries + b.click("#image-actions-dropdown") + b.click("button:contains(Download new image)") + b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') + # HACK: Sometimes the value is not shown fully. FIXME + b.set_input_text("#search-image-dialog-name", "my-busybox", value_check=False) + + b.wait_visible(".pf-v5-c-data-list .image-name:contains('localhost:5000/my-busybox')") + b.wait_visible(".pf-v5-c-data-list .image-name:contains('localhost:6000/my-busybox')") + b.assert_pixels(".docker-search", "download", skip_layouts=["rtl"]) + + b.set_val('#registry-select', "localhost:6000") + b.wait_not_present(".pf-v5-c-data-list .image-name:contains('localhost:5000/my-busybox')") + b.wait_visible(".pf-v5-c-data-list .image-name:contains('localhost:6000/my-busybox')") + b.click(".pf-v5-c-modal-box button:contains('Cancel')") + b.wait_not_present('div.pf-v5-c-modal-box') + + dialog0 = DownloadImageDialog(self, imageName='my-busybox', user="system") + dialog0.openDialog() \ + .fillDialog() \ + .selectImageAndDownload() \ + .expectDownloadSuccess() + dialog0.deleteImage() + + dialog1 = DownloadImageDialog(self, imageName='my-busybox', user="user") + dialog1.openDialog() \ + .fillDialog() \ + .selectImageAndDownload() \ + .expectDownloadSuccess() + # test recognition/deletion of multiple image tags + second_tag = "localhost/copybox:latest" + self.execute(False, f"docker tag localhost:5000/my-busybox {second_tag}") + # expand details + b.click("#containers-images tr:contains('my-busybox') td.pf-v5-c-table__toggle button") + b.wait_in_text("#containers-images tbody.pf-m-expanded tr .image-details", second_tag) + dialog1.deleteImage(True, another=second_tag) + + dialog = DownloadImageDialog(self, imageName='my-busybox', imageTag='latest', user="system") + dialog.openDialog() \ + .fillDialog() \ + .selectImageAndDownload() \ + .expectDownloadSuccess() \ + .deleteImage() + + dialog = DownloadImageDialog(self, imageName='foobar') + dialog.openDialog() \ + .fillDialog() \ + .expectSearchErrorForNotExistingImage() + + dialog = DownloadImageDialog(self, imageName='my-busybox', imageTag='foobar') + dialog.openDialog() \ + .fillDialog() \ + .selectImageAndDownload() \ + .expectDownloadErrorForNonExistingTag() + + def testLifecycleOperationsUser(self): + self._testLifecycleOperations(False) + + def testLifecycleOperationsSystem(self): + self._testLifecycleOperations(True) + + def _testLifecycleOperations(self, auth): + b = self.browser + + if not auth: + self.allow_browser_errors("Failed to start system docker.socket.*") + + self.login() + self.filter_containers('all') + + # run a container + self.execute(auth, f""" + docker run -d --name swamped-crate --stop-timeout 0 {IMG_BUSYBOX} sh -c 'echo 123; sleep infinity'; + docker stop swamped-crate""") + b.wait(lambda: self.execute(auth, "docker ps --all | grep -e swamped-crate -e Exited")) + + b.wait_visible("#containers-containers") + container_sha = self.execute(auth, "docker inspect --format '{{.Id}}' swamped-crate").strip() + self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX, + state='Exited', owner="system" if auth else "admin") + b.click("#containers-containers tbody tr:contains('swamped-crate') .pf-v5-c-menu-toggle") + + if not auth: + # Checkpoint/restore is not supported on user containers yet - the related buttons should not be shown + # Check that the restore option is not present + b.wait_not_present(self.getContainerAction('swamped-crate', 'Restore')) + + # Health check is not set up + b.wait_not_present(self.getContainerAction('swamped-crate', 'Run health check')) + + b.click("#containers-containers tbody tr:contains('swamped-crate') .pf-v5-c-menu-toggle") + + # Start the container + self.performContainerAction(IMG_BUSYBOX, "Start") + + self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX, + state='Running', owner="system" if auth else "admin") + + def get_cpu_usage(sel): + cpu = self.getContainerAttr(sel, "CPU") + self.assertIn('%', cpu) + # If it not a number it will raise ValueError which is what we want to know + return float(cpu[:-1]) + + # Check we show usage + b.wait(lambda: self.getContainerAttr(IMG_BUSYBOX, "CPU") != "") + b.wait(lambda: self.getContainerAttr(IMG_BUSYBOX, "Memory") != "") + memory = self.getContainerAttr(IMG_BUSYBOX, "Memory") + if auth or self.has_cgroupsV2: + cpu = get_cpu_usage(IMG_BUSYBOX) + + self.assertIn('/', memory) + numbers = memory.split('/') + self.assertTrue(numbers[0].strip().replace('.', '', 1).isdigit()) + full = numbers[1].strip().split() + self.assertTrue(full[0].replace('.', '', 1).isdigit()) + self.assertIn(full[1], ["GB", "MB"]) + + # Test that the value is updated dynamically + self.execute(auth, "docker exec -i swamped-crate sh -c 'dd bs=1024 < /dev/urandom > /dev/null &'") + b.wait(lambda: get_cpu_usage(IMG_BUSYBOX) > cpu) + self.execute(auth, "docker exec swamped-crate sh -c 'pkill dd'") + else: + # No support for CGroupsV2 + self.assertEqual(self.getContainerAttr(IMG_BUSYBOX, "CPU"), "n/a") + self.assertEqual(memory, "n/a") + + # Restart the container; there is no steady state change in the visible UI, so look for + # a changed data-started-at attribute + old_start = self.getStartTime("swamped-crate", auth=auth) + b.wait_in_text(f'#containers-containers tr[data-started-at="{old_start}"]', "swamped-crate") + self.performContainerAction(IMG_BUSYBOX, "Force restart") + new_start = self.waitRestart("swamped-crate", old_start, auth=auth) + b.wait_in_text(f'#containers-containers tr[data-started-at="{new_start}"]', "swamped-crate") + self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX, state='Running') + + self.waitContainerRow(IMG_BUSYBOX) + if not auth: + # Check that the checkpoint option is not present for rootless + b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") + b.wait_visible(self.getContainerAction(IMG_BUSYBOX, 'Force stop')) + b.wait_not_present(self.getContainerAction(IMG_BUSYBOX, 'Checkpoint')) + b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") + # Stop the container + self.performContainerAction(IMG_BUSYBOX, "Force stop") + + self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX) + b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING) + b.wait(lambda: self.getContainerAttr("swamped-crate", "CPU") == "") + b.wait(lambda: self.getContainerAttr("swamped-crate", "Memory") == "") + + # Check that container details are not lost when the container is stopped + self.toggleExpandedContainer("swamped-crate") + b.click(".pf-m-expanded button:contains('Integration')") + b.wait_visible(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Environment variables")') + + # Check that console reconnects when container starts + b.click(".pf-m-expanded button:contains('Console')") + b.wait_text(".pf-m-expanded .pf-v5-c-empty-state", "Container is not running") + self.performContainerAction("swamped-crate", "Start") + b.wait_in_text(".pf-m-expanded .xterm-accessibility-tree", "/ # ") + b.focus(".pf-m-expanded .xterm-helper-textarea") + b.key_press('clear\r') + b.wait_not_in_text(".pf-m-expanded .xterm-accessibility-tree", "clear") + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # ") + b.key_press('echo hello\r') + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(2)", "hello") + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(3)", "/ # ") + self.performContainerAction("swamped-crate", "Stop") + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(3)", "/ # disconnected ") + sha = self.execute(auth, "docker inspect --format '{{.Id}}' swamped-crate").strip() + self.waitContainer(sha, auth, name='swamped-crate', image=IMG_BUSYBOX, state=NOT_RUNNING) + self.performContainerAction("swamped-crate", "Start") + self.waitContainer(sha, auth, state='Running') + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # ") + b.wait_not_in_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(2)", "hello") + + # Check that logs reconnect when container starts + b.click(".pf-m-expanded button:contains('Logs')") + self.performContainerAction("swamped-crate", "Stop") + self.waitContainer(sha, auth, state=NOT_RUNNING) + b.wait_in_text(".pf-m-expanded .container-logs .xterm-accessibility-tree", "Streaming disconnected") + self.performContainerAction("swamped-crate", "Start") + b.wait_in_text(".pf-m-expanded .container-logs .xterm-accessibility-tree", "Streaming disconnected123") + + def testCheckpointRestore(self): + m = self.machine + b = self.browser + + self.login() + self.filter_containers('all') + + if not self.has_criu: + # On cgroupsv1 systems just check that we get expected error messages + + # Run a container + self.execute(True, f"docker run -dit --name swamped-crate --stop-timeout 0 {IMG_BUSYBOX} sh") + b.wait(lambda: self.execute(True, "docker ps --all | grep -e swamped-crate")) + + # Checkpoint the container + self.performContainerAction(IMG_BUSYBOX, "Checkpoint") + b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-keep', True) + b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-tcpEstablished', True) + b.click('.pf-v5-c-modal-box button:contains(Checkpoint)') + b.wait_not_present('.modal_dialog') + + def criu_alert(): + text = b.text(".pf-v5-c-alert.pf-m-danger > .pf-v5-c-alert__description").lower() + return "checkpoint/restore requires at least criu" in text or "failed to check for criu" in text + b.wait(criu_alert) + return + + # Run a container + mac_address = '92:d0:c6:0a:29:38' + self.execute(True, f""" + docker run -dit --mac-address {mac_address} --name swamped-crate --stop-timeout 0 {IMG_BUSYBOX} sh; + docker stop swamped-crate + """) + b.wait(lambda: self.execute(True, "docker ps --all | grep -e swamped-crate -e Exited")) + + # Check that the restore option is not present (i.e. start is a regular button) + b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") + b.wait_not_present(self.getContainerAction(IMG_BUSYBOX, 'Restore')) + b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") + + # Start the container + self.performContainerAction("swamped-crate", "Start") + b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in 'Running') + + self.toggleExpandedContainer("swamped-crate") + b.wait_visible(".pf-m-expanded button:contains('Details')") + b.wait_not_present(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Latest checkpoint")') + + # Checkpoint the container + self.performContainerAction("swamped-crate", "Checkpoint") + b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-keep', True) + b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-tcpEstablished', True) + b.click('.pf-v5-c-modal-box button:contains(Checkpoint)') + + with b.wait_timeout(300): + b.wait_not_present(".pf-v5-c-modal-box") + + if self.has_criu: + b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING) + b.wait_in_text( + f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Latest checkpoint") + dd', + 'today at' + ) + else: + # expect proper error message + b.wait_in_text(".pf-v5-c-alert.pf-m-danger", "Failed to checkpoint container swamped-crate") + b.wait(lambda: "checkpoint/restore requires at least criu" in + b.text(".pf-v5-c-alert.pf-m-danger > .pf-v5-c-alert__description").lower()) + return + + # Restore the container + self.waitContainerRow("swamped-crate") + self.performContainerAction("swamped-crate", "Restore") + b.set_checked('.pf-v5-c-modal-box input#restore-dialog-keep', True) + b.set_checked('.pf-v5-c-modal-box input#restore-dialog-tcpEstablished', True) + b.set_checked('.pf-v5-c-modal-box input#restore-dialog-ignoreStaticIP', True) + b.set_checked('.pf-v5-c-modal-box input#restore-dialog-ignoreStaticMAC', True) + b.click('.pf-v5-c-modal-box button:contains(Restore)') + b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in 'Running') + + # A new MAC address should have been generated + # Fixed in docker 4.4.0 https://github.com/containers/docker/issues/16666 + cmd = "docker inspect --format '{{.NetworkSettings.MacAddress}}' swamped-crate" + new_mac_address = self.execute(True, cmd).strip() + if docker_version(self) >= (4, 4, 0): + self.assertNotEqual(new_mac_address, mac_address) + else: + self.assertEqual(new_mac_address, mac_address) + + # Checkpoint the container without stopping + self.waitContainerRow("swamped-crate") + self.performContainerAction("swamped-crate", "Checkpoint") + b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-leaveRunning', True) + b.click('.pf-v5-c-modal-box button:contains(Checkpoint)') + b.wait_not_present('.modal_dialog') + + # Stop the container + m.execute("docker stop swamped-crate") + b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING) + + # Restore the container + self.performContainerAction("swamped-crate", "Restore") + b.click('.pf-v5-c-modal-box button:contains(Restore)') + b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in 'Running') + + def testNotRunning(self): + b = self.browser + + def disable_system(): + self.execute(True, "systemctl disable --now docker.socket; systemctl stop docker.service; systemctl stop containerd.service") + + def enable_system(): + self.execute(True, "systemctl enable --now docker.socket") + + def is_active_system(string): + b.wait(lambda: self.execute(True, "systemctl is-active docker.socket || true").strip() == string) + + def is_enabled_system(string): + b.wait(lambda: self.execute(True, "systemctl is-enabled docker.socket || true").strip() == string) + + disable_system() + self.login_and_go("/docker") + + # Troubleshoot action + b.click("#app .pf-v5-c-empty-state button.pf-m-link") + b.enter_page("/system/services") + # services page is too slow + with b.wait_timeout(60): + b.wait_in_text("#service-details", "docker.socket") + + # Start action, with enabling (by default) + b.go("/docker") + b.enter_page("/docker") + b.click("#app .pf-v5-c-empty-state button.pf-m-primary") + + b.wait_visible("#containers-containers") + b.wait_not_present("#overview div.pf-v5-c-alert.pf-m-info") + + is_active_system("active") + is_enabled_system("enabled") + + # Start action, without enabling + disable_system() + b.click("#app .pf-v5-c-empty-state input[type=checkbox]") + b.assert_pixels("#app .pf-v5-c-empty-state", "docker-service-disabled", skip_layouts=["medium", "mobile"]) + b.click("#app .pf-v5-c-empty-state button.pf-m-primary") + + b.wait_visible("#containers-containers") + is_enabled_system("disabled") + is_active_system("active") + + b.logout() + disable_system() + # HACK: Due to https://github.com/containers/docker/issues/7180, avoid + # user docker.service to time out; make sure to start it afresh + self.login_and_go("/docker") + self.login_and_go("/docker") + b.wait_in_text("#overview div.pf-v5-c-alert .pf-v5-c-alert__title", "Docker service is available") + b.click("#overview div.pf-v5-c-alert .pf-v5-c-alert__action > button:contains(Start)") + b.wait_not_present("#overview div.pf-v5-c-alert") + is_active_system("active") + is_enabled_system("enabled") + + b.logout() + disable_system() + self.login_and_go("/docker", superuser=False) + b.click("#app .pf-v5-c-empty-state button.pf-m-primary") + b.wait_visible("#containers-containers") + b.wait_not_present("#overview div.pf-v5-c-alert") + + is_active_system("inactive") + is_enabled_system("disabled") + b.logout() + + # no Troubleshoot action without cockpit-system package + disable_system() + self.restore_dir("/usr/share/cockpit/systemd") + self.machine.execute("rm /usr/share/cockpit/systemd/manifest.json") + self.login_and_go("/docker") + b.wait_visible("#app .pf-v5-c-empty-state button.pf-m-primary") + self.assertFalse(b.is_present("#app .pf-v5-c-empty-state button.pf-m-link")) + # starting still works + b.click("#app .pf-v5-c-empty-state button.pf-m-primary") + b.wait_visible("#containers-containers") + + self.allow_restart_journal_messages() + self.allow_journal_messages(".*docker/docker.sock/.*: couldn't connect:.*") + self.allow_journal_messages(".*docker/docker.sock: .*Connection.*Error.*") + self.allow_journal_messages(".*docker/docker.sock/.*/events.*: received truncated HTTP response.*") + + def testCreateContainerSystem(self): + self._testCreateContainer(True) + + def testCreateContainerUser(self): + self._testCreateContainer(False) + + def _testCreateContainer(self, auth): + new_container = 'new-container' + self.execute(True, f"docker run -d --name {new_container} --stop-timeout 0 {IMG_BUSYBOX} touch /latest") + self.execute(True, f"docker commit {new_container} newimage") + new_image_sha = self.execute(True, "docker inspect --format '{{.Id}}' newimage").strip() + + self.execute(True, f"docker run -d -p 5000:5000 --name registry --stop-timeout 0 {IMG_REGISTRY}") + self.execute(True, f"docker run -d -p 6000:5000 --name registry_alt --stop-timeout 0 {IMG_REGISTRY}") + # Add local insecure registry into registries conf + self.machine.write("/etc/containers/registries.conf", REGISTRIES_CONF) + self.execute(True, "systemctl stop docker.service") + # Push busybox image to the local registries + self.execute(True, + f"docker tag {IMG_BUSYBOX} localhost:5000/my-busybox; docker push localhost:5000/my-busybox") + self.execute(True, + f"docker tag {IMG_BUSYBOX} localhost:6000/my-busybox; docker push localhost:6000/my-busybox") + # Untag busybox image which duplicates the image we are about to download + self.execute(True, f"docker rmi -f {IMG_BUSYBOX} localhost:5000/my-busybox localhost:6000/my-busybox") + + self.login(auth) + + b = self.browser + container_name = "busybox-downloaded" + + b.click("#containers-containers button.pf-v5-c-button.pf-m-primary") + b.set_input_text("#run-image-dialog-name", container_name) + + # Test invalid input + b.set_input_text("#create-image-image-select-typeahead", "|alpi*ne?\\") + b.wait_text("button.pf-v5-c-select__menu-item:not(.pf-m-disabled)", "localhost/test-alpine:latest") + + # No local results found + b.set_input_text("#create-image-image-select-typeahead", "notfound") + + b.click('button.pf-v5-c-toggle-group__button:contains("Local")') + b.wait_text("button.pf-v5-c-select__menu-item.pf-m-disabled", "No images found") + + # Local results found + b.set_input_text("#create-image-image-select-typeahead", "registry") + if auth: + b.assert_pixels(".pf-v5-c-modal-box", "image-select", skip_layouts=["rtl"]) + b.click('button.pf-v5-c-toggle-group__button:contains("Local")') + b.wait_text("button.pf-v5-c-select__menu-item", IMG_REGISTRY_LATEST) + + # Local registry + b.set_input_text("#create-image-image-select-typeahead", "my-busybox") + b.click('button.pf-v5-c-toggle-group__button:contains("localhost:5000")') + b.wait_text("button.pf-v5-c-select__menu-item:not(.pf-m-disabled)", "localhost:5000/my-busybox") + + # Select image + b.click('button.pf-v5-c-select__menu-item:contains("localhost:5000/my-busybox")') + + # Remote image, no pull latest image option + b.wait_not_present("#run-image-dialog-pull-latest-image") + + # Create Container, image is pulled and should end up being "running" + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + sel = " span:not(.downloading)" + b.wait(lambda: self.getContainerAttr(container_name, "State", sel) in 'Running') + self.execute(auth, f"docker exec {container_name} test ! -e /latest") + + # Now that we have downloaded an image, verify that selecting download latest image + # downloads the latest image we now push to the registry. Note this image has a /latest file + # to differnatiate it from the other local image. + self.execute(True, f"docker push {new_image_sha} localhost:5000/my-busybox") + self.execute(True, f"docker push {new_image_sha} localhost:6000/my-busybox") + self.execute(True, f"docker rmi {new_image_sha}") + + container_name = "busybox-latest" + + b.click("#containers-containers button.pf-v5-c-button.pf-m-primary") + b.set_input_text("#run-image-dialog-name", container_name) + + # Local registry + b.set_input_text("#create-image-image-select-typeahead", "my-busybox") + b.click('button.pf-v5-c-toggle-group__button:contains("Local")') + + # Select image + b.click('button.pf-v5-c-select__menu-item:contains("localhost:5000/my-busybox")') + + # Pull the latest image + b.set_checked("#run-image-dialog-pull-latest-image", True) + + # Create Container, image is pulled and should end up being "running" + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + sel = " span:not(.downloading)" + b.wait(lambda: self.getContainerAttr(container_name, "State", sel) in 'Running') + # Verify that the latest file exists + output = self.execute(auth, f"docker exec {container_name} ls -lh /latest").strip() + self.assertNotIn("No such file or directory", output) + + # Test creating a container with + if auth: + container_name = "busybox-download-admin" + b.click("#containers-containers button.pf-v5-c-button.pf-m-primary") + + # Start container as admin + b.click('#run-image-dialog-owner-user') + + # Create Container, image is pulled and should end up being "Running" + b.set_input_text("#run-image-dialog-name", container_name) + + b.set_input_text("#create-image-image-select-typeahead", IMG_BUSYBOX) + b.click('button.pf-v5-c-toggle-group__button:contains("Local")') + b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_BUSYBOX}")') + + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + b.wait(lambda: self.getContainerAttr(container_name, "State", sel) in 'Running') + + def testRunImageSystem(self): + self._testRunImage(True) + + def testRunImageUser(self): + self._testRunImage(False) + + def _testRunImage(self, auth): + b = self.browser + m = self.machine + + # Just drop user images so we can use simpler selectors + if auth: + self.execute(False, "docker rmi --all") + + self.login(auth) + + b.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + b.wait_in_text("#containers-images", IMG_BUSYBOX) + b.wait_in_text("#containers-images", IMG_ALPINE) + if auth: + b.wait_not_in_text("#containers-images", "admin") + + # Check command in alpine + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_ALPINE}")') + b.click(f'#containers-images tbody tr:contains("{IMG_ALPINE}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + # depending on the precise container, this can be /bin/sh or /bin/ash + cmd = self.execute(auth, 'docker image inspect --format "{{.Config.Cmd}}" ' + IMG_ALPINE) + cmd = cmd.strip().replace('[', '').replace(']', '') + b.wait_attr("#run-image-dialog-command", "value", cmd) + b.click(".btn-cancel") + + # Open run image dialog + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + # Inspect and fill modal dialog + b.wait_val("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) + + # Check that there is autogenerated name and then overwrite it + b.wait_not_val("#run-image-dialog-name", "") + b.set_input_text("#run-image-dialog-name", "busybox-with-tty") + + b.wait_visible("#run-image-dialog-command[value='sh']") + + # Check memory configuration + # Only works with CGroupsV2 + if auth or self.has_cgroupsV2: + b.set_checked("#run-image-dialog-memory-limit-checkbox", True) + b.wait_visible("#run-image-dialog-memory-limit-checkbox:checked") + b.wait_visible('#run-image-dialog-memory-limit input[value="512"]') + b.set_input_text("#run-image-dialog-memory-limit input[type=number]", "0.5") + b.set_val('#memory-unit-select', "GB") + + # CPU shares work only with system containers + if auth: + # Check that the checkbox is enabled when clicked on the field + b.wait_visible("#run-image-dialog-cpu-priority-checkbox:not(:checked)") + b.click('#run-image-cpu-priority') + b.wait_visible("#run-image-dialog-cpu-priority-checkbox:checked") + b.set_checked("#run-image-dialog-cpu-priority-checkbox", False) + + b.set_checked("#run-image-dialog-cpu-priority-checkbox", True) + b.wait_visible("#run-image-dialog-cpu-priority-checkbox:checked") + b.wait_visible('#run-image-dialog-cpu-priority input[value="1024"]') + b.set_input_text("#run-image-dialog-cpu-priority input[type=number]", "512") + else: + b.wait_not_present("#run-image-dialog-cpu-priority-checkbox") + + # Enable tty + b.set_checked("#run-image-dialog-tty", True) + + # Set up command line + b.set_input_text('#run-image-dialog-command', + "sh -c 'for i in $(seq 20); do sleep 1; echo $i; done; sleep infinity'") + + if auth: + # Set restart policy to 3 retries + b.set_val("#run-image-dialog-restart-policy", "on-failure") + b.set_input_text('#run-image-dialog-restart-retries input', '3') + else: # no lingering enabled so it's disabled + b.wait_not_present("#run-image-dialog-restart-policy") + + # Switch to Integration tab + b.click("#pf-tab-1-create-image-dialog-tab-integration") + + # Configure published ports + b.click('.publish-port-form .btn-add') + b.set_input_text('#run-image-dialog-publish-0-host-port', '6000') + b.set_input_text('#run-image-dialog-publish-0-container-port', '5000') + b.click('.publish-port-form .btn-add') + b.set_input_text('#run-image-dialog-publish-1-ip-address', '127.0.0.1') + b.set_input_text('#run-image-dialog-publish-1-host-port', '6001') + b.set_input_text('#run-image-dialog-publish-1-container-port', '5001') + b.set_val('#run-image-dialog-publish-1-protocol', "udp") + b.click('.publish-port-form .btn-add') + b.set_input_text('#run-image-dialog-publish-2-ip-address', '7001') + b.set_input_text('#run-image-dialog-publish-2-host-port', '7001') + b.click('#run-image-dialog-publish-2-btn-close') + b.click('.publish-port-form .btn-add') + b.set_input_text('#run-image-dialog-publish-3-container-port', '8001') + b.click('.publish-port-form .btn-add') + b.set_input_text('#run-image-dialog-publish-4-ip-address', '127.0.0.2') + b.set_input_text('#run-image-dialog-publish-4-container-port', '9001') + + # Configure env + b.click('.env-form .btn-add') + b.set_input_text('#run-image-dialog-env-0-key', 'APPLE') + b.set_input_text('#run-image-dialog-env-0-value', 'ORANGE') + b.click('.env-form .btn-add') + b.set_input_text('#run-image-dialog-env-1-key', 'PEAR') + b.set_input_text('#run-image-dialog-env-1-value', 'BANANA') + b.click('.env-form .btn-add') + b.set_input_text('#run-image-dialog-env-2-key', 'MELON') + b.set_input_text('#run-image-dialog-env-2-value', 'GRAPE') + b.click('#run-image-dialog-env-2-btn-close') + b.click('.env-form .btn-add') + # Test inputting an key=var entry + b.set_val('#run-image-dialog-env-3-value', + "RHUBARB=STRAWBERRY DURIAN=LEMON TEST_URL=wss://cockpit/?start=1&stop=0") + # set_val does not trigger onChange so append a space. + b.set_input_text('#run-image-dialog-env-3-value', ' ', append=True, value_check=False) + + b.click('.env-form .btn-add') + b.set_input_text('#run-image-dialog-env-6-key', 'HOSTNAME') + b.set_input_text('#run-image-dialog-env-6-value', 'busybox') + + # Test inputting a var with = in it doesn't reset key + b.click('.env-form .btn-add') + b.set_input_text('#run-image-dialog-env-7-key', 'TEST') + b.set_input_text('#run-image-dialog-env-7-value', 'REBASE=1') + + # Configure volumes + b.click('.volume-form .btn-add') + rodir, rwdir = m.execute("mktemp; mktemp").split('\n')[:2] + m.execute(f"chown admin:admin {rodir}") + m.execute(f"chown admin:admin {rwdir}") + b.set_checked("#run-image-dialog-volume-0-mode", False) + + if self.has_selinux: + b.set_val('#run-image-dialog-volume-0-selinux', "z") + else: + b.wait_not_present('#run-image-dialog-volume-0-selinux') + + b.set_file_autocomplete_val("#run-image-dialog-volume-0 .pf-v5-c-select", rodir) + b.key_press(["\r"]) + b.set_input_text('#run-image-dialog-volume-0-container-path', '/tmp/ro') + ro_label = m.execute(f"ls -dZ {rodir}").split(" ")[0] + b.key_press(["\r"]) + b.click('.volume-form .btn-add') + b.wait_visible('#run-image-dialog-volume-1') + b.click('#run-image-dialog-volume-1-btn-close') + b.wait_not_present('#run-image-dialog-volume-1') + b.click('.volume-form .btn-add') + + if auth: + b.assert_pixels(".pf-v5-c-modal-box", "integration", + ignore=["#run-image-dialog-volume-0 .pf-v5-c-select__toggle-typeahead"], + skip_layouts=["rtl"]) + + if self.has_selinux: + b.set_val('#run-image-dialog-volume-2-selinux', "Z") + else: + b.wait_not_present('#run-image-dialog-volume-2-selinux') + + b.set_file_autocomplete_val("#run-image-dialog-volume-2 .pf-v5-c-select", rwdir) + b.key_press(["\r"]) + b.set_input_text('#run-image-dialog-volume-2-container-path', '/tmp/rw') + rw_label = m.execute(f"ls -dZ {rwdir}").split(" ")[0] + + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + b.wait_not_present("div.pf-v5-c-modal-box") + self.waitContainerRow(IMG_BUSYBOX) + sha = self.execute(auth, "docker inspect --format '{{.Id}}' busybox-with-tty").strip() + self.waitContainer(sha, auth, name='busybox-with-tty', image=IMG_BUSYBOX, + cmd='sh -c "for i in $(seq 20); do sleep 1; echo $i; done; sleep infinity"', + state='Running', owner="system" if auth else "admin") + hasTTY = self.execute(auth, "docker inspect --format '{{.Config.Tty}}' busybox-with-tty").strip() + self.assertEqual(hasTTY, 'true') + # Only works with CGroupsV2 + if auth or self.has_cgroupsV2: + memory = self.execute(auth, "docker inspect --format '{{.HostConfig.Memory}}' busybox-with-tty").strip() + self.assertEqual(memory, '500000000') + + if auth: + cpuShares = self.execute(auth, + "docker inspect --format '{{.HostConfig.CpuShares}}' busybox-with-tty").strip() + self.assertEqual(cpuShares, '512') + + restartPolicy = self.getRestartPolicy(auth, "busybox-with-tty") + if auth: + self.assertEqual(restartPolicy, '{on-failure 3}') + else: + # No restart policy + # format changed in podman 5.1 (https://github.com/containers/podman/pull/22322) + self.assertIn(restartPolicy, ['{ 0}', '{no 0}']) + + b.wait(lambda: "3" in self.execute(auth, "docker logs busybox-with-tty")) + + self.toggleExpandedContainer(IMG_BUSYBOX) + + b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Created") + dd', 'today at') + + b.click(".pf-m-expanded button:contains('Integration')") + + b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', + '0.0.0.0:6000 \u2192 5000/tcp') + b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', + '127.0.0.1:6001 \u2192 5001/udp') + b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', + '127.0.0.2:') + b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', + ' \u2192 8001/tcp') + b.wait_not_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', + '7001/tcp') + + ports = self.execute(auth, "docker inspect --format '{{.NetworkSettings.Ports}}' busybox-with-tty") + self.assertIn('5000/tcp:[{ 6000}]', ports) + self.assertIn('5001/udp:[{127.0.0.1 6001}]', ports) + self.assertIn('8001/tcp:[{', ports) + self.assertIn('9001/tcp:[{127.0.0.2 ', ports) + self.assertNotIn('7001/tcp', ports) + + env_select = f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Environment variables") + dd' + b.wait_in_text(env_select, 'APPLE=ORANGE') + b.wait_in_text(env_select, 'PEAR=BANANA') + b.wait_in_text(env_select, 'RHUBARB=STRAWBERRY') + b.wait_in_text(env_select, 'DURIAN=LEMON') + b.wait_in_text(env_select, 'TEST_URL=wss://cockpit/?start=1&stop=0') + b.wait_in_text(env_select, 'HOSTNAME=busybox') + b.wait_in_text(env_select, 'TEST=REBASE=1') + # variables are present in env but are not displayed in the UI + b.wait_not_in_text(env_select, 'container=docker') + b.wait_not_in_text(env_select, 'TERM=xterm') + b.wait_not_in_text(env_select, 'HOME=/root') + b.wait_not_in_text(env_select, 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin') + + b.click(".container-integration button:contains('Show more')") + # previously hidden variables are now visible + b.wait_in_text(env_select, 'container=docker') + b.wait_in_text(env_select, 'TERM=xterm') + b.wait_in_text(env_select, 'HOME=/root') + b.wait_in_text(env_select, 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin') + + env = self.execute(auth, "docker exec busybox-with-tty env") + self.assertIn('APPLE=ORANGE', env) + self.assertIn('PEAR=BANANA', env) + self.assertIn('RHUBARB=STRAWBERRY', env) + self.assertIn('DURIAN=LEMON', env) + self.assertIn('HOSTNAME=busybox', env) + self.assertIn('TEST=REBASE=1', env) + self.assertIn('container=docker', env) + self.assertIn('TERM=xterm', env) + self.assertIn('HOME=/root', env) + self.assertIn('PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', env) + self.assertNotIn('MELON=GRAPE', env) + + vol_select = f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Volumes") + dd' + b.wait_in_text(vol_select, f"{rodir} \u2192 /tmp/ro") + b.wait_in_text(vol_select, f"{rwdir} \u2194 /tmp/rw") + + romnt = self.execute(auth, "docker exec busybox-with-tty cat /proc/self/mountinfo | grep /tmp/ro") + self.assertIn('ro', romnt) + self.assertIn(rodir[4:], romnt) + rwmnt = self.execute(auth, "docker exec busybox-with-tty cat /proc/self/mountinfo | grep /tmp/rw") + self.assertIn('rw', rwmnt) + self.assertIn(rwdir[4:], rwmnt) + + if self.has_selinux: + # rw was set to :Z so it should change, but not be shared + rw_label_new = m.execute(f"ls -dZ {rwdir}").split(" ")[0] + self.assertNotEqual(rw_label, rw_label_new) + self.assertRegex(rw_label_new, r"container_file_t:s0:c\d*,c\d*$") + + # ro was set to :z to it should change and be shared + ro_label_new = m.execute(f"ls -dZ {rodir}").split(" ")[0] + self.assertNotEqual(ro_label, ro_label_new) + self.assertRegex(ro_label_new, "container_file_t:s0$") + + def get_int(n): + try: + return int(n) + except ValueError: + return 0 + + b.wait_not_present("button:contains('Health check logs')") + b.click(".pf-m-expanded button:contains('Logs')") + b.wait_text(".pf-m-expanded .container-logs .xterm-accessibility-tree > div:nth-child(1)", "1") + + # firefox optimizes these out when not visible + b.eval_js(""" + document.querySelector('.pf-m-expanded .container-logs .xterm-accessibility-tree').scrollIntoView() + """) + b.wait_in_text(".pf-m-expanded .container-logs .xterm-accessibility-tree", "6") + + b.click(".pf-m-expanded button:contains('Console')") + b.wait(lambda: + get_int(b.text(".pf-m-expanded .container-terminal .xterm-accessibility-tree > div:nth-child(3)")) > 7) + + # Create another instance without port publishing + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') + self.toggleExpandedContainer(IMG_BUSYBOX) + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + b.wait_val("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) + b.set_input_text("#run-image-dialog-name", "busybox-without-publish") + + # Set up command line + b.set_input_text('#run-image-dialog-command', + "sh -c 'for i in $(seq 20); do echo $i; sleep 3; done; sleep infinity'") + + # Run without tty, console should be able to `exec` + b.set_checked("#run-image-dialog-tty", False) + + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + b.wait_not_present("div.pf-v5-c-modal-box") + + self.waitContainerRow("busybox-without-publish") + self.toggleExpandedContainer("busybox-without-publish") + b.wait_not_present(""" + #containers-containers tbody tr:contains("busybox-without-publish") + tr dt:contains("Ports") + """) + + # Rootless only works with CGroupsV2 + if auth or self.has_cgroupsV2: + cpuShares = self.execute(auth, """ + docker inspect --format '{{.HostConfig.CpuShares}}' busybox-without-publish + """).strip() + # docker ≥ 1.8 translates 0 default into actual value + self.assertIn(cpuShares, ['0', '1024']) + + b.set_val("#containers-containers-filter", "all") + + b.click(".pf-m-expanded button:contains('Console')") + b.wait_in_text(".pf-m-expanded .xterm-accessibility-tree", "/ # ") + b.focus(".pf-m-expanded .xterm-helper-textarea") + b.key_press('clear\r') + b.wait_not_in_text(".pf-m-expanded .xterm-accessibility-tree", "clear") + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # ") + b.key_press('echo hello\r') + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(2)", "hello") + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(3)", "/ # ") + b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # echo hello") + + b.go("#/?name=tty") + self.check_containers(["busybox-with-tty"], ["busybox-without-publish"]) + b.go("#/?name=busy") + self.check_containers(["busybox-with-tty", "busybox-without-publish"], []) + + b.set_input_text('#containers-filter', 'tty') + self.check_containers(["busybox-with-tty"], ["busybox-without-publish"]) + self.check_images([], [IMG_ALPINE, IMG_BUSYBOX, IMG_REGISTRY]) + b.set_input_text('#containers-filter', 'busy') + b.wait_js_cond('window.location.hash === "#/?name=busy"') + self.check_containers(["busybox-with-tty", "busybox-without-publish"], []) + self.check_images([IMG_BUSYBOX], [IMG_ALPINE, IMG_REGISTRY]) + b.set_input_text('#containers-filter', 'alpine') + b.wait_js_cond('window.location.hash === "#/?name=alpine"') + self.check_containers([], ["busybox-with-tty", "busybox-without-publish"]) + self.check_images([IMG_ALPINE], [IMG_BUSYBOX, IMG_REGISTRY]) + b.set_input_text('#containers-filter', '') + self.check_containers(["busybox-with-tty", "busybox-without-publish"], []) + self.check_images([IMG_ALPINE, IMG_BUSYBOX, IMG_REGISTRY], []) + b.wait_js_cond('window.location.hash === "#/"') + + self.filter_containers("running") + id_with_tty = self.execute(auth, "docker inspect --format '{{.Id}}' busybox-with-tty").strip() + + container_sel = f'#containers-images tbody tr:contains("{IMG_BUSYBOX}")' + b.click(f'{container_sel} td.pf-v5-c-table__toggle button') + # running container, just selects it, but leaves "Only running" alone + b.click(f"{container_sel} + tr div.ct-listing-panel-body dt:contains('Used by') + dd button:contains('busybox-with-tty')") # noqa: E501 + b.wait_js_cond('window.location.hash === "#' + id_with_tty + '"') + b.wait_val("#containers-containers-filter", "running") + # FIXME: expanding running container details does not actually work right now + # b.wait_in_text("#containers-containers tr.pf-m-expanded .container-details", "sleep infinity") + # stopped container, switches to showing all containers + + # Create a container without starting it + self.filter_containers("all") + container_name = "busybox-not-started" + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + b.wait_val("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) + b.set_input_text("#run-image-dialog-name", container_name) + b.set_input_text("#run-image-dialog-command", "sh -c sleep infinity") + + b.click('.pf-v5-c-modal-box__footer #create-image-create-btn') + b.wait_not_present("div.pf-v5-c-modal-box") + + sha = self.execute(auth, "docker inspect --format '{{.Id}}' " + container_name).strip() + self.waitContainer(sha, auth, name=container_name, image=IMG_BUSYBOX, state=['Configured', 'Created']) + + self.filter_containers("running") + b.wait_not_in_text("#containers-containers", "busybox-not-started") + container_sel = f"#containers-images tbody tr:contains('{IMG_BUSYBOX}') + tr div.ct-listing-panel-body" + b.click(f"{container_sel} dt:contains('Used by') + dd button:contains('busybox-not-started')") + b.wait_js_cond(f"window.location.hash === '#{sha}'") + b.wait_val("#containers-containers-filter", "all") + b.wait_in_text("#containers-containers", "busybox-not-started") + # auto-expands container details + b.wait_in_text("#containers-containers tbody tr:contains('busybox-not-started') + tr", "sleep infinity") + + b.click(f'#containers-images tbody tr:contains("{IMG_ALPINE}") td.pf-v5-c-table__toggle button') + b.wait_in_text(f"#containers-images tbody tr:contains('{IMG_ALPINE}') td[data-label='Used by']", 'unused') + + b.set_input_text('#containers-filter', 'foobar') + b.wait_in_text('#containers-containers .pf-v5-c-empty-state', 'No containers that match the current filter') + b.wait_in_text('#containers-images .pf-v5-c-empty-state', 'No images that match the current filter') + b.set_input_text('#containers-filter', '') + + if not auth or not self.machine.ostree_image: # don't kill ws container + # Ubuntu 22.04 has old docker that does not know about --time + if m.image != 'ubuntu-2204': + # Remove all containers first as it is not possible to set --time 0 to rmi command + self.execute(auth, "docker rm --all --force --time 0") + self.execute(auth, "docker rmi -af") + b.wait_in_text('#containers-containers .pf-v5-c-empty-state', 'No containers') + b.set_val("#containers-containers-filter", "running") + b.wait_in_text('#containers-containers .pf-v5-c-empty-state', 'No running containers') + b.wait_in_text('#containers-images .pf-v5-c-empty-state', 'No images') + + def check_content(self, kind, present, not_present): + b = self.browser + for item in present: + b.wait_visible(f'#containers-{kind} tbody tr:first-child:contains({item})') + for item in not_present: + b.wait_not_present(f'#containers-{kind} tbody tr:first-child:contains({item})') + + def check_containers(self, present, not_present): + self.check_content("containers", present, not_present) + + def check_images(self, present, not_present): + self.check_content("images", present, not_present) + + def waitContainer(self, row_id, auth, name="", image="", cmd="", owner="", state=None, pod="no-pod"): + """Check the container with row_name has the expected values + "image" can be substring, "state" might be string or array of possible states, other are + checked for exact match. + """ + sel = "#containers-containers #table-" + pod + f" tbody tr[data-row-id=\"{row_id}{auth}\"]".lower() + b = self.browser + if name: + b.wait_text(sel + " .container-name", name) + if image: + b.wait_in_text(sel + " .container-block small:nth-child(2)", image) + if cmd: + b.wait_text(sel + " .container-block small:last-child", cmd) + if owner: + if owner == "system": + b.wait_text(sel + " td[data-label=Owner]", owner) + else: + b.wait_text(sel + " td[data-label=Owner]", "user: " + owner) + if state is not None: + if not isinstance(state, list): + state = [state] + b.wait(lambda: b.text(sel + " td[data-label=State]") in state) + + def filter_containers(self, value): + """Use dropdown menu in the header to filter containers""" + b = self.browser + b.set_val("#containers-containers-filter", value) + + def confirm_modal(self, text): + """Wait for the pop up window and click the button with text""" + b = self.browser + b.click(f".pf-v5-c-modal-box footer button:contains({text})") + b.wait_not_present(f".pf-v5-c-modal-box footer button:contains({text})") + + def testPruneUnusedImagesSystem(self): + self._testPruneUnusedImagesSystem(True) + + def testPruneUnusedImagesUser(self): + self._testPruneUnusedImagesSystem(False) + + @testlib.skipOstree("no root login available on ostree") + def testPruneUnusedImagesRoot(self): + self._testPruneUnusedImagesSystem(False, True) + + def _testPruneUnusedImagesSystem(self, auth, root=False): + b = self.browser + if root: + self.login_and_go("/docker", user="root", enable_root_login=True) + b.wait_visible("#app") + else: + self.login(auth) + + leftover_images = 1 + # cockpit-ws image + if self.machine.ostree_image and auth: + leftover_images += 1 + + # By default we have 3 unused images, start one. + self.execute(auth or root, f"docker run -d --name used_image --stop-timeout 0 {IMG_ALPINE} sh") + b.click("#image-actions-dropdown") + b.click("#prune-unused-images-button") + + if auth: + b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", + (self.user_images_count + self.system_images_count) - leftover_images) + elif root: + b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", + self.system_images_count - leftover_images) + else: + b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", + self.user_images_count - leftover_images) + b.click(".pf-v5-c-modal-box button:contains(Prune)") + + # When being superuser, admin images are also removed + if auth: + self.waitNumImages(leftover_images) + checkImage(b, IMG_ALPINE, "system") + else: + self.waitNumImages(leftover_images) + # Two images removed, one in use kept + b.wait_not_present(f"#containers-images:contains('{IMG_BUSYBOX}')") + b.wait_not_present(f"#containers-images:contains('{IMG_REGISTRY}')") + b.wait_visible(f"#containers-images:contains('{IMG_ALPINE}')") + + # Prune button should now be disabled + b.click("#image-actions-dropdown") + b.wait_visible(".pf-m-disabled.pf-v5-c-menu__list-item:contains(Prune unused images)") + + def testPruneUnusedImagesSystemSelections(self): + """ Test the prune unused images selection options""" + b = self.browser + self.login(True) + + b.click("#image-actions-dropdown") + b.click("button:contains(Prune unused images)") + + # Deselect both + b.click("#deleteSystemImages") + b.click("#deleteUserImages") + b.wait_visible(".pf-v5-c-modal-box button:contains(Prune):disabled") + + # Admin / user images are selected + expected_images = self.user_images_count + self.system_images_count + if self.machine.ostree_image: + expected_images -= 1 + b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", expected_images) + # Select user images + b.click("#deleteUserImages") + b.click(".pf-v5-c-modal-box button:contains(Prune)") + + # System images are left over + self.waitNumImages(self.system_images_count) + checkImage(b, IMG_ALPINE, "system") + checkImage(b, IMG_BUSYBOX, "system") + checkImage(b, IMG_REGISTRY, "system") + + # Pruning again, should delete all system images + b.click("#image-actions-dropdown") + b.click("button:contains(Prune unused images)") + b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", + self.system_images_count - 1 if self.machine.ostree_image else self.system_images_count) + b.click(".pf-v5-c-modal-box button:contains(Prune)") + self.waitNumImages(1 if self.machine.ostree_image else 0) + + # Prune button should now be disabled + b.click("#image-actions-dropdown") + b.wait_visible(".pf-v5-c-menu__list-item.pf-m-disabled:contains(Prune unused images)") + + def testPruneUnusedContainersSystem(self): + self._testPruneUnusedContainersSystem(True) + + def testPruneUnusedContainersUser(self): + self._testPruneUnusedContainersSystem(False) + + def _testPruneUnusedContainersSystem(self, auth): + """Test the prune unused container image dialog""" + + b = self.browser + self.login(auth) + + # Create running and non-running containers + self.execute(auth, "docker pod create --name pod") + notrunninginpodId = self.execute(auth, f""" + docker run --name inpod --pod pod -tid {IMG_BUSYBOX} sh -c 'exit 1'""").strip() + runninginpodId = self.execute(auth, f""" + docker run --name inpodrunning --pod pod -tid {IMG_BUSYBOX} sh -c 'sleep infinity'""").strip() + + self.execute(auth, f"docker run --name notrunning -tid {IMG_BUSYBOX} sh -c 'exit 1'") + self.execute(auth, f"docker run --name containerrunning -tid {IMG_BUSYBOX} sh -c 'sleep infinity'") + + # Create containers for the opposite of what we are, admin or super admin + if auth: + self.execute(False, f"docker run --name adminnotrunning -tid {IMG_BUSYBOX} sh 'exit 1'") + b.wait(lambda: self.getContainerAttr("adminnotrunning", "State") in NOT_RUNNING) + self.execute(False, f"docker run --name adminrunning -tid {IMG_BUSYBOX} sh -c 'sleep infinity'") + b.wait(lambda: self.getContainerAttr("adminrunning", "State") == "Running") + + b.click("#containers-actions-dropdown") + b.click("button:contains(Prune unused containers)") + + if auth: + b.wait_in_text(".pf-v5-c-modal-box__body tbody:nth-of-type(1) td[data-label=Name]", "adminnotrunning") + b.wait_in_text(".pf-v5-c-modal-box__body tbody:nth-of-type(2) td[data-label=Name]", "notrunning") + else: + b.wait_in_text(".pf-v5-c-modal-box__body tbody td[data-label=Name]", "notrunning") + + b.click(".pf-v5-c-modal-box button:contains(Prune)") + b.wait_not_present(".pf-v5-c-modal-box__body") + + if auth: + self.waitContainerRow("notrunning", False) + self.waitContainerRow("adminnotrunning", False) + else: + self.waitContainerRow("notrunning", False) + + # Verify running containers still exists + self.waitContainerRow("containerrunning") + pods = [{"name": "inpod", "state": "Exited", "id": notrunninginpodId, + "image": IMG_BUSYBOX, "command": 'sh -c "exit 1"'}, + {"name": "inpodrunning", "state": "Running", "id": runninginpodId, + "image": IMG_BUSYBOX, "command": 'sh -c "sleep infinity"'}] + self.waitPodContainer("pod", pods, auth) + + def testCreateContainerValidation(self): + def validateField(groupSelector, value, errorMessage, resetValue=""): + b.set_input_text(f"{groupSelector} input", value) + b.wait_visible(".pf-v5-c-modal-box__footer #create-image-create-run-btn:not(:disabled)") + b.wait_in_text(f"{groupSelector} .pf-v5-c-helper-text__item-text", errorMessage) + b.wait_visible(".pf-v5-c-modal-box__footer #create-image-create-run-btn[aria-disabled=true]") + # Reset to acceptable value and verify the validation message is not present + b.set_input_text(f"{groupSelector} input", resetValue) + b.wait_not_present(f"{groupSelector} .pf-v5-c-helper-text__item-text") + b.wait_visible(".pf-v5-c-modal-box__footer #create-image-create-run-btn:not(:disabled)") + + # Test the validation errors + + # complaint about port conflict + self.allow_browser_errors("error: Container failed to be started:.*") + self.allow_browser_errors("No routable interface.*") + self.allow_browser_errors(".*ddress already in use.*5000.*") + b = self.browser + self.login(False) + container_name = 'portused' + + # Start a docker container which uses a port + self.execute(False, f"docker run -d -p 5000:5000 --name registry --stop-timeout 0 {IMG_REGISTRY}") + b.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + validateField("#image-name-group", "registry", "Name already in use") + + # Switch to Integration tab + b.click("#pf-tab-1-create-image-dialog-tab-integration") + + # Test validation of port mapping + b.click('.publish-port-form .btn-add') + b.set_input_text("#run-image-dialog-publish-0-container-port-group input", "1") + validateField("#run-image-dialog-publish-0-ip-address-group", "abcd", "valid IP address") + validateField("#run-image-dialog-publish-0-host-port-group", "-1", "1 to 65535") + validateField("#run-image-dialog-publish-0-host-port-group", "99999", "1 to 65535") + validateField("#run-image-dialog-publish-0-container-port-group", "-1", "1 to 65535", resetValue="1") + validateField("#run-image-dialog-publish-0-container-port-group", "", "must not be empty", resetValue="1") + validateField("#run-image-dialog-publish-0-container-port-group", "99999", "1 to 65535", resetValue="1") + + # Test validation of volumes + b.click('.volume-form .btn-add') + b.set_input_text("#run-image-dialog-volume-0-container-path-group input", "/somepath") + validateField("#run-image-dialog-volume-0-container-path-group", "", "not be empty", resetValue="/somepath") + + # Test validation of environment variables + b.click('.env-form .btn-add') + b.set_input_text("#run-image-dialog-env-0-key-group input", "sometext") + validateField("#run-image-dialog-env-0-key-group", "", "must not be empty", resetValue="sometext") + + b.set_input_text("#run-image-dialog-name", container_name) + + # Port address is already in use + b.set_input_text('#run-image-dialog-publish-0-host-port', '5000') + b.set_input_text('#run-image-dialog-publish-0-container-port', '5000') + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + # Can be "[aA]ddress" + b.wait_in_text(".pf-v5-c-alert", "ddress already in use") + + # Changing the port should allow creation of container + b.set_input_text('#run-image-dialog-publish-0-host-port', '5001') + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + b.wait_not_present("#run-image-dialog-name") + + self.waitContainerRow(container_name) + + # Test validation JavaScript errors when removing invalid environment entries + container_name = 'env-var-validation' + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + b.set_input_text("#run-image-dialog-name", container_name) + b.click("#pf-tab-1-create-image-dialog-tab-integration") + + # Make sure our form validation does not crash when adding and removing invalid entries + b.click('.env-form .btn-add') + b.click('.env-form .btn-add') + b.click('.env-form .btn-add') + b.set_input_text("#run-image-dialog-env-1-key-group input", "something") + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + + b.wait_in_text("#run-image-dialog-env-0-key-group .pf-v5-c-helper-text__item-text", "must not be empty") + b.wait_in_text("#run-image-dialog-env-2-key-group .pf-v5-c-helper-text__item-text", "must not be empty") + + # remove invalid entries + b.click('#run-image-dialog-env-0-btn-close') + b.click('#run-image-dialog-env-2-btn-close') + + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + self.waitContainerRow(container_name) + + def _testHealthcheck(self, auth): + b = self.browser + + # Just drop user images so we can use simpler selectors + if auth: + self.execute(False, f"docker rmi {IMG_BUSYBOX}") + + self.login(auth) + + b.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + b.set_input_text("#run-image-dialog-name", "healthy") + + b.click("#pf-tab-2-create-image-dialog-tab-healthcheck") + b.set_input_text('#run-image-dialog-healthcheck-command', 'true') + b.set_input_text('#run-image-healthcheck-interval input', '325') + b.set_input_text('#run-image-healthcheck-timeout input', '35') + b.set_input_text('#run-image-healthcheck-start-period input', '5') + b.click('#run-image-healthcheck-retries .pf-v5-c-input-group__item:nth-child(1) button') + b.wait_val("#run-image-healthcheck-retries input", 2) + if auth: + b.assert_pixels('.pf-v5-c-modal-box', "healthcheck-modal", skip_layouts=["rtl"]) + # Test that the healthcheck option is not available before docker 4.3 + if docker_version(self) < (4, 3, 0): + b.wait_not_present("#run-image-healthcheck-action") + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + + self.waitContainerRow("healthy") + b.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + healthy_sha = self.execute(auth, "docker inspect --format '{{.Id}}' healthy").strip() + self.waitContainer(healthy_sha, auth, state='RunningHealthy') + + self.toggleExpandedContainer("healthy") + b.click(".pf-m-expanded button:contains('Health check')") + + b.wait_in_text('#container-details-healthcheck dt:contains("Command") + dd', 'true') + b.wait_in_text('#container-details-healthcheck dt:contains("Interval") + dd', '325 seconds') + b.wait_in_text('#container-details-healthcheck dt:contains("Retries") + dd', '2') + b.wait_in_text('#container-details-healthcheck dt:contains("Timeout") + dd', '35 seconds') + b.wait_in_text('#container-details-healthcheck dt:contains("Start period") + dd', '5 seconds') + b.wait_not_present('#container-details-healthcheck dt:contains("Failing streak")') + if docker_version(self) >= (4, 3, 0): + b.wait_in_text('#container-details-healthcheck dt:contains("When unhealthy") + dd', 'No action') + + self.assertEqual(self.execute(auth, "docker inspect --format '{{.Config.Healthcheck}}' healthy").strip(), + "{[true] 5s 5m25s 35s 2}") + + # single successful health check + b.wait_in_text(".ct-listing-panel-body tbody tr", "Passed health run") + b.wait_visible(".ct-listing-panel-body tbody:nth-of-type(1) svg.green") + b.wait_not_present(".ct-listing-panel-body tbody:nth-of-type(2)") + + # Trigger run manually, adds one more healthy run + self.performContainerAction("healthy", "Run health check") + b.wait_visible(".ct-listing-panel-body tbody:nth-of-type(2) svg.green") + b.wait_not_present(".ct-listing-panel-body tbody:nth-of-type(3)") + + self.toggleExpandedContainer("healthy") + + self.execute(auth, f"docker run --name sick -dt --health-cmd false --health-interval 5s {IMG_BUSYBOX}") + self.waitContainerRow("sick") + unhealthy_sha = self.execute(auth, "docker inspect --format '{{.Id}}' sick").strip() + self.waitContainer(unhealthy_sha, auth, state='RunningUnhealthy') + # Unhealthy should be first + expected_ws = "" + if auth and self.machine.ostree_image: + expected_ws = "ws" + b.wait_collected_text("#containers-containers .container-name", "healthysick" + expected_ws) + + self.toggleExpandedContainer("sick") + b.click(".pf-m-expanded button:contains('Health check')") + b.wait_visible(".pf-m-expanded .ct-listing-panel-body tbody:nth-of-type(1)") + b.wait_visible(".pf-m-expanded .ct-listing-panel-body tbody:nth-of-type(4)") + b.wait_visible(".pf-m-expanded .ct-listing-panel-body tbody:nth-of-type(2) svg.red") + b.wait_visible('.pf-m-expanded #container-details-healthcheck dt:contains("Failing streak")') + failures = int(b.text('.pf-m-expanded #container-details-healthcheck dt:contains("Failing streak") + dd')) + self.assertGreater(failures, 3) + if auth: + b.wait_js_func("ph_count_check", ".pf-m-expanded table[aria-label=Logs] tbody tr", 5) + b.assert_pixels(".pf-m-expanded .pf-v5-c-table__expandable-row-content", + "healthcheck-details", + ignore=["thead", "#container-details-healthcheck dt:contains('Failing streak') + dd", + "td[data-label='Started at']"], + skip_layouts=["rtl"]) + + self.toggleExpandedContainer("sick") + b.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + b.wait_visible('#containers-images td[data-label="Image"]:contains("busybox:latest")') + b.click('#containers-images tbody tr:contains("busybox:latest") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + # Test the health check action, only supported in docker 4.3 and later. + # To test this we make a healthcheck which depends on a file, so when starting the + # container is healthy, after we remove the file the healthcheck should fail and our + # configured action should executed. + if docker_version(self) < (4, 3, 0): + return + + containername = "healthaction" + b.set_input_text("#run-image-dialog-name", containername) + b.set_input_text("#run-image-dialog-command", "/bin/sh -c 'echo 1 > /healthy && sleep infinity'") + + b.click("#pf-tab-2-create-image-dialog-tab-healthcheck") + b.set_input_text('#run-image-dialog-healthcheck-command', '/bin/test -f /healthy') + b.set_input_text('#run-image-healthcheck-interval input', '1') + b.set_input_text('#run-image-healthcheck-timeout input', '1') + b.click('#run-image-healthcheck-action-2') + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + + self.waitContainerRow(containername) + self.toggleExpandedContainer(containername) + b.wait(lambda: self.getContainerAttr(containername, "State") == "RunningHealthy") + b.click(".pf-m-expanded button:contains('Health check')") + b.wait_in_text('.pf-m-expanded #container-details-healthcheck dt:contains("When unhealthy") + dd', + 'Force stop') + # Removing the file should kill the container + status = self.execute(auth, f"docker exec {containername} rm -f /healthy").strip() + b.wait(lambda: self.getContainerAttr(containername, + "State", "span:not(.ct-badge-container-unhealthy)") in NOT_RUNNING) + status = self.execute(auth, f"docker inspect --format '{{{{.State.Health.Status}}}}' {containername}").strip() + self.assertEqual(status, "unhealthy") + + def testHealthcheckSystem(self): + self._testHealthcheck(True) + + def testHealthcheckUser(self): + self._testHealthcheck(False) + + + def testdockerRestartEnabledSystem(self): + self._testdockerRestartEnabled(True) + + def _testdockerRestartEnabled(self, auth): + b = self.browser + if auth: + self.addCleanup(self.machine.execute, "systemctl disable docker-restart.service") + + # Drop user images for easy selection + if auth: + self.execute(False, f"docker rmi {IMG_BUSYBOX}") + + self.login(auth) + b.click("#containers-images button.pf-v5-c-expandable-section__toggle") + + def create_container(name, policy=None): + b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') + b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') + b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') + + b.set_input_text("#run-image-dialog-name", name) + if policy: + b.set_val("#run-image-dialog-restart-policy", "always") + b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') + self.waitContainerRow(name) + + container_name = 'none' + create_container(container_name) + # format changed in podman 5.1 (https://github.com/containers/podman/pull/22322) + self.assertIn(self.getRestartPolicy(auth, container_name), ['{ 0}', '{no 0}']) + + container_name = 'restart' + create_container(container_name, 'always') + self.assertEqual(self.getRestartPolicy(auth, container_name), '{always 0}') + if auth: + dockerRestartEnabled = self.execute(True, "systemctl is-enabled docker-restart.service || true").strip() + self.assertEqual(dockerRestartEnabled, 'enabled') + + def testPauseResumeContainerSystem(self): + self._testPauseResumeContainer(True) + + def testPauseResumeContainerUser(self): + # rootless cgroupv1 containers do not support pausing + if not self.has_cgroupsV2: + return + self._testPauseResumeContainer(False) + + def _testPauseResumeContainer(self, auth): + b = self.browser + container_name = "pauseresume" + + self.execute(auth, f"docker run -dt --name {container_name} --stop-timeout 0 {IMG_ALPINE}") + self.login(auth) + + self.waitContainerRow(container_name) + self.toggleExpandedContainer(container_name) + b.wait_not_present(self.getContainerAction(container_name, 'Resume')) + self.performContainerAction(container_name, "Pause") + + # show all containers and check status + self.filter_containers('all') + + # Check that container details are not lost when the container is paused + b.click(".pf-m-expanded button:contains('Integration')") + b.wait_visible(f'#containers-containers tr:contains("{IMG_ALPINE}") dt:contains("Environment variables")') + + b.wait(lambda: self.getContainerAttr(container_name, "State") == "Paused") + b.wait_not_present(self.getContainerAction(container_name, 'Pause')) + self.performContainerAction(container_name, "Resume") + b.wait(lambda: self.getContainerAttr(container_name, "State") == "Running") + + def testRenameContainerSystem(self): + self._testRenameContainer(True) + + def _testRenameContainer(self, auth): + b = self.browser + container_name = "rename" + container_name_new = "rename-new" + + self.execute(auth, f"docker container create -t --name {container_name} {IMG_BUSYBOX}") + self.login(auth) + + self.filter_containers('all') + + self.waitContainerRow(container_name) + self.toggleExpandedContainer(container_name) + self.performContainerAction(container_name, "Rename") + + # the container name should be in the "Rename container" header + b.wait_in_text("#pf-modal-part-1", container_name) + b.set_input_text("#rename-dialog-container-name", "") + b.wait_in_text("#commit-dialog-image-name-helper", "Container name is required") + b.set_input_text("#rename-dialog-container-name", "banana???") + b.wait_in_text("#commit-dialog-image-name-helper", "Name can only contain letters, numbers") + + b.set_input_text("#rename-dialog-container-name", container_name_new) + b.click('#btn-rename-dialog-container') + b.wait_not_present("#rename-dialog-container-name") + + self.execute(auth, f"docker inspect --format '{{{{.Id}}}}' {container_name_new}").strip() + self.waitContainerRow(container_name_new) + + # rename using the enter key + self.toggleExpandedContainer(container_name_new) + self.performContainerAction(container_name_new, "Rename") + + container_name_new = "rename-new-enter" + b.set_input_text("#rename-dialog-container-name", "") + b.focus("#rename-dialog-container-name") + b.key_press("\r") # Simulate enter key + b.wait_in_text("#commit-dialog-image-name-helper", "Container name is required") + b.set_input_text("#rename-dialog-container-name", container_name_new) + b.focus("#rename-dialog-container-name") + b.key_press("\r") # Simulate enter key + b.wait_not_present("#rename-dialog-container-name") + + self.execute(auth, f"docker inspect --format '{{{{.Id}}}}' {container_name_new}").strip() + self.waitContainerRow(container_name_new) + + def testMultipleContainers(self): + self.login() + + # Create 31 containers + for i in range(31): + self.execute(True, f"docker run -dt --name container{i} --stop-timeout 0 {IMG_BUSYBOX}") + + self.waitContainerRow("container30") + + # Generic cleanup takes too long and timeouts, so remove these container manually one by one + for i in range(31): + self.execute(True, f"docker rm -f container{i}") + + def testSpecialContainers(self): + m = self.machine + b = self.browser + + toolbox_label = "com.github.containers.toolbox=true" + distrobox_label = "manager=distrobox" + + container_1_id = m.execute(f"docker run -d --name container_1 -l {toolbox_label} {IMG_BUSYBOX}").strip() + container_2_id = m.execute(f"docker run -d --name container_2 -l {distrobox_label} {IMG_BUSYBOX}").strip() + + self.login() + + self.waitContainerRow('container_1') + self.waitContainerRow('container_2') + + container_1_sel = f"#containers-containers tbody tr[data-row-id=\"{container_1_id}{'true'}\"]" + container_2_sel = f"#containers-containers tbody tr[data-row-id=\"{container_2_id}{'true'}\"]" + + b.wait_visible(container_1_sel + " .ct-badge-toolbox:contains('toolbox')") + b.wait_visible(container_2_sel + " .ct-badge-distrobox:contains('distrobox')") + + # def testCreatePodSystem(self): + # self._createPod(True) + + # def testCreatePodUser(self): + # self._createPod(False) + + # def _createPod(self, auth): + # b = self.browser + # m = self.machine + # pod_name = "testpod1" + + # self.login(auth) + + # b.click("#containers-containers-create-pod-btn") + # b.set_input_text("#create-pod-dialog-name", "") + # b.wait_visible(".pf-v5-c-modal-box__footer #create-pod-create-btn:disabled") + # b.wait_in_text("#pod-name-group .pf-v5-c-helper-text__item-text", "Invalid characters") + + # b.set_input_text("#create-pod-dialog-name", pod_name) + # b.wait_visible(".pf-v5-c-modal-box__footer #create-pod-create-btn:not(:disabled)") + + # b.click('.publish-port-form .btn-add') + # b.set_input_text("#create-pod-dialog-publish-0-container-port-group input", "-1") + # b.click(".pf-v5-c-modal-box__footer #create-pod-create-btn") + # b.wait_in_text("#create-pod-dialog-publish-0-container-port-group .pf-v5-c-helper-text__item-text", + # "1 to 65535") + # b.click("#create-pod-dialog-publish-0-btn-close") + + # if auth: + # b.wait_visible("#create-pod-dialog-owner-system:checked") + # else: + # b.wait_not_present("#create-pod-dialog-owner-system") + + # Ports + # b.click('.publish-port-form .btn-add') + # b.set_input_text('#create-pod-dialog-publish-1-host-port', '6000') + # b.set_input_text('#create-pod-dialog-publish-1-container-port', '5000') + # b.click('.publish-port-form .btn-add') + # b.set_input_text('#create-pod-dialog-publish-2-ip-address', '127.0.0.1') + # b.set_input_text('#create-pod-dialog-publish-2-host-port', '6001') + # b.set_input_text('#create-pod-dialog-publish-2-container-port', '5001') + # b.set_val('#create-pod-dialog-publish-2-protocol', "udp") + # b.click('.publish-port-form .btn-add') + # b.set_input_text('#create-pod-dialog-publish-3-ip-address', '127.0.0.2') + # b.set_input_text('#create-pod-dialog-publish-3-container-port', '9001') + + # Volumes + # if self.machine.image not in ["ubuntu-2204"]: + # b.click('.volume-form .btn-add') + # rodir, rwdir = m.execute("mktemp; mktemp").split('\n')[:2] + # m.execute(f"chown admin:admin {rodir}") + # m.execute(f"chown admin:admin {rwdir}") + + # if self.has_selinux: + # b.set_val('#create-pod-dialog-volume-0-selinux', "z") + # else: + # b.wait_not_present('#create-pod-dialog-volume-0-selinux') + + # b.set_file_autocomplete_val("#create-pod-dialog-volume-0 .pf-v5-c-select", rodir) + # b.set_input_text('#create-pod-dialog-volume-0-container-path', '/tmp/ro') + # b.click('.volume-form .btn-add') + + # b.set_file_autocomplete_val("#create-pod-dialog-volume-1 .pf-v5-c-select", rwdir) + # b.set_input_text('#create-pod-dialog-volume-1-container-path', '/tmp/rw') + + # b.click("#create-pod-create-btn") + # b.set_val("#containers-containers-filter", "all") + # self.waitPodContainer(pod_name, []) + + # container_name = 'test-pod-1-system' if auth else 'test-pod-1' + # cmd = f"docker run -d --pod {pod_name} --name {container_name} --stop-timeout 0 {IMG_ALPINE} sleep 500" + # containerId = self.execute(auth, cmd).strip() + # self.waitPodContainer(pod_name, + # [{"name": container_name, "image": IMG_ALPINE, + # "command": "sleep 500", "state": "Running", "id": containerId}], auth) + + # self.toggleExpandedContainer(container_name) + # b.click(".pf-m-expanded button:contains('Integration')") + # if self.machine.image not in ["ubuntu-2204"]: + # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Volumes") + dd', + # f"{rodir} \u2194 /tmp/ro") + # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Volumes") + dd', + # f"{rwdir} \u2194 /tmp/rw") + + # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Ports") + dd', + # '0.0.0.0:6000 \u2192 5000/tcp') + # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Ports") + dd', + # '127.0.0.1:6001 \u2192 5001/udp') + # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Ports") + dd', + # ' \u2192 9001/tcp') + + + # Create pod as admin + # if auth: + # pod_name = 'testpod2' + # b.click("#containers-containers-create-pod-btn") + # b.set_input_text("#create-pod-dialog-name", pod_name) + # b.click("#create-pod-dialog-owner-user") + # b.click("#create-pod-create-btn") + + # b.set_val("#containers-containers-filter", "all") + # self.waitPodContainer(pod_name, []) + + @testlib.skipImage("passthrough log driver not supported", "ubuntu-2204") + def testLogErrors(self): + b = self.browser + container_name = "logissue" + self.login() + + self.execute(False, + f"docker run --log-driver=passthrough --name {container_name} -d {IMG_ALPINE} false /etc/sysctl.d/00-local-userns.conf + systemctl restart systemd-sysctl + + # disable services that get in the way of /var/lib/containers + if systemctl is-enabled docker.service; then + systemctl disable docker.service + fi +fi + +# don't force https:// (self-signed cert) +mkdir -p /etc/cockpit +printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf + +if systemctl is-active -q firewalld.service; then + firewall-cmd --add-service=cockpit --permanent +fi + +. /usr/lib/os-release + +# Remove extra images, tests assume our specific set +# Since 4.0 docker now ships the pause image +docker images --format '{{.Repository}}:{{.Tag}}' | grep -Ev 'localhost/test-|pause|cockpit/ws' | xargs -r docker rmi -f + +# tests reset podman, save the images +mkdir -p /var/lib/test-images +for img in $(podman images --format '{{.Repository}}:{{.Tag}}'); do + fname="$(echo "$img" | tr -dc '[a-zA-Z-]')" + podman save -o "/var/lib/test-images/${fname}.tar" "$img" +done + +# 15minutes after boot tmp files are removed and docker stores some tmp lock files +systemctl disable --now systemd-tmpfiles-clean.timer +systemctl --global disable systemd-tmpfiles-clean.timer -- 2.40.1 From fdebda26e796dcf57709ecb544892edf3db70e38 Mon Sep 17 00:00:00 2001 From: Burak Ozter Date: Tue, 29 Oct 2024 10:14:35 -0300 Subject: [PATCH 2/9] update readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index b0d9635..66081a9 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,17 @@ git clone https://github.com/echomav/echopilot_deploy.git /tmp/echopilot_deploy Using the web user interface, you can now configure mavlink-router endpoints. The most common scenario is UDP Client pushing data to the ground control system computer. +## cockpit-docker + +[Source](https://askubuntu.com/a/1522863) + +``` +sudo apt install -y nodejs gettext make +wget https://github.com/chabad360/cockpit-docker/releases/download/16/cockpit-docker-16.tar.xz +tar xvf cockpit-docker-16.tar.xz +cd cockpit-docker +export NODE_ENV=production +sudo make install PREFIX="/usr" +sudo systemctl restart cockpit.{socket,service} +``` + -- 2.40.1 From f4a278c691095a57bbc875135082ff05219f92e5 Mon Sep 17 00:00:00 2001 From: Youssof Date: Wed, 30 Oct 2024 19:41:44 +0000 Subject: [PATCH 3/9] Add ace code editor component dependencies --- ui/base1/ace/ace.js | 21443 ++++++ ui/base1/ace/ext-beautify.js | 330 + ui/base1/ace/ext-code_lens.js | 202 + ui/base1/ace/ext-command_bar.js | 459 + ui/base1/ace/ext-elastic_tabstops_lite.js | 227 + ui/base1/ace/ext-emmet.js | 1293 + ui/base1/ace/ext-error_marker.js | 9 + ui/base1/ace/ext-hardwrap.js | 116 + ui/base1/ace/ext-inline_autocomplete.js | 3380 + ui/base1/ace/ext-keybinding_menu.js | 136 + ui/base1/ace/ext-language_tools.js | 2577 + ui/base1/ace/ext-linking.js | 56 + ui/base1/ace/ext-modelist.js | 264 + ui/base1/ace/ext-options.js | 767 + ui/base1/ace/ext-prompt.js | 3065 + ui/base1/ace/ext-rtl.js | 120 + ui/base1/ace/ext-searchbox.js | 344 + ui/base1/ace/ext-settings_menu.js | 789 + ui/base1/ace/ext-simple_tokenizer.js | 45 + ui/base1/ace/ext-spellcheck.js | 67 + ui/base1/ace/ext-split.js | 186 + ui/base1/ace/ext-static_highlight.js | 184 + ui/base1/ace/ext-statusbar.js | 48 + ui/base1/ace/ext-textarea.js | 380 + ui/base1/ace/ext-themelist.js | 74 + ui/base1/ace/ext-whitespace.js | 192 + ui/base1/ace/keybinding-emacs.js | 1067 + ui/base1/ace/keybinding-sublime.js | 409 + ui/base1/ace/keybinding-vim.js | 7056 ++ ui/base1/ace/keybinding-vscode.js | 255 + ui/base1/ace/mode-abap.js | 200 + ui/base1/ace/mode-abc.js | 243 + ui/base1/ace/mode-actionscript.js | 234 + ui/base1/ace/mode-ada.js | 108 + ui/base1/ace/mode-alda.js | 279 + ui/base1/ace/mode-apache_conf.js | 318 + ui/base1/ace/mode-apex.js | 402 + ui/base1/ace/mode-applescript.js | 232 + ui/base1/ace/mode-aql.js | 92 + ui/base1/ace/mode-asciidoc.js | 311 + ui/base1/ace/mode-asl.js | 357 + ui/base1/ace/mode-assembly_arm32.js | 185 + ui/base1/ace/mode-assembly_x86.js | 170 + ui/base1/ace/mode-astro.js | 2474 + ui/base1/ace/mode-autohotkey.js | 208 + ui/base1/ace/mode-batchfile.js | 199 + ui/base1/ace/mode-bibtex.js | 318 + ui/base1/ace/mode-c9search.js | 250 + ui/base1/ace/mode-c_cpp.js | 417 + ui/base1/ace/mode-cirru.js | 192 + ui/base1/ace/mode-clojure.js | 322 + ui/base1/ace/mode-cobol.js | 82 + ui/base1/ace/mode-coffee.js | 335 + ui/base1/ace/mode-coldfusion.js | 2409 + ui/base1/ace/mode-crystal.js | 586 + ui/base1/ace/mode-csharp.js | 413 + ui/base1/ace/mode-csound_document.js | 4072 ++ ui/base1/ace/mode-csound_orchestra.js | 2923 + ui/base1/ace/mode-csound_score.js | 409 + ui/base1/ace/mode-csp.js | 59 + ui/base1/ace/mode-css.js | 632 + ui/base1/ace/mode-curly.js | 2381 + ui/base1/ace/mode-cuttlefish.js | 56 + ui/base1/ace/mode-d.js | 450 + ui/base1/ace/mode-dart.js | 618 + ui/base1/ace/mode-diff.js | 129 + ui/base1/ace/mode-django.js | 2416 + ui/base1/ace/mode-dockerfile.js | 427 + ui/base1/ace/mode-dot.js | 348 + ui/base1/ace/mode-drools.js | 557 + ui/base1/ace/mode-edifact.js | 130 + ui/base1/ace/mode-eiffel.js | 120 + ui/base1/ace/mode-ejs.js | 3277 + ui/base1/ace/mode-elixir.js | 443 + ui/base1/ace/mode-elm.js | 274 + ui/base1/ace/mode-erlang.js | 836 + ui/base1/ace/mode-flix.js | 164 + ui/base1/ace/mode-forth.js | 253 + ui/base1/ace/mode-fortran.js | 361 + ui/base1/ace/mode-fsharp.js | 277 + ui/base1/ace/mode-fsl.js | 226 + ui/base1/ace/mode-ftl.js | 1255 + ui/base1/ace/mode-gcode.js | 74 + ui/base1/ace/mode-gherkin.js | 154 + ui/base1/ace/mode-gitignore.js | 49 + ui/base1/ace/mode-glsl.js | 475 + ui/base1/ace/mode-gobstones.js | 1459 + ui/base1/ace/mode-golang.js | 341 + ui/base1/ace/mode-graphqlschema.js | 174 + ui/base1/ace/mode-groovy.js | 1401 + ui/base1/ace/mode-haml.js | 1906 + ui/base1/ace/mode-handlebars.js | 2438 + ui/base1/ace/mode-haskell.js | 324 + ui/base1/ace/mode-haskell_cabal.js | 135 + ui/base1/ace/mode-haxe.js | 313 + ui/base1/ace/mode-hjson.js | 318 + ui/base1/ace/mode-html.js | 2339 + ui/base1/ace/mode-html_elixir.js | 2845 + ui/base1/ace/mode-html_ruby.js | 3294 + ui/base1/ace/mode-ini.js | 138 + ui/base1/ace/mode-io.js | 210 + ui/base1/ace/mode-ion.js | 477 + ui/base1/ace/mode-jack.js | 293 + ui/base1/ace/mode-jade.js | 2017 + ui/base1/ace/mode-java.js | 1556 + ui/base1/ace/mode-javascript.js | 1191 + ui/base1/ace/mode-jexl.js | 270 + ui/base1/ace/mode-json.js | 275 + ui/base1/ace/mode-json5.js | 308 + ui/base1/ace/mode-jsoniq.js | 2577 + ui/base1/ace/mode-jsp.js | 1610 + ui/base1/ace/mode-jssm.js | 293 + ui/base1/ace/mode-jsx.js | 1209 + ui/base1/ace/mode-julia.js | 254 + ui/base1/ace/mode-kotlin.js | 445 + ui/base1/ace/mode-latex.js | 252 + ui/base1/ace/mode-latte.js | 2522 + ui/base1/ace/mode-less.js | 742 + ui/base1/ace/mode-liquid.js | 2741 + ui/base1/ace/mode-lisp.js | 104 + ui/base1/ace/mode-livescript.js | 272 + ui/base1/ace/mode-logiql.js | 272 + ui/base1/ace/mode-logtalk.js | 309 + ui/base1/ace/mode-lsl.js | 287 + ui/base1/ace/mode-lua.js | 393 + ui/base1/ace/mode-luapage.js | 2785 + ui/base1/ace/mode-lucene.js | 145 + ui/base1/ace/mode-makefile.js | 374 + ui/base1/ace/mode-markdown.js | 2935 + ui/base1/ace/mode-mask.js | 1757 + ui/base1/ace/mode-matlab.js | 239 + ui/base1/ace/mode-maze.js | 256 + ui/base1/ace/mode-mediawiki.js | 580 + ui/base1/ace/mode-mel.js | 213 + ui/base1/ace/mode-mips.js | 231 + ui/base1/ace/mode-mixal.js | 110 + ui/base1/ace/mode-mushcode.js | 642 + ui/base1/ace/mode-mysql.js | 150 + ui/base1/ace/mode-nasal.js | 513 + ui/base1/ace/mode-nginx.js | 262 + ui/base1/ace/mode-nim.js | 325 + ui/base1/ace/mode-nix.js | 555 + ui/base1/ace/mode-nsis.js | 279 + ui/base1/ace/mode-nunjucks.js | 2518 + ui/base1/ace/mode-objectivec.js | 626 + ui/base1/ace/mode-ocaml.js | 378 + ui/base1/ace/mode-odin.js | 449 + ui/base1/ace/mode-partiql.js | 750 + ui/base1/ace/mode-pascal.js | 204 + ui/base1/ace/mode-perl.js | 318 + ui/base1/ace/mode-pgsql.js | 1860 + ui/base1/ace/mode-php.js | 14071 ++++ ui/base1/ace/mode-php_laravel_blade.js | 14259 ++++ ui/base1/ace/mode-pig.js | 278 + ui/base1/ace/mode-plain_text.js | 27 + ui/base1/ace/mode-plsql.js | 268 + ui/base1/ace/mode-powershell.js | 567 + ui/base1/ace/mode-praat.js | 412 + ui/base1/ace/mode-prisma.js | 457 + ui/base1/ace/mode-prolog.js | 305 + ui/base1/ace/mode-properties.js | 69 + ui/base1/ace/mode-protobuf.js | 498 + ui/base1/ace/mode-prql.js | 323 + ui/base1/ace/mode-puppet.js | 316 + ui/base1/ace/mode-python.js | 476 + ui/base1/ace/mode-qml.js | 346 + ui/base1/ace/mode-r.js | 387 + ui/base1/ace/mode-raku.js | 516 + ui/base1/ace/mode-razor.js | 2691 + ui/base1/ace/mode-rdoc.js | 286 + ui/base1/ace/mode-red.js | 388 + ui/base1/ace/mode-redshift.js | 321 + ui/base1/ace/mode-rhtml.js | 2750 + ui/base1/ace/mode-robot.js | 168 + ui/base1/ace/mode-rst.js | 245 + ui/base1/ace/mode-ruby.js | 921 + ui/base1/ace/mode-rust.js | 392 + ui/base1/ace/mode-sac.js | 349 + ui/base1/ace/mode-sass.js | 480 + ui/base1/ace/mode-scad.js | 350 + ui/base1/ace/mode-scala.js | 1394 + ui/base1/ace/mode-scheme.js | 210 + ui/base1/ace/mode-scrypt.js | 317 + ui/base1/ace/mode-scss.js | 768 + ui/base1/ace/mode-sh.js | 387 + ui/base1/ace/mode-sjs.js | 1393 + ui/base1/ace/mode-slim.js | 4770 ++ ui/base1/ace/mode-smarty.js | 2436 + ui/base1/ace/mode-smithy.js | 456 + ui/base1/ace/mode-snippets.js | 183 + ui/base1/ace/mode-soy_template.js | 2611 + ui/base1/ace/mode-space.js | 151 + ui/base1/ace/mode-sparql.js | 288 + ui/base1/ace/mode-sql.js | 221 + ui/base1/ace/mode-sqlserver.js | 391 + ui/base1/ace/mode-stylus.js | 443 + ui/base1/ace/mode-svg.js | 1487 + ui/base1/ace/mode-swift.js | 342 + ui/base1/ace/mode-tcl.js | 338 + ui/base1/ace/mode-terraform.js | 346 + ui/base1/ace/mode-tex.js | 212 + ui/base1/ace/mode-text.js | 9 + ui/base1/ace/mode-textile.js | 125 + ui/base1/ace/mode-toml.js | 129 + ui/base1/ace/mode-tsx.js | 1276 + ui/base1/ace/mode-turtle.js | 264 + ui/base1/ace/mode-twig.js | 2502 + ui/base1/ace/mode-typescript.js | 1254 + ui/base1/ace/mode-vala.js | 554 + ui/base1/ace/mode-vbscript.js | 602 + ui/base1/ace/mode-velocity.js | 2580 + ui/base1/ace/mode-verilog.js | 98 + ui/base1/ace/mode-vhdl.js | 94 + ui/base1/ace/mode-visualforce.js | 2454 + ui/base1/ace/mode-vue.js | 3834 + ui/base1/ace/mode-wollok.js | 1328 + ui/base1/ace/mode-xml.js | 477 + ui/base1/ace/mode-xquery.js | 2589 + ui/base1/ace/mode-yaml.js | 395 + ui/base1/ace/mode-zeek.js | 502 + ui/base1/ace/mode-zig.js | 585 + ui/base1/ace/theme-ambiance.js | 18 + ui/base1/ace/theme-chaos.js | 18 + ui/base1/ace/theme-chrome.js | 18 + ui/base1/ace/theme-cloud9_day.js | 19 + ui/base1/ace/theme-cloud9_night.js | 18 + ui/base1/ace/theme-cloud9_night_low_color.js | 18 + ui/base1/ace/theme-cloud_editor.js | 18 + ui/base1/ace/theme-cloud_editor_dark.js | 18 + ui/base1/ace/theme-clouds.js | 18 + ui/base1/ace/theme-clouds_midnight.js | 18 + ui/base1/ace/theme-cobalt.js | 18 + ui/base1/ace/theme-crimson_editor.js | 18 + ui/base1/ace/theme-dawn.js | 18 + ui/base1/ace/theme-dracula.js | 19 + ui/base1/ace/theme-dreamweaver.js | 18 + ui/base1/ace/theme-eclipse.js | 19 + ui/base1/ace/theme-github.js | 18 + ui/base1/ace/theme-github_dark.js | 18 + ui/base1/ace/theme-github_light_default.js | 18 + ui/base1/ace/theme-gob.js | 18 + ui/base1/ace/theme-gruvbox.js | 18 + ui/base1/ace/theme-gruvbox_dark_hard.js | 18 + ui/base1/ace/theme-gruvbox_light_hard.js | 18 + ui/base1/ace/theme-idle_fingers.js | 18 + ui/base1/ace/theme-iplastic.js | 18 + ui/base1/ace/theme-katzenmilch.js | 18 + ui/base1/ace/theme-kr_theme.js | 18 + ui/base1/ace/theme-kuroir.js | 18 + ui/base1/ace/theme-merbivore.js | 18 + ui/base1/ace/theme-merbivore_soft.js | 18 + ui/base1/ace/theme-mono_industrial.js | 18 + ui/base1/ace/theme-monokai.js | 18 + ui/base1/ace/theme-nord_dark.js | 19 + ui/base1/ace/theme-one_dark.js | 18 + ui/base1/ace/theme-pastel_on_dark.js | 18 + ui/base1/ace/theme-solarized_dark.js | 18 + ui/base1/ace/theme-solarized_light.js | 18 + ui/base1/ace/theme-sqlserver.js | 18 + ui/base1/ace/theme-terminal.js | 18 + ui/base1/ace/theme-textmate.js | 16 + ui/base1/ace/theme-tomorrow.js | 18 + ui/base1/ace/theme-tomorrow_night.js | 18 + ui/base1/ace/theme-tomorrow_night_blue.js | 18 + ui/base1/ace/theme-tomorrow_night_bright.js | 18 + ui/base1/ace/theme-tomorrow_night_eighties.js | 18 + ui/base1/ace/theme-twilight.js | 18 + ui/base1/ace/theme-vibrant_ink.js | 18 + ui/base1/ace/theme-xcode.js | 18 + ui/base1/ace/worker-base.js | 1332 + ui/base1/ace/worker-coffee.js | 1381 + ui/base1/ace/worker-css.js | 8913 +++ ui/base1/ace/worker-html.js | 10843 +++ ui/base1/ace/worker-javascript.js | 15404 +++++ ui/base1/ace/worker-json.js | 1626 + ui/base1/ace/worker-lua.js | 3519 + ui/base1/ace/worker-php.js | 3788 + ui/base1/ace/worker-xml.js | 3122 + ui/base1/ace/worker-xquery.js | 57579 ++++++++++++++++ ui/base1/ace/worker-yaml.js | 5841 ++ 280 files changed, 336404 insertions(+) create mode 100644 ui/base1/ace/ace.js create mode 100644 ui/base1/ace/ext-beautify.js create mode 100644 ui/base1/ace/ext-code_lens.js create mode 100644 ui/base1/ace/ext-command_bar.js create mode 100644 ui/base1/ace/ext-elastic_tabstops_lite.js create mode 100644 ui/base1/ace/ext-emmet.js create mode 100644 ui/base1/ace/ext-error_marker.js create mode 100644 ui/base1/ace/ext-hardwrap.js create mode 100644 ui/base1/ace/ext-inline_autocomplete.js create mode 100644 ui/base1/ace/ext-keybinding_menu.js create mode 100644 ui/base1/ace/ext-language_tools.js create mode 100644 ui/base1/ace/ext-linking.js create mode 100644 ui/base1/ace/ext-modelist.js create mode 100644 ui/base1/ace/ext-options.js create mode 100644 ui/base1/ace/ext-prompt.js create mode 100644 ui/base1/ace/ext-rtl.js create mode 100644 ui/base1/ace/ext-searchbox.js create mode 100644 ui/base1/ace/ext-settings_menu.js create mode 100644 ui/base1/ace/ext-simple_tokenizer.js create mode 100644 ui/base1/ace/ext-spellcheck.js create mode 100644 ui/base1/ace/ext-split.js create mode 100644 ui/base1/ace/ext-static_highlight.js create mode 100644 ui/base1/ace/ext-statusbar.js create mode 100644 ui/base1/ace/ext-textarea.js create mode 100644 ui/base1/ace/ext-themelist.js create mode 100644 ui/base1/ace/ext-whitespace.js create mode 100644 ui/base1/ace/keybinding-emacs.js create mode 100644 ui/base1/ace/keybinding-sublime.js create mode 100644 ui/base1/ace/keybinding-vim.js create mode 100644 ui/base1/ace/keybinding-vscode.js create mode 100644 ui/base1/ace/mode-abap.js create mode 100644 ui/base1/ace/mode-abc.js create mode 100644 ui/base1/ace/mode-actionscript.js create mode 100644 ui/base1/ace/mode-ada.js create mode 100644 ui/base1/ace/mode-alda.js create mode 100644 ui/base1/ace/mode-apache_conf.js create mode 100644 ui/base1/ace/mode-apex.js create mode 100644 ui/base1/ace/mode-applescript.js create mode 100644 ui/base1/ace/mode-aql.js create mode 100644 ui/base1/ace/mode-asciidoc.js create mode 100644 ui/base1/ace/mode-asl.js create mode 100644 ui/base1/ace/mode-assembly_arm32.js create mode 100644 ui/base1/ace/mode-assembly_x86.js create mode 100644 ui/base1/ace/mode-astro.js create mode 100644 ui/base1/ace/mode-autohotkey.js create mode 100644 ui/base1/ace/mode-batchfile.js create mode 100644 ui/base1/ace/mode-bibtex.js create mode 100644 ui/base1/ace/mode-c9search.js create mode 100644 ui/base1/ace/mode-c_cpp.js create mode 100644 ui/base1/ace/mode-cirru.js create mode 100644 ui/base1/ace/mode-clojure.js create mode 100644 ui/base1/ace/mode-cobol.js create mode 100644 ui/base1/ace/mode-coffee.js create mode 100644 ui/base1/ace/mode-coldfusion.js create mode 100644 ui/base1/ace/mode-crystal.js create mode 100644 ui/base1/ace/mode-csharp.js create mode 100644 ui/base1/ace/mode-csound_document.js create mode 100644 ui/base1/ace/mode-csound_orchestra.js create mode 100644 ui/base1/ace/mode-csound_score.js create mode 100644 ui/base1/ace/mode-csp.js create mode 100644 ui/base1/ace/mode-css.js create mode 100644 ui/base1/ace/mode-curly.js create mode 100644 ui/base1/ace/mode-cuttlefish.js create mode 100644 ui/base1/ace/mode-d.js create mode 100644 ui/base1/ace/mode-dart.js create mode 100644 ui/base1/ace/mode-diff.js create mode 100644 ui/base1/ace/mode-django.js create mode 100644 ui/base1/ace/mode-dockerfile.js create mode 100644 ui/base1/ace/mode-dot.js create mode 100644 ui/base1/ace/mode-drools.js create mode 100644 ui/base1/ace/mode-edifact.js create mode 100644 ui/base1/ace/mode-eiffel.js create mode 100644 ui/base1/ace/mode-ejs.js create mode 100644 ui/base1/ace/mode-elixir.js create mode 100644 ui/base1/ace/mode-elm.js create mode 100644 ui/base1/ace/mode-erlang.js create mode 100644 ui/base1/ace/mode-flix.js create mode 100644 ui/base1/ace/mode-forth.js create mode 100644 ui/base1/ace/mode-fortran.js create mode 100644 ui/base1/ace/mode-fsharp.js create mode 100644 ui/base1/ace/mode-fsl.js create mode 100644 ui/base1/ace/mode-ftl.js create mode 100644 ui/base1/ace/mode-gcode.js create mode 100644 ui/base1/ace/mode-gherkin.js create mode 100644 ui/base1/ace/mode-gitignore.js create mode 100644 ui/base1/ace/mode-glsl.js create mode 100644 ui/base1/ace/mode-gobstones.js create mode 100644 ui/base1/ace/mode-golang.js create mode 100644 ui/base1/ace/mode-graphqlschema.js create mode 100644 ui/base1/ace/mode-groovy.js create mode 100644 ui/base1/ace/mode-haml.js create mode 100644 ui/base1/ace/mode-handlebars.js create mode 100644 ui/base1/ace/mode-haskell.js create mode 100644 ui/base1/ace/mode-haskell_cabal.js create mode 100644 ui/base1/ace/mode-haxe.js create mode 100644 ui/base1/ace/mode-hjson.js create mode 100644 ui/base1/ace/mode-html.js create mode 100644 ui/base1/ace/mode-html_elixir.js create mode 100644 ui/base1/ace/mode-html_ruby.js create mode 100644 ui/base1/ace/mode-ini.js create mode 100644 ui/base1/ace/mode-io.js create mode 100644 ui/base1/ace/mode-ion.js create mode 100644 ui/base1/ace/mode-jack.js create mode 100644 ui/base1/ace/mode-jade.js create mode 100644 ui/base1/ace/mode-java.js create mode 100644 ui/base1/ace/mode-javascript.js create mode 100644 ui/base1/ace/mode-jexl.js create mode 100644 ui/base1/ace/mode-json.js create mode 100644 ui/base1/ace/mode-json5.js create mode 100644 ui/base1/ace/mode-jsoniq.js create mode 100644 ui/base1/ace/mode-jsp.js create mode 100644 ui/base1/ace/mode-jssm.js create mode 100644 ui/base1/ace/mode-jsx.js create mode 100644 ui/base1/ace/mode-julia.js create mode 100644 ui/base1/ace/mode-kotlin.js create mode 100644 ui/base1/ace/mode-latex.js create mode 100644 ui/base1/ace/mode-latte.js create mode 100644 ui/base1/ace/mode-less.js create mode 100644 ui/base1/ace/mode-liquid.js create mode 100644 ui/base1/ace/mode-lisp.js create mode 100644 ui/base1/ace/mode-livescript.js create mode 100644 ui/base1/ace/mode-logiql.js create mode 100644 ui/base1/ace/mode-logtalk.js create mode 100644 ui/base1/ace/mode-lsl.js create mode 100644 ui/base1/ace/mode-lua.js create mode 100644 ui/base1/ace/mode-luapage.js create mode 100644 ui/base1/ace/mode-lucene.js create mode 100644 ui/base1/ace/mode-makefile.js create mode 100644 ui/base1/ace/mode-markdown.js create mode 100644 ui/base1/ace/mode-mask.js create mode 100644 ui/base1/ace/mode-matlab.js create mode 100644 ui/base1/ace/mode-maze.js create mode 100644 ui/base1/ace/mode-mediawiki.js create mode 100644 ui/base1/ace/mode-mel.js create mode 100644 ui/base1/ace/mode-mips.js create mode 100644 ui/base1/ace/mode-mixal.js create mode 100644 ui/base1/ace/mode-mushcode.js create mode 100644 ui/base1/ace/mode-mysql.js create mode 100644 ui/base1/ace/mode-nasal.js create mode 100644 ui/base1/ace/mode-nginx.js create mode 100644 ui/base1/ace/mode-nim.js create mode 100644 ui/base1/ace/mode-nix.js create mode 100644 ui/base1/ace/mode-nsis.js create mode 100644 ui/base1/ace/mode-nunjucks.js create mode 100644 ui/base1/ace/mode-objectivec.js create mode 100644 ui/base1/ace/mode-ocaml.js create mode 100644 ui/base1/ace/mode-odin.js create mode 100644 ui/base1/ace/mode-partiql.js create mode 100644 ui/base1/ace/mode-pascal.js create mode 100644 ui/base1/ace/mode-perl.js create mode 100644 ui/base1/ace/mode-pgsql.js create mode 100644 ui/base1/ace/mode-php.js create mode 100644 ui/base1/ace/mode-php_laravel_blade.js create mode 100644 ui/base1/ace/mode-pig.js create mode 100644 ui/base1/ace/mode-plain_text.js create mode 100644 ui/base1/ace/mode-plsql.js create mode 100644 ui/base1/ace/mode-powershell.js create mode 100644 ui/base1/ace/mode-praat.js create mode 100644 ui/base1/ace/mode-prisma.js create mode 100644 ui/base1/ace/mode-prolog.js create mode 100644 ui/base1/ace/mode-properties.js create mode 100644 ui/base1/ace/mode-protobuf.js create mode 100644 ui/base1/ace/mode-prql.js create mode 100644 ui/base1/ace/mode-puppet.js create mode 100644 ui/base1/ace/mode-python.js create mode 100644 ui/base1/ace/mode-qml.js create mode 100644 ui/base1/ace/mode-r.js create mode 100644 ui/base1/ace/mode-raku.js create mode 100644 ui/base1/ace/mode-razor.js create mode 100644 ui/base1/ace/mode-rdoc.js create mode 100644 ui/base1/ace/mode-red.js create mode 100644 ui/base1/ace/mode-redshift.js create mode 100644 ui/base1/ace/mode-rhtml.js create mode 100644 ui/base1/ace/mode-robot.js create mode 100644 ui/base1/ace/mode-rst.js create mode 100644 ui/base1/ace/mode-ruby.js create mode 100644 ui/base1/ace/mode-rust.js create mode 100644 ui/base1/ace/mode-sac.js create mode 100644 ui/base1/ace/mode-sass.js create mode 100644 ui/base1/ace/mode-scad.js create mode 100644 ui/base1/ace/mode-scala.js create mode 100644 ui/base1/ace/mode-scheme.js create mode 100644 ui/base1/ace/mode-scrypt.js create mode 100644 ui/base1/ace/mode-scss.js create mode 100644 ui/base1/ace/mode-sh.js create mode 100644 ui/base1/ace/mode-sjs.js create mode 100644 ui/base1/ace/mode-slim.js create mode 100644 ui/base1/ace/mode-smarty.js create mode 100644 ui/base1/ace/mode-smithy.js create mode 100644 ui/base1/ace/mode-snippets.js create mode 100644 ui/base1/ace/mode-soy_template.js create mode 100644 ui/base1/ace/mode-space.js create mode 100644 ui/base1/ace/mode-sparql.js create mode 100644 ui/base1/ace/mode-sql.js create mode 100644 ui/base1/ace/mode-sqlserver.js create mode 100644 ui/base1/ace/mode-stylus.js create mode 100644 ui/base1/ace/mode-svg.js create mode 100644 ui/base1/ace/mode-swift.js create mode 100644 ui/base1/ace/mode-tcl.js create mode 100644 ui/base1/ace/mode-terraform.js create mode 100644 ui/base1/ace/mode-tex.js create mode 100644 ui/base1/ace/mode-text.js create mode 100644 ui/base1/ace/mode-textile.js create mode 100644 ui/base1/ace/mode-toml.js create mode 100644 ui/base1/ace/mode-tsx.js create mode 100644 ui/base1/ace/mode-turtle.js create mode 100644 ui/base1/ace/mode-twig.js create mode 100644 ui/base1/ace/mode-typescript.js create mode 100644 ui/base1/ace/mode-vala.js create mode 100644 ui/base1/ace/mode-vbscript.js create mode 100644 ui/base1/ace/mode-velocity.js create mode 100644 ui/base1/ace/mode-verilog.js create mode 100644 ui/base1/ace/mode-vhdl.js create mode 100644 ui/base1/ace/mode-visualforce.js create mode 100644 ui/base1/ace/mode-vue.js create mode 100644 ui/base1/ace/mode-wollok.js create mode 100644 ui/base1/ace/mode-xml.js create mode 100644 ui/base1/ace/mode-xquery.js create mode 100644 ui/base1/ace/mode-yaml.js create mode 100644 ui/base1/ace/mode-zeek.js create mode 100644 ui/base1/ace/mode-zig.js create mode 100644 ui/base1/ace/theme-ambiance.js create mode 100644 ui/base1/ace/theme-chaos.js create mode 100644 ui/base1/ace/theme-chrome.js create mode 100644 ui/base1/ace/theme-cloud9_day.js create mode 100644 ui/base1/ace/theme-cloud9_night.js create mode 100644 ui/base1/ace/theme-cloud9_night_low_color.js create mode 100644 ui/base1/ace/theme-cloud_editor.js create mode 100644 ui/base1/ace/theme-cloud_editor_dark.js create mode 100644 ui/base1/ace/theme-clouds.js create mode 100644 ui/base1/ace/theme-clouds_midnight.js create mode 100644 ui/base1/ace/theme-cobalt.js create mode 100644 ui/base1/ace/theme-crimson_editor.js create mode 100644 ui/base1/ace/theme-dawn.js create mode 100644 ui/base1/ace/theme-dracula.js create mode 100644 ui/base1/ace/theme-dreamweaver.js create mode 100644 ui/base1/ace/theme-eclipse.js create mode 100644 ui/base1/ace/theme-github.js create mode 100644 ui/base1/ace/theme-github_dark.js create mode 100644 ui/base1/ace/theme-github_light_default.js create mode 100644 ui/base1/ace/theme-gob.js create mode 100644 ui/base1/ace/theme-gruvbox.js create mode 100644 ui/base1/ace/theme-gruvbox_dark_hard.js create mode 100644 ui/base1/ace/theme-gruvbox_light_hard.js create mode 100644 ui/base1/ace/theme-idle_fingers.js create mode 100644 ui/base1/ace/theme-iplastic.js create mode 100644 ui/base1/ace/theme-katzenmilch.js create mode 100644 ui/base1/ace/theme-kr_theme.js create mode 100644 ui/base1/ace/theme-kuroir.js create mode 100644 ui/base1/ace/theme-merbivore.js create mode 100644 ui/base1/ace/theme-merbivore_soft.js create mode 100644 ui/base1/ace/theme-mono_industrial.js create mode 100644 ui/base1/ace/theme-monokai.js create mode 100644 ui/base1/ace/theme-nord_dark.js create mode 100644 ui/base1/ace/theme-one_dark.js create mode 100644 ui/base1/ace/theme-pastel_on_dark.js create mode 100644 ui/base1/ace/theme-solarized_dark.js create mode 100644 ui/base1/ace/theme-solarized_light.js create mode 100644 ui/base1/ace/theme-sqlserver.js create mode 100644 ui/base1/ace/theme-terminal.js create mode 100644 ui/base1/ace/theme-textmate.js create mode 100644 ui/base1/ace/theme-tomorrow.js create mode 100644 ui/base1/ace/theme-tomorrow_night.js create mode 100644 ui/base1/ace/theme-tomorrow_night_blue.js create mode 100644 ui/base1/ace/theme-tomorrow_night_bright.js create mode 100644 ui/base1/ace/theme-tomorrow_night_eighties.js create mode 100644 ui/base1/ace/theme-twilight.js create mode 100644 ui/base1/ace/theme-vibrant_ink.js create mode 100644 ui/base1/ace/theme-xcode.js create mode 100644 ui/base1/ace/worker-base.js create mode 100644 ui/base1/ace/worker-coffee.js create mode 100644 ui/base1/ace/worker-css.js create mode 100644 ui/base1/ace/worker-html.js create mode 100644 ui/base1/ace/worker-javascript.js create mode 100644 ui/base1/ace/worker-json.js create mode 100644 ui/base1/ace/worker-lua.js create mode 100644 ui/base1/ace/worker-php.js create mode 100644 ui/base1/ace/worker-xml.js create mode 100644 ui/base1/ace/worker-xquery.js create mode 100644 ui/base1/ace/worker-yaml.js diff --git a/ui/base1/ace/ace.js b/ui/base1/ace/ace.js new file mode 100644 index 0000000..f0c1071 --- /dev/null +++ b/ui/base1/ace/ace.js @@ -0,0 +1,21443 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +/** + * Define a module along with a payload + * @param module a name for the payload + * @param payload a function to call with (require, exports, module) params + */ + +(function() { + +var ACE_NAMESPACE = ""; + +var global = (function() { return this; })(); +if (!global && typeof window != "undefined") global = window; // strict mode + + +if (!ACE_NAMESPACE && typeof requirejs !== "undefined") + return; + + +var define = function(module, deps, payload) { + if (typeof module !== "string") { + if (define.original) + define.original.apply(this, arguments); + else { + console.error("dropping module because define wasn\'t a string."); + console.trace(); + } + return; + } + if (arguments.length == 2) + payload = deps; + if (!define.modules[module]) { + define.payloads[module] = payload; + define.modules[module] = null; + } +}; + +define.modules = {}; +define.payloads = {}; + +/** + * Get at functionality define()ed using the function above + */ +var _require = function(parentId, module, callback) { + if (typeof module === "string") { + var payload = lookup(parentId, module); + if (payload != undefined) { + callback && callback(); + return payload; + } + } else if (Object.prototype.toString.call(module) === "[object Array]") { + var params = []; + for (var i = 0, l = module.length; i < l; ++i) { + var dep = lookup(parentId, module[i]); + if (dep == undefined && require.original) + return; + params.push(dep); + } + return callback && callback.apply(null, params) || true; + } +}; + +var require = function(module, callback) { + var packagedModule = _require("", module, callback); + if (packagedModule == undefined && require.original) + return require.original.apply(this, arguments); + return packagedModule; +}; + +var normalizeModule = function(parentId, moduleName) { + // normalize plugin requires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); + } + // normalize relative requires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = base + "/" + moduleName; + + while(moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + return moduleName; +}; + +/** + * Internal function to lookup moduleNames and resolve them by calling the + * definition function if needed. + */ +var lookup = function(parentId, moduleName) { + moduleName = normalizeModule(parentId, moduleName); + + var module = define.modules[moduleName]; + if (!module) { + module = define.payloads[moduleName]; + if (typeof module === 'function') { + var exports = {}; + var mod = { + id: moduleName, + uri: '', + exports: exports, + packaged: true + }; + + var req = function(module, callback) { + return _require(moduleName, module, callback); + }; + + var returnValue = module(req, exports, mod); + exports = returnValue || mod.exports; + define.modules[moduleName] = exports; + delete define.payloads[moduleName]; + } + module = define.modules[moduleName] = exports || module; + } + return module; +}; + +function exportAce(ns) { + var root = global; + if (ns) { + if (!global[ns]) + global[ns] = {}; + root = global[ns]; + } + + if (!root.define || !root.define.packaged) { + define.original = root.define; + root.define = define; + root.define.packaged = true; + } + + if (!root.require || !root.require.packaged) { + require.original = root.require; + root.require = require; + root.require.packaged = true; + } +} + +exportAce(ACE_NAMESPACE); + +})(); + +define("ace/lib/es6-shim",["require","exports","module"], function(require, exports, module){function defineProp(obj, name, val) { + Object.defineProperty(obj, name, { + value: val, + enumerable: false, + writable: true, + configurable: true + }); +} +if (!String.prototype.startsWith) { + defineProp(String.prototype, "startsWith", function (searchString, position) { + position = position || 0; + return this.lastIndexOf(searchString, position) === position; + }); +} +if (!String.prototype.endsWith) { + defineProp(String.prototype, "endsWith", function (searchString, position) { + var subjectString = this; + if (position === undefined || position > subjectString.length) { + position = subjectString.length; + } + position -= searchString.length; + var lastIndex = subjectString.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }); +} +if (!String.prototype.repeat) { + defineProp(String.prototype, "repeat", function (count) { + var result = ""; + var string = this; + while (count > 0) { + if (count & 1) + result += string; + if ((count >>= 1)) + string += string; + } + return result; + }); +} +if (!String.prototype.includes) { + defineProp(String.prototype, "includes", function (str, position) { + return this.indexOf(str, position) != -1; + }); +} +if (!Object.assign) { + Object.assign = function (target) { + if (target === undefined || target === null) { + throw new TypeError("Cannot convert undefined or null to object"); + } + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + Object.keys(source).forEach(function (key) { + output[key] = source[key]; + }); + } + } + return output; + }; +} +if (!Object.values) { + Object.values = function (o) { + return Object.keys(o).map(function (k) { + return o[k]; + }); + }; +} +if (!Array.prototype.find) { + defineProp(Array.prototype, "find", function (predicate) { + var len = this.length; + var thisArg = arguments[1]; + for (var k = 0; k < len; k++) { + var kValue = this[k]; + if (predicate.call(thisArg, kValue, k, this)) { + return kValue; + } + } + }); +} +if (!Array.prototype.findIndex) { + defineProp(Array.prototype, "findIndex", function (predicate) { + var len = this.length; + var thisArg = arguments[1]; + for (var k = 0; k < len; k++) { + var kValue = this[k]; + if (predicate.call(thisArg, kValue, k, this)) { + return k; + } + } + }); +} +if (!Array.prototype.includes) { + defineProp(Array.prototype, "includes", function (item, position) { + return this.indexOf(item, position) != -1; + }); +} +if (!Array.prototype.fill) { + defineProp(Array.prototype, "fill", function (value) { + var O = this; + var len = O.length >>> 0; + var start = arguments[1]; + var relativeStart = start >> 0; + var k = relativeStart < 0 + ? Math.max(len + relativeStart, 0) + : Math.min(relativeStart, len); + var end = arguments[2]; + var relativeEnd = end === undefined ? len : end >> 0; + var final = relativeEnd < 0 + ? Math.max(len + relativeEnd, 0) + : Math.min(relativeEnd, len); + while (k < final) { + O[k] = value; + k++; + } + return O; + }); +} +if (!Array.of) { + defineProp(Array, "of", function () { + return Array.prototype.slice.call(arguments); + }); +} + +}); + +define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"], function(require, exports, module){// vim:set ts=4 sts=4 sw=4 st: +"use strict"; +require("./es6-shim"); + +}); + +define("ace/lib/deep_copy",["require","exports","module"], function(require, exports, module){exports.deepCopy = function deepCopy(obj) { + if (typeof obj !== "object" || !obj) + return obj; + var copy; + if (Array.isArray(obj)) { + copy = []; + for (var key = 0; key < obj.length; key++) { + copy[key] = deepCopy(obj[key]); + } + return copy; + } + if (Object.prototype.toString.call(obj) !== "[object Object]") + return obj; + copy = {}; + for (var key in obj) + copy[key] = deepCopy(obj[key]); + return copy; +}; + +}); + +define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"], function(require, exports, module){"use strict"; +exports.last = function (a) { + return a[a.length - 1]; +}; +exports.stringReverse = function (string) { + return string.split("").reverse().join(""); +}; +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + if (count >>= 1) + string += string; + } + return result; +}; +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; +exports.copyObject = function (obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; +exports.copyArray = function (array) { + var copy = []; + for (var i = 0, l = array.length; i < l; i++) { + if (array[i] && typeof array[i] == "object") + copy[i] = this.copyObject(array[i]); + else + copy[i] = array[i]; + } + return copy; +}; +exports.deepCopy = require("./deep_copy").deepCopy; +exports.arrayToMap = function (arr) { + var map = {}; + for (var i = 0; i < arr.length; i++) { + map[arr[i]] = 1; + } + return map; +}; +exports.createMap = function (props) { + var map = Object.create(null); + for (var i in props) { + map[i] = props[i]; + } + return map; +}; +exports.arrayRemove = function (array, value) { + for (var i = 0; i <= array.length; i++) { + if (value === array[i]) { + array.splice(i, 1); + } + } +}; +exports.escapeRegExp = function (str) { + return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); +}; +exports.escapeHTML = function (str) { + return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 0xffff ? 2 : 1; +}; + +}); + +define("ace/lib/useragent",["require","exports","module"], function(require, exports, module){"use strict"; +exports.OS = { + LINUX: "LINUX", + MAC: "MAC", + WINDOWS: "WINDOWS" +}; +exports.getOS = function () { + if (exports.isMac) { + return exports.OS.MAC; + } + else if (exports.isLinux) { + return exports.OS.LINUX; + } + else { + return exports.OS.WINDOWS; + } +}; +var _navigator = typeof navigator == "object" ? navigator : {}; +var os = (/mac|win|linux/i.exec(_navigator.platform) || ["other"])[0].toLowerCase(); +var ua = _navigator.userAgent || ""; +var appName = _navigator.appName || ""; +exports.isWin = (os == "win"); +exports.isMac = (os == "mac"); +exports.isLinux = (os == "linux"); +exports.isIE = + (appName == "Microsoft Internet Explorer" || appName.indexOf("MSAppHost") >= 0) + ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || [])[1]) + : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || [])[1]); // for ie +exports.isOldIE = exports.isIE && exports.isIE < 9; +exports.isGecko = exports.isMozilla = ua.match(/ Gecko\/\d+/); +exports.isOpera = typeof opera == "object" && Object.prototype.toString.call(window["opera"]) == "[object Opera]"; +exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; +exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; +exports.isSafari = parseFloat(ua.split(" Safari/")[1]) && !exports.isChrome || undefined; +exports.isEdge = parseFloat(ua.split(" Edge/")[1]) || undefined; +exports.isAIR = ua.indexOf("AdobeAIR") >= 0; +exports.isAndroid = ua.indexOf("Android") >= 0; +exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; +exports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window["MSStream"]; +if (exports.isIOS) + exports.isMac = true; +exports.isMobile = exports.isIOS || exports.isAndroid; + +}); + +define("ace/lib/dom",["require","exports","module","ace/lib/useragent"], function(require, exports, module){"use strict"; +var useragent = require("./useragent"); +var XHTML_NS = "http://www.w3.org/1999/xhtml"; +exports.buildDom = function buildDom(arr, parent, refs) { + if (typeof arr == "string" && arr) { + var txt = document.createTextNode(arr); + if (parent) + parent.appendChild(txt); + return txt; + } + if (!Array.isArray(arr)) { + if (arr && arr.appendChild && parent) + parent.appendChild(arr); + return arr; + } + if (typeof arr[0] != "string" || !arr[0]) { + var els = []; + for (var i = 0; i < arr.length; i++) { + var ch = buildDom(arr[i], parent, refs); + ch && els.push(ch); + } + return els; + } + var el = document.createElement(arr[0]); + var options = arr[1]; + var childIndex = 1; + if (options && typeof options == "object" && !Array.isArray(options)) + childIndex = 2; + for (var i = childIndex; i < arr.length; i++) + buildDom(arr[i], el, refs); + if (childIndex == 2) { + Object.keys(options).forEach(function (n) { + var val = options[n]; + if (n === "class") { + el.className = Array.isArray(val) ? val.join(" ") : val; + } + else if (typeof val == "function" || n == "value" || n[0] == "$") { + el[n] = val; + } + else if (n === "ref") { + if (refs) + refs[val] = el; + } + else if (n === "style") { + if (typeof val == "string") + el.style.cssText = val; + } + else if (val != null) { + el.setAttribute(n, val); + } + }); + } + if (parent) + parent.appendChild(el); + return el; +}; +exports.getDocumentHead = function (doc) { + if (!doc) + doc = document; + return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; +}; +exports.createElement = function (tag, ns) { + return document.createElementNS ? + document.createElementNS(ns || XHTML_NS, tag) : + document.createElement(tag); +}; +exports.removeChildren = function (element) { + element.innerHTML = ""; +}; +exports.createTextNode = function (textContent, element) { + var doc = element ? element.ownerDocument : document; + return doc.createTextNode(textContent); +}; +exports.createFragment = function (element) { + var doc = element ? element.ownerDocument : document; + return doc.createDocumentFragment(); +}; +exports.hasCssClass = function (el, name) { + var classes = (el.className + "").split(/\s+/g); + return classes.indexOf(name) !== -1; +}; +exports.addCssClass = function (el, name) { + if (!exports.hasCssClass(el, name)) { + el.className += " " + name; + } +}; +exports.removeCssClass = function (el, name) { + var classes = el.className.split(/\s+/g); + while (true) { + var index = classes.indexOf(name); + if (index == -1) { + break; + } + classes.splice(index, 1); + } + el.className = classes.join(" "); +}; +exports.toggleCssClass = function (el, name) { + var classes = el.className.split(/\s+/g), add = true; + while (true) { + var index = classes.indexOf(name); + if (index == -1) { + break; + } + add = false; + classes.splice(index, 1); + } + if (add) + classes.push(name); + el.className = classes.join(" "); + return add; +}; +exports.setCssClass = function (node, className, include) { + if (include) { + exports.addCssClass(node, className); + } + else { + exports.removeCssClass(node, className); + } +}; +exports.hasCssString = function (id, doc) { + var index = 0, sheets; + doc = doc || document; + if ((sheets = doc.querySelectorAll("style"))) { + while (index < sheets.length) { + if (sheets[index++].id === id) { + return true; + } + } + } +}; +exports.removeElementById = function (id, doc) { + doc = doc || document; + if (doc.getElementById(id)) { + doc.getElementById(id).remove(); + } +}; +var strictCSP; +var cssCache = []; +exports.useStrictCSP = function (value) { + strictCSP = value; + if (value == false) + insertPendingStyles(); + else if (!cssCache) + cssCache = []; +}; +function insertPendingStyles() { + var cache = cssCache; + cssCache = null; + cache && cache.forEach(function (item) { + importCssString(item[0], item[1]); + }); +} +function importCssString(cssText, id, target) { + if (typeof document == "undefined") + return; + if (cssCache) { + if (target) { + insertPendingStyles(); + } + else if (target === false) { + return cssCache.push([cssText, id]); + } + } + if (strictCSP) + return; + var container = target; + if (!target || !target.getRootNode) { + container = document; + } + else { + container = target.getRootNode(); + if (!container || container == target) + container = document; + } + var doc = container.ownerDocument || container; + if (id && exports.hasCssString(id, container)) + return null; + if (id) + cssText += "\n/*# sourceURL=ace/css/" + id + " */"; + var style = exports.createElement("style"); + style.appendChild(doc.createTextNode(cssText)); + if (id) + style.id = id; + if (container == doc) + container = exports.getDocumentHead(doc); + container.insertBefore(style, container.firstChild); +} +exports.importCssString = importCssString; +exports.importCssStylsheet = function (uri, doc) { + exports.buildDom(["link", { rel: "stylesheet", href: uri }], exports.getDocumentHead(doc)); +}; +exports.scrollbarWidth = function (doc) { + var inner = exports.createElement("ace_inner"); + inner.style.width = "100%"; + inner.style.minWidth = "0px"; + inner.style.height = "200px"; + inner.style.display = "block"; + var outer = exports.createElement("ace_outer"); + var style = outer.style; + style.position = "absolute"; + style.left = "-10000px"; + style.overflow = "hidden"; + style.width = "200px"; + style.minWidth = "0px"; + style.height = "150px"; + style.display = "block"; + outer.appendChild(inner); + var body = (doc && doc.documentElement) || (document && document.documentElement); + if (!body) + return 0; + body.appendChild(outer); + var noScrollbar = inner.offsetWidth; + style.overflow = "scroll"; + var withScrollbar = inner.offsetWidth; + if (noScrollbar === withScrollbar) { + withScrollbar = outer.clientWidth; + } + body.removeChild(outer); + return noScrollbar - withScrollbar; +}; +exports.computedStyle = function (element, style) { + return window.getComputedStyle(element, "") || {}; +}; +exports.setStyle = function (styles, property, value) { + if (styles[property] !== value) { + styles[property] = value; + } +}; +exports.HAS_CSS_ANIMATION = false; +exports.HAS_CSS_TRANSFORMS = false; +exports.HI_DPI = useragent.isWin + ? typeof window !== "undefined" && window.devicePixelRatio >= 1.5 + : true; +if (useragent.isChromeOS) + exports.HI_DPI = false; +if (typeof document !== "undefined") { + var div = document.createElement("div"); + if (exports.HI_DPI && div.style.transform !== undefined) + exports.HAS_CSS_TRANSFORMS = true; + if (!useragent.isEdge && typeof div.style.animationName !== "undefined") + exports.HAS_CSS_ANIMATION = true; + div = null; +} +if (exports.HAS_CSS_TRANSFORMS) { + exports.translate = function (element, tx, ty) { + element.style.transform = "translate(" + Math.round(tx) + "px, " + Math.round(ty) + "px)"; + }; +} +else { + exports.translate = function (element, tx, ty) { + element.style.top = Math.round(ty) + "px"; + element.style.left = Math.round(tx) + "px"; + }; +} + +}); + +define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module){/* + * based on code from: + * + * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/requirejs for details + */ +"use strict"; +var dom = require("./dom"); +exports.get = function (url, callback) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + callback(xhr.responseText); + } + }; + xhr.send(null); +}; +exports.loadScript = function (path, callback) { + var head = dom.getDocumentHead(); + var s = document.createElement('script'); + s.src = path; + head.appendChild(s); + s.onload = s.onreadystatechange = function (_, isAbort) { + if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { + s = s.onload = s.onreadystatechange = null; + if (!isAbort) + callback(); + } + }; +}; +exports.qualifyURL = function (url) { + var a = document.createElement('a'); + a.href = url; + return a.href; +}; + +}); + +define("ace/lib/oop",["require","exports","module"], function(require, exports, module){"use strict"; +exports.inherits = function (ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; +exports.mixin = function (obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; +exports.implement = function (proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module){"use strict"; +var EventEmitter = {}; +var stopPropagation = function () { this.propagationStopped = true; }; +var preventDefault = function () { this.defaultPrevented = true; }; +EventEmitter._emit = + EventEmitter._dispatchEvent = function (eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + if (typeof e != "object" || !e) + e = {}; + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) { + listeners[i](e, this); + if (e.propagationStopped) + break; + } + if (defaultHandler && !e.defaultPrevented) + return defaultHandler(e, this); + }; +EventEmitter._signal = function (eventName, e) { + var listeners = (this._eventRegistry || {})[eventName]; + if (!listeners) + return; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) + listeners[i](e, this); +}; +EventEmitter.once = function (eventName, callback) { + var _self = this; + this.on(eventName, function newCallback() { + _self.off(eventName, newCallback); + callback.apply(null, arguments); + }); + if (!callback) { + return new Promise(function (resolve) { + callback = resolve; + }); + } +}; +EventEmitter.setDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + handlers = this._defaultHandlers = { _disabled_: {} }; + if (handlers[eventName]) { + var old = handlers[eventName]; + var disabled = handlers._disabled_[eventName]; + if (!disabled) + handlers._disabled_[eventName] = disabled = []; + disabled.push(old); + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } + handlers[eventName] = callback; +}; +EventEmitter.removeDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + return; + var disabled = handlers._disabled_[eventName]; + if (handlers[eventName] == callback) { + if (disabled) + this.setDefaultHandler(eventName, disabled.pop()); + } + else if (disabled) { + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } +}; +EventEmitter.on = + EventEmitter.addEventListener = function (eventName, callback, capturing) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + listeners = this._eventRegistry[eventName] = []; + if (listeners.indexOf(callback) == -1) + listeners[capturing ? "unshift" : "push"](callback); + return callback; + }; +EventEmitter.off = + EventEmitter.removeListener = + EventEmitter.removeEventListener = function (eventName, callback) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + return; + var index = listeners.indexOf(callback); + if (index !== -1) + listeners.splice(index, 1); + }; +EventEmitter.removeAllListeners = function (eventName) { + if (!eventName) + this._eventRegistry = this._defaultHandlers = undefined; + if (this._eventRegistry) + this._eventRegistry[eventName] = undefined; + if (this._defaultHandlers) + this._defaultHandlers[eventName] = undefined; +}; +exports.EventEmitter = EventEmitter; + +}); + +define("ace/lib/report_error",["require","exports","module"], function(require, exports, module){exports.reportError = function reportError(msg, data) { + var e = new Error(msg); + e["data"] = data; + if (typeof console == "object" && console.error) + console.error(e); + setTimeout(function () { throw e; }); +}; + +}); + +define("ace/lib/default_english_messages",["require","exports","module"], function(require, exports, module){var defaultEnglishMessages = { + "autocomplete.popup.aria-roledescription": "Autocomplete suggestions", + "autocomplete.popup.aria-label": "Autocomplete suggestions", + "autocomplete.popup.item.aria-roledescription": "item", + "autocomplete.loading": "Loading...", + "editor.scroller.aria-roledescription": "editor", + "editor.scroller.aria-label": "Editor content, press Enter to start editing, press Escape to exit", + "editor.gutter.aria-roledescription": "editor", + "editor.gutter.aria-label": "Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit", + "error-marker.good-state": "Looks good!", + "prompt.recently-used": "Recently used", + "prompt.other-commands": "Other commands", + "prompt.no-matching-commands": "No matching commands", + "search-box.find.placeholder": "Search for", + "search-box.find-all.text": "All", + "search-box.replace.placeholder": "Replace with", + "search-box.replace-next.text": "Replace", + "search-box.replace-all.text": "All", + "search-box.toggle-replace.title": "Toggle Replace mode", + "search-box.toggle-regexp.title": "RegExp Search", + "search-box.toggle-case.title": "CaseSensitive Search", + "search-box.toggle-whole-word.title": "Whole Word Search", + "search-box.toggle-in-selection.title": "Search In Selection", + "search-box.search-counter": "$0 of $1", + "text-input.aria-roledescription": "editor", + "text-input.aria-label": "Cursor at row $0", + "gutter.code-folding.range.aria-label": "Toggle code folding, rows $0 through $1", + "gutter.code-folding.closed.aria-label": "Toggle code folding, rows $0 through $1", + "gutter.code-folding.open.aria-label": "Toggle code folding, row $0", + "gutter.code-folding.closed.title": "Unfold code", + "gutter.code-folding.open.title": "Fold code", + "gutter.annotation.aria-label.error": "Error, read annotations row $0", + "gutter.annotation.aria-label.warning": "Warning, read annotations row $0", + "gutter.annotation.aria-label.info": "Info, read annotations row $0", + "inline-fold.closed.title": "Unfold code", + "gutter-tooltip.aria-label.error.singular": "error", + "gutter-tooltip.aria-label.error.plural": "errors", + "gutter-tooltip.aria-label.warning.singular": "warning", + "gutter-tooltip.aria-label.warning.plural": "warnings", + "gutter-tooltip.aria-label.info.singular": "information message", + "gutter-tooltip.aria-label.info.plural": "information messages", + "gutter.annotation.aria-label.security": "Security finding, read annotations row $0", + "gutter.annotation.aria-label.hint": "Suggestion, read annotations row $0", + "gutter-tooltip.aria-label.security.singular": "security finding", + "gutter-tooltip.aria-label.security.plural": "security findings", + "gutter-tooltip.aria-label.hint.singular": "suggestion", + "gutter-tooltip.aria-label.hint.plural": "suggestions" +}; +exports.defaultEnglishMessages = defaultEnglishMessages; + +}); + +define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"], function(require, exports, module){"no use strict"; +var oop = require("./oop"); +var EventEmitter = require("./event_emitter").EventEmitter; +var reportError = require("./report_error").reportError; +var defaultEnglishMessages = require("./default_english_messages").defaultEnglishMessages; +var optionsProvider = { + setOptions: function (optList) { + Object.keys(optList).forEach(function (key) { + this.setOption(key, optList[key]); + }, this); + }, + getOptions: function (optionNames) { + var result = {}; + if (!optionNames) { + var options = this.$options; + optionNames = Object.keys(options).filter(function (key) { + return !options[key].hidden; + }); + } + else if (!Array.isArray(optionNames)) { + result = optionNames; + optionNames = Object.keys(result); + } + optionNames.forEach(function (key) { + result[key] = this.getOption(key); + }, this); + return result; + }, + setOption: function (name, value) { + if (this["$" + name] === value) + return; + var opt = this.$options[name]; + if (!opt) { + return warn('misspelled option "' + name + '"'); + } + if (opt.forwardTo) + return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value); + if (!opt.handlesSet) + this["$" + name] = value; + if (opt && opt.set) + opt.set.call(this, value); + }, + getOption: function (name) { + var opt = this.$options[name]; + if (!opt) { + return warn('misspelled option "' + name + '"'); + } + if (opt.forwardTo) + return this[opt.forwardTo] && this[opt.forwardTo].getOption(name); + return opt && opt.get ? opt.get.call(this) : this["$" + name]; + } +}; +function warn(message) { + if (typeof console != "undefined" && console.warn) + console.warn.apply(console, arguments); +} +var messages; +var nlsPlaceholders; +var AppConfig = /** @class */ (function () { + function AppConfig() { + this.$defaultOptions = {}; + messages = defaultEnglishMessages; + nlsPlaceholders = "dollarSigns"; + } + AppConfig.prototype.defineOptions = function (obj, path, options) { + if (!obj.$options) + this.$defaultOptions[path] = obj.$options = {}; + Object.keys(options).forEach(function (key) { + var opt = options[key]; + if (typeof opt == "string") + opt = { forwardTo: opt }; + opt.name || (opt.name = key); + obj.$options[opt.name] = opt; + if ("initialValue" in opt) + obj["$" + opt.name] = opt.initialValue; + }); + oop.implement(obj, optionsProvider); + return this; + }; + AppConfig.prototype.resetOptions = function (obj) { + Object.keys(obj.$options).forEach(function (key) { + var opt = obj.$options[key]; + if ("value" in opt) + obj.setOption(key, opt.value); + }); + }; + AppConfig.prototype.setDefaultValue = function (path, name, value) { + if (!path) { + for (path in this.$defaultOptions) + if (this.$defaultOptions[path][name]) + break; + if (!this.$defaultOptions[path][name]) + return false; + } + var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {}); + if (opts[name]) { + if (opts.forwardTo) + this.setDefaultValue(opts.forwardTo, name, value); + else + opts[name].value = value; + } + }; + AppConfig.prototype.setDefaultValues = function (path, optionHash) { + Object.keys(optionHash).forEach(function (key) { + this.setDefaultValue(path, key, optionHash[key]); + }, this); + }; + AppConfig.prototype.setMessages = function (value, options) { + messages = value; + if (options && options.placeholders) { + nlsPlaceholders = options.placeholders; + } + }; + AppConfig.prototype.nls = function (key, defaultString, params) { + if (!messages[key]) { + warn("No message found for the key '" + key + "' in the provided messages, trying to find a translation for the default string '" + defaultString + "'."); + if (!messages[defaultString]) { + warn("No message found for the default string '" + defaultString + "' in the provided messages. Falling back to the default English message."); + } + } + var translated = messages[key] || messages[defaultString] || defaultString; + if (params) { + if (nlsPlaceholders === "dollarSigns") { + translated = translated.replace(/\$(\$|[\d]+)/g, function (_, dollarMatch) { + if (dollarMatch == "$") + return "$"; + return params[dollarMatch]; + }); + } + if (nlsPlaceholders === "curlyBrackets") { + translated = translated.replace(/\{([^\}]+)\}/g, function (_, curlyBracketMatch) { + return params[curlyBracketMatch]; + }); + } + } + return translated; + }; + return AppConfig; +}()); +AppConfig.prototype.warn = warn; +AppConfig.prototype.reportError = reportError; +oop.implement(AppConfig.prototype, EventEmitter); +exports.AppConfig = AppConfig; + +}); + +define("ace/theme/textmate-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"], function(require, exports, module){"use strict"; +exports.isDark = false; +exports.cssClass = "ace-tm"; +exports.cssText = require("./textmate-css"); +exports.$id = "ace/theme/textmate"; +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); + +define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"], function(require, exports, module){"no use strict"; +var lang = require("./lib/lang"); +var net = require("./lib/net"); +var dom = require("./lib/dom"); +var AppConfig = require("./lib/app_config").AppConfig; +module.exports = exports = new AppConfig(); +var options = { + packaged: false, + workerPath: null, + modePath: null, + themePath: null, + basePath: "", + suffix: ".js", + $moduleUrls: {}, + loadWorkerFromBlob: true, + sharedPopups: false, + useStrictCSP: null +}; +exports.get = function (key) { + if (!options.hasOwnProperty(key)) + throw new Error("Unknown config key: " + key); + return options[key]; +}; +exports.set = function (key, value) { + if (options.hasOwnProperty(key)) + options[key] = value; + else if (this.setDefaultValue("", key, value) == false) + throw new Error("Unknown config key: " + key); + if (key == "useStrictCSP") + dom.useStrictCSP(value); +}; +exports.all = function () { + return lang.copyObject(options); +}; +exports.$modes = {}; +exports.moduleUrl = function (name, component) { + if (options.$moduleUrls[name]) + return options.$moduleUrls[name]; + var parts = name.split("/"); + component = component || parts[parts.length - 2] || ""; + var sep = component == "snippets" ? "/" : "-"; + var base = parts[parts.length - 1]; + if (component == "worker" && sep == "-") { + var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g"); + base = base.replace(re, ""); + } + if ((!base || base == component) && parts.length > 1) + base = parts[parts.length - 2]; + var path = options[component + "Path"]; + if (path == null) { + path = options.basePath; + } + else if (sep == "/") { + component = sep = ""; + } + if (path && path.slice(-1) != "/") + path += "/"; + return path + component + sep + base + this.get("suffix"); +}; +exports.setModuleUrl = function (name, subst) { + return options.$moduleUrls[name] = subst; +}; +var loader = function (moduleName, cb) { + if (moduleName === "ace/theme/textmate" || moduleName === "./theme/textmate") + return cb(null, require("./theme/textmate")); + if (customLoader) + return customLoader(moduleName, cb); + console.error("loader is not configured"); +}; +var customLoader; +exports.setLoader = function (cb) { + customLoader = cb; +}; +exports.dynamicModules = Object.create(null); +exports.$loading = {}; +exports.$loaded = {}; +exports.loadModule = function (moduleId, onLoad) { + var loadedModule; + if (Array.isArray(moduleId)) { + var moduleType = moduleId[0]; + var moduleName = moduleId[1]; + } + else if (typeof moduleId == "string") { + var moduleName = moduleId; + } + var load = function (module) { + if (module && !exports.$loading[moduleName]) + return onLoad && onLoad(module); + if (!exports.$loading[moduleName]) + exports.$loading[moduleName] = []; + exports.$loading[moduleName].push(onLoad); + if (exports.$loading[moduleName].length > 1) + return; + var afterLoad = function () { + loader(moduleName, function (err, module) { + if (module) + exports.$loaded[moduleName] = module; + exports._emit("load.module", { name: moduleName, module: module }); + var listeners = exports.$loading[moduleName]; + exports.$loading[moduleName] = null; + listeners.forEach(function (onLoad) { + onLoad && onLoad(module); + }); + }); + }; + if (!exports.get("packaged")) + return afterLoad(); + net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); + reportErrorIfPathIsNotConfigured(); + }; + if (exports.dynamicModules[moduleName]) { + exports.dynamicModules[moduleName]().then(function (module) { + if (module.default) { + load(module.default); + } + else { + load(module); + } + }); + } + else { + try { + loadedModule = this.$require(moduleName); + } + catch (e) { } + load(loadedModule || exports.$loaded[moduleName]); + } +}; +exports.$require = function (moduleName) { + if (typeof module["require"] == "function") { + var req = "require"; + return module[req](moduleName); + } +}; +exports.setModuleLoader = function (moduleName, onLoad) { + exports.dynamicModules[moduleName] = onLoad; +}; +var reportErrorIfPathIsNotConfigured = function () { + if (!options.basePath && !options.workerPath + && !options.modePath && !options.themePath + && !Object.keys(options.$moduleUrls).length) { + console.error("Unable to infer path to ace from script src,", "use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes", "or with webpack use ace/webpack-resolver"); + reportErrorIfPathIsNotConfigured = function () { }; + } +}; +exports.version = "1.36.3"; + +}); + +define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"], function(require, exports, module) { +"use strict"; + +require("./lib/fixoldbrowsers"); +var config = require("./config"); +config.setLoader(function(moduleName, cb) { + require([moduleName], function(module) { + cb(null, module); + }); +}); + +var global = (function() { + return this || typeof window != "undefined" && window; +})(); + +module.exports = function(ace) { + config.init = init; + config.$require = require; + ace.require = require; + + if (typeof define === "function") + ace.define = define; +}; +init(true);function init(packaged) { + + if (!global || !global.document) + return; + + config.set("packaged", packaged || require.packaged || module.packaged || (global.define && define.packaged)); + + var scriptOptions = {}; + var scriptUrl = ""; + var currentScript = (document.currentScript || document._currentScript ); // native or polyfill + var currentDocument = currentScript && currentScript.ownerDocument || document; + + if (currentScript && currentScript.src) { + scriptUrl = currentScript.src.split(/[?#]/)[0].split("/").slice(0, -1).join("/") || ""; + } + + var scripts = currentDocument.getElementsByTagName("script"); + for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); + }; + Range.prototype.contains = function (row, column) { + return this.compare(row, column) == 0; + }; + Range.prototype.compareRange = function (range) { + var cmp, end = range.end, start = range.start; + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } + else if (cmp == 0) { + return 1; + } + else { + return 0; + } + } + else if (cmp == -1) { + return -2; + } + else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } + else if (cmp == 1) { + return 42; + } + else { + return 0; + } + } + }; + Range.prototype.comparePoint = function (p) { + return this.compare(p.row, p.column); + }; + Range.prototype.containsRange = function (range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + Range.prototype.intersects = function (range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + Range.prototype.isEnd = function (row, column) { + return this.end.row == row && this.end.column == column; + }; + Range.prototype.isStart = function (row, column) { + return this.start.row == row && this.start.column == column; + }; + Range.prototype.setStart = function (row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } + else { + this.start.row = row; + this.start.column = column; + } + }; + Range.prototype.setEnd = function (row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } + else { + this.end.row = row; + this.end.column = column; + } + }; + Range.prototype.inside = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideStart = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideEnd = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.compare = function (row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + } + } + if (row < this.start.row) + return -1; + if (row > this.end.row) + return 1; + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + return 0; + }; + Range.prototype.compareStart = function (row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareEnd = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareInside = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.clipRows = function (firstRow, lastRow) { + if (this.end.row > lastRow) + var end = { row: lastRow + 1, column: 0 }; + else if (this.end.row < firstRow) + var end = { row: firstRow, column: 0 }; + if (this.start.row > lastRow) + var start = { row: lastRow + 1, column: 0 }; + else if (this.start.row < firstRow) + var start = { row: firstRow, column: 0 }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.extend = function (row, column) { + var cmp = this.compare(row, column); + if (cmp == 0) + return this; + else if (cmp == -1) + var start = { row: row, column: column }; + else + var end = { row: row, column: column }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.isEmpty = function () { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + Range.prototype.isMultiLine = function () { + return (this.start.row !== this.end.row); + }; + Range.prototype.clone = function () { + return Range.fromPoints(this.start, this.end); + }; + Range.prototype.collapseRows = function () { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0); + else + return new Range(this.start.row, 0, this.end.row, 0); + }; + Range.prototype.toScreenRange = function (session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column); + }; + Range.prototype.moveBy = function (row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + return Range; +}()); +Range.fromPoints = function (start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = function (p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; +exports.Range = Range; + +}); + +define("ace/lib/keys",["require","exports","module","ace/lib/oop"], function(require, exports, module){"use strict"; +var oop = require("./oop"); +var Keys = { + MODIFIER_KEYS: { + 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta', + 91: 'MetaLeft', 92: 'MetaRight', 93: 'ContextMenu' + }, + KEY_MODS: { + "ctrl": 1, "alt": 2, "option": 2, "shift": 4, + "super": 8, "meta": 8, "command": 8, "cmd": 8, + "control": 1 + }, + FUNCTION_KEYS: { + 8: "Backspace", + 9: "Tab", + 13: "Return", + 19: "Pause", + 27: "Esc", + 32: "Space", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "Left", + 38: "Up", + 39: "Right", + 40: "Down", + 44: "Print", + 45: "Insert", + 46: "Delete", + '-13': "NumpadEnter", + 144: "Numlock", + 145: "Scrolllock" + }, + PRINTABLE_KEYS: { + 32: ' ', 59: ';', 61: '=', 107: '+', 109: '-', 110: '.', + 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', + 219: '[', 220: '\\', 221: ']', 222: "'", 111: '/', 106: '*' + } +}; +var codeToKeyCode = { + Command: 224, + Backspace: 8, + Tab: 9, + Return: 13, + Enter: 13, + Pause: 19, + Escape: 27, + PageUp: 33, + PageDown: 34, + End: 35, + Home: 36, + Insert: 45, + Delete: 46, + ArrowLeft: 37, + ArrowUp: 38, + ArrowRight: 39, + ArrowDown: 40, + Backquote: 192, + Minus: 189, + Equal: 187, + BracketLeft: 219, + Backslash: 220, + BracketRight: 221, + Semicolon: 186, + Quote: 222, + Comma: 188, + Period: 190, + Slash: 191, + Space: 32, + NumpadAdd: 107, + NumpadDecimal: 110, + NumpadSubtract: 109, + NumpadDivide: 111, + NumpadMultiply: 106 +}; +for (var i = 0; i < 10; i++) { + codeToKeyCode["Digit" + i] = 48 + i; + codeToKeyCode["Numpad" + i] = 96 + i; + Keys.PRINTABLE_KEYS[48 + i] = "" + i; + Keys.FUNCTION_KEYS[96 + i] = "Numpad" + i; +} +for (var i = 65; i < 91; i++) { + var chr = String.fromCharCode(i + 32); + codeToKeyCode["Key" + chr.toUpperCase()] = i; + Keys.PRINTABLE_KEYS[i] = chr; +} +for (var i = 1; i < 13; i++) { + codeToKeyCode["F" + i] = 111 + i; + Keys.FUNCTION_KEYS[111 + i] = "F" + i; +} +var modifiers = { + Shift: 16, + Control: 17, + Alt: 18, + Meta: 224 +}; +for (var mod in modifiers) { + codeToKeyCode[mod] = codeToKeyCode[mod + "Left"] + = codeToKeyCode[mod + "Right"] = modifiers[mod]; +} +exports.$codeToKeyCode = codeToKeyCode; +Keys.PRINTABLE_KEYS[173] = '-'; +for (var j in Keys.FUNCTION_KEYS) { + var name = Keys.FUNCTION_KEYS[j].toLowerCase(); + Keys[name] = parseInt(j, 10); +} +for (var j in Keys.PRINTABLE_KEYS) { + var name = Keys.PRINTABLE_KEYS[j].toLowerCase(); + Keys[name] = parseInt(j, 10); +} +oop.mixin(Keys, Keys.MODIFIER_KEYS); +oop.mixin(Keys, Keys.PRINTABLE_KEYS); +oop.mixin(Keys, Keys.FUNCTION_KEYS); +Keys.enter = Keys["return"]; +Keys.escape = Keys.esc; +Keys.del = Keys["delete"]; +(function () { + var mods = ["cmd", "ctrl", "alt", "shift"]; + for (var i = Math.pow(2, mods.length); i--;) { + Keys.KEY_MODS[i] = mods.filter(function (x) { + return i & Keys.KEY_MODS[x]; + }).join("-") + "-"; + } +})(); +Keys.KEY_MODS[0] = ""; +Keys.KEY_MODS[-1] = "input-"; +oop.mixin(exports, Keys); +exports.default = exports; +exports.keyCodeToString = function (keyCode) { + var keyString = Keys[keyCode]; + if (typeof keyString != "string") + keyString = String.fromCharCode(keyCode); + return keyString.toLowerCase(); +}; + +}); + +define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module){"use strict"; var keys = require("./keys"); +var useragent = require("./useragent"); +var pressedKeys = null; +var ts = 0; +var activeListenerOptions; +function detectListenerOptionsSupport() { + activeListenerOptions = false; + try { + document.createComment("").addEventListener("test", function () { }, { + get passive() { + activeListenerOptions = { passive: false }; + return true; + } + }); + } + catch (e) { } +} +function getListenerOptions() { + if (activeListenerOptions == undefined) + detectListenerOptionsSupport(); + return activeListenerOptions; +} +function EventListener(elem, type, callback) { + this.elem = elem; + this.type = type; + this.callback = callback; +} +EventListener.prototype.destroy = function () { + removeListener(this.elem, this.type, this.callback); + this.elem = this.type = this.callback = undefined; +}; +var addListener = exports.addListener = function (elem, type, callback, /**@type{any?}*/ destroyer) { + elem.addEventListener(type, callback, getListenerOptions()); + if (destroyer) + destroyer.$toDestroy.push(new EventListener(elem, type, callback)); +}; +var removeListener = exports.removeListener = function (elem, type, callback) { + elem.removeEventListener(type, callback, getListenerOptions()); +}; +exports.stopEvent = function (e) { + exports.stopPropagation(e); + exports.preventDefault(e); + return false; +}; +exports.stopPropagation = function (e) { + if (e.stopPropagation) + e.stopPropagation(); +}; +exports.preventDefault = function (e) { + if (e.preventDefault) + e.preventDefault(); +}; +exports.getButton = function (e) { + if (e.type == "dblclick") + return 0; + if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) + return 2; + return e.button; +}; +exports.capture = function (el, eventHandler, releaseCaptureHandler) { + var ownerDocument = el && el.ownerDocument || document; + function onMouseUp(e) { + eventHandler && eventHandler(e); + releaseCaptureHandler && releaseCaptureHandler(e); + removeListener(ownerDocument, "mousemove", eventHandler); + removeListener(ownerDocument, "mouseup", onMouseUp); + removeListener(ownerDocument, "dragstart", onMouseUp); + } + addListener(ownerDocument, "mousemove", eventHandler); + addListener(ownerDocument, "mouseup", onMouseUp); + addListener(ownerDocument, "dragstart", onMouseUp); + return onMouseUp; +}; +exports.addMouseWheelListener = function (el, callback, destroyer) { + addListener(el, "wheel", function (e) { + var factor = 0.15; + var deltaX = e.deltaX || 0; + var deltaY = e.deltaY || 0; + switch (e.deltaMode) { + case e.DOM_DELTA_PIXEL: + e.wheelX = deltaX * factor; + e.wheelY = deltaY * factor; + break; + case e.DOM_DELTA_LINE: + var linePixels = 15; + e.wheelX = deltaX * linePixels; + e.wheelY = deltaY * linePixels; + break; + case e.DOM_DELTA_PAGE: + var pagePixels = 150; + e.wheelX = deltaX * pagePixels; + e.wheelY = deltaY * pagePixels; + break; + } + callback(e); + }, destroyer); +}; +exports.addMultiMouseDownListener = function (elements, timeouts, eventHandler, callbackName, destroyer) { + var clicks = 0; + var startX, startY, timer; + var eventNames = { + 2: "dblclick", + 3: "tripleclick", + 4: "quadclick" + }; + function onMousedown(e) { + if (exports.getButton(e) !== 0) { + clicks = 0; + } + else if (e.detail > 1) { + clicks++; + if (clicks > 4) + clicks = 1; + } + else { + clicks = 1; + } + if (useragent.isIE) { + var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; + if (!timer || isNewClick) + clicks = 1; + if (timer) + clearTimeout(timer); + timer = setTimeout(function () { timer = null; }, timeouts[clicks - 1] || 600); + if (clicks == 1) { + startX = e.clientX; + startY = e.clientY; + } + } + e._clicks = clicks; + eventHandler[callbackName]("mousedown", e); + if (clicks > 4) + clicks = 0; + else if (clicks > 1) + return eventHandler[callbackName](eventNames[clicks], e); + } + if (!Array.isArray(elements)) + elements = [elements]; + elements.forEach(function (el) { + addListener(el, "mousedown", onMousedown, destroyer); + }); +}; +function getModifierHash(e) { + return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); +} +exports.getModifierString = function (e) { + return keys.KEY_MODS[getModifierHash(e)]; +}; +function normalizeCommandKeys(callback, e, keyCode) { + var hashId = getModifierHash(e); + if (!keyCode && e.code) { + keyCode = keys.$codeToKeyCode[e.code] || keyCode; + } + if (!useragent.isMac && pressedKeys) { + if (e.getModifierState && (e.getModifierState("OS") || e.getModifierState("Win"))) + hashId |= 8; + if (pressedKeys.altGr) { + if ((3 & hashId) != 3) + pressedKeys.altGr = 0; + else + return; + } + if (keyCode === 18 || keyCode === 17) { + var location = e.location; + if (keyCode === 17 && location === 1) { + if (pressedKeys[keyCode] == 1) + ts = e.timeStamp; + } + else if (keyCode === 18 && hashId === 3 && location === 2) { + var dt = e.timeStamp - ts; + if (dt < 50) + pressedKeys.altGr = true; + } + } + } + if (keyCode in keys.MODIFIER_KEYS) { + keyCode = -1; + } + if (!hashId && keyCode === 13) { + if (e.location === 3) { + callback(e, hashId, -keyCode); + if (e.defaultPrevented) + return; + } + } + if (useragent.isChromeOS && hashId & 8) { + callback(e, hashId, keyCode); + if (e.defaultPrevented) + return; + else + hashId &= ~8; + } + if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { + return false; + } + return callback(e, hashId, keyCode); +} +exports.addCommandKeyListener = function (el, callback, destroyer) { + var lastDefaultPrevented = null; + addListener(el, "keydown", function (e) { + pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1; + var result = normalizeCommandKeys(callback, e, e.keyCode); + lastDefaultPrevented = e.defaultPrevented; + return result; + }, destroyer); + addListener(el, "keypress", function (e) { + if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { + exports.stopEvent(e); + lastDefaultPrevented = null; + } + }, destroyer); + addListener(el, "keyup", function (e) { + pressedKeys[e.keyCode] = null; + }, destroyer); + if (!pressedKeys) { + resetPressedKeys(); + addListener(window, "focus", resetPressedKeys); + } +}; +function resetPressedKeys() { + pressedKeys = Object.create(null); +} +if (typeof window == "object" && window.postMessage && !useragent.isOldIE) { + var postMessageId = 1; + exports.nextTick = function (callback, win) { + win = win || window; + var messageName = "zero-timeout-message-" + (postMessageId++); + var listener = function (e) { + if (e.data == messageName) { + exports.stopPropagation(e); + removeListener(win, "message", listener); + callback(); + } + }; + addListener(win, "message", listener); + win.postMessage(messageName, "*"); + }; +} +exports.$idleBlocked = false; +exports.onIdle = function (cb, timeout) { + return setTimeout(function handler() { + if (!exports.$idleBlocked) { + cb(); + } + else { + setTimeout(handler, 100); + } + }, timeout); +}; +exports.$idleBlockId = null; +exports.blockIdle = function (delay) { + if (exports.$idleBlockId) + clearTimeout(exports.$idleBlockId); + exports.$idleBlocked = true; + exports.$idleBlockId = setTimeout(function () { + exports.$idleBlocked = false; + }, delay || 100); +}; +exports.nextFrame = typeof window == "object" && (window.requestAnimationFrame + || window["mozRequestAnimationFrame"] + || window["webkitRequestAnimationFrame"] + || window["msRequestAnimationFrame"] + || window["oRequestAnimationFrame"]); +if (exports.nextFrame) + exports.nextFrame = exports.nextFrame.bind(window); +else + exports.nextFrame = function (callback) { + setTimeout(callback, 17); + }; + +}); + +define("ace/clipboard",["require","exports","module"], function(require, exports, module){"use strict"; +var $cancelT; +module.exports = { + lineMode: false, + pasteCancelled: function () { + if ($cancelT && $cancelT > Date.now() - 50) + return true; + return $cancelT = false; + }, + cancel: function () { + $cancelT = Date.now(); + } +}; + +}); + +define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"], function(require, exports, module){"use strict"; +var event = require("../lib/event"); +var nls = require("../config").nls; +var useragent = require("../lib/useragent"); +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var clipboard = require("../clipboard"); +var BROKEN_SETDATA = useragent.isChrome < 18; +var USE_IE_MIME_TYPE = useragent.isIE; +var HAS_FOCUS_ARGS = useragent.isChrome > 63; +var MAX_LINE_LENGTH = 400; +var KEYS = require("../lib/keys"); +var MODS = KEYS.KEY_MODS; +var isIOS = useragent.isIOS; +var valueResetRegex = isIOS ? /\s/ : /\n/; +var isMobile = useragent.isMobile; +var TextInput; +TextInput = function (parentNode, host) { + var text = dom.createElement("textarea"); + text.className = "ace_text-input"; + text.setAttribute("wrap", "off"); + text.setAttribute("autocorrect", "off"); + text.setAttribute("autocapitalize", "off"); + text.setAttribute("spellcheck", "false"); + text.style.opacity = "0"; + parentNode.insertBefore(text, parentNode.firstChild); + var copied = false; + var pasted = false; + var inComposition = false; + var sendingText = false; + var tempStyle = ''; + if (!isMobile) + text.style.fontSize = "1px"; + var commandMode = false; + var ignoreFocusEvents = false; + var lastValue = ""; + var lastSelectionStart = 0; + var lastSelectionEnd = 0; + var lastRestoreEnd = 0; + var rowStart = Number.MAX_SAFE_INTEGER; + var rowEnd = Number.MIN_SAFE_INTEGER; + var numberOfExtraLines = 0; + try { + var isFocused = document.activeElement === text; + } + catch (e) { } + this.setNumberOfExtraLines = function (number) { + rowStart = Number.MAX_SAFE_INTEGER; + rowEnd = Number.MIN_SAFE_INTEGER; + if (number < 0) { + numberOfExtraLines = 0; + return; + } + numberOfExtraLines = number; + }; + this.setAriaOptions = function (options) { + if (options.activeDescendant) { + text.setAttribute("aria-haspopup", "true"); + text.setAttribute("aria-autocomplete", options.inline ? "both" : "list"); + text.setAttribute("aria-activedescendant", options.activeDescendant); + } + else { + text.setAttribute("aria-haspopup", "false"); + text.setAttribute("aria-autocomplete", "both"); + text.removeAttribute("aria-activedescendant"); + } + if (options.role) { + text.setAttribute("role", options.role); + } + if (options.setLabel) { + text.setAttribute("aria-roledescription", nls("text-input.aria-roledescription", "editor")); + var arialLabel = ""; + if (host.$textInputAriaLabel) { + arialLabel += "".concat(host.$textInputAriaLabel, ", "); + } + if (host.session) { + var row = host.session.selection.cursor.row; + arialLabel += nls("text-input.aria-label", "Cursor at row $0", [row + 1]); + } + text.setAttribute("aria-label", arialLabel); + } + }; + this.setAriaOptions({ role: "textbox" }); + event.addListener(text, "blur", function (e) { + if (ignoreFocusEvents) + return; + host.onBlur(e); + isFocused = false; + }, host); + event.addListener(text, "focus", function (e) { + if (ignoreFocusEvents) + return; + isFocused = true; + if (useragent.isEdge) { + try { + if (!document.hasFocus()) + return; + } + catch (e) { } + } + host.onFocus(e); + if (useragent.isEdge) + setTimeout(resetSelection); + else + resetSelection(); + }, host); + this.$focusScroll = false; + this.focus = function () { + this.setAriaOptions({ + setLabel: host.renderer.enableKeyboardAccessibility + }); + if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == "browser") + return text.focus({ preventScroll: true }); + var top = text.style.top; + text.style.position = "fixed"; + text.style.top = "0px"; + try { + var isTransformed = text.getBoundingClientRect().top != 0; + } + catch (e) { + return; + } + var ancestors = []; + if (isTransformed) { + var t = text.parentElement; + while (t && t.nodeType == 1) { + ancestors.push(t); + t.setAttribute("ace_nocontext", "true"); + if (!t.parentElement && t.getRootNode) + t = t.getRootNode()["host"]; + else + t = t.parentElement; + } + } + text.focus({ preventScroll: true }); + if (isTransformed) { + ancestors.forEach(function (p) { + p.removeAttribute("ace_nocontext"); + }); + } + setTimeout(function () { + text.style.position = ""; + if (text.style.top == "0px") + text.style.top = top; + }, 0); + }; + this.blur = function () { + text.blur(); + }; + this.isFocused = function () { + return isFocused; + }; + host.on("beforeEndOperation", function () { + var curOp = host.curOp; + var commandName = curOp && curOp.command && curOp.command.name; + if (commandName == "insertstring") + return; + var isUserAction = commandName && (curOp.docChanged || curOp.selectionChanged); + if (inComposition && isUserAction) { + lastValue = text.value = ""; + onCompositionEnd(); + } + resetSelection(); + }); + var positionToSelection = function (row, column) { + var selection = column; + for (var i = 1; i <= row - rowStart && i < 2 * numberOfExtraLines + 1; i++) { + selection += host.session.getLine(row - i).length + 1; + } + return selection; + }; + var resetSelection = isIOS + ? function (value) { + if (!isFocused || (copied && !value) || sendingText) + return; + if (!value) + value = ""; + var newValue = "\n ab" + value + "cde fg\n"; + if (newValue != text.value) + text.value = lastValue = newValue; + var selectionStart = 4; + var selectionEnd = 4 + (value.length || (host.selection.isEmpty() ? 0 : 1)); + if (lastSelectionStart != selectionStart || lastSelectionEnd != selectionEnd) { + text.setSelectionRange(selectionStart, selectionEnd); + } + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + } + : function () { + if (inComposition || sendingText) + return; + if (!isFocused && !afterContextMenu) + return; + inComposition = true; + var selectionStart = 0; + var selectionEnd = 0; + var line = ""; + if (host.session) { + var selection = host.selection; + var range = selection.getRange(); + var row = selection.cursor.row; + if (row === rowEnd + 1) { + rowStart = rowEnd + 1; + rowEnd = rowStart + 2 * numberOfExtraLines; + } + else if (row === rowStart - 1) { + rowEnd = rowStart - 1; + rowStart = rowEnd - 2 * numberOfExtraLines; + } + else if (row < rowStart - 1 || row > rowEnd + 1) { + rowStart = row > numberOfExtraLines ? row - numberOfExtraLines : 0; + rowEnd = row > numberOfExtraLines ? row + numberOfExtraLines : 2 * numberOfExtraLines; + } + var lines = []; + for (var i = rowStart; i <= rowEnd; i++) { + lines.push(host.session.getLine(i)); + } + line = lines.join('\n'); + selectionStart = positionToSelection(range.start.row, range.start.column); + selectionEnd = positionToSelection(range.end.row, range.end.column); + if (range.start.row < rowStart) { + var prevLine = host.session.getLine(rowStart - 1); + selectionStart = range.start.row < rowStart - 1 ? 0 : selectionStart; + selectionEnd += prevLine.length + 1; + line = prevLine + "\n" + line; + } + else if (range.end.row > rowEnd) { + var nextLine = host.session.getLine(rowEnd + 1); + selectionEnd = range.end.row > rowEnd + 1 ? nextLine.length : range.end.column; + selectionEnd += line.length + 1; + line = line + "\n" + nextLine; + } + else if (isMobile && row > 0) { + line = "\n" + line; + selectionEnd += 1; + selectionStart += 1; + } + if (line.length > MAX_LINE_LENGTH) { + if (selectionStart < MAX_LINE_LENGTH && selectionEnd < MAX_LINE_LENGTH) { + line = line.slice(0, MAX_LINE_LENGTH); + } + else { + line = "\n"; + if (selectionStart == selectionEnd) { + selectionStart = selectionEnd = 0; + } + else { + selectionStart = 0; + selectionEnd = 1; + } + } + } + var newValue = line + "\n\n"; + if (newValue != lastValue) { + text.value = lastValue = newValue; + lastSelectionStart = lastSelectionEnd = newValue.length; + } + } + if (afterContextMenu) { + lastSelectionStart = text.selectionStart; + lastSelectionEnd = text.selectionEnd; + } + if (lastSelectionEnd != selectionEnd + || lastSelectionStart != selectionStart + || text.selectionEnd != lastSelectionEnd // on ie edge selectionEnd changes silently after the initialization + ) { + try { + text.setSelectionRange(selectionStart, selectionEnd); + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + } + catch (e) { } + } + inComposition = false; + }; + this.resetSelection = resetSelection; + if (isFocused) + host.onFocus(); + var isAllSelected = function (text) { + return text.selectionStart === 0 && text.selectionEnd >= lastValue.length + && text.value === lastValue && lastValue + && text.selectionEnd !== lastSelectionEnd; + }; + var onSelect = function (e) { + if (inComposition) + return; + if (copied) { + copied = false; + } + else if (isAllSelected(text)) { + host.selectAll(); + resetSelection(); + } + else if (isMobile && text.selectionStart != lastSelectionStart) { + resetSelection(); + } + }; + var inputHandler = null; + this.setInputHandler = function (cb) { inputHandler = cb; }; + this.getInputHandler = function () { return inputHandler; }; + var afterContextMenu = false; + var sendText = function (value, fromInput) { + if (afterContextMenu) + afterContextMenu = false; + if (pasted) { + resetSelection(); + if (value) + host.onPaste(value); + pasted = false; + return ""; + } + else { + var selectionStart = text.selectionStart; + var selectionEnd = text.selectionEnd; + var extendLeft = lastSelectionStart; + var extendRight = lastValue.length - lastSelectionEnd; + var inserted = value; + var restoreStart = value.length - selectionStart; + var restoreEnd = value.length - selectionEnd; + var i = 0; + while (extendLeft > 0 && lastValue[i] == value[i]) { + i++; + extendLeft--; + } + inserted = inserted.slice(i); + i = 1; + while (extendRight > 0 && lastValue.length - i > lastSelectionStart - 1 && lastValue[lastValue.length - i] == value[value.length - i]) { + i++; + extendRight--; + } + restoreStart -= i - 1; + restoreEnd -= i - 1; + var endIndex = inserted.length - i + 1; + if (endIndex < 0) { + extendLeft = -endIndex; + endIndex = 0; + } + inserted = inserted.slice(0, endIndex); + if (!fromInput && !inserted && !restoreStart && !extendLeft && !extendRight && !restoreEnd) + return ""; + sendingText = true; + var shouldReset = false; + if (useragent.isAndroid && inserted == ". ") { + inserted = " "; + shouldReset = true; + } + if (inserted && !extendLeft && !extendRight && !restoreStart && !restoreEnd || commandMode) { + host.onTextInput(inserted); + } + else { + host.onTextInput(inserted, { + extendLeft: extendLeft, + extendRight: extendRight, + restoreStart: restoreStart, + restoreEnd: restoreEnd + }); + } + sendingText = false; + lastValue = value; + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + lastRestoreEnd = restoreEnd; + return shouldReset ? "\n" : inserted; + } + }; + var onInput = function (e) { + if (inComposition) + return onCompositionUpdate(); + if (e && e.inputType) { + if (e.inputType == "historyUndo") + return host.execCommand("undo"); + if (e.inputType == "historyRedo") + return host.execCommand("redo"); + } + var data = text.value; + var inserted = sendText(data, true); + if (data.length > MAX_LINE_LENGTH + 100 + || valueResetRegex.test(inserted) + || isMobile && lastSelectionStart < 1 && lastSelectionStart == lastSelectionEnd) { + resetSelection(); + } + }; + var handleClipboardData = function (e, data, forceIEMime) { + var clipboardData = e.clipboardData || window["clipboardData"]; + if (!clipboardData || BROKEN_SETDATA) + return; + var mime = USE_IE_MIME_TYPE || forceIEMime ? "Text" : "text/plain"; + try { + if (data) { + return clipboardData.setData(mime, data) !== false; + } + else { + return clipboardData.getData(mime); + } + } + catch (e) { + if (!forceIEMime) + return handleClipboardData(e, data, true); + } + }; + var doCopy = function (e, isCut) { + var data = host.getCopyText(); + if (!data) + return event.preventDefault(e); + if (handleClipboardData(e, data)) { + if (isIOS) { + resetSelection(data); + copied = data; + setTimeout(function () { + copied = false; + }, 10); + } + isCut ? host.onCut() : host.onCopy(); + event.preventDefault(e); + } + else { + copied = true; + text.value = data; + text.select(); + setTimeout(function () { + copied = false; + resetSelection(); + isCut ? host.onCut() : host.onCopy(); + }); + } + }; + var onCut = function (e) { + doCopy(e, true); + }; + var onCopy = function (e) { + doCopy(e, false); + }; + var onPaste = function (e) { + var data = handleClipboardData(e); + if (clipboard.pasteCancelled()) + return; + if (typeof data == "string") { + if (data) + host.onPaste(data, e); + if (useragent.isIE) + setTimeout(resetSelection); + event.preventDefault(e); + } + else { + text.value = ""; + pasted = true; + } + }; + event.addCommandKeyListener(text, function (e, hashId, keyCode) { + if (inComposition) + return; + return host.onCommandKey(e, hashId, keyCode); + }, host); + event.addListener(text, "select", onSelect, host); + event.addListener(text, "input", onInput, host); + event.addListener(text, "cut", onCut, host); + event.addListener(text, "copy", onCopy, host); + event.addListener(text, "paste", onPaste, host); + if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) { + event.addListener(parentNode, "keydown", function (e) { + if ((useragent.isMac && !e.metaKey) || !e.ctrlKey) + return; + switch (e.keyCode) { + case 67: + onCopy(e); + break; + case 86: + onPaste(e); + break; + case 88: + onCut(e); + break; + } + }, host); + } + var onCompositionStart = function (e) { + if (inComposition || !host.onCompositionStart || host.$readOnly) + return; + inComposition = {}; + if (commandMode) + return; + if (e.data) + inComposition.useTextareaForIME = false; + setTimeout(onCompositionUpdate, 0); + host._signal("compositionStart"); + host.on("mousedown", cancelComposition); + var range = host.getSelectionRange(); + range.end.row = range.start.row; + range.end.column = range.start.column; + inComposition.markerRange = range; + inComposition.selectionStart = lastSelectionStart; + host.onCompositionStart(inComposition); + if (inComposition.useTextareaForIME) { + lastValue = text.value = ""; + lastSelectionStart = 0; + lastSelectionEnd = 0; + } + else { + if (text.msGetInputContext) + inComposition.context = text.msGetInputContext(); + if (text.getInputContext) + inComposition.context = text.getInputContext(); + } + }; + var onCompositionUpdate = function () { + if (!inComposition || !host.onCompositionUpdate || host.$readOnly) + return; + if (commandMode) + return cancelComposition(); + if (inComposition.useTextareaForIME) { + host.onCompositionUpdate(text.value); + } + else { + var data = text.value; + sendText(data); + if (inComposition.markerRange) { + if (inComposition.context) { + inComposition.markerRange.start.column = inComposition.selectionStart + = inComposition.context.compositionStartOffset; + } + inComposition.markerRange.end.column = inComposition.markerRange.start.column + + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd; + } + } + }; + var onCompositionEnd = function (e) { + if (!host.onCompositionEnd || host.$readOnly) + return; + inComposition = false; + host.onCompositionEnd(); + host.off("mousedown", cancelComposition); + if (e) + onInput(); + }; + function cancelComposition() { + ignoreFocusEvents = true; + text.blur(); + text.focus(); + ignoreFocusEvents = false; + } + var syncComposition = lang.delayedCall(onCompositionUpdate, 50).schedule.bind(null, null); + function onKeyup(e) { + if (e.keyCode == 27 && text.value.length < text.selectionStart) { + if (!inComposition) + lastValue = text.value; + lastSelectionStart = lastSelectionEnd = -1; + resetSelection(); + } + syncComposition(); + } + event.addListener(text, "compositionstart", onCompositionStart, host); + event.addListener(text, "compositionupdate", onCompositionUpdate, host); + event.addListener(text, "keyup", onKeyup, host); + event.addListener(text, "keydown", syncComposition, host); + event.addListener(text, "compositionend", onCompositionEnd, host); + this.getElement = function () { + return text; + }; + this.setCommandMode = function (value) { + commandMode = value; + text.readOnly = false; + }; + this.setReadOnly = function (readOnly) { + if (!commandMode) + text.readOnly = readOnly; + }; + this.setCopyWithEmptySelection = function (value) { + }; + this.onContextMenu = function (e) { + afterContextMenu = true; + resetSelection(); + host._emit("nativecontextmenu", { target: host, domEvent: e }); + this.moveToMouse(e, true); + }; + this.moveToMouse = function (e, bringToFront) { + if (!tempStyle) + tempStyle = text.style.cssText; + text.style.cssText = (bringToFront ? "z-index:100000;" : "") + + (useragent.isIE ? "opacity:0.1;" : "") + + "text-indent: -" + (lastSelectionStart + lastSelectionEnd) * host.renderer.characterWidth * 0.5 + "px;"; + var rect = host.container.getBoundingClientRect(); + var style = dom.computedStyle(host.container); + var top = rect.top + (parseInt(style.borderTopWidth) || 0); + var left = rect.left + (parseInt(rect.borderLeftWidth) || 0); + var maxTop = rect.bottom - top - text.clientHeight - 2; + var move = function (e) { + dom.translate(text, e.clientX - left - 2, Math.min(e.clientY - top - 2, maxTop)); + }; + move(e); + if (e.type != "mousedown") + return; + host.renderer.$isMousePressed = true; + clearTimeout(closeTimeout); + if (useragent.isWin) + event.capture(host.container, move, onContextMenuClose); + }; + this.onContextMenuClose = onContextMenuClose; + var closeTimeout; + function onContextMenuClose() { + clearTimeout(closeTimeout); + closeTimeout = setTimeout(function () { + if (tempStyle) { + text.style.cssText = tempStyle; + tempStyle = ''; + } + host.renderer.$isMousePressed = false; + if (host.renderer.$keepTextAreaAtCursor) + host.renderer.$moveTextAreaToCursor(); + }, 0); + } + var onContextMenu = function (e) { + host.textInput.onContextMenu(e); + onContextMenuClose(); + }; + event.addListener(text, "mouseup", onContextMenu, host); + event.addListener(text, "mousedown", function (e) { + e.preventDefault(); + onContextMenuClose(); + }, host); + event.addListener(host.renderer.scroller, "contextmenu", onContextMenu, host); + event.addListener(text, "contextmenu", onContextMenu, host); + if (isIOS) + addIosSelectionHandler(parentNode, host, text); + function addIosSelectionHandler(parentNode, host, text) { + var typingResetTimeout = null; + var typing = false; + text.addEventListener("keydown", function (e) { + if (typingResetTimeout) + clearTimeout(typingResetTimeout); + typing = true; + }, true); + text.addEventListener("keyup", function (e) { + typingResetTimeout = setTimeout(function () { + typing = false; + }, 100); + }, true); + var detectArrowKeys = function (e) { + if (document.activeElement !== text) + return; + if (typing || inComposition || host.$mouseHandler.isMousePressed) + return; + if (copied) { + return; + } + var selectionStart = text.selectionStart; + var selectionEnd = text.selectionEnd; + var key = null; + var modifier = 0; + if (selectionStart == 0) { + key = KEYS.up; + } + else if (selectionStart == 1) { + key = KEYS.home; + } + else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd] == "\n") { + key = KEYS.end; + } + else if (selectionStart < lastSelectionStart && lastValue[selectionStart - 1] == " ") { + key = KEYS.left; + modifier = MODS.option; + } + else if (selectionStart < lastSelectionStart + || (selectionStart == lastSelectionStart + && lastSelectionEnd != lastSelectionStart + && selectionStart == selectionEnd)) { + key = KEYS.left; + } + else if (selectionEnd > lastSelectionEnd && lastValue.slice(0, selectionEnd).split("\n").length > 2) { + key = KEYS.down; + } + else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd - 1] == " ") { + key = KEYS.right; + modifier = MODS.option; + } + else if (selectionEnd > lastSelectionEnd + || (selectionEnd == lastSelectionEnd + && lastSelectionEnd != lastSelectionStart + && selectionStart == selectionEnd)) { + key = KEYS.right; + } + if (selectionStart !== selectionEnd) + modifier |= MODS.shift; + if (key) { + var result = host.onCommandKey({}, modifier, key); + if (!result && host.commands) { + key = KEYS.keyCodeToString(key); + var command = host.commands.findKeyCommand(modifier, key); + if (command) + host.execCommand(command); + } + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + resetSelection(""); + } + }; + document.addEventListener("selectionchange", detectArrowKeys); + host.on("destroy", function () { + document.removeEventListener("selectionchange", detectArrowKeys); + }); + } + this.destroy = function () { + if (text.parentElement) + text.parentElement.removeChild(text); + }; +}; +exports.TextInput = TextInput; +exports.$setUserAgentForTests = function (_isMobile, _isIOS) { + isMobile = _isMobile; + isIOS = _isIOS; +}; + +}); + +define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"], function(require, exports, module){"use strict"; +var useragent = require("../lib/useragent"); +var DRAG_OFFSET = 0; // pixels +var SCROLL_COOLDOWN_T = 550; // milliseconds +var DefaultHandlers = /** @class */ (function () { + function DefaultHandlers(mouseHandler) { + mouseHandler.$clickSelection = null; + var editor = mouseHandler.editor; + editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler)); + editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler)); + editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler)); + editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler)); + editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler)); + var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd", + "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"]; + exports.forEach(function (x) { + mouseHandler[x] = this[x]; + }, this); + mouseHandler["selectByLines"] = this.extendSelectionBy.bind(mouseHandler, "getLineRange"); + mouseHandler["selectByWords"] = this.extendSelectionBy.bind(mouseHandler, "getWordRange"); + } + DefaultHandlers.prototype.onMouseDown = function (ev) { + var inSelection = ev.inSelection(); + var pos = ev.getDocumentPosition(); + this.mousedownEvent = ev; + var editor = this.editor; + var button = ev.getButton(); + if (button !== 0) { + var selectionRange = editor.getSelectionRange(); + var selectionEmpty = selectionRange.isEmpty(); + if (selectionEmpty || button == 1) + editor.selection.moveToPosition(pos); + if (button == 2) { + editor.textInput.onContextMenu(ev.domEvent); + if (!useragent.isMozilla) + ev.preventDefault(); + } + return; + } + this.mousedownEvent.time = Date.now(); + if (inSelection && !editor.isFocused()) { + editor.focus(); + if (this.$focusTimeout && !this.$clickSelection && !editor.inMultiSelectMode) { + this.setState("focusWait"); + this.captureMouse(ev); + return; + } + } + this.captureMouse(ev); + this.startSelect(pos, ev.domEvent._clicks > 1); + return ev.preventDefault(); + }; + DefaultHandlers.prototype.startSelect = function (pos, waitForClickSelection) { + pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); + var editor = this.editor; + if (!this.mousedownEvent) + return; + if (this.mousedownEvent.getShiftKey()) + editor.selection.selectToPosition(pos); + else if (!waitForClickSelection) + editor.selection.moveToPosition(pos); + if (!waitForClickSelection) + this.select(); + editor.setStyle("ace_selecting"); + this.setState("select"); + }; + DefaultHandlers.prototype.select = function () { + var anchor, editor = this.editor; + var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); + if (this.$clickSelection) { + var cmp = this.$clickSelection.comparePoint(cursor); + if (cmp == -1) { + anchor = this.$clickSelection.end; + } + else if (cmp == 1) { + anchor = this.$clickSelection.start; + } + else { + var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); + cursor = orientedRange.cursor; + anchor = orientedRange.anchor; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + } + editor.selection.selectToPosition(cursor); + editor.renderer.scrollCursorIntoView(); + }; + DefaultHandlers.prototype.extendSelectionBy = function (unitName) { + var anchor, editor = this.editor; + var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); + var range = editor.selection[unitName](cursor.row, cursor.column); + if (this.$clickSelection) { + var cmpStart = this.$clickSelection.comparePoint(range.start); + var cmpEnd = this.$clickSelection.comparePoint(range.end); + if (cmpStart == -1 && cmpEnd <= 0) { + anchor = this.$clickSelection.end; + if (range.end.row != cursor.row || range.end.column != cursor.column) + cursor = range.start; + } + else if (cmpEnd == 1 && cmpStart >= 0) { + anchor = this.$clickSelection.start; + if (range.start.row != cursor.row || range.start.column != cursor.column) + cursor = range.end; + } + else if (cmpStart == -1 && cmpEnd == 1) { + cursor = range.end; + anchor = range.start; + } + else { + var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); + cursor = orientedRange.cursor; + anchor = orientedRange.anchor; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + } + editor.selection.selectToPosition(cursor); + editor.renderer.scrollCursorIntoView(); + }; + DefaultHandlers.prototype.selectByLinesEnd = function () { + this.$clickSelection = null; + this.editor.unsetStyle("ace_selecting"); + }; + DefaultHandlers.prototype.focusWait = function () { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + var time = Date.now(); + if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimeout) + this.startSelect(this.mousedownEvent.getDocumentPosition()); + }; + DefaultHandlers.prototype.onDoubleClick = function (ev) { + var pos = ev.getDocumentPosition(); + var editor = this.editor; + var session = editor.session; + var range = session.getBracketRange(pos); + if (range) { + if (range.isEmpty()) { + range.start.column--; + range.end.column++; + } + this.setState("select"); + } + else { + range = editor.selection.getWordRange(pos.row, pos.column); + this.setState("selectByWords"); + } + this.$clickSelection = range; + this.select(); + }; + DefaultHandlers.prototype.onTripleClick = function (ev) { + var pos = ev.getDocumentPosition(); + var editor = this.editor; + this.setState("selectByLines"); + var range = editor.getSelectionRange(); + if (range.isMultiLine() && range.contains(pos.row, pos.column)) { + this.$clickSelection = editor.selection.getLineRange(range.start.row); + this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; + } + else { + this.$clickSelection = editor.selection.getLineRange(pos.row); + } + this.select(); + }; + DefaultHandlers.prototype.onQuadClick = function (ev) { + var editor = this.editor; + editor.selectAll(); + this.$clickSelection = editor.getSelectionRange(); + this.setState("selectAll"); + }; + DefaultHandlers.prototype.onMouseWheel = function (ev) { + if (ev.getAccelKey()) + return; + if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { + ev.wheelX = ev.wheelY; + ev.wheelY = 0; + } + var editor = this.editor; + if (!this.$lastScroll) + this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 }; + var prevScroll = this.$lastScroll; + var t = ev.domEvent.timeStamp; + var dt = t - prevScroll.t; + var vx = dt ? ev.wheelX / dt : prevScroll.vx; + var vy = dt ? ev.wheelY / dt : prevScroll.vy; + if (dt < SCROLL_COOLDOWN_T) { + vx = (vx + prevScroll.vx) / 2; + vy = (vy + prevScroll.vy) / 2; + } + var direction = Math.abs(vx / vy); + var canScroll = false; + if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0)) + canScroll = true; + if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed)) + canScroll = true; + if (canScroll) { + prevScroll.allowed = t; + } + else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) { + var isSlower = Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx) + && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy); + if (isSlower) { + canScroll = true; + prevScroll.allowed = t; + } + else { + prevScroll.allowed = 0; + } + } + prevScroll.t = t; + prevScroll.vx = vx; + prevScroll.vy = vy; + if (canScroll) { + editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); + return ev.stop(); + } + }; + return DefaultHandlers; +}()); +DefaultHandlers.prototype.selectEnd = DefaultHandlers.prototype.selectByLinesEnd; +DefaultHandlers.prototype.selectAllEnd = DefaultHandlers.prototype.selectByLinesEnd; +DefaultHandlers.prototype.selectByWordsEnd = DefaultHandlers.prototype.selectByLinesEnd; +exports.DefaultHandlers = DefaultHandlers; +function calcDistance(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); +} +function calcRangeOrientation(range, cursor) { + if (range.start.row == range.end.row) + var cmp = 2 * cursor.column - range.start.column - range.end.column; + else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) + var cmp = cursor.column - 4; + else + var cmp = 2 * cursor.row - range.start.row - range.end.row; + if (cmp < 0) + return { cursor: range.start, anchor: range.end }; + else + return { cursor: range.end, anchor: range.start }; +} + +}); + +define("ace/lib/scroll",["require","exports","module"], function(require, exports, module){exports.preventParentScroll = function preventParentScroll(event) { + event.stopPropagation(); + var target = event.currentTarget; + var contentOverflows = target.scrollHeight > target.clientHeight; + if (!contentOverflows) { + event.preventDefault(); + } +}; + +}); + +define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var dom = require("./lib/dom"); +var event = require("./lib/event"); +var Range = require("./range").Range; +var preventParentScroll = require("./lib/scroll").preventParentScroll; +var CLASSNAME = "ace_tooltip"; +var Tooltip = /** @class */ (function () { + function Tooltip(parentNode) { + this.isOpen = false; + this.$element = null; + this.$parentNode = parentNode; + } + Tooltip.prototype.$init = function () { + this.$element = dom.createElement("div"); + this.$element.className = CLASSNAME; + this.$element.style.display = "none"; + this.$parentNode.appendChild(this.$element); + return this.$element; + }; + Tooltip.prototype.getElement = function () { + return this.$element || this.$init(); + }; + Tooltip.prototype.setText = function (text) { + this.getElement().textContent = text; + }; + Tooltip.prototype.setHtml = function (html) { + this.getElement().innerHTML = html; + }; + Tooltip.prototype.setPosition = function (x, y) { + this.getElement().style.left = x + "px"; + this.getElement().style.top = y + "px"; + }; + Tooltip.prototype.setClassName = function (className) { + dom.addCssClass(this.getElement(), className); + }; + Tooltip.prototype.setTheme = function (theme) { + this.$element.className = CLASSNAME + " " + + (theme.isDark ? "ace_dark " : "") + (theme.cssClass || ""); + }; + Tooltip.prototype.show = function (text, x, y) { + if (text != null) + this.setText(text); + if (x != null && y != null) + this.setPosition(x, y); + if (!this.isOpen) { + this.getElement().style.display = "block"; + this.isOpen = true; + } + }; + Tooltip.prototype.hide = function (e) { + if (this.isOpen) { + this.getElement().style.display = "none"; + this.getElement().className = CLASSNAME; + this.isOpen = false; + } + }; + Tooltip.prototype.getHeight = function () { + return this.getElement().offsetHeight; + }; + Tooltip.prototype.getWidth = function () { + return this.getElement().offsetWidth; + }; + Tooltip.prototype.destroy = function () { + this.isOpen = false; + if (this.$element && this.$element.parentNode) { + this.$element.parentNode.removeChild(this.$element); + } + }; + return Tooltip; +}()); +var PopupManager = /** @class */ (function () { + function PopupManager() { + this.popups = []; + } + PopupManager.prototype.addPopup = function (popup) { + this.popups.push(popup); + this.updatePopups(); + }; + PopupManager.prototype.removePopup = function (popup) { + var index = this.popups.indexOf(popup); + if (index !== -1) { + this.popups.splice(index, 1); + this.updatePopups(); + } + }; + PopupManager.prototype.updatePopups = function () { + var e_1, _a, e_2, _b; + this.popups.sort(function (a, b) { return b.priority - a.priority; }); + var visiblepopups = []; + try { + for (var _c = __values(this.popups), _d = _c.next(); !_d.done; _d = _c.next()) { + var popup = _d.value; + var shouldDisplay = true; + try { + for (var visiblepopups_1 = (e_2 = void 0, __values(visiblepopups)), visiblepopups_1_1 = visiblepopups_1.next(); !visiblepopups_1_1.done; visiblepopups_1_1 = visiblepopups_1.next()) { + var visiblePopup = visiblepopups_1_1.value; + if (this.doPopupsOverlap(visiblePopup, popup)) { + shouldDisplay = false; + break; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (visiblepopups_1_1 && !visiblepopups_1_1.done && (_b = visiblepopups_1.return)) _b.call(visiblepopups_1); + } + finally { if (e_2) throw e_2.error; } + } + if (shouldDisplay) { + visiblepopups.push(popup); + } + else { + popup.hide(); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + }; + PopupManager.prototype.doPopupsOverlap = function (popupA, popupB) { + var rectA = popupA.getElement().getBoundingClientRect(); + var rectB = popupB.getElement().getBoundingClientRect(); + return (rectA.left < rectB.right && rectA.right > rectB.left && rectA.top < rectB.bottom && rectA.bottom + > rectB.top); + }; + return PopupManager; +}()); +var popupManager = new PopupManager(); +exports.popupManager = popupManager; +exports.Tooltip = Tooltip; +var HoverTooltip = /** @class */ (function (_super) { + __extends(HoverTooltip, _super); + function HoverTooltip(parentNode) { + if (parentNode === void 0) { parentNode = document.body; } + var _this = _super.call(this, parentNode) || this; + _this.timeout = undefined; + _this.lastT = 0; + _this.idleTime = 350; + _this.lastEvent = undefined; + _this.onMouseOut = _this.onMouseOut.bind(_this); + _this.onMouseMove = _this.onMouseMove.bind(_this); + _this.waitForHover = _this.waitForHover.bind(_this); + _this.hide = _this.hide.bind(_this); + var el = _this.getElement(); + el.style.whiteSpace = "pre-wrap"; + el.style.pointerEvents = "auto"; + el.addEventListener("mouseout", _this.onMouseOut); + el.tabIndex = -1; + el.addEventListener("blur", function () { + if (!el.contains(document.activeElement)) + this.hide(); + }.bind(_this)); + el.addEventListener("wheel", preventParentScroll); + return _this; + } + HoverTooltip.prototype.addToEditor = function (editor) { + editor.on("mousemove", this.onMouseMove); + editor.on("mousedown", this.hide); + editor.renderer.getMouseEventTarget().addEventListener("mouseout", this.onMouseOut, true); + }; + HoverTooltip.prototype.removeFromEditor = function (editor) { + editor.off("mousemove", this.onMouseMove); + editor.off("mousedown", this.hide); + editor.renderer.getMouseEventTarget().removeEventListener("mouseout", this.onMouseOut, true); + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + }; + HoverTooltip.prototype.onMouseMove = function (e, editor) { + this.lastEvent = e; + this.lastT = Date.now(); + var isMousePressed = editor.$mouseHandler.isMousePressed; + if (this.isOpen) { + var pos = this.lastEvent && this.lastEvent.getDocumentPosition(); + if (!this.range + || !this.range.contains(pos.row, pos.column) + || isMousePressed + || this.isOutsideOfText(this.lastEvent)) { + this.hide(); + } + } + if (this.timeout || isMousePressed) + return; + this.lastEvent = e; + this.timeout = setTimeout(this.waitForHover, this.idleTime); + }; + HoverTooltip.prototype.waitForHover = function () { + if (this.timeout) + clearTimeout(this.timeout); + var dt = Date.now() - this.lastT; + if (this.idleTime - dt > 10) { + this.timeout = setTimeout(this.waitForHover, this.idleTime - dt); + return; + } + this.timeout = null; + if (this.lastEvent && !this.isOutsideOfText(this.lastEvent)) { + this.$gatherData(this.lastEvent, this.lastEvent.editor); + } + }; + HoverTooltip.prototype.isOutsideOfText = function (e) { + var editor = e.editor; + var docPos = e.getDocumentPosition(); + var line = editor.session.getLine(docPos.row); + if (docPos.column == line.length) { + var screenPos = editor.renderer.pixelToScreenCoordinates(e.clientX, e.clientY); + var clippedPos = editor.session.documentToScreenPosition(docPos.row, docPos.column); + if (clippedPos.column != screenPos.column + || clippedPos.row != screenPos.row) { + return true; + } + } + return false; + }; + HoverTooltip.prototype.setDataProvider = function (value) { + this.$gatherData = value; + }; + HoverTooltip.prototype.showForRange = function (editor, range, domNode, startingEvent) { + var MARGIN = 10; + if (startingEvent && startingEvent != this.lastEvent) + return; + if (this.isOpen && document.activeElement == this.getElement()) + return; + var renderer = editor.renderer; + if (!this.isOpen) { + popupManager.addPopup(this); + this.$registerCloseEvents(); + this.setTheme(renderer.theme); + } + this.isOpen = true; + this.addMarker(range, editor.session); + this.range = Range.fromPoints(range.start, range.end); + var position = renderer.textToScreenCoordinates(range.start.row, range.start.column); + var rect = renderer.scroller.getBoundingClientRect(); + if (position.pageX < rect.left) + position.pageX = rect.left; + var element = this.getElement(); + element.innerHTML = ""; + element.appendChild(domNode); + element.style.maxHeight = ""; + element.style.display = "block"; + var labelHeight = element.clientHeight; + var labelWidth = element.clientWidth; + var spaceBelow = window.innerHeight - position.pageY - renderer.lineHeight; + var isAbove = true; + if (position.pageY - labelHeight < 0 && position.pageY < spaceBelow) { + isAbove = false; + } + element.style.maxHeight = (isAbove ? position.pageY : spaceBelow) - MARGIN + "px"; + element.style.top = isAbove ? "" : position.pageY + renderer.lineHeight + "px"; + element.style.bottom = isAbove ? window.innerHeight - position.pageY + "px" : ""; + element.style.left = Math.min(position.pageX, window.innerWidth - labelWidth - MARGIN) + "px"; + }; + HoverTooltip.prototype.addMarker = function (range, session) { + if (this.marker) { + this.$markerSession.removeMarker(this.marker); + } + this.$markerSession = session; + this.marker = session && session.addMarker(range, "ace_highlight-marker", "text"); + }; + HoverTooltip.prototype.hide = function (e) { + if (!e && document.activeElement == this.getElement()) + return; + if (e && e.target && (e.type != "keydown" || e.ctrlKey || e.metaKey) && this.$element.contains(e.target)) + return; + this.lastEvent = null; + if (this.timeout) + clearTimeout(this.timeout); + this.timeout = null; + this.addMarker(null); + if (this.isOpen) { + this.$removeCloseEvents(); + this.getElement().style.display = "none"; + this.isOpen = false; + popupManager.removePopup(this); + } + }; + HoverTooltip.prototype.$registerCloseEvents = function () { + window.addEventListener("keydown", this.hide, true); + window.addEventListener("wheel", this.hide, true); + window.addEventListener("mousedown", this.hide, true); + }; + HoverTooltip.prototype.$removeCloseEvents = function () { + window.removeEventListener("keydown", this.hide, true); + window.removeEventListener("wheel", this.hide, true); + window.removeEventListener("mousedown", this.hide, true); + }; + HoverTooltip.prototype.onMouseOut = function (e) { + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.lastEvent = null; + if (!this.isOpen) + return; + if (!e.relatedTarget || this.getElement().contains(e.relatedTarget)) + return; + if (e && e.currentTarget.contains(e.relatedTarget)) + return; + if (!e.relatedTarget.classList.contains("ace_content")) + this.hide(); + }; + return HoverTooltip; +}(Tooltip)); +exports.HoverTooltip = HoverTooltip; + +}); + +define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var dom = require("../lib/dom"); +var event = require("../lib/event"); +var Tooltip = require("../tooltip").Tooltip; +var nls = require("../config").nls; +var lang = require("../lib/lang"); +function GutterHandler(mouseHandler) { + var editor = mouseHandler.editor; + var gutter = editor.renderer.$gutterLayer; + var tooltip = new GutterTooltip(editor); + mouseHandler.editor.setDefaultHandler("guttermousedown", function (e) { + if (!editor.isFocused() || e.getButton() != 0) + return; + var gutterRegion = gutter.getRegion(e); + if (gutterRegion == "foldWidgets") + return; + var row = e.getDocumentPosition().row; + var selection = editor.session.selection; + if (e.getShiftKey()) + selection.selectTo(row, 0); + else { + if (e.domEvent.detail == 2) { + editor.selectAll(); + return e.preventDefault(); + } + mouseHandler.$clickSelection = editor.selection.getLineRange(row); + } + mouseHandler.setState("selectByLines"); + mouseHandler.captureMouse(e); + return e.preventDefault(); + }); + var tooltipTimeout, mouseEvent; + function showTooltip() { + var row = mouseEvent.getDocumentPosition().row; + var maxRow = editor.session.getLength(); + if (row == maxRow) { + var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; + var pos = mouseEvent.$pos; + if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) + return hideTooltip(); + } + tooltip.showTooltip(row); + if (!tooltip.isOpen) + return; + editor.on("mousewheel", hideTooltip); + if (mouseHandler.$tooltipFollowsMouse) { + moveTooltip(mouseEvent); + } + else { + var gutterRow = mouseEvent.getGutterRow(); + var gutterCell = gutter.$lines.get(gutterRow); + if (gutterCell) { + var gutterElement = gutterCell.element.querySelector(".ace_gutter_annotation"); + var rect = gutterElement.getBoundingClientRect(); + var style = tooltip.getElement().style; + style.left = rect.right + "px"; + style.top = rect.bottom + "px"; + } + else { + moveTooltip(mouseEvent); + } + } + } + function hideTooltip() { + if (tooltipTimeout) + tooltipTimeout = clearTimeout(tooltipTimeout); + if (tooltip.isOpen) { + tooltip.hideTooltip(); + editor.off("mousewheel", hideTooltip); + } + } + function moveTooltip(e) { + tooltip.setPosition(e.x, e.y); + } + mouseHandler.editor.setDefaultHandler("guttermousemove", function (e) { + var target = e.domEvent.target || e.domEvent.srcElement; + if (dom.hasCssClass(target, "ace_fold-widget")) + return hideTooltip(); + if (tooltip.isOpen && mouseHandler.$tooltipFollowsMouse) + moveTooltip(e); + mouseEvent = e; + if (tooltipTimeout) + return; + tooltipTimeout = setTimeout(function () { + tooltipTimeout = null; + if (mouseEvent && !mouseHandler.isMousePressed) + showTooltip(); + else + hideTooltip(); + }, 50); + }); + event.addListener(editor.renderer.$gutter, "mouseout", function (e) { + mouseEvent = null; + if (!tooltip.isOpen || tooltipTimeout) + return; + tooltipTimeout = setTimeout(function () { + tooltipTimeout = null; + hideTooltip(); + }, 50); + }, editor); + editor.on("changeSession", hideTooltip); + editor.on("input", hideTooltip); +} +exports.GutterHandler = GutterHandler; +var GutterTooltip = /** @class */ (function (_super) { + __extends(GutterTooltip, _super); + function GutterTooltip(editor) { + var _this = _super.call(this, editor.container) || this; + _this.editor = editor; + return _this; + } + GutterTooltip.prototype.setPosition = function (x, y) { + var windowWidth = window.innerWidth || document.documentElement.clientWidth; + var windowHeight = window.innerHeight || document.documentElement.clientHeight; + var width = this.getWidth(); + var height = this.getHeight(); + x += 15; + y += 15; + if (x + width > windowWidth) { + x -= (x + width) - windowWidth; + } + if (y + height > windowHeight) { + y -= 20 + height; + } + Tooltip.prototype.setPosition.call(this, x, y); + }; + Object.defineProperty(GutterTooltip, "annotationLabels", { + get: function () { + return { + error: { + singular: nls("gutter-tooltip.aria-label.error.singular", "error"), + plural: nls("gutter-tooltip.aria-label.error.plural", "errors") + }, + security: { + singular: nls("gutter-tooltip.aria-label.security.singular", "security finding"), + plural: nls("gutter-tooltip.aria-label.security.plural", "security findings") + }, + warning: { + singular: nls("gutter-tooltip.aria-label.warning.singular", "warning"), + plural: nls("gutter-tooltip.aria-label.warning.plural", "warnings") + }, + info: { + singular: nls("gutter-tooltip.aria-label.info.singular", "information message"), + plural: nls("gutter-tooltip.aria-label.info.plural", "information messages") + }, + hint: { + singular: nls("gutter-tooltip.aria-label.hint.singular", "suggestion"), + plural: nls("gutter-tooltip.aria-label.hint.plural", "suggestions") + } + }; + }, + enumerable: false, + configurable: true + }); + GutterTooltip.prototype.showTooltip = function (row) { + var _a; + var gutter = this.editor.renderer.$gutterLayer; + var annotationsInRow = gutter.$annotations[row]; + var annotation; + if (annotationsInRow) + annotation = { + displayText: Array.from(annotationsInRow.displayText), + type: Array.from(annotationsInRow.type) + }; + else + annotation = { displayText: [], type: [] }; + var fold = gutter.session.getFoldLine(row); + if (fold && gutter.$showFoldedAnnotations) { + var annotationsInFold = { error: [], security: [], warning: [], info: [], hint: [] }; + var severityRank = { error: 1, security: 2, warning: 3, info: 4, hint: 5 }; + var mostSevereAnnotationTypeInFold; + for (var i = row + 1; i <= fold.end.row; i++) { + if (!gutter.$annotations[i]) + continue; + for (var j = 0; j < gutter.$annotations[i].text.length; j++) { + var annotationType = gutter.$annotations[i].type[j]; + annotationsInFold[annotationType].push(gutter.$annotations[i].text[j]); + if (!mostSevereAnnotationTypeInFold || + severityRank[annotationType] < severityRank[mostSevereAnnotationTypeInFold]) { + mostSevereAnnotationTypeInFold = annotationType; + } + } + } + if (["error", "security", "warning"].includes(mostSevereAnnotationTypeInFold)) { + var summaryFoldedAnnotations = "".concat(GutterTooltip.annotationsToSummaryString(annotationsInFold), " in folded code."); + annotation.displayText.push(summaryFoldedAnnotations); + annotation.type.push(mostSevereAnnotationTypeInFold + "_fold"); + } + } + if (annotation.displayText.length === 0) + return this.hide(); + var annotationMessages = { error: [], security: [], warning: [], info: [], hint: [] }; + var iconClassName = gutter.$useSvgGutterIcons ? "ace_icon_svg" : "ace_icon"; + for (var i = 0; i < annotation.displayText.length; i++) { + var lineElement = dom.createElement("span"); + var iconElement = dom.createElement("span"); + (_a = iconElement.classList).add.apply(_a, ["ace_".concat(annotation.type[i]), iconClassName]); + iconElement.setAttribute("aria-label", "".concat(GutterTooltip.annotationLabels[annotation.type[i].replace("_fold", "")].singular)); + iconElement.setAttribute("role", "img"); + iconElement.appendChild(dom.createTextNode(" ")); + lineElement.appendChild(iconElement); + lineElement.appendChild(dom.createTextNode(annotation.displayText[i])); + lineElement.appendChild(dom.createElement("br")); + annotationMessages[annotation.type[i].replace("_fold", "")].push(lineElement); + } + var tooltipElement = this.getElement(); + dom.removeChildren(tooltipElement); + annotationMessages.error.forEach(function (el) { return tooltipElement.appendChild(el); }); + annotationMessages.security.forEach(function (el) { return tooltipElement.appendChild(el); }); + annotationMessages.warning.forEach(function (el) { return tooltipElement.appendChild(el); }); + annotationMessages.info.forEach(function (el) { return tooltipElement.appendChild(el); }); + annotationMessages.hint.forEach(function (el) { return tooltipElement.appendChild(el); }); + tooltipElement.setAttribute("aria-live", "polite"); + if (!this.isOpen) { + this.setTheme(this.editor.renderer.theme); + this.setClassName("ace_gutter-tooltip"); + } + this.show(); + this.editor._signal("showGutterTooltip", this); + }; + GutterTooltip.prototype.hideTooltip = function () { + this.$element.removeAttribute("aria-live"); + this.hide(); + this.editor._signal("hideGutterTooltip", this); + }; + GutterTooltip.annotationsToSummaryString = function (annotations) { + var e_1, _a; + var summary = []; + var annotationTypes = ["error", "security", "warning", "info", "hint"]; + try { + for (var annotationTypes_1 = __values(annotationTypes), annotationTypes_1_1 = annotationTypes_1.next(); !annotationTypes_1_1.done; annotationTypes_1_1 = annotationTypes_1.next()) { + var annotationType = annotationTypes_1_1.value; + if (!annotations[annotationType].length) + continue; + var label = annotations[annotationType].length === 1 ? GutterTooltip.annotationLabels[annotationType].singular : GutterTooltip.annotationLabels[annotationType].plural; + summary.push("".concat(annotations[annotationType].length, " ").concat(label)); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (annotationTypes_1_1 && !annotationTypes_1_1.done && (_a = annotationTypes_1.return)) _a.call(annotationTypes_1); + } + finally { if (e_1) throw e_1.error; } + } + return summary.join(", "); + }; + return GutterTooltip; +}(Tooltip)); +exports.GutterTooltip = GutterTooltip; + +}); + +define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module){"use strict"; +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +var MouseEvent = /** @class */ (function () { + function MouseEvent(domEvent, editor) { this.speed; this.wheelX; this.wheelY; + this.domEvent = domEvent; + this.editor = editor; + this.x = this.clientX = domEvent.clientX; + this.y = this.clientY = domEvent.clientY; + this.$pos = null; + this.$inSelection = null; + this.propagationStopped = false; + this.defaultPrevented = false; + } + MouseEvent.prototype.stopPropagation = function () { + event.stopPropagation(this.domEvent); + this.propagationStopped = true; + }; + MouseEvent.prototype.preventDefault = function () { + event.preventDefault(this.domEvent); + this.defaultPrevented = true; + }; + MouseEvent.prototype.stop = function () { + this.stopPropagation(); + this.preventDefault(); + }; + MouseEvent.prototype.getDocumentPosition = function () { + if (this.$pos) + return this.$pos; + this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); + return this.$pos; + }; + MouseEvent.prototype.getGutterRow = function () { + var documentRow = this.getDocumentPosition().row; + var screenRow = this.editor.session.documentToScreenRow(documentRow, 0); + var screenTopRow = this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row, 0); + return screenRow - screenTopRow; + }; + MouseEvent.prototype.inSelection = function () { + if (this.$inSelection !== null) + return this.$inSelection; + var editor = this.editor; + var selectionRange = editor.getSelectionRange(); + if (selectionRange.isEmpty()) + this.$inSelection = false; + else { + var pos = this.getDocumentPosition(); + this.$inSelection = selectionRange.contains(pos.row, pos.column); + } + return this.$inSelection; + }; + MouseEvent.prototype.getButton = function () { + return event.getButton(this.domEvent); + }; + MouseEvent.prototype.getShiftKey = function () { + return this.domEvent.shiftKey; + }; + MouseEvent.prototype.getAccelKey = function () { + return useragent.isMac ? this.domEvent.metaKey : this.domEvent.ctrlKey; + }; + return MouseEvent; +}()); +exports.MouseEvent = MouseEvent; + +}); + +define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +var AUTOSCROLL_DELAY = 200; +var SCROLL_CURSOR_DELAY = 200; +var SCROLL_CURSOR_HYSTERESIS = 5; +function DragdropHandler(mouseHandler) { + var editor = mouseHandler.editor; + var dragImage = dom.createElement("div"); + dragImage.style.cssText = "top:-100px;position:absolute;z-index:2147483647;opacity:0.5"; + dragImage.textContent = "\xa0"; + var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; + exports.forEach(function (x) { + mouseHandler[x] = this[x]; + }, this); + editor.on("mousedown", this.onMouseDown.bind(mouseHandler)); + var mouseTarget = editor.container; + var dragSelectionMarker, x, y; + var timerId, range; + var dragCursor, counter = 0; + var dragOperation; + var isInternal; + var autoScrollStartTime; + var cursorMovedTime; + var cursorPointOnCaretMoved; + this.onDragStart = function (e) { + if (this.cancelDrag || !mouseTarget.draggable) { + var self = this; + setTimeout(function () { + self.startSelect(); + self.captureMouse(e); + }, 0); + return e.preventDefault(); + } + range = editor.getSelectionRange(); + var dataTransfer = e.dataTransfer; + dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; + editor.container.appendChild(dragImage); + dataTransfer.setDragImage && dataTransfer.setDragImage(dragImage, 0, 0); + setTimeout(function () { + editor.container.removeChild(dragImage); + }); + dataTransfer.clearData(); + dataTransfer.setData("Text", editor.session.getTextRange()); + isInternal = true; + this.setState("drag"); + }; + this.onDragEnd = function (e) { + mouseTarget.draggable = false; + isInternal = false; + this.setState(null); + if (!editor.getReadOnly()) { + var dropEffect = e.dataTransfer.dropEffect; + if (!dragOperation && dropEffect == "move") + editor.session.remove(editor.getSelectionRange()); + editor.$resetCursorStyle(); + } + this.editor.unsetStyle("ace_dragging"); + this.editor.renderer.setCursorStyle(""); + }; + this.onDragEnter = function (e) { + if (editor.getReadOnly() || !canAccept(e.dataTransfer)) + return; + x = e.clientX; + y = e.clientY; + if (!dragSelectionMarker) + addDragMarker(); + counter++; + e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); + return event.preventDefault(e); + }; + this.onDragOver = function (e) { + if (editor.getReadOnly() || !canAccept(e.dataTransfer)) + return; + x = e.clientX; + y = e.clientY; + if (!dragSelectionMarker) { + addDragMarker(); + counter++; + } + if (onMouseMoveTimer !== null) + onMouseMoveTimer = null; + e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); + return event.preventDefault(e); + }; + this.onDragLeave = function (e) { + counter--; + if (counter <= 0 && dragSelectionMarker) { + clearDragMarker(); + dragOperation = null; + return event.preventDefault(e); + } + }; + this.onDrop = function (e) { + if (!dragCursor) + return; + var dataTransfer = e.dataTransfer; + if (isInternal) { + switch (dragOperation) { + case "move": + if (range.contains(dragCursor.row, dragCursor.column)) { + range = { + start: dragCursor, + end: dragCursor + }; + } + else { + range = editor.moveText(range, dragCursor); + } + break; + case "copy": + range = editor.moveText(range, dragCursor, true); + break; + } + } + else { + var dropData = dataTransfer.getData('Text'); + range = { + start: dragCursor, + end: editor.session.insert(dragCursor, dropData) + }; + editor.focus(); + dragOperation = null; + } + clearDragMarker(); + return event.preventDefault(e); + }; + event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler), editor); + event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler), editor); + event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler), editor); + event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler), editor); + event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler), editor); + event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler), editor); + function scrollCursorIntoView(cursor, prevCursor) { + var now = Date.now(); + var vMovement = !prevCursor || cursor.row != prevCursor.row; + var hMovement = !prevCursor || cursor.column != prevCursor.column; + if (!cursorMovedTime || vMovement || hMovement) { + editor.moveCursorToPosition(cursor); + cursorMovedTime = now; + cursorPointOnCaretMoved = { x: x, y: y }; + } + else { + var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); + if (distance > SCROLL_CURSOR_HYSTERESIS) { + cursorMovedTime = null; + } + else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { + editor.renderer.scrollCursorIntoView(); + cursorMovedTime = null; + } + } + } + function autoScroll(cursor, prevCursor) { + var now = Date.now(); + var lineHeight = editor.renderer.layerConfig.lineHeight; + var characterWidth = editor.renderer.layerConfig.characterWidth; + var editorRect = editor.renderer.scroller.getBoundingClientRect(); + var offsets = { + x: { + left: x - editorRect.left, + right: editorRect.right - x + }, + y: { + top: y - editorRect.top, + bottom: editorRect.bottom - y + } + }; + var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); + var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); + var scrollCursor = { row: cursor.row, column: cursor.column }; + if (nearestXOffset / characterWidth <= 2) { + scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); + } + if (nearestYOffset / lineHeight <= 1) { + scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); + } + var vScroll = cursor.row != scrollCursor.row; + var hScroll = cursor.column != scrollCursor.column; + var vMovement = !prevCursor || cursor.row != prevCursor.row; + if (vScroll || (hScroll && !vMovement)) { + if (!autoScrollStartTime) + autoScrollStartTime = now; + else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) + editor.renderer.scrollCursorIntoView(scrollCursor); + } + else { + autoScrollStartTime = null; + } + } + function onDragInterval() { + var prevCursor = dragCursor; + dragCursor = editor.renderer.screenToTextCoordinates(x, y); + scrollCursorIntoView(dragCursor, prevCursor); + autoScroll(dragCursor, prevCursor); + } + function addDragMarker() { + range = editor.selection.toOrientedRange(); + dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); + editor.clearSelection(); + if (editor.isFocused()) + editor.renderer.$cursorLayer.setBlinking(false); + clearInterval(timerId); + onDragInterval(); + timerId = setInterval(onDragInterval, 20); + counter = 0; + event.addListener(document, "mousemove", onMouseMove); + } + function clearDragMarker() { + clearInterval(timerId); + editor.session.removeMarker(dragSelectionMarker); + dragSelectionMarker = null; + editor.selection.fromOrientedRange(range); + if (editor.isFocused() && !isInternal) + editor.$resetCursorStyle(); + range = null; + dragCursor = null; + counter = 0; + autoScrollStartTime = null; + cursorMovedTime = null; + event.removeListener(document, "mousemove", onMouseMove); + } + var onMouseMoveTimer = null; + function onMouseMove() { + if (onMouseMoveTimer == null) { + onMouseMoveTimer = setTimeout(function () { + if (onMouseMoveTimer != null && dragSelectionMarker) + clearDragMarker(); + }, 20); + } + } + function canAccept(dataTransfer) { + var types = dataTransfer.types; + return !types || Array.prototype.some.call(types, function (type) { + return type == 'text/plain' || type == 'Text'; + }); + } + function getDropEffect(e) { + var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; + var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; + var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; + var effectAllowed = "uninitialized"; + try { + effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); + } + catch (e) { } + var dropEffect = "none"; + if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "copy"; + else if (moveAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "move"; + else if (copyAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "copy"; + return dropEffect; + } +} +(function () { + this.dragWait = function () { + var interval = Date.now() - this.mousedownEvent.time; + if (interval > this.editor.getDragDelay()) + this.startDrag(); + }; + this.dragWaitEnd = function () { + var target = this.editor.container; + target.draggable = false; + this.startSelect(this.mousedownEvent.getDocumentPosition()); + this.selectEnd(); + }; + this.dragReadyEnd = function (e) { + this.editor.$resetCursorStyle(); + this.editor.unsetStyle("ace_dragging"); + this.editor.renderer.setCursorStyle(""); + this.dragWaitEnd(); + }; + this.startDrag = function () { + this.cancelDrag = false; + var editor = this.editor; + var target = editor.container; + target.draggable = true; + editor.renderer.$cursorLayer.setBlinking(false); + editor.setStyle("ace_dragging"); + var cursorStyle = useragent.isWin ? "default" : "move"; + editor.renderer.setCursorStyle(cursorStyle); + this.setState("dragReady"); + }; + this.onMouseDrag = function (e) { + var target = this.editor.container; + if (useragent.isIE && this.state == "dragReady") { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + if (distance > 3) + target.dragDrop(); + } + if (this.state === "dragWait") { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + if (distance > 0) { + target.draggable = false; + this.startSelect(this.mousedownEvent.getDocumentPosition()); + } + } + }; + this.onMouseDown = function (e) { + if (!this.$dragEnabled) + return; + this.mousedownEvent = e; + var editor = this.editor; + var inSelection = e.inSelection(); + var button = e.getButton(); + var clickCount = e.domEvent.detail || 1; + if (clickCount === 1 && button === 0 && inSelection) { + if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) + return; + this.mousedownEvent.time = Date.now(); + var eventTarget = e.domEvent.target || e.domEvent.srcElement; + if ("unselectable" in eventTarget) + eventTarget.unselectable = "on"; + if (editor.getDragDelay()) { + if (useragent.isWebKit) { + this.cancelDrag = true; + var mouseTarget = editor.container; + mouseTarget.draggable = true; + } + this.setState("dragWait"); + } + else { + this.startDrag(); + } + this.captureMouse(e, this.onMouseDrag.bind(this)); + e.defaultPrevented = true; + } + }; +}).call(DragdropHandler.prototype); +function calcDistance(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); +} +exports.DragdropHandler = DragdropHandler; + +}); + +define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"], function(require, exports, module){"use strict"; +var MouseEvent = require("./mouse_event").MouseEvent; +var event = require("../lib/event"); +var dom = require("../lib/dom"); +exports.addTouchListeners = function (el, editor) { + var mode = "scroll"; + var startX; + var startY; + var touchStartT; + var lastT; + var longTouchTimer; + var animationTimer; + var animationSteps = 0; + var pos; + var clickCount = 0; + var vX = 0; + var vY = 0; + var pressed; + var contextMenu; + function createContextMenu() { + var clipboard = window.navigator && window.navigator.clipboard; + var isOpen = false; + var updateMenu = function () { + var selected = editor.getCopyText(); + var hasUndo = editor.session.getUndoManager().hasUndo(); + contextMenu.replaceChild(dom.buildDom(isOpen ? ["span", + !selected && canExecuteCommand("selectall") && ["span", { class: "ace_mobile-button", action: "selectall" }, "Select All"], + selected && canExecuteCommand("copy") && ["span", { class: "ace_mobile-button", action: "copy" }, "Copy"], + selected && canExecuteCommand("cut") && ["span", { class: "ace_mobile-button", action: "cut" }, "Cut"], + clipboard && canExecuteCommand("paste") && ["span", { class: "ace_mobile-button", action: "paste" }, "Paste"], + hasUndo && canExecuteCommand("undo") && ["span", { class: "ace_mobile-button", action: "undo" }, "Undo"], + canExecuteCommand("find") && ["span", { class: "ace_mobile-button", action: "find" }, "Find"], + canExecuteCommand("openCommandPalette") && ["span", { class: "ace_mobile-button", action: "openCommandPalette" }, "Palette"] + ] : ["span"]), contextMenu.firstChild); + }; + var canExecuteCommand = function (/** @type {string} */ cmd) { + return editor.commands.canExecute(cmd, editor); + }; + var handleClick = function (e) { + var action = e.target.getAttribute("action"); + if (action == "more" || !isOpen) { + isOpen = !isOpen; + return updateMenu(); + } + if (action == "paste") { + clipboard.readText().then(function (text) { + editor.execCommand(action, text); + }); + } + else if (action) { + if (action == "cut" || action == "copy") { + if (clipboard) + clipboard.writeText(editor.getCopyText()); + else + document.execCommand("copy"); + } + editor.execCommand(action); + } + contextMenu.firstChild.style.display = "none"; + isOpen = false; + if (action != "openCommandPalette") + editor.focus(); + }; + contextMenu = dom.buildDom(["div", + { + class: "ace_mobile-menu", + ontouchstart: function (e) { + mode = "menu"; + e.stopPropagation(); + e.preventDefault(); + editor.textInput.focus(); + }, + ontouchend: function (e) { + e.stopPropagation(); + e.preventDefault(); + handleClick(e); + }, + onclick: handleClick + }, + ["span"], + ["span", { class: "ace_mobile-button", action: "more" }, "..."] + ], editor.container); + } + function showContextMenu() { + if (!editor.getOption("enableMobileMenu")) { + if (contextMenu) { + hideContextMenu(); + } + return; + } + if (!contextMenu) + createContextMenu(); + var cursor = editor.selection.cursor; + var pagePos = editor.renderer.textToScreenCoordinates(cursor.row, cursor.column); + var leftOffset = editor.renderer.textToScreenCoordinates(0, 0).pageX; + var scrollLeft = editor.renderer.scrollLeft; + var rect = editor.container.getBoundingClientRect(); + contextMenu.style.top = pagePos.pageY - rect.top - 3 + "px"; + if (pagePos.pageX - rect.left < rect.width - 70) { + contextMenu.style.left = ""; + contextMenu.style.right = "10px"; + } + else { + contextMenu.style.right = ""; + contextMenu.style.left = leftOffset + scrollLeft - rect.left + "px"; + } + contextMenu.style.display = ""; + contextMenu.firstChild.style.display = "none"; + editor.on("input", hideContextMenu); + } + function hideContextMenu(e) { + if (contextMenu) + contextMenu.style.display = "none"; + editor.off("input", hideContextMenu); + } + function handleLongTap() { + longTouchTimer = null; + clearTimeout(longTouchTimer); + var range = editor.selection.getRange(); + var inSelection = range.contains(pos.row, pos.column); + if (range.isEmpty() || !inSelection) { + editor.selection.moveToPosition(pos); + editor.selection.selectWord(); + } + mode = "wait"; + showContextMenu(); + } + function switchToSelectionMode() { + longTouchTimer = null; + clearTimeout(longTouchTimer); + editor.selection.moveToPosition(pos); + var range = clickCount >= 2 + ? editor.selection.getLineRange(pos.row) + : editor.session.getBracketRange(pos); + if (range && !range.isEmpty()) { + editor.selection.setRange(range); + } + else { + editor.selection.selectWord(); + } + mode = "wait"; + } + event.addListener(el, "contextmenu", function (e) { + if (!pressed) + return; + var textarea = editor.textInput.getElement(); + textarea.focus(); + }, editor); + event.addListener(el, "touchstart", function (e) { + var touches = e.touches; + if (longTouchTimer || touches.length > 1) { + clearTimeout(longTouchTimer); + longTouchTimer = null; + touchStartT = -1; + mode = "zoom"; + return; + } + pressed = editor.$mouseHandler.isMousePressed = true; + var h = editor.renderer.layerConfig.lineHeight; + var w = editor.renderer.layerConfig.lineHeight; + var t = e.timeStamp; + lastT = t; + var touchObj = touches[0]; + var x = touchObj.clientX; + var y = touchObj.clientY; + if (Math.abs(startX - x) + Math.abs(startY - y) > h) + touchStartT = -1; + startX = e.clientX = x; + startY = e.clientY = y; + vX = vY = 0; + var ev = new MouseEvent(e, editor); + pos = ev.getDocumentPosition(); + if (t - touchStartT < 500 && touches.length == 1 && !animationSteps) { + clickCount++; + e.preventDefault(); + e.button = 0; + switchToSelectionMode(); + } + else { + clickCount = 0; + var cursor = editor.selection.cursor; + var anchor = editor.selection.isEmpty() ? cursor : editor.selection.anchor; + var cursorPos = editor.renderer.$cursorLayer.getPixelPosition(cursor, true); + var anchorPos = editor.renderer.$cursorLayer.getPixelPosition(anchor, true); + var rect = editor.renderer.scroller.getBoundingClientRect(); + var offsetTop = editor.renderer.layerConfig.offset; + var offsetLeft = editor.renderer.scrollLeft; + var weightedDistance = function (x, y) { + x = x / w; + y = y / h - 0.75; + return x * x + y * y; + }; + if (e.clientX < rect.left) { + mode = "zoom"; + return; + } + var diff1 = weightedDistance(e.clientX - rect.left - cursorPos.left + offsetLeft, e.clientY - rect.top - cursorPos.top + offsetTop); + var diff2 = weightedDistance(e.clientX - rect.left - anchorPos.left + offsetLeft, e.clientY - rect.top - anchorPos.top + offsetTop); + if (diff1 < 3.5 && diff2 < 3.5) + mode = diff1 > diff2 ? "cursor" : "anchor"; + if (diff2 < 3.5) + mode = "anchor"; + else if (diff1 < 3.5) + mode = "cursor"; + else + mode = "scroll"; + longTouchTimer = setTimeout(handleLongTap, 450); + } + touchStartT = t; + }, editor); + event.addListener(el, "touchend", function (e) { + pressed = editor.$mouseHandler.isMousePressed = false; + if (animationTimer) + clearInterval(animationTimer); + if (mode == "zoom") { + mode = ""; + animationSteps = 0; + } + else if (longTouchTimer) { + editor.selection.moveToPosition(pos); + animationSteps = 0; + showContextMenu(); + } + else if (mode == "scroll") { + animate(); + hideContextMenu(); + } + else { + showContextMenu(); + } + clearTimeout(longTouchTimer); + longTouchTimer = null; + }, editor); + event.addListener(el, "touchmove", function (e) { + if (longTouchTimer) { + clearTimeout(longTouchTimer); + longTouchTimer = null; + } + var touches = e.touches; + if (touches.length > 1 || mode == "zoom") + return; + var touchObj = touches[0]; + var wheelX = startX - touchObj.clientX; + var wheelY = startY - touchObj.clientY; + if (mode == "wait") { + if (wheelX * wheelX + wheelY * wheelY > 4) + mode = "cursor"; + else + return e.preventDefault(); + } + startX = touchObj.clientX; + startY = touchObj.clientY; + e.clientX = touchObj.clientX; + e.clientY = touchObj.clientY; + var t = e.timeStamp; + var dt = t - lastT; + lastT = t; + if (mode == "scroll") { + var mouseEvent = new MouseEvent(e, editor); + mouseEvent.speed = 1; + mouseEvent.wheelX = wheelX; + mouseEvent.wheelY = wheelY; + if (10 * Math.abs(wheelX) < Math.abs(wheelY)) + wheelX = 0; + if (10 * Math.abs(wheelY) < Math.abs(wheelX)) + wheelY = 0; + if (dt != 0) { + vX = wheelX / dt; + vY = wheelY / dt; + } + editor._emit("mousewheel", mouseEvent); + if (!mouseEvent.propagationStopped) { + vX = vY = 0; + } + } + else { + var ev = new MouseEvent(e, editor); + var pos = ev.getDocumentPosition(); + if (mode == "cursor") + editor.selection.moveCursorToPosition(pos); + else if (mode == "anchor") + editor.selection.setSelectionAnchor(pos.row, pos.column); + editor.renderer.scrollCursorIntoView(pos); + e.preventDefault(); + } + }, editor); + function animate() { + animationSteps += 60; + animationTimer = setInterval(function () { + if (animationSteps-- <= 0) { + clearInterval(animationTimer); + animationTimer = null; + } + if (Math.abs(vX) < 0.01) + vX = 0; + if (Math.abs(vY) < 0.01) + vY = 0; + if (animationSteps < 20) + vX = 0.9 * vX; + if (animationSteps < 20) + vY = 0.9 * vY; + var oldScrollTop = editor.session.getScrollTop(); + editor.renderer.scrollBy(10 * vX, 10 * vY); + if (oldScrollTop == editor.session.getScrollTop()) + animationSteps = 0; + }, 10); + } +}; + +}); + +define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"], function(require, exports, module){"use strict"; +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +var DefaultHandlers = require("./default_handlers").DefaultHandlers; +var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler; +var MouseEvent = require("./mouse_event").MouseEvent; +var DragdropHandler = require("./dragdrop_handler").DragdropHandler; +var addTouchListeners = require("./touch_handler").addTouchListeners; +var config = require("../config"); +var MouseHandler = /** @class */ (function () { + function MouseHandler(editor) { this.$dragDelay; this.$dragEnabled; this.$mouseMoved; this.mouseEvent; this.$focusTimeout; + var _self = this; + this.editor = editor; + new DefaultHandlers(this); + new DefaultGutterHandler(this); + new DragdropHandler(this); + var focusEditor = function (e) { + var windowBlurred = !document.hasFocus || !document.hasFocus() + || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement()); + if (windowBlurred) + window.focus(); + editor.focus(); + setTimeout(function () { + if (!editor.isFocused()) + editor.focus(); + }); + }; + var mouseTarget = editor.renderer.getMouseEventTarget(); + event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"), editor); + event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"), editor); + event.addMultiMouseDownListener([ + mouseTarget, + editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner, + editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner, + editor.textInput && editor.textInput.getElement() + ].filter(Boolean), [400, 300, 250], this, "onMouseEvent", editor); + event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"), editor); + addTouchListeners(editor.container, editor); + var gutterEl = editor.renderer.$gutter; + event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"), editor); + event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"), editor); + event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"), editor); + event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"), editor); + event.addListener(mouseTarget, "mousedown", focusEditor, editor); + event.addListener(gutterEl, "mousedown", focusEditor, editor); + if (useragent.isIE && editor.renderer.scrollBarV) { + event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor, editor); + event.addListener(editor.renderer.scrollBarH.element, "mousedown", focusEditor, editor); + } + editor.on("mousemove", function (e) { + if (_self.state || _self.$dragDelay || !_self.$dragEnabled) + return; + var character = editor.renderer.screenToTextCoordinates(e.x, e.y); + var range = editor.session.selection.getRange(); + var renderer = editor.renderer; + if (!range.isEmpty() && range.insideStart(character.row, character.column)) { + renderer.setCursorStyle("default"); + } + else { + renderer.setCursorStyle(""); + } + }, //@ts-expect-error TODO: seems mistyping - should be boolean + editor); + } + MouseHandler.prototype.onMouseEvent = function (name, e) { + if (!this.editor.session) + return; + this.editor._emit(name, new MouseEvent(e, this.editor)); + }; + MouseHandler.prototype.onMouseMove = function (name, e) { + var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove; + if (!listeners || !listeners.length) + return; + this.editor._emit(name, new MouseEvent(e, this.editor)); + }; + MouseHandler.prototype.onMouseWheel = function (name, e) { + var mouseEvent = new MouseEvent(e, this.editor); + mouseEvent.speed = this.$scrollSpeed * 2; + mouseEvent.wheelX = e.wheelX; + mouseEvent.wheelY = e.wheelY; + this.editor._emit(name, mouseEvent); + }; + MouseHandler.prototype.setState = function (state) { + this.state = state; + }; + MouseHandler.prototype.captureMouse = function (ev, mouseMoveHandler) { + this.x = ev.x; + this.y = ev.y; + this.isMousePressed = true; + var editor = this.editor; + var renderer = this.editor.renderer; + renderer.$isMousePressed = true; + var self = this; + var onMouseMove = function (e) { + if (!e) + return; + if (useragent.isWebKit && !e.which && self.releaseMouse) + return self.releaseMouse(); + self.x = e.clientX; + self.y = e.clientY; + mouseMoveHandler && mouseMoveHandler(e); + self.mouseEvent = new MouseEvent(e, self.editor); + self.$mouseMoved = true; + }; + var onCaptureEnd = function (e) { + editor.off("beforeEndOperation", onOperationEnd); + clearInterval(timerId); + if (editor.session) + onCaptureInterval(); + self[self.state + "End"] && self[self.state + "End"](e); + self.state = ""; + self.isMousePressed = renderer.$isMousePressed = false; + if (renderer.$keepTextAreaAtCursor) + renderer.$moveTextAreaToCursor(); + self.$onCaptureMouseMove = self.releaseMouse = null; + e && self.onMouseEvent("mouseup", e); + editor.endOperation(); + }; + var onCaptureInterval = function () { + self[self.state] && self[self.state](); + self.$mouseMoved = false; + }; + if (useragent.isOldIE && ev.domEvent.type == "dblclick") { + return setTimeout(function () { onCaptureEnd(ev); }); + } + var onOperationEnd = function (e) { + if (!self.releaseMouse) + return; + if (editor.curOp.command.name && editor.curOp.selectionChanged) { + self[self.state + "End"] && self[self.state + "End"](); + self.state = ""; + self.releaseMouse(); + } + }; + editor.on("beforeEndOperation", onOperationEnd); + editor.startOperation({ command: { name: "mouse" } }); + self.$onCaptureMouseMove = onMouseMove; + self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd); + var timerId = setInterval(onCaptureInterval, 20); + }; + MouseHandler.prototype.cancelContextMenu = function () { + var stop = function (e) { + if (e && e.domEvent && e.domEvent.type != "contextmenu") + return; + this.editor.off("nativecontextmenu", stop); + if (e && e.domEvent) + event.stopEvent(e.domEvent); + }.bind(this); + setTimeout(stop, 10); + this.editor.on("nativecontextmenu", stop); + }; + MouseHandler.prototype.destroy = function () { + if (this.releaseMouse) + this.releaseMouse(); + }; + return MouseHandler; +}()); +MouseHandler.prototype.releaseMouse = null; +config.defineOptions(MouseHandler.prototype, "mouseHandler", { + scrollSpeed: { initialValue: 2 }, + dragDelay: { initialValue: (useragent.isMac ? 150 : 0) }, + dragEnabled: { initialValue: true }, + focusTimeout: { initialValue: 0 }, + tooltipFollowsMouse: { initialValue: true } +}); +exports.MouseHandler = MouseHandler; + +}); + +define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var FoldHandler = /** @class */ (function () { + function FoldHandler(editor) { + editor.on("click", function (e) { + var position = e.getDocumentPosition(); + var session = editor.session; + var fold = session.getFoldAt(position.row, position.column, 1); + if (fold) { + if (e.getAccelKey()) + session.removeFold(fold); + else + session.expandFold(fold); + e.stop(); + } + var target = e.domEvent && e.domEvent.target; + if (target && dom.hasCssClass(target, "ace_inline_button")) { + if (dom.hasCssClass(target, "ace_toggle_wrap")) { + session.setOption("wrap", !session.getUseWrapMode()); + editor.renderer.scrollCursorIntoView(); + } + } + }); + editor.on("gutterclick", function (e) { + var gutterRegion = editor.renderer.$gutterLayer.getRegion(e); + if (gutterRegion == "foldWidgets") { + var row = e.getDocumentPosition().row; + var session = editor.session; + if (session.foldWidgets && session.foldWidgets[row]) + editor.session.onFoldWidgetClick(row, e); + if (!editor.isFocused()) + editor.focus(); + e.stop(); + } + }); + editor.on("gutterdblclick", function (e) { + var gutterRegion = editor.renderer.$gutterLayer.getRegion(e); + if (gutterRegion == "foldWidgets") { + var row = e.getDocumentPosition().row; + var session = editor.session; + var data = session.getParentFoldRangeData(row, true); + var range = data.range || data.firstRange; + if (range) { + row = range.start.row; + var fold = session.getFoldAt(row, session.getLine(row).length, 1); + if (fold) { + session.removeFold(fold); + } + else { + session.addFold("...", range); + editor.renderer.scrollCursorIntoView({ row: range.start.row, column: 0 }); + } + } + e.stop(); + } + }); + } + return FoldHandler; +}()); +exports.FoldHandler = FoldHandler; + +}); + +define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"], function(require, exports, module){"use strict"; +var keyUtil = require("../lib/keys"); +var event = require("../lib/event"); +var KeyBinding = /** @class */ (function () { + function KeyBinding(editor) { + this.$editor = editor; + this.$data = { editor: editor }; + this.$handlers = []; + this.setDefaultHandler(editor.commands); + } + KeyBinding.prototype.setDefaultHandler = function (kb) { + this.removeKeyboardHandler(this.$defaultHandler); + this.$defaultHandler = kb; + this.addKeyboardHandler(kb, 0); + }; + KeyBinding.prototype.setKeyboardHandler = function (kb) { + var h = this.$handlers; + if (h[h.length - 1] == kb) + return; + while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler) + this.removeKeyboardHandler(h[h.length - 1]); + this.addKeyboardHandler(kb, 1); + }; + KeyBinding.prototype.addKeyboardHandler = function (kb, pos) { + if (!kb) + return; + if (typeof kb == "function" && !kb.handleKeyboard) + kb.handleKeyboard = kb; + var i = this.$handlers.indexOf(kb); + if (i != -1) + this.$handlers.splice(i, 1); + if (pos == undefined) + this.$handlers.push(kb); + else + this.$handlers.splice(pos, 0, kb); + if (i == -1 && kb.attach) + kb.attach(this.$editor); + }; + KeyBinding.prototype.removeKeyboardHandler = function (kb) { + var i = this.$handlers.indexOf(kb); + if (i == -1) + return false; + this.$handlers.splice(i, 1); + kb.detach && kb.detach(this.$editor); + return true; + }; + KeyBinding.prototype.getKeyboardHandler = function () { + return this.$handlers[this.$handlers.length - 1]; + }; + KeyBinding.prototype.getStatusText = function () { + var data = this.$data; + var editor = data.editor; + return this.$handlers.map(function (h) { + return h.getStatusText && h.getStatusText(editor, data) || ""; + }).filter(Boolean).join(" "); + }; + KeyBinding.prototype.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) { + var toExecute; + var success = false; + var commands = this.$editor.commands; + for (var i = this.$handlers.length; i--;) { + toExecute = this.$handlers[i].handleKeyboard( + this.$data, hashId, keyString, keyCode, e); + if (!toExecute || !toExecute.command) + continue; + if (toExecute.command == "null") { + success = true; + } + else { + success = commands.exec(toExecute.command, this.$editor, toExecute.args, e); + } + if (success && e && hashId != -1 && + toExecute["passEvent"] != true && toExecute.command["passEvent"] != true) { + event.stopEvent(e); + } + if (success) + break; + } + if (!success && hashId == -1) { + toExecute = { command: "insertstring" }; + success = commands.exec("insertstring", this.$editor, keyString); + } + if (success && this.$editor._signal) + this.$editor._signal("keyboardActivity", toExecute); + return success; + }; + KeyBinding.prototype.onCommandKey = function (e, hashId, keyCode) { + var keyString = keyUtil.keyCodeToString(keyCode); + return this.$callKeyboardHandlers(hashId, keyString, keyCode, e); + }; + KeyBinding.prototype.onTextInput = function (text) { + return this.$callKeyboardHandlers(-1, text); + }; + return KeyBinding; +}()); +exports.KeyBinding = KeyBinding; + +}); + +define("ace/lib/bidiutil",["require","exports","module"], function(require, exports, module){"use strict"; +var ArabicAlefBetIntervalsBegine = ['\u0621', '\u0641']; +var ArabicAlefBetIntervalsEnd = ['\u063A', '\u064a']; +var dir = 0, hiLevel = 0; +var lastArabic = false, hasUBAT_AL = false, hasUBAT_B = false, hasUBAT_S = false, hasBlockSep = false, hasSegSep = false; +var impTab_LTR = [ [0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0] +]; +var impTab_RTL = [ [2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1] +]; +var LTR = 0, RTL = 1; +var L = 0; +var R = 1; +var EN = 2; +var AN = 3; +var ON = 4; +var B = 5; +var S = 6; +var AL = 7; +var WS = 8; +var CS = 9; +var ES = 10; +var ET = 11; +var NSM = 12; +var LRE = 13; +var RLE = 14; +var PDF = 15; +var LRO = 16; +var RLO = 17; +var BN = 18; +var UnicodeTBL00 = [ + BN, BN, BN, BN, BN, BN, BN, BN, BN, S, B, S, WS, B, BN, BN, + BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, B, B, B, S, + WS, ON, ON, ET, ET, ET, ON, ON, ON, ON, ON, ES, CS, ES, CS, CS, + EN, EN, EN, EN, EN, EN, EN, EN, EN, EN, CS, ON, ON, ON, ON, ON, + ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, + L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, ON, + ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, + L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, BN, + BN, BN, BN, BN, BN, B, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, + BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, + CS, ON, ET, ET, ET, ET, ON, ON, ON, ON, L, ON, ON, BN, ON, ON, + ET, ET, EN, EN, ON, L, ON, ON, ON, EN, L, ON, ON, ON, ON, ON +]; +var UnicodeTBL20 = [ + WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, BN, BN, BN, L, R, + ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, + ON, ON, ON, ON, ON, ON, ON, ON, WS, B, LRE, RLE, PDF, LRO, RLO, CS, + ET, ET, ET, ET, ET, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, + ON, ON, ON, ON, CS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, + ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, WS +]; +function _computeLevels(chars, levels, len, charTypes) { + var impTab = dir ? impTab_RTL : impTab_LTR, prevState = null, newClass = null, newLevel = null, newState = 0, action = null, cond = null, condPos = -1, i = null, ix = null, classes = []; + if (!charTypes) { + for (i = 0, charTypes = []; i < len; i++) { + charTypes[i] = _getCharacterType(chars[i]); + } + } + hiLevel = dir; + lastArabic = false; + hasUBAT_AL = false; + hasUBAT_B = false; + hasUBAT_S = false; + for (ix = 0; ix < len; ix++) { + prevState = newState; + classes[ix] = newClass = _getCharClass(chars, charTypes, classes, ix); + newState = impTab[prevState][newClass]; + action = newState & 0xF0; + newState &= 0x0F; + levels[ix] = newLevel = impTab[newState][5]; + if (action > 0) { + if (action == 0x10) { + for (i = condPos; i < ix; i++) { + levels[i] = 1; + } + condPos = -1; + } + else { + condPos = -1; + } + } + cond = impTab[newState][6]; + if (cond) { + if (condPos == -1) { + condPos = ix; + } + } + else { + if (condPos > -1) { + for (i = condPos; i < ix; i++) { + levels[i] = newLevel; + } + condPos = -1; + } + } + if (charTypes[ix] == B) { + levels[ix] = 0; + } + hiLevel |= newLevel; + } + if (hasUBAT_S) { + for (i = 0; i < len; i++) { + if (charTypes[i] == S) { + levels[i] = dir; + for (var j = i - 1; j >= 0; j--) { + if (charTypes[j] == WS) { + levels[j] = dir; + } + else { + break; + } + } + } + } + } +} +function _invertLevel(lev, levels, _array) { + if (hiLevel < lev) { + return; + } + if (lev == 1 && dir == RTL && !hasUBAT_B) { + _array.reverse(); + return; + } + var len = _array.length, start = 0, end, lo, hi, tmp; + while (start < len) { + if (levels[start] >= lev) { + end = start + 1; + while (end < len && levels[end] >= lev) { + end++; + } + for (lo = start, hi = end - 1; lo < hi; lo++, hi--) { + tmp = _array[lo]; + _array[lo] = _array[hi]; + _array[hi] = tmp; + } + start = end; + } + start++; + } +} +function _getCharClass(chars, types, classes, ix) { + var cType = types[ix], wType, nType, len, i; + switch (cType) { + case L: + case R: + lastArabic = false; + case ON: + case AN: + return cType; + case EN: + return lastArabic ? AN : EN; + case AL: + lastArabic = true; + hasUBAT_AL = true; + return R; + case WS: + return ON; + case CS: + if (ix < 1 || (ix + 1) >= types.length || + ((wType = classes[ix - 1]) != EN && wType != AN) || + ((nType = types[ix + 1]) != EN && nType != AN)) { + return ON; + } + if (lastArabic) { + nType = AN; + } + return nType == wType ? nType : ON; + case ES: + wType = ix > 0 ? classes[ix - 1] : B; + if (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN) { + return EN; + } + return ON; + case ET: + if (ix > 0 && classes[ix - 1] == EN) { + return EN; + } + if (lastArabic) { + return ON; + } + i = ix + 1; + len = types.length; + while (i < len && types[i] == ET) { + i++; + } + if (i < len && types[i] == EN) { + return EN; + } + return ON; + case NSM: + len = types.length; + i = ix + 1; + while (i < len && types[i] == NSM) { + i++; + } + if (i < len) { + var c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E; + wType = types[i]; + if (rtlCandidate && (wType == R || wType == AL)) { + return R; + } + } + if (ix < 1 || (wType = types[ix - 1]) == B) { + return ON; + } + return classes[ix - 1]; + case B: + lastArabic = false; + hasUBAT_B = true; + return dir; + case S: + hasUBAT_S = true; + return ON; + case LRE: + case RLE: + case LRO: + case RLO: + case PDF: + lastArabic = false; + case BN: + return ON; + } +} +function _getCharacterType(ch) { + var uc = ch.charCodeAt(0), hi = uc >> 8; + if (hi == 0) { + return ((uc > 0x00BF) ? L : UnicodeTBL00[uc]); + } + else if (hi == 5) { + return (/[\u0591-\u05f4]/.test(ch) ? R : L); + } + else if (hi == 6) { + if (/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ch)) + return NSM; + else if (/[\u0660-\u0669\u066b-\u066c]/.test(ch)) + return AN; + else if (uc == 0x066A) + return ET; + else if (/[\u06f0-\u06f9]/.test(ch)) + return EN; + else + return AL; + } + else if (hi == 0x20 && uc <= 0x205F) { + return UnicodeTBL20[uc & 0xFF]; + } + else if (hi == 0xFE) { + return (uc >= 0xFE70 ? AL : ON); + } + return ON; +} +function _isArabicDiacritics(ch) { + return (ch >= '\u064b' && ch <= '\u0655'); +} +exports.L = L; +exports.R = R; +exports.EN = EN; +exports.ON_R = 3; +exports.AN = 4; +exports.R_H = 5; +exports.B = 6; +exports.RLE = 7; +exports.DOT = "\xB7"; +exports.doBidiReorder = function (text, textCharTypes, isRtl) { + if (text.length < 2) + return {}; + var chars = text.split(""), logicalFromVisual = new Array(chars.length), bidiLevels = new Array(chars.length), levels = []; + dir = isRtl ? RTL : LTR; + _computeLevels(chars, levels, chars.length, textCharTypes); + for (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++) + ; + _invertLevel(2, levels, logicalFromVisual); + _invertLevel(1, levels, logicalFromVisual); + for (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width + if (textCharTypes[i] === AN) { + levels[i] = exports.AN; + } + else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE) + || textCharTypes[i] === ON || textCharTypes[i] === BN)) { + levels[i] = exports.ON_R; + } + else if ((i > 0 && chars[i - 1] === '\u0644') && /\u0622|\u0623|\u0625|\u0627/.test(chars[i])) { + levels[i - 1] = levels[i] = exports.R_H; + i++; + } + } + if (chars[chars.length - 1] === exports.DOT) + levels[chars.length - 1] = exports.B; + if (chars[0] === '\u202B') + levels[0] = exports.RLE; + for (var i = 0; i < logicalFromVisual.length; i++) { + bidiLevels[i] = levels[logicalFromVisual[i]]; + } + return { 'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels }; +}; +exports.hasBidiCharacters = function (text, textCharTypes) { + var ret = false; + for (var i = 0; i < text.length; i++) { + textCharTypes[i] = _getCharacterType(text.charAt(i)); + if (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL || textCharTypes[i] == AN)) + ret = true; + } + return ret; +}; +exports.getVisualFromLogicalIdx = function (logIdx, rowMap) { + for (var i = 0; i < rowMap.logicalFromVisual.length; i++) { + if (rowMap.logicalFromVisual[i] == logIdx) + return i; + } + return 0; +}; + +}); + +define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"], function(require, exports, module){"use strict"; +var bidiUtil = require("./lib/bidiutil"); +var lang = require("./lib/lang"); +var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/; +var BidiHandler = /** @class */ (function () { + function BidiHandler(session) { + this.session = session; + this.bidiMap = {}; + this.currentRow = null; + this.bidiUtil = bidiUtil; + this.charWidths = []; + this.EOL = "\xAC"; + this.showInvisibles = true; + this.isRtlDir = false; + this.$isRtl = false; + this.line = ""; + this.wrapIndent = 0; + this.EOF = "\xB6"; + this.RLE = "\u202B"; + this.contentWidth = 0; + this.fontMetrics = null; + this.rtlLineOffset = 0; + this.wrapOffset = 0; + this.isMoveLeftOperation = false; + this.seenBidi = bidiRE.test(session.getValue()); + } + BidiHandler.prototype.isBidiRow = function (screenRow, docRow, splitIndex) { + if (!this.seenBidi) + return false; + if (screenRow !== this.currentRow) { + this.currentRow = screenRow; + this.updateRowLine(docRow, splitIndex); + this.updateBidiMap(); + } + return this.bidiMap.bidiLevels; + }; + BidiHandler.prototype.onChange = function (delta) { + if (!this.seenBidi) { + if (delta.action == "insert" && bidiRE.test(delta.lines.join("\n"))) { + this.seenBidi = true; + this.currentRow = null; + } + } + else { + this.currentRow = null; + } + }; + BidiHandler.prototype.getDocumentRow = function () { + var docRow = 0; + var rowCache = this.session.$screenRowCache; + if (rowCache.length) { + var index = this.session.$getRowCacheIndex(rowCache, this.currentRow); + if (index >= 0) + docRow = this.session.$docRowCache[index]; + } + return docRow; + }; + BidiHandler.prototype.getSplitIndex = function () { + var splitIndex = 0; + var rowCache = this.session.$screenRowCache; + if (rowCache.length) { + var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow); + while (this.currentRow - splitIndex > 0) { + currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1); + if (currentIndex !== prevIndex) + break; + prevIndex = currentIndex; + splitIndex++; + } + } + else { + splitIndex = this.currentRow; + } + return splitIndex; + }; + BidiHandler.prototype.updateRowLine = function (docRow, splitIndex) { + if (docRow === undefined) + docRow = this.getDocumentRow(); + var isLastRow = (docRow === this.session.getLength() - 1), endOfLine = isLastRow ? this.EOF : this.EOL; + this.wrapIndent = 0; + this.line = this.session.getLine(docRow); + this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE; + if (this.session.$useWrapMode) { + var splits = this.session.$wrapData[docRow]; + if (splits) { + if (splitIndex === undefined) + splitIndex = this.getSplitIndex(); + if (splitIndex > 0 && splits.length) { + this.wrapIndent = splits.indent; + this.wrapOffset = this.wrapIndent * this.charWidths[bidiUtil.L]; + this.line = (splitIndex < splits.length) ? + this.line.substring(splits[splitIndex - 1], splits[splitIndex]) : + this.line.substring(splits[splits.length - 1]); + } + else { + this.line = this.line.substring(0, splits[splitIndex]); + } + if (splitIndex == splits.length) { + this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT; + } + } + } + else { + this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT; + } + var session = this.session, shift = 0, size; + this.line = this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g, function (ch, i) { + if (ch === '\t' || session.isFullWidth(ch.charCodeAt(0))) { + size = (ch === '\t') ? session.getScreenTabSize(i + shift) : 2; + shift += size - 1; + return lang.stringRepeat(bidiUtil.DOT, size); + } + return ch; + }); + if (this.isRtlDir) { + this.fontMetrics.$main.textContent = (this.line.charAt(this.line.length - 1) == bidiUtil.DOT) ? this.line.substr(0, this.line.length - 1) : this.line; + this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width; + } + }; + BidiHandler.prototype.updateBidiMap = function () { + var textCharTypes = []; + if (bidiUtil.hasBidiCharacters(this.line, textCharTypes) || this.isRtlDir) { + this.bidiMap = bidiUtil.doBidiReorder(this.line, textCharTypes, this.isRtlDir); + } + else { + this.bidiMap = {}; + } + }; + BidiHandler.prototype.markAsDirty = function () { + this.currentRow = null; + }; + BidiHandler.prototype.updateCharacterWidths = function (fontMetrics) { + if (this.characterWidth === fontMetrics.$characterSize.width) + return; + this.fontMetrics = fontMetrics; + var characterWidth = this.characterWidth = fontMetrics.$characterSize.width; + var bidiCharWidth = fontMetrics.$measureCharWidth("\u05d4"); + this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth; + this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth; + this.charWidths[bidiUtil.R_H] = bidiCharWidth * 0.45; + this.charWidths[bidiUtil.B] = this.charWidths[bidiUtil.RLE] = 0; + this.currentRow = null; + }; + BidiHandler.prototype.setShowInvisibles = function (showInvisibles) { + this.showInvisibles = showInvisibles; + this.currentRow = null; + }; + BidiHandler.prototype.setEolChar = function (eolChar) { + this.EOL = eolChar; + }; + BidiHandler.prototype.setContentWidth = function (width) { + this.contentWidth = width; + }; + BidiHandler.prototype.isRtlLine = function (row) { + if (this.$isRtl) + return true; + if (row != undefined) + return (this.session.getLine(row).charAt(0) == this.RLE); + else + return this.isRtlDir; + }; + BidiHandler.prototype.setRtlDirection = function (editor, isRtlDir) { + var cursor = editor.getCursorPosition(); + for (var row = editor.selection.getSelectionAnchor().row; row <= cursor.row; row++) { + if (!isRtlDir && editor.session.getLine(row).charAt(0) === editor.session.$bidiHandler.RLE) + editor.session.doc.removeInLine(row, 0, 1); + else if (isRtlDir && editor.session.getLine(row).charAt(0) !== editor.session.$bidiHandler.RLE) + editor.session.doc.insert({ column: 0, row: row }, editor.session.$bidiHandler.RLE); + } + }; + BidiHandler.prototype.getPosLeft = function (col) { + col -= this.wrapIndent; + var leftBoundary = (this.line.charAt(0) === this.RLE) ? 1 : 0; + var logicalIdx = (col > leftBoundary) ? (this.session.getOverwrite() ? col : col - 1) : leftBoundary; + var visualIdx = bidiUtil.getVisualFromLogicalIdx(logicalIdx, this.bidiMap), levels = this.bidiMap.bidiLevels, left = 0; + if (!this.session.getOverwrite() && col <= leftBoundary && levels[visualIdx] % 2 !== 0) + visualIdx++; + for (var i = 0; i < visualIdx; i++) { + left += this.charWidths[levels[i]]; + } + if (!this.session.getOverwrite() && (col > leftBoundary) && (levels[visualIdx] % 2 === 0)) + left += this.charWidths[levels[visualIdx]]; + if (this.wrapIndent) + left += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset; + if (this.isRtlDir) + left += this.rtlLineOffset; + return left; + }; + BidiHandler.prototype.getSelections = function (startCol, endCol) { + var map = this.bidiMap, levels = map.bidiLevels, level, selections = [], offset = 0, selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent, isSelected = false, isSelectedPrev = false, selectionStart = 0; + if (this.wrapIndent) + offset += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset; + for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) { + logIdx = map.logicalFromVisual[visIdx]; + level = levels[visIdx]; + isSelected = (logIdx >= selColMin) && (logIdx < selColMax); + if (isSelected && !isSelectedPrev) { + selectionStart = offset; + } + else if (!isSelected && isSelectedPrev) { + selections.push({ left: selectionStart, width: offset - selectionStart }); + } + offset += this.charWidths[level]; + isSelectedPrev = isSelected; + } + if (isSelected && (visIdx === levels.length)) { + selections.push({ left: selectionStart, width: offset - selectionStart }); + } + if (this.isRtlDir) { + for (var i = 0; i < selections.length; i++) { + selections[i].left += this.rtlLineOffset; + } + } + return selections; + }; + BidiHandler.prototype.offsetToCol = function (posX) { + if (this.isRtlDir) + posX -= this.rtlLineOffset; + var logicalIdx = 0, posX = Math.max(posX, 0), offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels, charWidth = this.charWidths[levels[visualIdx]]; + if (this.wrapIndent) + posX -= this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset; + while (posX > offset + charWidth / 2) { + offset += charWidth; + if (visualIdx === levels.length - 1) { + charWidth = 0; + break; + } + charWidth = this.charWidths[levels[++visualIdx]]; + } + if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)) { + if (posX < offset) + visualIdx--; + logicalIdx = this.bidiMap.logicalFromVisual[visualIdx]; + } + else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)) { + logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx] + : this.bidiMap.logicalFromVisual[visualIdx - 1]); + } + else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0)) + || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))) { + logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx]; + } + else { + if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0) + visualIdx--; + logicalIdx = this.bidiMap.logicalFromVisual[visualIdx]; + } + if (logicalIdx === 0 && this.isRtlDir) + logicalIdx++; + return (logicalIdx + this.wrapIndent); + }; + return BidiHandler; +}()); +exports.BidiHandler = BidiHandler; + +}); + +define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var lang = require("./lib/lang"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Selection = /** @class */ (function () { + function Selection(session) { + this.session = session; + this.doc = session.getDocument(); + this.clearSelection(); + this.cursor = this.lead = this.doc.createAnchor(0, 0); + this.anchor = this.doc.createAnchor(0, 0); + this.$silent = false; + var self = this; + this.cursor.on("change", function (e) { + self.$cursorChanged = true; + if (!self.$silent) + self._emit("changeCursor"); + if (!self.$isEmpty && !self.$silent) + self._emit("changeSelection"); + if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) + self.$desiredColumn = null; + }); + this.anchor.on("change", function () { + self.$anchorChanged = true; + if (!self.$isEmpty && !self.$silent) + self._emit("changeSelection"); + }); + } + Selection.prototype.isEmpty = function () { + return this.$isEmpty || (this.anchor.row == this.lead.row && + this.anchor.column == this.lead.column); + }; + Selection.prototype.isMultiLine = function () { + return !this.$isEmpty && this.anchor.row != this.cursor.row; + }; + Selection.prototype.getCursor = function () { + return this.lead.getPosition(); + }; + Selection.prototype.setAnchor = function (row, column) { + this.$isEmpty = false; + this.anchor.setPosition(row, column); + }; + Selection.prototype.getAnchor = function () { + if (this.$isEmpty) + return this.getSelectionLead(); + return this.anchor.getPosition(); + }; + Selection.prototype.getSelectionLead = function () { + return this.lead.getPosition(); + }; + Selection.prototype.isBackwards = function () { + var anchor = this.anchor; + var lead = this.lead; + return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); + }; + Selection.prototype.getRange = function () { + var anchor = this.anchor; + var lead = this.lead; + if (this.$isEmpty) + return Range.fromPoints(lead, lead); + return this.isBackwards() + ? Range.fromPoints(lead, anchor) + : Range.fromPoints(anchor, lead); + }; + Selection.prototype.clearSelection = function () { + if (!this.$isEmpty) { + this.$isEmpty = true; + this._emit("changeSelection"); + } + }; + Selection.prototype.selectAll = function () { + this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE); + }; + Selection.prototype.setRange = function (range, reverse) { + var start = reverse ? range.end : range.start; + var end = reverse ? range.start : range.end; + this.$setSelection(start.row, start.column, end.row, end.column); + }; + Selection.prototype.$setSelection = function (anchorRow, anchorColumn, cursorRow, cursorColumn) { + if (this.$silent) + return; + var wasEmpty = this.$isEmpty; + var wasMultiselect = this.inMultiSelectMode; + this.$silent = true; + this.$cursorChanged = this.$anchorChanged = false; + this.anchor.setPosition(anchorRow, anchorColumn); + this.cursor.setPosition(cursorRow, cursorColumn); + this.$isEmpty = !Range.comparePoints(this.anchor, this.cursor); + this.$silent = false; + if (this.$cursorChanged) + this._emit("changeCursor"); + if (this.$cursorChanged || this.$anchorChanged || wasEmpty != this.$isEmpty || wasMultiselect) + this._emit("changeSelection"); + }; + Selection.prototype.$moveSelection = function (mover) { + var lead = this.lead; + if (this.$isEmpty) + this.setSelectionAnchor(lead.row, lead.column); + mover.call(this); + }; + Selection.prototype.selectTo = function (row, column) { + this.$moveSelection(function () { + this.moveCursorTo(row, column); + }); + }; + Selection.prototype.selectToPosition = function (pos) { + this.$moveSelection(function () { + this.moveCursorToPosition(pos); + }); + }; + Selection.prototype.moveTo = function (row, column) { + this.clearSelection(); + this.moveCursorTo(row, column); + }; + Selection.prototype.moveToPosition = function (pos) { + this.clearSelection(); + this.moveCursorToPosition(pos); + }; + Selection.prototype.selectUp = function () { + this.$moveSelection(this.moveCursorUp); + }; + Selection.prototype.selectDown = function () { + this.$moveSelection(this.moveCursorDown); + }; + Selection.prototype.selectRight = function () { + this.$moveSelection(this.moveCursorRight); + }; + Selection.prototype.selectLeft = function () { + this.$moveSelection(this.moveCursorLeft); + }; + Selection.prototype.selectLineStart = function () { + this.$moveSelection(this.moveCursorLineStart); + }; + Selection.prototype.selectLineEnd = function () { + this.$moveSelection(this.moveCursorLineEnd); + }; + Selection.prototype.selectFileEnd = function () { + this.$moveSelection(this.moveCursorFileEnd); + }; + Selection.prototype.selectFileStart = function () { + this.$moveSelection(this.moveCursorFileStart); + }; + Selection.prototype.selectWordRight = function () { + this.$moveSelection(this.moveCursorWordRight); + }; + Selection.prototype.selectWordLeft = function () { + this.$moveSelection(this.moveCursorWordLeft); + }; + Selection.prototype.getWordRange = function (row, column) { + if (typeof column == "undefined") { + var cursor = row || this.lead; + row = cursor.row; + column = cursor.column; + } + return this.session.getWordRange(row, column); + }; + Selection.prototype.selectWord = function () { + this.setSelectionRange(this.getWordRange()); + }; + Selection.prototype.selectAWord = function () { + var cursor = this.getCursor(); + var range = this.session.getAWordRange(cursor.row, cursor.column); + this.setSelectionRange(range); + }; + Selection.prototype.getLineRange = function (row, excludeLastChar) { + var rowStart = typeof row == "number" ? row : this.lead.row; + var rowEnd; + var foldLine = this.session.getFoldLine(rowStart); + if (foldLine) { + rowStart = foldLine.start.row; + rowEnd = foldLine.end.row; + } + else { + rowEnd = rowStart; + } + if (excludeLastChar === true) + return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); + else + return new Range(rowStart, 0, rowEnd + 1, 0); + }; + Selection.prototype.selectLine = function () { + this.setSelectionRange(this.getLineRange()); + }; + Selection.prototype.moveCursorUp = function () { + this.moveCursorBy(-1, 0); + }; + Selection.prototype.moveCursorDown = function () { + this.moveCursorBy(1, 0); + }; + Selection.prototype.wouldMoveIntoSoftTab = function (cursor, tabSize, direction) { + var start = cursor.column; + var end = cursor.column + tabSize; + if (direction < 0) { + start = cursor.column - tabSize; + end = cursor.column; + } + return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(" ").length - 1 == tabSize; + }; + Selection.prototype.moveCursorLeft = function () { + var cursor = this.lead.getPosition(), fold; + if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { + this.moveCursorTo(fold.start.row, fold.start.column); + } + else if (cursor.column === 0) { + if (cursor.row > 0) { + this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); + } + } + else { + var tabSize = this.session.getTabSize(); + if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) { + this.moveCursorBy(0, -tabSize); + } + else { + this.moveCursorBy(0, -1); + } + } + }; + Selection.prototype.moveCursorRight = function () { + var cursor = this.lead.getPosition(), fold; + if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { + this.moveCursorTo(fold.end.row, fold.end.column); + } + else if (this.lead.column == this.doc.getLine(this.lead.row).length) { + if (this.lead.row < this.doc.getLength() - 1) { + this.moveCursorTo(this.lead.row + 1, 0); + } + } + else { + var tabSize = this.session.getTabSize(); + var cursor = this.lead; + if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) { + this.moveCursorBy(0, tabSize); + } + else { + this.moveCursorBy(0, 1); + } + } + }; + Selection.prototype.moveCursorLineStart = function () { + var row = this.lead.row; + var column = this.lead.column; + var screenRow = this.session.documentToScreenRow(row, column); + var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); + var beforeCursor = this.session.getDisplayLine(row, null, firstColumnPosition.row, firstColumnPosition.column); + var leadingSpace = beforeCursor.match(/^\s*/); + if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) + firstColumnPosition.column += leadingSpace[0].length; + this.moveCursorToPosition(firstColumnPosition); + }; + Selection.prototype.moveCursorLineEnd = function () { + var lead = this.lead; + var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); + if (this.lead.column == lineEnd.column) { + var line = this.session.getLine(lineEnd.row); + if (lineEnd.column == line.length) { + var textEnd = line.search(/\s+$/); + if (textEnd > 0) + lineEnd.column = textEnd; + } + } + this.moveCursorTo(lineEnd.row, lineEnd.column); + }; + Selection.prototype.moveCursorFileEnd = function () { + var row = this.doc.getLength() - 1; + var column = this.doc.getLine(row).length; + this.moveCursorTo(row, column); + }; + Selection.prototype.moveCursorFileStart = function () { + this.moveCursorTo(0, 0); + }; + Selection.prototype.moveCursorLongWordRight = function () { + var row = this.lead.row; + var column = this.lead.column; + var line = this.doc.getLine(row); + var rightOfCursor = line.substring(column); + this.session.nonTokenRe.lastIndex = 0; + this.session.tokenRe.lastIndex = 0; + var fold = this.session.getFoldAt(row, column, 1); + if (fold) { + this.moveCursorTo(fold.end.row, fold.end.column); + return; + } + if (this.session.nonTokenRe.exec(rightOfCursor)) { + column += this.session.nonTokenRe.lastIndex; + this.session.nonTokenRe.lastIndex = 0; + rightOfCursor = line.substring(column); + } + if (column >= line.length) { + this.moveCursorTo(row, line.length); + this.moveCursorRight(); + if (row < this.doc.getLength() - 1) + this.moveCursorWordRight(); + return; + } + if (this.session.tokenRe.exec(rightOfCursor)) { + column += this.session.tokenRe.lastIndex; + this.session.tokenRe.lastIndex = 0; + } + this.moveCursorTo(row, column); + }; + Selection.prototype.moveCursorLongWordLeft = function () { + var row = this.lead.row; + var column = this.lead.column; + var fold; + if (fold = this.session.getFoldAt(row, column, -1)) { + this.moveCursorTo(fold.start.row, fold.start.column); + return; + } + var str = this.session.getFoldStringAt(row, column, -1); + if (str == null) { + str = this.doc.getLine(row).substring(0, column); + } + var leftOfCursor = lang.stringReverse(str); + this.session.nonTokenRe.lastIndex = 0; + this.session.tokenRe.lastIndex = 0; + if (this.session.nonTokenRe.exec(leftOfCursor)) { + column -= this.session.nonTokenRe.lastIndex; + leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); + this.session.nonTokenRe.lastIndex = 0; + } + if (column <= 0) { + this.moveCursorTo(row, 0); + this.moveCursorLeft(); + if (row > 0) + this.moveCursorWordLeft(); + return; + } + if (this.session.tokenRe.exec(leftOfCursor)) { + column -= this.session.tokenRe.lastIndex; + this.session.tokenRe.lastIndex = 0; + } + this.moveCursorTo(row, column); + }; + Selection.prototype.$shortWordEndIndex = function (rightOfCursor) { + var index = 0, ch; + var whitespaceRe = /\s/; + var tokenRe = this.session.tokenRe; + tokenRe.lastIndex = 0; + if (this.session.tokenRe.exec(rightOfCursor)) { + index = this.session.tokenRe.lastIndex; + } + else { + while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) + index++; + if (index < 1) { + tokenRe.lastIndex = 0; + while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { + tokenRe.lastIndex = 0; + index++; + if (whitespaceRe.test(ch)) { + if (index > 2) { + index--; + break; + } + else { + while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) + index++; + if (index > 2) + break; + } + } + } + } + } + tokenRe.lastIndex = 0; + return index; + }; + Selection.prototype.moveCursorShortWordRight = function () { + var row = this.lead.row; + var column = this.lead.column; + var line = this.doc.getLine(row); + var rightOfCursor = line.substring(column); + var fold = this.session.getFoldAt(row, column, 1); + if (fold) + return this.moveCursorTo(fold.end.row, fold.end.column); + if (column == line.length) { + var l = this.doc.getLength(); + do { + row++; + rightOfCursor = this.doc.getLine(row); + } while (row < l && /^\s*$/.test(rightOfCursor)); + if (!/^\s+/.test(rightOfCursor)) + rightOfCursor = ""; + column = 0; + } + var index = this.$shortWordEndIndex(rightOfCursor); + this.moveCursorTo(row, column + index); + }; + Selection.prototype.moveCursorShortWordLeft = function () { + var row = this.lead.row; + var column = this.lead.column; + var fold; + if (fold = this.session.getFoldAt(row, column, -1)) + return this.moveCursorTo(fold.start.row, fold.start.column); + var line = this.session.getLine(row).substring(0, column); + if (column === 0) { + do { + row--; + line = this.doc.getLine(row); + } while (row > 0 && /^\s*$/.test(line)); + column = line.length; + if (!/\s+$/.test(line)) + line = ""; + } + var leftOfCursor = lang.stringReverse(line); + var index = this.$shortWordEndIndex(leftOfCursor); + return this.moveCursorTo(row, column - index); + }; + Selection.prototype.moveCursorWordRight = function () { + if (this.session.$selectLongWords) + this.moveCursorLongWordRight(); + else + this.moveCursorShortWordRight(); + }; + Selection.prototype.moveCursorWordLeft = function () { + if (this.session.$selectLongWords) + this.moveCursorLongWordLeft(); + else + this.moveCursorShortWordLeft(); + }; + Selection.prototype.moveCursorBy = function (rows, chars) { + var screenPos = this.session.documentToScreenPosition(this.lead.row, this.lead.column); + var offsetX; + if (chars === 0) { + if (rows !== 0) { + if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) { + offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column); + screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]); + } + else { + offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0]; + } + } + if (this.$desiredColumn) + screenPos.column = this.$desiredColumn; + else + this.$desiredColumn = screenPos.column; + } + if (rows != 0 && this.session.lineWidgets && this.session.lineWidgets[this.lead.row]) { + var widget = this.session.lineWidgets[this.lead.row]; + if (rows < 0) + rows -= widget.rowsAbove || 0; + else if (rows > 0) + rows += widget.rowCount - (widget.rowsAbove || 0); + } + var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX); + if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { + } + this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); + }; + Selection.prototype.moveCursorToPosition = function (position) { + this.moveCursorTo(position.row, position.column); + }; + Selection.prototype.moveCursorTo = function (row, column, keepDesiredColumn) { + var fold = this.session.getFoldAt(row, column, 1); + if (fold) { + row = fold.start.row; + column = fold.start.column; + } + this.$keepDesiredColumnOnChange = true; + var line = this.session.getLine(row); + if (/[\uDC00-\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) { + if (this.lead.row == row && this.lead.column == column + 1) + column = column - 1; + else + column = column + 1; + } + this.lead.setPosition(row, column); + this.$keepDesiredColumnOnChange = false; + if (!keepDesiredColumn) + this.$desiredColumn = null; + }; + Selection.prototype.moveCursorToScreen = function (row, column, keepDesiredColumn) { + var pos = this.session.screenToDocumentPosition(row, column); + this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); + }; + Selection.prototype.detach = function () { + this.lead.detach(); + this.anchor.detach(); + }; + Selection.prototype.fromOrientedRange = function (range) { + this.setSelectionRange(range, range.cursor == range.start); + this.$desiredColumn = range.desiredColumn || this.$desiredColumn; + }; + Selection.prototype.toOrientedRange = function (range) { + var r = this.getRange(); + if (range) { + range.start.column = r.start.column; + range.start.row = r.start.row; + range.end.column = r.end.column; + range.end.row = r.end.row; + } + else { + range = r; + } + range.cursor = this.isBackwards() ? range.start : range.end; + range.desiredColumn = this.$desiredColumn; + return range; + }; + Selection.prototype.getRangeOfMovements = function (func) { + var start = this.getCursor(); + try { + func(this); + var end = this.getCursor(); + return Range.fromPoints(start, end); + } + catch (e) { + return Range.fromPoints(start, start); + } + finally { + this.moveCursorToPosition(start); + } + }; + Selection.prototype.toJSON = function () { + if (this.rangeCount) { var data = this.ranges.map(function (r) { + var r1 = r.clone(); + r1.isBackwards = r.cursor == r.start; + return r1; + }); + } + else { var data = this.getRange(); + data.isBackwards = this.isBackwards(); + } + return data; + }; + Selection.prototype.fromJSON = function (data) { + if (data.start == undefined) { + if (this.rangeList && data.length > 1) { + this.toSingleRange(data[0]); + for (var i = data.length; i--;) { + var r = Range.fromPoints(data[i].start, data[i].end); + if (data[i].isBackwards) + r.cursor = r.start; + this.addRange(r, true); + } + return; + } + else { + data = data[0]; + } + } + if (this.rangeList) + this.toSingleRange(data); + this.setSelectionRange(data, data.isBackwards); + }; + Selection.prototype.isEqual = function (data) { + if ((data.length || this.rangeCount) && data.length != this.rangeCount) + return false; + if (!data.length || !this.ranges) + return this.getRange().isEqual(data); + for (var i = this.ranges.length; i--;) { + if (!this.ranges[i].isEqual(data[i])) + return false; + } + return true; + }; + return Selection; +}()); +Selection.prototype.setSelectionAnchor = Selection.prototype.setAnchor; +Selection.prototype.getSelectionAnchor = Selection.prototype.getAnchor; +Selection.prototype.setSelectionRange = Selection.prototype.setRange; +oop.implement(Selection.prototype, EventEmitter); +exports.Selection = Selection; + +}); + +define("ace/tokenizer",["require","exports","module","ace/lib/report_error"], function(require, exports, module){"use strict"; +var reportError = require("./lib/report_error").reportError; +var MAX_TOKEN_COUNT = 2000; +var Tokenizer = /** @class */ (function () { + function Tokenizer(rules) { + this.splitRegex; + this.states = rules; + this.regExps = {}; + this.matchMappings = {}; + for (var key in this.states) { + var state = this.states[key]; + var ruleRegExps = []; + var matchTotal = 0; + var mapping = this.matchMappings[key] = { defaultToken: "text" }; + var flag = "g"; + var splitterRurles = []; + for (var i = 0; i < state.length; i++) { + var rule = state[i]; + if (rule.defaultToken) + mapping.defaultToken = rule.defaultToken; + if (rule.caseInsensitive && flag.indexOf("i") === -1) + flag += "i"; + if (rule.unicode && flag.indexOf("u") === -1) + flag += "u"; + if (rule.regex == null) + continue; + if (rule.regex instanceof RegExp) + rule.regex = rule.regex.toString().slice(1, -1); + var adjustedregex = rule.regex; + var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; + if (Array.isArray(rule.token)) { + if (rule.token.length == 1 || matchcount == 1) { + rule.token = rule.token[0]; + } + else if (matchcount - 1 != rule.token.length) { + this.reportError("number of classes and regexp groups doesn't match", { + rule: rule, + groupCount: matchcount - 1 + }); + rule.token = rule.token[0]; + } + else { + rule.tokenArray = rule.token; + rule.token = null; + rule.onMatch = this.$arrayTokens; + } + } + else if (typeof rule.token == "function" && !rule.onMatch) { + if (matchcount > 1) + rule.onMatch = this.$applyToken; + else + rule.onMatch = rule.token; + } + if (matchcount > 1) { + if (/\\\d/.test(rule.regex)) { + adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function (match, digit) { + return "\\" + (parseInt(digit, 10) + matchTotal + 1); + }); + } + else { + matchcount = 1; + adjustedregex = this.removeCapturingGroups(rule.regex); + } + if (!rule.splitRegex && typeof rule.token != "string") + splitterRurles.push(rule); // flag will be known only at the very end + } + mapping[matchTotal] = i; + matchTotal += matchcount; + ruleRegExps.push(adjustedregex); + if (!rule.onMatch) + rule.onMatch = null; + } + if (!ruleRegExps.length) { + mapping[0] = 0; + ruleRegExps.push("$"); + } + splitterRurles.forEach(function (rule) { + rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); + }, this); + this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); + } + } + Tokenizer.prototype.$setMaxTokenCount = function (m) { + MAX_TOKEN_COUNT = m | 0; + }; + Tokenizer.prototype.$applyToken = function (str) { + var values = this.splitRegex.exec(str).slice(1); + var types = this.token.apply(this, values); + if (typeof types === "string") + return [{ type: types, value: str }]; + var tokens = []; + for (var i = 0, l = types.length; i < l; i++) { + if (values[i]) + tokens[tokens.length] = { + type: types[i], + value: values[i] + }; + } + return tokens; + }; + Tokenizer.prototype.$arrayTokens = function (str) { + if (!str) + return []; + var values = this.splitRegex.exec(str); + if (!values) + return "text"; + var tokens = []; + var types = this.tokenArray; + for (var i = 0, l = types.length; i < l; i++) { + if (values[i + 1]) + tokens[tokens.length] = { + type: types[i], + value: values[i + 1] + }; + } + return tokens; + }; + Tokenizer.prototype.removeCapturingGroups = function (src) { + var r = src.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g, function (x, y) { return y ? "(?:" : x; }); + return r; + }; + Tokenizer.prototype.createSplitterRegexp = function (src, flag) { + if (src.indexOf("(?=") != -1) { + var stack = 0; + var inChClass = false; + var lastCapture = {}; + src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function (m, esc, parenOpen, parenClose, square, index) { + if (inChClass) { + inChClass = square != "]"; + } + else if (square) { + inChClass = true; + } + else if (parenClose) { + if (stack == lastCapture.stack) { + lastCapture.end = index + 1; + lastCapture.stack = -1; + } + stack--; + } + else if (parenOpen) { + stack++; + if (parenOpen.length != 1) { + lastCapture.stack = stack; + lastCapture.start = index; + } + } + return m; + }); + if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) + src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); + } + if (src.charAt(0) != "^") + src = "^" + src; + if (src.charAt(src.length - 1) != "$") + src += "$"; + return new RegExp(src, (flag || "").replace("g", "")); + }; + Tokenizer.prototype.getLineTokens = function (line, startState) { + if (startState && typeof startState != "string") { + var stack = startState.slice(0); + startState = stack[0]; + if (startState === "#tmp") { + stack.shift(); + startState = stack.shift(); + } + } + else + var stack = []; + var currentState = /**@type{string}*/ (startState) || "start"; + var state = this.states[currentState]; + if (!state) { + currentState = "start"; + state = this.states[currentState]; + } + var mapping = this.matchMappings[currentState]; + var re = this.regExps[currentState]; + re.lastIndex = 0; + var match, tokens = []; + var lastIndex = 0; + var matchAttempts = 0; + var token = { type: null, value: "" }; + while (match = re.exec(line)) { + var type = mapping.defaultToken; + var rule = null; + var value = match[0]; + var index = re.lastIndex; + if (index - value.length > lastIndex) { + var skipped = line.substring(lastIndex, index - value.length); + if (token.type == type) { + token.value += skipped; + } + else { + if (token.type) + tokens.push(token); + token = { type: type, value: skipped }; + } + } + for (var i = 0; i < match.length - 2; i++) { + if (match[i + 1] === undefined) + continue; + rule = state[mapping[i]]; + if (rule.onMatch) + type = rule.onMatch(value, currentState, stack, line); + else + type = rule.token; + if (rule.next) { + if (typeof rule.next == "string") { + currentState = rule.next; + } + else { + currentState = rule.next(currentState, stack); + } + state = this.states[currentState]; + if (!state) { + this.reportError("state doesn't exist", currentState); + currentState = "start"; + state = this.states[currentState]; + } + mapping = this.matchMappings[currentState]; + lastIndex = index; + re = this.regExps[currentState]; + re.lastIndex = index; + } + if (rule.consumeLineEnd) + lastIndex = index; + break; + } + if (value) { + if (typeof type === "string") { + if ((!rule || rule.merge !== false) && token.type === type) { + token.value += value; + } + else { + if (token.type) + tokens.push(token); + token = { type: type, value: value }; + } + } + else if (type) { + if (token.type) + tokens.push(token); + token = { type: null, value: "" }; + for (var i = 0; i < type.length; i++) + tokens.push(type[i]); + } + } + if (lastIndex == line.length) + break; + lastIndex = index; + if (matchAttempts++ > MAX_TOKEN_COUNT) { + if (matchAttempts > 2 * line.length) { + this.reportError("infinite loop with in ace tokenizer", { + startState: startState, + line: line + }); + } + while (lastIndex < line.length) { + if (token.type) + tokens.push(token); + token = { + value: line.substring(lastIndex, lastIndex += 500), + type: "overflow" + }; + } + currentState = "start"; + stack = []; + break; + } + } + if (token.type) + tokens.push(token); + if (stack.length > 1) { + if (stack[0] !== currentState) + stack.unshift("#tmp", currentState); + } + return { + tokens: tokens, + state: stack.length ? stack : currentState + }; + }; + return Tokenizer; +}()); +Tokenizer.prototype.reportError = reportError; +exports.Tokenizer = Tokenizer; + +}); + +define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"], function(require, exports, module){"use strict"; +var deepCopy = require("../lib/deep_copy").deepCopy; +var TextHighlightRules; +TextHighlightRules = function () { + this.$rules = { + "start": [{ + token: "empty_line", + regex: '^$' + }, { + defaultToken: "text" + }] + }; +}; +(function () { + this.addRules = function (rules, prefix) { + if (!prefix) { + for (var key in rules) + this.$rules[key] = rules[key]; + return; + } + for (var key in rules) { + var state = rules[key]; + for (var i = 0; i < state.length; i++) { + var rule = state[i]; + if (rule.next || rule.onMatch) { + if (typeof rule.next == "string") { + if (rule.next.indexOf(prefix) !== 0) + rule.next = prefix + rule.next; + } + if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) + rule.nextState = prefix + rule.nextState; + } + } + this.$rules[prefix + key] = state; + } + }; + this.getRules = function () { + return this.$rules; + }; + this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { + var embedRules = typeof HighlightRules == "function" + ? new HighlightRules().getRules() + : HighlightRules; + if (states) { + for (var i = 0; i < states.length; i++) + states[i] = prefix + states[i]; + } + else { + states = []; + for (var key in embedRules) + states.push(prefix + key); + } + this.addRules(embedRules, prefix); + if (escapeRules) { + var addRules = Array.prototype[append ? "push" : "unshift"]; + for (var i = 0; i < states.length; i++) + addRules.apply(this.$rules[states[i]], deepCopy(escapeRules)); + } + if (!this.$embeds) + this.$embeds = []; + this.$embeds.push(prefix); + }; + this.getEmbeds = function () { + return this.$embeds; + }; + var pushState = function (currentState, stack) { + if (currentState != "start" || stack.length) + stack.unshift(this.nextState, currentState); + return this.nextState; + }; + var popState = function (currentState, stack) { + stack.shift(); + return stack.shift() || "start"; + }; + this.normalizeRules = function () { + var id = 0; + var rules = this.$rules; + function processState(key) { + var state = rules[key]; + state["processed"] = true; + for (var i = 0; i < state.length; i++) { + var rule = state[i]; + var toInsert = null; + if (Array.isArray(rule)) { + toInsert = rule; + rule = {}; + } + if (!rule.regex && rule.start) { + rule.regex = rule.start; + if (!rule.next) + rule.next = []; + rule.next.push({ + defaultToken: rule.token + }, { + token: rule.token + ".end", + regex: rule.end || rule.start, + next: "pop" + }); + rule.token = rule.token + ".start"; + rule.push = true; + } + var next = rule.next || rule.push; + if (next && Array.isArray(next)) { + var stateName = rule.stateName; + if (!stateName) { + stateName = rule.token; + if (typeof stateName != "string") + stateName = stateName[0] || ""; + if (rules[stateName]) + stateName += id++; + } + rules[stateName] = next; + rule.next = stateName; + processState(stateName); + } + else if (next == "pop") { + rule.next = popState; + } + if (rule.push) { + rule.nextState = rule.next || rule.push; + rule.next = pushState; + delete rule.push; + } + if (rule.rules) { + for (var r in rule.rules) { + if (rules[r]) { + if (rules[r].push) + rules[r].push.apply(rules[r], rule.rules[r]); + } + else { + rules[r] = rule.rules[r]; + } + } + } + var includeName = typeof rule == "string" ? rule : rule.include; + if (includeName) { + if (includeName === "$self") + includeName = "start"; + if (Array.isArray(includeName)) + toInsert = includeName.map(function (x) { return rules[x]; }); + else + toInsert = rules[includeName]; + } + if (toInsert) { + var args = [i, 1].concat(toInsert); + if (rule.noEscape) + args = args.filter(function (x) { return !x.next; }); + state.splice.apply(state, args); + i--; + } + if (rule.keywordMap) { + rule.token = this.createKeywordMapper(rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive); + delete rule.defaultToken; + } + } + } + Object.keys(rules).forEach(processState, this); + }; + this.createKeywordMapper = function (map, defaultToken, ignoreCase, splitChar) { + var keywords = Object.create(null); + this.$keywordList = []; + Object.keys(map).forEach(function (className) { + var a = map[className]; + var list = a.split(splitChar || "|"); + for (var i = list.length; i--;) { + var word = list[i]; + this.$keywordList.push(word); + if (ignoreCase) + word = word.toLowerCase(); + keywords[word] = className; + } + }, this); + map = null; + return ignoreCase + ? function (value) { return keywords[value.toLowerCase()] || defaultToken; } + : function (value) { return keywords[value] || defaultToken; }; + }; + this.getKeywords = function () { + return this.$keywords; + }; +}).call(TextHighlightRules.prototype); +exports.TextHighlightRules = TextHighlightRules; + +}); + +define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module){"use strict"; +var Behaviour; +Behaviour = function () { + this.$behaviours = {}; +}; +(function () { + this.add = function (name, action, callback) { + switch (undefined) { + case this.$behaviours: + this.$behaviours = {}; + case this.$behaviours[name]: + this.$behaviours[name] = {}; + } + this.$behaviours[name][action] = callback; + }; + this.addBehaviours = function (behaviours) { + for (var key in behaviours) { + for (var action in behaviours[key]) { + this.add(key, action, behaviours[key][action]); + } + } + }; + this.remove = function (name) { + if (this.$behaviours && this.$behaviours[name]) { + delete this.$behaviours[name]; + } + }; + this.inherit = function (mode, filter) { + if (typeof mode === "function") { + var behaviours = new mode().getBehaviours(filter); + } + else { + var behaviours = mode.getBehaviours(filter); + } + this.addBehaviours(behaviours); + }; + this.getBehaviours = function (filter) { + if (!filter) { + return this.$behaviours; + } + else { + var ret = {}; + for (var i = 0; i < filter.length; i++) { + if (this.$behaviours[filter[i]]) { + ret[filter[i]] = this.$behaviours[filter[i]]; + } + } + return ret; + } + }; +}).call(Behaviour.prototype); +exports.Behaviour = Behaviour; + +}); + +define("ace/token_iterator",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("./range").Range; +var TokenIterator = /** @class */ (function () { + function TokenIterator(session, initialRow, initialColumn) { + this.$session = session; + this.$row = initialRow; + this.$rowTokens = session.getTokens(initialRow); + var token = session.getTokenAt(initialRow, initialColumn); + this.$tokenIndex = token ? token.index : -1; + } + TokenIterator.prototype.stepBackward = function () { + this.$tokenIndex -= 1; + while (this.$tokenIndex < 0) { + this.$row -= 1; + if (this.$row < 0) { + this.$row = 0; + return null; + } + this.$rowTokens = this.$session.getTokens(this.$row); + this.$tokenIndex = this.$rowTokens.length - 1; + } + return this.$rowTokens[this.$tokenIndex]; + }; + TokenIterator.prototype.stepForward = function () { + this.$tokenIndex += 1; + var rowCount; + while (this.$tokenIndex >= this.$rowTokens.length) { + this.$row += 1; + if (!rowCount) + rowCount = this.$session.getLength(); + if (this.$row >= rowCount) { + this.$row = rowCount - 1; + return null; + } + this.$rowTokens = this.$session.getTokens(this.$row); + this.$tokenIndex = 0; + } + return this.$rowTokens[this.$tokenIndex]; + }; + TokenIterator.prototype.getCurrentToken = function () { + return this.$rowTokens[this.$tokenIndex]; + }; + TokenIterator.prototype.getCurrentTokenRow = function () { + return this.$row; + }; + TokenIterator.prototype.getCurrentTokenColumn = function () { + var rowTokens = this.$rowTokens; + var tokenIndex = this.$tokenIndex; + var column = rowTokens[tokenIndex].start; + if (column !== undefined) + return column; + column = 0; + while (tokenIndex > 0) { + tokenIndex -= 1; + column += rowTokens[tokenIndex].value.length; + } + return column; + }; + TokenIterator.prototype.getCurrentTokenPosition = function () { + return { row: this.$row, column: this.getCurrentTokenColumn() }; + }; + TokenIterator.prototype.getCurrentTokenRange = function () { + var token = this.$rowTokens[this.$tokenIndex]; + var column = this.getCurrentTokenColumn(); + return new Range(this.$row, column, this.$row, column + token.value.length); + }; + return TokenIterator; +}()); +exports.TokenIterator = TokenIterator; + +}); + +define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var lang = require("../../lib/lang"); +var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "rparen", "paren", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "rparen", "paren", "punctuation.operator", "comment"]; +var context; +var contextCache = {}; +var defaultQuotes = { '"': '"', "'": "'" }; +var initContext = function (editor) { + var id = -1; + if (editor.multiSelect) { + id = editor.selection.index; + if (contextCache.rangeCount != editor.multiSelect.rangeCount) + contextCache = { rangeCount: editor.multiSelect.rangeCount }; + } + if (contextCache[id]) + return context = contextCache[id]; + context = contextCache[id] = { + autoInsertedBrackets: 0, + autoInsertedRow: -1, + autoInsertedLineEnd: "", + maybeInsertedBrackets: 0, + maybeInsertedRow: -1, + maybeInsertedLineStart: "", + maybeInsertedLineEnd: "" + }; +}; +var getWrapped = function (selection, selected, opening, closing) { + var rowDiff = selection.end.row - selection.start.row; + return { + text: opening + selected + closing, + selection: [ + 0, + selection.start.column + 1, + rowDiff, + selection.end.column + (rowDiff ? 0 : 1) + ] + }; +}; +var CstyleBehaviour; +CstyleBehaviour = function (options) { + options = options || {}; + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + var token = session.getTokenAt(cursor.row, cursor.column); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '{', '}'); + } + else if (token && /(?:string)\.quasi|\.xml/.test(token.type)) { + var excludeTokens = [ + /tag\-(?:open|name)/, /attribute\-name/ + ]; + if (excludeTokens.some(function (el) { return el.test(token.type); }) || /(string)\.quasi/.test(token.type) + && token.value[cursor.column - token.start - 1] !== '$') + return; + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } + else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options.braces) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } + else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } + else if (text == '}') { + initContext(editor); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', { column: cursor.column + 1, row: cursor.row }); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + else if (text == "\n" || text == "\r\n") { + initContext(editor); + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", context.maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === '}') { + var openBracePos = session.findMatchingBracket({ row: cursor.row, column: cursor.column + 1 }, '}'); + if (!openBracePos) + return null; + var next_indent = this.$getIndent(session.getLine(openBracePos.row)); + } + else if (closing) { + var next_indent = this.$getIndent(line); + } + else { + CstyleBehaviour.clearMaybeInsertedClosing(); + return; + } + var indent = next_indent + session.getTabString(); + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + else { + CstyleBehaviour.clearMaybeInsertedClosing(); + } + }); + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } + else { + context.maybeInsertedBrackets--; + } + } + }); + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '(', ')'); + } + else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } + else if (text == ')') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', { column: cursor.column + 1, row: cursor.row }); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '[', ']'); + } + else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } + else if (text == ']') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', { column: cursor.column + 1, row: cursor.row }); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + var quotes = session.$mode.$quotes || defaultQuotes; + if (text.length == 1 && quotes[text]) { + if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1) + return; + initContext(editor); + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, quote, quote); + } + else if (!selected) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column - 1, cursor.column); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var token = session.getTokenAt(cursor.row, cursor.column); + var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); + if (leftChar == "\\" && token && /escape/.test(token.type)) + return null; + var stringBefore = token && /string|escape/.test(token.type); + var stringAfter = !rightToken || /string|escape/.test(rightToken.type); + var pair; + if (rightChar == quote) { + pair = stringBefore !== stringAfter; + if (pair && /string\.end/.test(rightToken.type)) + pair = false; + } + else { + if (stringBefore && !stringAfter) + return null; // wrap string with different quote + if (stringBefore && stringAfter) + return null; // do not pair quotes inside strings + var wordRe = session.$mode.tokenRe; + wordRe.lastIndex = 0; + var isWordBefore = wordRe.test(leftChar); + wordRe.lastIndex = 0; + var isWordAfter = wordRe.test(rightChar); + var pairQuotesAfter = session.$mode.$pairQuotesAfter; + var shouldPairQuotes = pairQuotesAfter && pairQuotesAfter[quote] && pairQuotesAfter[quote].test(leftChar); + if ((!shouldPairQuotes && isWordBefore) || isWordAfter) + return null; // before or after alphanumeric + if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) + return null; // there is rightChar and it isn't closing + var charBefore = line[cursor.column - 2]; + if (leftChar == quote && (charBefore == quote || wordRe.test(charBefore))) + return null; + pair = true; + } + return { + text: pair ? quote + quote : "", + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var quotes = session.$mode.$quotes || defaultQuotes; + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && quotes.hasOwnProperty(selected)) { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + if (options.closeDocComment !== false) { + this.add("doc comment end", "insertion", function (state, action, editor, session, text) { + if (state === "doc-start" && (text === "\n" || text === "\r\n") && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + if (cursor.column === 0) { + return; + } + var line = session.doc.getLine(cursor.row); + var nextLine = session.doc.getLine(cursor.row + 1); + var tokens = session.getTokens(cursor.row); + var index = 0; + for (var i = 0; i < tokens.length; i++) { + index += tokens[i].value.length; + var currentToken = tokens[i]; + if (index >= cursor.column) { + if (index === cursor.column) { + if (!/\.doc/.test(currentToken.type)) { + return; + } + if (/\*\//.test(currentToken.value)) { + var nextToken = tokens[i + 1]; + if (!nextToken || !/\.doc/.test(nextToken.type)) { + return; + } + } + } + var cursorPosInToken = cursor.column - (index - currentToken.value.length); + var closeDocPos = currentToken.value.indexOf("*/"); + var openDocPos = currentToken.value.indexOf("/**", closeDocPos > -1 ? closeDocPos + 2 : 0); + if (openDocPos !== -1 && cursorPosInToken > openDocPos && cursorPosInToken < openDocPos + 3) { + return; + } + if (closeDocPos !== -1 && openDocPos !== -1 && cursorPosInToken >= closeDocPos + && cursorPosInToken <= openDocPos || !/\.doc/.test(currentToken.type)) { + return; + } + break; + } + } + var indent = this.$getIndent(line); + if (/\s*\*/.test(nextLine)) { + if (/^\s*\*/.test(line)) { + return { + text: text + indent + "* ", + selection: [1, 2 + indent.length, 1, 2 + indent.length] + }; + } + else { + return { + text: text + indent + " * ", + selection: [1, 3 + indent.length, 1, 3 + indent.length] + }; + } + } + if (/\/\*\*/.test(line.substring(0, cursor.column))) { + return { + text: text + indent + " * " + text + " " + indent + "*/", + selection: [1, 4 + indent.length, 1, 4 + indent.length] + }; + } + } + }); + } +}; +CstyleBehaviour.isSaneInsertion = function (editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + if (/[)}\]]/.test(editor.session.getLine(cursor.row)[cursor.column])) + return true; + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); +}; +CstyleBehaviour["$matchTokenType"] = function (token, types) { + return types.indexOf(token.type || token) > -1; +}; +CstyleBehaviour["recordAutoInsert"] = function (editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this["isAutoInsertedClosing"](cursor, line, context.autoInsertedLineEnd[0])) + context.autoInsertedBrackets = 0; + context.autoInsertedRow = cursor.row; + context.autoInsertedLineEnd = bracket + line.substr(cursor.column); + context.autoInsertedBrackets++; +}; +CstyleBehaviour["recordMaybeInsert"] = function (editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this["isMaybeInsertedClosing"](cursor, line)) + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = cursor.row; + context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + context.maybeInsertedLineEnd = line.substr(cursor.column); + context.maybeInsertedBrackets++; +}; +CstyleBehaviour["isAutoInsertedClosing"] = function (cursor, line, bracket) { + return context.autoInsertedBrackets > 0 && + cursor.row === context.autoInsertedRow && + bracket === context.autoInsertedLineEnd[0] && + line.substr(cursor.column) === context.autoInsertedLineEnd; +}; +CstyleBehaviour["isMaybeInsertedClosing"] = function (cursor, line) { + return context.maybeInsertedBrackets > 0 && + cursor.row === context.maybeInsertedRow && + line.substr(cursor.column) === context.maybeInsertedLineEnd && + line.substr(0, cursor.column) == context.maybeInsertedLineStart; +}; +CstyleBehaviour["popAutoInsertedClosing"] = function () { + context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); + context.autoInsertedBrackets--; +}; +CstyleBehaviour["clearMaybeInsertedClosing"] = function () { + if (context) { + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = -1; + } +}; +oop.inherits(CstyleBehaviour, Behaviour); +exports.CstyleBehaviour = CstyleBehaviour; + +}); + +define("ace/unicode",["require","exports","module"], function(require, exports, module){"use strict"; +var wordChars = [48, 9, 8, 25, 5, 0, 2, 25, 48, 0, 11, 0, 5, 0, 6, 22, 2, 30, 2, 457, 5, 11, 15, 4, 8, 0, 2, 0, 18, 116, 2, 1, 3, 3, 9, 0, 2, 2, 2, 0, 2, 19, 2, 82, 2, 138, 2, 4, 3, 155, 12, 37, 3, 0, 8, 38, 10, 44, 2, 0, 2, 1, 2, 1, 2, 0, 9, 26, 6, 2, 30, 10, 7, 61, 2, 9, 5, 101, 2, 7, 3, 9, 2, 18, 3, 0, 17, 58, 3, 100, 15, 53, 5, 0, 6, 45, 211, 57, 3, 18, 2, 5, 3, 11, 3, 9, 2, 1, 7, 6, 2, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 0, 4, 3, 3, 8, 3, 1, 3, 3, 9, 0, 5, 1, 2, 4, 3, 11, 16, 2, 2, 5, 5, 1, 3, 21, 2, 6, 2, 1, 2, 1, 2, 1, 3, 0, 2, 4, 5, 1, 3, 2, 4, 0, 8, 3, 2, 0, 8, 15, 12, 2, 2, 8, 2, 2, 2, 21, 2, 6, 2, 1, 2, 4, 3, 9, 2, 2, 2, 2, 3, 0, 16, 3, 3, 9, 18, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 3, 8, 3, 1, 3, 2, 9, 1, 5, 1, 2, 4, 3, 9, 2, 0, 17, 1, 2, 5, 4, 2, 2, 3, 4, 1, 2, 0, 2, 1, 4, 1, 4, 2, 4, 11, 5, 4, 4, 2, 2, 3, 3, 0, 7, 0, 15, 9, 18, 2, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 4, 7, 2, 2, 2, 3, 8, 1, 2, 1, 7, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 3, 8, 2, 2, 2, 3, 8, 1, 8, 0, 2, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 15, 4, 7, 2, 2, 2, 3, 10, 0, 9, 3, 3, 9, 11, 5, 3, 1, 2, 17, 4, 23, 2, 8, 2, 0, 3, 6, 4, 0, 5, 5, 2, 0, 2, 7, 19, 1, 14, 57, 6, 14, 2, 9, 40, 1, 2, 0, 3, 1, 2, 0, 3, 0, 7, 3, 2, 6, 2, 2, 2, 0, 2, 0, 3, 1, 2, 12, 2, 2, 3, 4, 2, 0, 2, 5, 3, 9, 3, 1, 35, 0, 24, 1, 7, 9, 12, 0, 2, 0, 2, 0, 5, 9, 2, 35, 5, 19, 2, 5, 5, 7, 2, 35, 10, 0, 58, 73, 7, 77, 3, 37, 11, 42, 2, 0, 4, 328, 2, 3, 3, 6, 2, 0, 2, 3, 3, 40, 2, 3, 3, 32, 2, 3, 3, 6, 2, 0, 2, 3, 3, 14, 2, 56, 2, 3, 3, 66, 5, 0, 33, 15, 17, 84, 13, 619, 3, 16, 2, 25, 6, 74, 22, 12, 2, 6, 12, 20, 12, 19, 13, 12, 2, 2, 2, 1, 13, 51, 3, 29, 4, 0, 5, 1, 3, 9, 34, 2, 3, 9, 7, 87, 9, 42, 6, 69, 11, 28, 4, 11, 5, 11, 11, 39, 3, 4, 12, 43, 5, 25, 7, 10, 38, 27, 5, 62, 2, 28, 3, 10, 7, 9, 14, 0, 89, 75, 5, 9, 18, 8, 13, 42, 4, 11, 71, 55, 9, 9, 4, 48, 83, 2, 2, 30, 14, 230, 23, 280, 3, 5, 3, 37, 3, 5, 3, 7, 2, 0, 2, 0, 2, 0, 2, 30, 3, 52, 2, 6, 2, 0, 4, 2, 2, 6, 4, 3, 3, 5, 5, 12, 6, 2, 2, 6, 67, 1, 20, 0, 29, 0, 14, 0, 17, 4, 60, 12, 5, 0, 4, 11, 18, 0, 5, 0, 3, 9, 2, 0, 4, 4, 7, 0, 2, 0, 2, 0, 2, 3, 2, 10, 3, 3, 6, 4, 5, 0, 53, 1, 2684, 46, 2, 46, 2, 132, 7, 6, 15, 37, 11, 53, 10, 0, 17, 22, 10, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 31, 48, 0, 470, 1, 36, 5, 2, 4, 6, 1, 5, 85, 3, 1, 3, 2, 2, 89, 2, 3, 6, 40, 4, 93, 18, 23, 57, 15, 513, 6581, 75, 20939, 53, 1164, 68, 45, 3, 268, 4, 27, 21, 31, 3, 13, 13, 1, 2, 24, 9, 69, 11, 1, 38, 8, 3, 102, 3, 1, 111, 44, 25, 51, 13, 68, 12, 9, 7, 23, 4, 0, 5, 45, 3, 35, 13, 28, 4, 64, 15, 10, 39, 54, 10, 13, 3, 9, 7, 22, 4, 1, 5, 66, 25, 2, 227, 42, 2, 1, 3, 9, 7, 11171, 13, 22, 5, 48, 8453, 301, 3, 61, 3, 105, 39, 6, 13, 4, 6, 11, 2, 12, 2, 4, 2, 0, 2, 1, 2, 1, 2, 107, 34, 362, 19, 63, 3, 53, 41, 11, 5, 15, 17, 6, 13, 1, 25, 2, 33, 4, 2, 134, 20, 9, 8, 25, 5, 0, 2, 25, 12, 88, 4, 5, 3, 5, 3, 5, 3, 2]; +var code = 0; +var str = []; +for (var i = 0; i < wordChars.length; i += 2) { + str.push(code += wordChars[i]); + if (wordChars[i + 1]) + str.push(45, code += wordChars[i + 1]); +} +exports.wordChars = String.fromCharCode.apply(null, str); + +}); + +define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module){"use strict"; +var config = require("../config"); +var Tokenizer = require("../tokenizer").Tokenizer; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var unicode = require("../unicode"); +var lang = require("../lib/lang"); +var TokenIterator = require("../token_iterator").TokenIterator; +var Range = require("../range").Range; +var Mode; +Mode = function () { + this.HighlightRules = TextHighlightRules; +}; +(function () { + this.$defaultBehaviour = new CstyleBehaviour(); + this.tokenRe = new RegExp("^[" + unicode.wordChars + "\\$_]+", "g"); + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "\\$_]|\\s])+", "g"); + this.getTokenizer = function () { + if (!this.$tokenizer) { + this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig); + this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); + } + return this.$tokenizer; + }; + this.lineCommentStart = ""; + this.blockComment = ""; + this.toggleCommentLines = function (state, session, startRow, endRow) { + var doc = session.doc; + var ignoreBlankLines = true; + var shouldRemove = true; + var minIndent = Infinity; + var tabSize = session.getTabSize(); + var insertAtTabStop = false; + if (!this.lineCommentStart) { + if (!this.blockComment) + return false; + var lineCommentStart = this.blockComment.start; + var lineCommentEnd = this.blockComment.end; + var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); + var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); + var comment = function (line, i) { + if (testRemove(line, i)) + return; + if (!ignoreBlankLines || /\S/.test(line)) { + doc.insertInLine({ row: i, column: line.length }, lineCommentEnd); + doc.insertInLine({ row: i, column: minIndent }, lineCommentStart); + } + }; + var uncomment = function (line, i) { + var m; + if (m = line.match(regexpEnd)) + doc.removeInLine(i, line.length - m[0].length, line.length); + if (m = line.match(regexpStart)) + doc.removeInLine(i, m[1].length, m[0].length); + }; + var testRemove = function (line, row) { + if (regexpStart.test(line)) + return true; + var tokens = session.getTokens(row); + for (var i = 0; i < tokens.length; i++) { + if (tokens[i].type === "comment") + return true; + } + }; + } + else { + if (Array.isArray(this.lineCommentStart)) { + var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); + var lineCommentStart = this.lineCommentStart[0]; + } + else { + var regexpStart = lang.escapeRegExp(this.lineCommentStart); + var lineCommentStart = this.lineCommentStart; + } + regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); + insertAtTabStop = session.getUseSoftTabs(); + var uncomment = function (line, i) { + var m = line.match(regexpStart); + if (!m) + return; + var start = m[1].length, end = m[0].length; + if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") + end--; + doc.removeInLine(i, start, end); + }; + var commentWithSpace = lineCommentStart + " "; + var comment = function (line, i) { + if (!ignoreBlankLines || /\S/.test(line)) { + if (shouldInsertSpace(line, minIndent, minIndent)) + doc.insertInLine({ row: i, column: minIndent }, commentWithSpace); + else + doc.insertInLine({ row: i, column: minIndent }, lineCommentStart); + } + }; + var testRemove = function (line, i) { + return regexpStart.test(line); + }; + var shouldInsertSpace = function (line, before, after) { + var spaces = 0; + while (before-- && line.charAt(before) == " ") + spaces++; + if (spaces % tabSize != 0) + return false; + var spaces = 0; + while (line.charAt(after++) == " ") + spaces++; + if (tabSize > 2) + return spaces % tabSize != tabSize - 1; + else + return spaces % tabSize == 0; + }; + } + function iter(fun) { + for (var i = startRow; i <= endRow; i++) + fun(doc.getLine(i), i); + } + var minEmptyLength = Infinity; + iter(function (line, i) { + var indent = line.search(/\S/); + if (indent !== -1) { + if (indent < minIndent) + minIndent = indent; + if (shouldRemove && !testRemove(line, i)) + shouldRemove = false; + } + else if (minEmptyLength > line.length) { + minEmptyLength = line.length; + } + }); + if (minIndent == Infinity) { + minIndent = minEmptyLength; + ignoreBlankLines = false; + shouldRemove = false; + } + if (insertAtTabStop && minIndent % tabSize != 0) + minIndent = Math.floor(minIndent / tabSize) * tabSize; + iter(shouldRemove ? uncomment : comment); + }; + this.toggleBlockComment = function (state, session, range, cursor) { + var comment = this.blockComment; + if (!comment) + return; + if (!comment.start && comment[0]) + comment = comment[0]; + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + var sel = session.selection; + var initialRange = session.selection.toOrientedRange(); + var startRow, colDiff; + if (token && /comment/.test(token.type)) { + var startRange, endRange; + while (token && /comment/.test(token.type)) { + var i = token.value.indexOf(comment.start); + if (i != -1) { + var row = iterator.getCurrentTokenRow(); + var column = iterator.getCurrentTokenColumn() + i; + startRange = new Range(row, column, row, column + comment.start.length); + break; + } + token = iterator.stepBackward(); + } + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + while (token && /comment/.test(token.type)) { + var i = token.value.indexOf(comment.end); + if (i != -1) { + var row = iterator.getCurrentTokenRow(); + var column = iterator.getCurrentTokenColumn() + i; + endRange = new Range(row, column, row, column + comment.end.length); + break; + } + token = iterator.stepForward(); + } + if (endRange) + session.remove(endRange); + if (startRange) { + session.remove(startRange); + startRow = startRange.start.row; + colDiff = -comment.start.length; + } + } + else { + colDiff = comment.start.length; + startRow = range.start.row; + session.insert(range.end, comment.end); + session.insert(range.start, comment.start); + } + if (initialRange.start.row == startRow) + initialRange.start.column += colDiff; + if (initialRange.end.row == startRow) + initialRange.end.column += colDiff; + session.selection.fromOrientedRange(initialRange); + }; + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.autoOutdent = function (state, doc, row) { + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; + this.createWorker = function (session) { + return null; + }; + this.createModeDelegates = function (mapping) { + this.$embeds = []; + this.$modes = {}; + for (var i in mapping) { + if (mapping[i]) { + var Mode = mapping[i]; + var id = Mode.prototype.$id; + var mode = config.$modes[id]; + if (!mode) + config.$modes[id] = mode = new Mode(); + if (!config.$modes[i]) + config.$modes[i] = mode; + this.$embeds.push(i); + this.$modes[i] = mode; + } + } + var delegations = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent", + "checkOutdent", "autoOutdent", "transformAction", "getCompletions"]; + var _loop_1 = function (i) { + (function (scope) { + var functionName = delegations[i]; + var defaultHandler = scope[functionName]; + scope[delegations[i]] = + function () { + return this.$delegator(functionName, arguments, defaultHandler); + }; + }(this_1)); + }; + var this_1 = this; + for (var i = 0; i < delegations.length; i++) { + _loop_1(i); + } + }; + this.$delegator = function (method, args, defaultHandler) { + var state = args[0] || "start"; + if (typeof state != "string") { + if (Array.isArray(state[2])) { + var language = state[2][state[2].length - 1]; + var mode = this.$modes[language]; + if (mode) + return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1))); + } + state = state[0] || "start"; + } + for (var i = 0; i < this.$embeds.length; i++) { + if (!this.$modes[this.$embeds[i]]) + continue; + var split = state.split(this.$embeds[i]); + if (!split[0] && split[1]) { + args[0] = split[1]; + var mode = this.$modes[this.$embeds[i]]; + return mode[method].apply(mode, args); + } + } + var ret = defaultHandler.apply(this, args); + return defaultHandler ? ret : undefined; + }; + this.transformAction = function (state, action, editor, session, param) { + if (this.$behaviour) { + var behaviours = this.$behaviour.getBehaviours(); + for (var key in behaviours) { + if (behaviours[key][action]) { + var ret = behaviours[key][action].apply(this, arguments); + if (ret) { + return ret; + } + } + } + } + }; + this.getKeywords = function (append) { + if (!this.completionKeywords) { + var rules = this.$tokenizer["rules"]; + var completionKeywords = []; + for (var rule in rules) { + var ruleItr = rules[rule]; + for (var r = 0, l = ruleItr.length; r < l; r++) { + if (typeof ruleItr[r].token === "string") { + if (/keyword|support|storage/.test(ruleItr[r].token)) + completionKeywords.push(ruleItr[r].regex); + } + else if (typeof ruleItr[r].token === "object") { + for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { + if (/keyword|support|storage/.test(ruleItr[r].token[a])) { + var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; + completionKeywords.push(rule.substr(1, rule.length - 2)); + } + } + } + } + } + this.completionKeywords = completionKeywords; + } + if (!append) + return this.$keywordList; + return completionKeywords.concat(this.$keywordList || []); + }; + this.$createKeywordList = function () { + if (!this.$highlightRules) + this.getTokenizer(); + return this.$keywordList = this.$highlightRules.$keywordList || []; + }; + this.getCompletions = function (state, session, pos, prefix) { + var keywords = this.$keywordList || this.$createKeywordList(); + return keywords.map(function (word) { + return { + name: word, + value: word, + score: 0, + meta: "keyword" + }; + }); + }; + this.$id = "ace/mode/text"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/apply_delta",["require","exports","module"], function(require, exports, module){"use strict"; +function throwDeltaError(delta, errorText) { + console.log("Invalid Delta:", delta); + throw "Invalid Delta: " + errorText; +} +function positionInDocument(docLines, position) { + return position.row >= 0 && position.row < docLines.length && + position.column >= 0 && position.column <= docLines[position.row].length; +} +function validateDelta(docLines, delta) { + if (delta.action != "insert" && delta.action != "remove") + throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); + if (!(delta.lines instanceof Array)) + throwDeltaError(delta, "delta.lines must be an Array"); + if (!delta.start || !delta.end) + throwDeltaError(delta, "delta.start/end must be an present"); + var start = delta.start; + if (!positionInDocument(docLines, delta.start)) + throwDeltaError(delta, "delta.start must be contained in document"); + var end = delta.end; + if (delta.action == "remove" && !positionInDocument(docLines, end)) + throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); + var numRangeRows = end.row - start.row; + var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); + if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) + throwDeltaError(delta, "delta.range must match delta lines"); +} +exports.applyDelta = function (docLines, delta, doNotValidate) { + var row = delta.start.row; + var startColumn = delta.start.column; + var line = docLines[row] || ""; + switch (delta.action) { + case "insert": + var lines = delta.lines; + if (lines.length === 1) { + docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); + } + else { + var args = [row, 1].concat(delta.lines); + docLines.splice.apply(docLines, args); + docLines[row] = line.substring(0, startColumn) + docLines[row]; + docLines[row + delta.lines.length - 1] += line.substring(startColumn); + } + break; + case "remove": + var endColumn = delta.end.column; + var endRow = delta.end.row; + if (row === endRow) { + docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); + } + else { + docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn)); + } + break; + } +}; + +}); + +define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Anchor = /** @class */ (function () { + function Anchor(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + if (typeof row != "number") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); + } + Anchor.prototype.getPosition = function () { + return this.$clipPositionToDocument(this.row, this.column); + }; + Anchor.prototype.getDocument = function () { + return this.document; + }; + Anchor.prototype.onChange = function (delta) { + if (delta.start.row == delta.end.row && delta.start.row != this.row) + return; + if (delta.start.row > this.row) + return; + var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight); + this.setPosition(point.row, point.column, true); + }; + Anchor.prototype.setPosition = function (row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } + else { + pos = this.$clipPositionToDocument(row, column); + } + if (this.row == pos.row && this.column == pos.column) + return; + var old = { + row: this.row, + column: this.column + }; + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + Anchor.prototype.detach = function () { + this.document.off("change", this.$onChange); + }; + Anchor.prototype.attach = function (doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + Anchor.prototype.$clipPositionToDocument = function (row, column) { + var pos = {}; + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + if (column < 0) + pos.column = 0; + return pos; + }; + return Anchor; +}()); +Anchor.prototype.$insertRight = false; +oop.implement(Anchor.prototype, EventEmitter); +function $pointsInOrder(point1, point2, equalPointsInOrder) { + var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; + return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); +} +function $getTransformedPoint(delta, point, moveIfEqual) { + var deltaIsInsert = delta.action == "insert"; + var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); + var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); + var deltaStart = delta.start; + var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. + if ($pointsInOrder(point, deltaStart, moveIfEqual)) { + return { + row: point.row, + column: point.column + }; + } + if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { + return { + row: point.row + deltaRowShift, + column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) + }; + } + return { + row: deltaStart.row, + column: deltaStart.column + }; +} +exports.Anchor = Anchor; + +}); + +define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var applyDelta = require("./apply_delta").applyDelta; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; +var Document = /** @class */ (function () { + function Document(textOrLines) { + this.$lines = [""]; + if (textOrLines.length === 0) { + this.$lines = [""]; + } + else if (Array.isArray(textOrLines)) { + this.insertMergedLines({ row: 0, column: 0 }, textOrLines); + } + else { + this.insert({ row: 0, column: 0 }, textOrLines); + } + } + Document.prototype.setValue = function (text) { + var len = this.getLength() - 1; + this.remove(new Range(0, 0, len, this.getLine(len).length)); + this.insert({ row: 0, column: 0 }, text || ""); + }; + Document.prototype.getValue = function () { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + Document.prototype.createAnchor = function (row, column) { + return new Anchor(this, row, column); + }; + Document.prototype.$detectNewLine = function (text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineCharacter = function () { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + Document.prototype.setNewLineMode = function (newLineMode) { + if (this.$newLineMode === newLineMode) + return; + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineMode = function () { + return this.$newLineMode; + }; + Document.prototype.isNewLine = function (text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + Document.prototype.getLine = function (row) { + return this.$lines[row] || ""; + }; + Document.prototype.getLines = function (firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + Document.prototype.getAllLines = function () { + return this.getLines(0, this.getLength()); + }; + Document.prototype.getLength = function () { + return this.$lines.length; + }; + Document.prototype.getTextRange = function (range) { + return this.getLinesForRange(range).join(this.getNewLineCharacter()); + }; + Document.prototype.getLinesForRange = function (range) { + var lines; + if (range.start.row === range.end.row) { + lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; + } + else { + lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + } + return lines; + }; + Document.prototype.insertLines = function (row, lines) { + console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); + return this.insertFullLines(row, lines); + }; + Document.prototype.removeLines = function (firstRow, lastRow) { + console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); + return this.removeFullLines(firstRow, lastRow); + }; + Document.prototype.insertNewLine = function (position) { + console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); + return this.insertMergedLines(position, ["", ""]); + }; + Document.prototype.insert = function (position, text) { + if (this.getLength() <= 1) + this.$detectNewLine(text); + return this.insertMergedLines(position, this.$split(text)); + }; + Document.prototype.insertInLine = function (position, text) { + var start = this.clippedPos(position.row, position.column); + var end = this.pos(position.row, position.column + text.length); + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: [text] + }, true); + return this.clonePos(end); + }; + Document.prototype.clippedPos = function (row, column) { + var length = this.getLength(); + if (row === undefined) { + row = length; + } + else if (row < 0) { + row = 0; + } + else if (row >= length) { + row = length - 1; + column = undefined; + } + var line = this.getLine(row); + if (column == undefined) + column = line.length; + column = Math.min(Math.max(column, 0), line.length); + return { row: row, column: column }; + }; + Document.prototype.clonePos = function (pos) { + return { row: pos.row, column: pos.column }; + }; + Document.prototype.pos = function (row, column) { + return { row: row, column: column }; + }; + Document.prototype.$clipPosition = function (position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length - 1).length; + } + else { + position.row = Math.max(0, position.row); + position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); + } + return position; + }; + Document.prototype.insertFullLines = function (row, lines) { + row = Math.min(Math.max(row, 0), this.getLength()); + var column = 0; + if (row < this.getLength()) { + lines = lines.concat([""]); + column = 0; + } + else { + lines = [""].concat(lines); + row--; + column = this.$lines[row].length; + } + this.insertMergedLines({ row: row, column: column }, lines); + }; + Document.prototype.insertMergedLines = function (position, lines) { + var start = this.clippedPos(position.row, position.column); + var end = { + row: start.row + lines.length - 1, + column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length + }; + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: lines + }); + return this.clonePos(end); + }; + Document.prototype.remove = function (range) { + var start = this.clippedPos(range.start.row, range.start.column); + var end = this.clippedPos(range.end.row, range.end.column); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }); + return this.clonePos(start); + }; + Document.prototype.removeInLine = function (row, startColumn, endColumn) { + var start = this.clippedPos(row, startColumn); + var end = this.clippedPos(row, endColumn); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }, true); + return this.clonePos(start); + }; + Document.prototype.removeFullLines = function (firstRow, lastRow) { + firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); + lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1); + var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; + var deleteLastNewLine = lastRow < this.getLength() - 1; + var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow); + var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0); + var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow); + var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length); + var range = new Range(startRow, startCol, endRow, endCol); + var deletedLines = this.$lines.slice(firstRow, lastRow + 1); + this.applyDelta({ + start: range.start, + end: range.end, + action: "remove", + lines: this.getLinesForRange(range) + }); + return deletedLines; + }; + Document.prototype.removeNewLine = function (row) { + if (row < this.getLength() - 1 && row >= 0) { + this.applyDelta({ + start: this.pos(row, this.getLine(row).length), + end: this.pos(row + 1, 0), + action: "remove", + lines: ["", ""] + }); + } + }; + Document.prototype.replace = function (range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length === 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + this.remove(range); + var end; + if (text) { + end = this.insert(range.start, text); + } + else { + end = range.start; + } + return end; + }; + Document.prototype.applyDeltas = function (deltas) { + for (var i = 0; i < deltas.length; i++) { + this.applyDelta(deltas[i]); + } + }; + Document.prototype.revertDeltas = function (deltas) { + for (var i = deltas.length - 1; i >= 0; i--) { + this.revertDelta(deltas[i]); + } + }; + Document.prototype.applyDelta = function (delta, doNotValidate) { + var isInsert = delta.action == "insert"; + if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] + : !Range.comparePoints(delta.start, delta.end)) { + return; + } + if (isInsert && delta.lines.length > 20000) { + this.$splitAndapplyLargeDelta(delta, 20000); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } + }; + Document.prototype.$safeApplyDelta = function (delta) { + var docLength = this.$lines.length; + if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength + || delta.action == "insert" && delta.start.row <= docLength) { + this.applyDelta(delta); + } + }; + Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) { + var lines = delta.lines; + var l = lines.length - MAX + 1; + var row = delta.start.row; + var column = delta.start.column; + for (var from = 0, to = 0; from < l; from = to) { + to += MAX - 1; + var chunk = lines.slice(from, to); + chunk.push(""); + this.applyDelta({ + start: this.pos(row + from, column), + end: this.pos(row + to, column = 0), + action: delta.action, + lines: chunk + }, true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); + }; + Document.prototype.revertDelta = function (delta) { + this.$safeApplyDelta({ + start: this.clonePos(delta.start), + end: this.clonePos(delta.end), + action: (delta.action == "insert" ? "remove" : "insert"), + lines: delta.lines.slice() + }); + }; + Document.prototype.indexToPosition = function (index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return { row: i, column: index + lines[i].length + newlineLength }; + } + return { row: l - 1, column: index + lines[l - 1].length + newlineLength }; + }; + Document.prototype.positionToIndex = function (pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + return index + pos.column; + }; + Document.prototype.$split = function (text) { + return text.split(/\r\n|\r|\n/); + }; + return Document; +}()); +Document.prototype.$autoNewLine = ""; +Document.prototype.$newLineMode = "auto"; +oop.implement(Document.prototype, EventEmitter); +exports.Document = Document; + +}); + +define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var BackgroundTokenizer = /** @class */ (function () { + function BackgroundTokenizer(tokenizer, session) { + this.running = false; + this.lines = []; + this.states = []; + this.currentLine = 0; + this.tokenizer = tokenizer; + var self = this; + this.$worker = function () { + if (!self.running) { + return; + } + var workerStart = new Date(); + var currentLine = self.currentLine; + var endLine = -1; + var doc = self.doc; + var startLine = currentLine; + while (self.lines[currentLine]) + currentLine++; + var len = doc.getLength(); + var processedLines = 0; + self.running = false; + while (currentLine < len) { + self.$tokenizeRow(currentLine); + endLine = currentLine; + do { + currentLine++; + } while (self.lines[currentLine]); + processedLines++; + if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { + self.running = setTimeout(self.$worker, 20); + break; + } + } + self.currentLine = currentLine; + if (endLine == -1) + endLine = currentLine; + if (startLine <= endLine) + self.fireUpdateEvent(startLine, endLine); + }; + } + BackgroundTokenizer.prototype.setTokenizer = function (tokenizer) { + this.tokenizer = tokenizer; + this.lines = []; + this.states = []; + this.start(0); + }; + BackgroundTokenizer.prototype.setDocument = function (doc) { + this.doc = doc; + this.lines = []; + this.states = []; + this.stop(); + }; + BackgroundTokenizer.prototype.fireUpdateEvent = function (firstRow, lastRow) { + var data = { + first: firstRow, + last: lastRow + }; + this._signal("update", { data: data }); + }; + BackgroundTokenizer.prototype.start = function (startRow) { + this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); + this.lines.splice(this.currentLine, this.lines.length); + this.states.splice(this.currentLine, this.states.length); + this.stop(); + this.running = setTimeout(this.$worker, 700); + }; + BackgroundTokenizer.prototype.scheduleStart = function () { + if (!this.running) + this.running = setTimeout(this.$worker, 700); + }; + BackgroundTokenizer.prototype.$updateOnChange = function (delta) { + var startRow = delta.start.row; + var len = delta.end.row - startRow; + if (len === 0) { + this.lines[startRow] = null; + } + else if (delta.action == "remove") { + this.lines.splice(startRow, len + 1, null); + this.states.splice(startRow, len + 1, null); + } + else { + var args = Array(len + 1); + args.unshift(startRow, 1); + this.lines.splice.apply(this.lines, args); + this.states.splice.apply(this.states, args); + } + this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); + this.stop(); + }; + BackgroundTokenizer.prototype.stop = function () { + if (this.running) + clearTimeout(this.running); + this.running = false; + }; + BackgroundTokenizer.prototype.getTokens = function (row) { + return this.lines[row] || this.$tokenizeRow(row); + }; + BackgroundTokenizer.prototype.getState = function (row) { + if (this.currentLine == row) + this.$tokenizeRow(row); + return this.states[row] || "start"; + }; + BackgroundTokenizer.prototype.$tokenizeRow = function (row) { + var line = this.doc.getLine(row); + var state = this.states[row - 1]; + var data = this.tokenizer.getLineTokens(line, state, row); + if (this.states[row] + "" !== data.state + "") { + this.states[row] = data.state; + this.lines[row + 1] = null; + if (this.currentLine > row + 1) + this.currentLine = row + 1; + } + else if (this.currentLine == row) { + this.currentLine = row + 1; + } + return this.lines[row] = data.tokens; + }; + BackgroundTokenizer.prototype.cleanup = function () { + this.running = false; + this.lines = []; + this.states = []; + this.currentLine = 0; + this.removeAllListeners(); + }; + return BackgroundTokenizer; +}()); +oop.implement(BackgroundTokenizer.prototype, EventEmitter); +exports.BackgroundTokenizer = BackgroundTokenizer; + +}); + +define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"], function(require, exports, module){"use strict"; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var SearchHighlight = /** @class */ (function () { + function SearchHighlight(regExp, clazz, type) { + if (type === void 0) { type = "text"; } + this.setRegexp(regExp); + this.clazz = clazz; + this.type = type; + } + SearchHighlight.prototype.setRegexp = function (regExp) { + if (this.regExp + "" == regExp + "") + return; + this.regExp = regExp; + this.cache = []; + }; + SearchHighlight.prototype.update = function (html, markerLayer, session, config) { + if (!this.regExp) + return; + var start = config.firstRow, end = config.lastRow; + var renderedMarkerRanges = {}; + for (var i = start; i <= end; i++) { + var ranges = this.cache[i]; + if (ranges == null) { + ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); + if (ranges.length > this.MAX_RANGES) + ranges = ranges.slice(0, this.MAX_RANGES); + ranges = ranges.map(function (match) { + return new Range(i, match.offset, i, match.offset + match.length); + }); + this.cache[i] = ranges.length ? ranges : ""; + } + for (var j = ranges.length; j--;) { + var rangeToAddMarkerTo = ranges[j].toScreenRange(session); + var rangeAsString = rangeToAddMarkerTo.toString(); + if (renderedMarkerRanges[rangeAsString]) + continue; + renderedMarkerRanges[rangeAsString] = true; + markerLayer.drawSingleLineMarker(html, rangeToAddMarkerTo, this.clazz, config); + } + } + }; + return SearchHighlight; +}()); +SearchHighlight.prototype.MAX_RANGES = 500; +exports.SearchHighlight = SearchHighlight; + +}); + +define("ace/undomanager",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var UndoManager = /** @class */ (function () { + function UndoManager() { + this.$keepRedoStack; + this.$maxRev = 0; + this.$fromUndo = false; + this.$undoDepth = Infinity; + this.reset(); + } + UndoManager.prototype.addSession = function (session) { + this.$session = session; + }; + UndoManager.prototype.add = function (delta, allowMerge, session) { + if (this.$fromUndo) + return; + if (delta == this.$lastDelta) + return; + if (!this.$keepRedoStack) + this.$redoStack.length = 0; + if (allowMerge === false || !this.lastDeltas) { + this.lastDeltas = []; + var undoStackLength = this.$undoStack.length; + if (undoStackLength > this.$undoDepth - 1) { + this.$undoStack.splice(0, undoStackLength - this.$undoDepth + 1); + } + this.$undoStack.push(this.lastDeltas); + delta.id = this.$rev = ++this.$maxRev; + } + if (delta.action == "remove" || delta.action == "insert") + this.$lastDelta = delta; + this.lastDeltas.push(delta); + }; + UndoManager.prototype.addSelection = function (selection, rev) { + this.selections.push({ + value: selection, + rev: rev || this.$rev + }); + }; + UndoManager.prototype.startNewGroup = function () { + this.lastDeltas = null; + return this.$rev; + }; + UndoManager.prototype.markIgnored = function (from, to) { + if (to == null) + to = this.$rev + 1; + var stack = this.$undoStack; + for (var i = stack.length; i--;) { + var delta = stack[i][0]; + if (delta.id <= from) + break; + if (delta.id < to) + delta.ignore = true; + } + this.lastDeltas = null; + }; + UndoManager.prototype.getSelection = function (rev, after) { + var stack = this.selections; + for (var i = stack.length; i--;) { + var selection = stack[i]; + if (selection.rev < rev) { + if (after) + selection = stack[i + 1]; + return selection; + } + } + }; + UndoManager.prototype.getRevision = function () { + return this.$rev; + }; + UndoManager.prototype.getDeltas = function (from, to) { + if (to == null) + to = this.$rev + 1; + var stack = this.$undoStack; + var end = null, start = 0; + for (var i = stack.length; i--;) { + var delta = stack[i][0]; + if (delta.id < to && !end) + end = i + 1; + if (delta.id <= from) { + start = i + 1; + break; + } + } + return stack.slice(start, end); + }; + UndoManager.prototype.getChangedRanges = function (from, to) { + if (to == null) + to = this.$rev + 1; + }; + UndoManager.prototype.getChangedLines = function (from, to) { + if (to == null) + to = this.$rev + 1; + }; + UndoManager.prototype.undo = function (session, dontSelect) { + this.lastDeltas = null; + var stack = this.$undoStack; + if (!rearrangeUndoStack(stack, stack.length)) + return; + if (!session) + session = this.$session; + if (this.$redoStackBaseRev !== this.$rev && this.$redoStack.length) + this.$redoStack = []; + this.$fromUndo = true; + var deltaSet = stack.pop(); + var undoSelectionRange = null; + if (deltaSet) { + undoSelectionRange = session.undoChanges(deltaSet, dontSelect); + this.$redoStack.push(deltaSet); + this.$syncRev(); + } + this.$fromUndo = false; + return undoSelectionRange; + }; + UndoManager.prototype.redo = function (session, dontSelect) { + this.lastDeltas = null; + if (!session) + session = this.$session; + this.$fromUndo = true; + if (this.$redoStackBaseRev != this.$rev) { + var diff = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1); + rebaseRedoStack(this.$redoStack, diff); + this.$redoStackBaseRev = this.$rev; + this.$redoStack.forEach(function (x) { + x[0].id = ++this.$maxRev; + }, this); + } + var deltaSet = this.$redoStack.pop(); + var redoSelectionRange = null; + if (deltaSet) { + redoSelectionRange = session.redoChanges(deltaSet, dontSelect); + this.$undoStack.push(deltaSet); + this.$syncRev(); + } + this.$fromUndo = false; + return redoSelectionRange; + }; + UndoManager.prototype.$syncRev = function () { + var stack = this.$undoStack; + var nextDelta = stack[stack.length - 1]; + var id = nextDelta && nextDelta[0].id || 0; + this.$redoStackBaseRev = id; + this.$rev = id; + }; + UndoManager.prototype.reset = function () { + this.lastDeltas = null; + this.$lastDelta = null; + this.$undoStack = []; + this.$redoStack = []; + this.$rev = 0; + this.mark = 0; + this.$redoStackBaseRev = this.$rev; + this.selections = []; + }; + UndoManager.prototype.canUndo = function () { + return this.$undoStack.length > 0; + }; + UndoManager.prototype.canRedo = function () { + return this.$redoStack.length > 0; + }; + UndoManager.prototype.bookmark = function (rev) { + if (rev == undefined) + rev = this.$rev; + this.mark = rev; + }; + UndoManager.prototype.isAtBookmark = function () { + return this.$rev === this.mark; + }; + UndoManager.prototype.toJSON = function () { + return { + $redoStack: this.$redoStack, + $undoStack: this.$undoStack + }; + }; + UndoManager.prototype.fromJSON = function (json) { + this.reset(); + this.$undoStack = json.$undoStack; + this.$redoStack = json.$redoStack; + }; + UndoManager.prototype.$prettyPrint = function (delta) { + if (delta) + return stringifyDelta(delta); + return stringifyDelta(this.$undoStack) + "\n---\n" + stringifyDelta(this.$redoStack); + }; + return UndoManager; +}()); +UndoManager.prototype.hasUndo = UndoManager.prototype.canUndo; +UndoManager.prototype.hasRedo = UndoManager.prototype.canRedo; +UndoManager.prototype.isClean = UndoManager.prototype.isAtBookmark; +UndoManager.prototype.markClean = UndoManager.prototype.bookmark; +function rearrangeUndoStack(stack, pos) { + for (var i = pos; i--;) { + var deltaSet = stack[i]; + if (deltaSet && !deltaSet[0].ignore) { + while (i < pos - 1) { + var swapped = swapGroups(stack[i], stack[i + 1]); + stack[i] = swapped[0]; + stack[i + 1] = swapped[1]; + i++; + } + return true; + } + } +} +var Range = require("./range").Range; +var cmp = Range.comparePoints; +var comparePoints = Range.comparePoints; +function $updateMarkers(delta) { + var isInsert = delta.action == "insert"; + var start = delta.start; + var end = delta.end; + var rowShift = (end.row - start.row) * (isInsert ? 1 : -1); + var colShift = (end.column - start.column) * (isInsert ? 1 : -1); + if (isInsert) + end = start; + for (var i in this.marks) { + var point = this.marks[i]; + var cmp = comparePoints(point, start); + if (cmp < 0) { + continue; // delta starts after the range + } + if (cmp === 0) { + if (isInsert) { + if (point.bias == 1) { + cmp = 1; + } + else { + point.bias == -1; + continue; + } + } + } + var cmp2 = isInsert ? cmp : comparePoints(point, end); + if (cmp2 > 0) { + point.row += rowShift; + point.column += point.row == end.row ? colShift : 0; + continue; + } + if (!isInsert && cmp2 <= 0) { + point.row = start.row; + point.column = start.column; + if (cmp2 === 0) + point.bias = 1; + } + } +} +function clonePos(pos) { + return { row: pos.row, column: pos.column }; +} +function cloneDelta(d) { + return { + start: clonePos(d.start), + end: clonePos(d.end), + action: d.action, + lines: d.lines.slice() + }; +} +function stringifyDelta(d) { + d = d || this; + if (Array.isArray(d)) { + return d.map(stringifyDelta).join("\n"); + } + var type = ""; + if (d.action) { + type = d.action == "insert" ? "+" : "-"; + type += "[" + d.lines + "]"; + } + else if (d.value) { + if (Array.isArray(d.value)) { + type = d.value.map(stringifyRange).join("\n"); + } + else { + type = stringifyRange(d.value); + } + } + if (d.start) { + type += stringifyRange(d); + } + if (d.id || d.rev) { + type += "\t(" + (d.id || d.rev) + ")"; + } + return type; +} +function stringifyRange(r) { + return r.start.row + ":" + r.start.column + + "=>" + r.end.row + ":" + r.end.column; +} +function swap(d1, d2) { + var i1 = d1.action == "insert"; + var i2 = d2.action == "insert"; + if (i1 && i2) { + if (cmp(d2.start, d1.end) >= 0) { + shift(d2, d1, -1); + } + else if (cmp(d2.start, d1.start) <= 0) { + shift(d1, d2, +1); + } + else { + return null; + } + } + else if (i1 && !i2) { + if (cmp(d2.start, d1.end) >= 0) { + shift(d2, d1, -1); + } + else if (cmp(d2.end, d1.start) <= 0) { + shift(d1, d2, -1); + } + else { + return null; + } + } + else if (!i1 && i2) { + if (cmp(d2.start, d1.start) >= 0) { + shift(d2, d1, +1); + } + else if (cmp(d2.start, d1.start) <= 0) { + shift(d1, d2, +1); + } + else { + return null; + } + } + else if (!i1 && !i2) { + if (cmp(d2.start, d1.start) >= 0) { + shift(d2, d1, +1); + } + else if (cmp(d2.end, d1.start) <= 0) { + shift(d1, d2, -1); + } + else { + return null; + } + } + return [d2, d1]; +} +function swapGroups(ds1, ds2) { + for (var i = ds1.length; i--;) { + for (var j = 0; j < ds2.length; j++) { + if (!swap(ds1[i], ds2[j])) { + while (i < ds1.length) { + while (j--) { + swap(ds2[j], ds1[i]); + } + j = ds2.length; + i++; + } + return [ds1, ds2]; + } + } + } + ds1.selectionBefore = ds2.selectionBefore = + ds1.selectionAfter = ds2.selectionAfter = null; + return [ds2, ds1]; +} +function xform(d1, c1) { + var i1 = d1.action == "insert"; + var i2 = c1.action == "insert"; + if (i1 && i2) { + if (cmp(d1.start, c1.start) < 0) { + shift(c1, d1, 1); + } + else { + shift(d1, c1, 1); + } + } + else if (i1 && !i2) { + if (cmp(d1.start, c1.end) >= 0) { + shift(d1, c1, -1); + } + else if (cmp(d1.start, c1.start) <= 0) { + shift(c1, d1, +1); + } + else { + shift(d1, Range.fromPoints(c1.start, d1.start), -1); + shift(c1, d1, +1); + } + } + else if (!i1 && i2) { + if (cmp(c1.start, d1.end) >= 0) { + shift(c1, d1, -1); + } + else if (cmp(c1.start, d1.start) <= 0) { + shift(d1, c1, +1); + } + else { + shift(c1, Range.fromPoints(d1.start, c1.start), -1); + shift(d1, c1, +1); + } + } + else if (!i1 && !i2) { + if (cmp(c1.start, d1.end) >= 0) { + shift(c1, d1, -1); + } + else if (cmp(c1.end, d1.start) <= 0) { + shift(d1, c1, -1); + } + else { + var before, after; + if (cmp(d1.start, c1.start) < 0) { + before = d1; + d1 = splitDelta(d1, c1.start); + } + if (cmp(d1.end, c1.end) > 0) { + after = splitDelta(d1, c1.end); + } + shiftPos(c1.end, d1.start, d1.end, -1); + if (after && !before) { + d1.lines = after.lines; + d1.start = after.start; + d1.end = after.end; + after = d1; + } + return [c1, before, after].filter(Boolean); + } + } + return [c1, d1]; +} +function shift(d1, d2, dir) { + shiftPos(d1.start, d2.start, d2.end, dir); + shiftPos(d1.end, d2.start, d2.end, dir); +} +function shiftPos(pos, start, end, dir) { + if (pos.row == (dir == 1 ? start : end).row) { + pos.column += dir * (end.column - start.column); + } + pos.row += dir * (end.row - start.row); +} +function splitDelta(c, pos) { + var lines = c.lines; + var end = c.end; + c.end = clonePos(pos); + var rowsBefore = c.end.row - c.start.row; + var otherLines = lines.splice(rowsBefore, lines.length); + var col = rowsBefore ? pos.column : pos.column - c.start.column; + lines.push(otherLines[0].substring(0, col)); + otherLines[0] = otherLines[0].substr(col); + var rest = { + start: clonePos(pos), + end: end, + lines: otherLines, + action: c.action + }; + return rest; +} +function moveDeltasByOne(redoStack, d) { + d = cloneDelta(d); + for (var j = redoStack.length; j--;) { + var deltaSet = redoStack[j]; + for (var i = 0; i < deltaSet.length; i++) { + var x = deltaSet[i]; + var xformed = xform(x, d); + d = xformed[0]; + if (xformed.length != 2) { + if (xformed[2]) { + deltaSet.splice(i + 1, 1, xformed[1], xformed[2]); + i++; + } + else if (!xformed[1]) { + deltaSet.splice(i, 1); + i--; + } + } + } + if (!deltaSet.length) { + redoStack.splice(j, 1); + } + } + return redoStack; +} +function rebaseRedoStack(redoStack, deltaSets) { + for (var i = 0; i < deltaSets.length; i++) { + var deltas = deltaSets[i]; + for (var j = 0; j < deltas.length; j++) { + moveDeltasByOne(redoStack, deltas[j]); + } + } +} +exports.UndoManager = UndoManager; + +}); + +define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var FoldLine = /** @class */ (function () { + function FoldLine(foldData, folds) { + this.foldData = foldData; + if (Array.isArray(folds)) { + this.folds = folds; + } + else { + folds = this.folds = [folds]; + } + var last = folds[folds.length - 1]; + this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column); + this.start = this.range.start; + this.end = this.range.end; + this.folds.forEach(function (fold) { + fold.setFoldLine(this); + }, this); + } + FoldLine.prototype.shiftRow = function (shift) { + this.start.row += shift; + this.end.row += shift; + this.folds.forEach(function (fold) { + fold.start.row += shift; + fold.end.row += shift; + }); + }; + FoldLine.prototype.addFold = function (fold) { + if (fold.sameRow) { + if (fold.start.row < this.startRow || fold.endRow > this.endRow) { + throw new Error("Can't add a fold to this FoldLine as it has no connection"); + } + this.folds.push(fold); + this.folds.sort(function (a, b) { + return -a.range.compareEnd(b.start.row, b.start.column); + }); + if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { + this.end.row = fold.end.row; + this.end.column = fold.end.column; + } + else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { + this.start.row = fold.start.row; + this.start.column = fold.start.column; + } + } + else if (fold.start.row == this.end.row) { + this.folds.push(fold); + this.end.row = fold.end.row; + this.end.column = fold.end.column; + } + else if (fold.end.row == this.start.row) { + this.folds.unshift(fold); + this.start.row = fold.start.row; + this.start.column = fold.start.column; + } + else { + throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); + } + fold.foldLine = this; + }; + FoldLine.prototype.containsRow = function (row) { + return row >= this.start.row && row <= this.end.row; + }; + FoldLine.prototype.walk = function (callback, endRow, endColumn) { + var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true; + if (endRow == null) { + endRow = this.end.row; + endColumn = this.end.column; + } + for (var i = 0; i < folds.length; i++) { + fold = folds[i]; + cmp = fold.range.compareStart(endRow, endColumn); + if (cmp == -1) { + callback(null, endRow, endColumn, lastEnd, isNewRow); + return; + } + stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); + stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); + if (stop || cmp === 0) { + return; + } + isNewRow = !fold.sameRow; + lastEnd = fold.end.column; + } + callback(null, endRow, endColumn, lastEnd, isNewRow); + }; + FoldLine.prototype.getNextFoldTo = function (row, column) { + var fold, cmp; + for (var i = 0; i < this.folds.length; i++) { + fold = this.folds[i]; + cmp = fold.range.compareEnd(row, column); + if (cmp == -1) { + return { + fold: fold, + kind: "after" + }; + } + else if (cmp === 0) { + return { + fold: fold, + kind: "inside" + }; + } + } + return null; + }; + FoldLine.prototype.addRemoveChars = function (row, column, len) { + var ret = this.getNextFoldTo(row, column), fold, folds; + if (ret) { + fold = ret.fold; + if (ret.kind == "inside" + && fold.start.column != column + && fold.start.row != row) { + window.console && window.console.log(row, column, fold); + } + else if (fold.start.row == row) { + folds = this.folds; + var i = folds.indexOf(fold); + if (i === 0) { + this.start.column += len; + } + for (i; i < folds.length; i++) { + fold = folds[i]; + fold.start.column += len; + if (!fold.sameRow) { + return; + } + fold.end.column += len; + } + this.end.column += len; + } + } + }; + FoldLine.prototype.split = function (row, column) { + var pos = this.getNextFoldTo(row, column); + if (!pos || pos.kind == "inside") + return null; + var fold = pos.fold; + var folds = this.folds; + var foldData = this.foldData; + var i = folds.indexOf(fold); + var foldBefore = folds[i - 1]; + this.end.row = foldBefore.end.row; + this.end.column = foldBefore.end.column; + folds = folds.splice(i, folds.length - i); + var newFoldLine = new FoldLine(foldData, folds); + foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); + return newFoldLine; + }; + FoldLine.prototype.merge = function (foldLineNext) { + var folds = foldLineNext.folds; + for (var i = 0; i < folds.length; i++) { + this.addFold(folds[i]); + } + var foldData = this.foldData; + foldData.splice(foldData.indexOf(foldLineNext), 1); + }; + FoldLine.prototype.toString = function () { + var ret = [this.range.toString() + ": ["]; + this.folds.forEach(function (fold) { + ret.push(" " + fold.toString()); + }); + ret.push("]"); + return ret.join("\n"); + }; + FoldLine.prototype.idxToPosition = function (idx) { + var lastFoldEndColumn = 0; + for (var i = 0; i < this.folds.length; i++) { + var fold = this.folds[i]; + idx -= fold.start.column - lastFoldEndColumn; + if (idx < 0) { + return { + row: fold.start.row, + column: fold.start.column + idx + }; + } + idx -= fold.placeholder.length; + if (idx < 0) { + return fold.start; + } + lastFoldEndColumn = fold.end.column; + } + return { + row: this.end.row, + column: this.end.column + idx + }; + }; + return FoldLine; +}()); +exports.FoldLine = FoldLine; + +}); + +define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("./range").Range; +var comparePoints = Range.comparePoints; +var RangeList = /** @class */ (function () { + function RangeList() { + this.ranges = []; + this.$bias = 1; + } + RangeList.prototype.pointIndex = function (pos, excludeEdges, startIndex) { + var list = this.ranges; + for (var i = startIndex || 0; i < list.length; i++) { + var range = list[i]; + var cmpEnd = comparePoints(pos, range.end); + if (cmpEnd > 0) + continue; + var cmpStart = comparePoints(pos, range.start); + if (cmpEnd === 0) + return excludeEdges && cmpStart !== 0 ? -i - 2 : i; + if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) + return i; + return -i - 1; + } + return -i - 1; + }; + RangeList.prototype.add = function (range) { + var excludeEdges = !range.isEmpty(); + var startIndex = this.pointIndex(range.start, excludeEdges); + if (startIndex < 0) + startIndex = -startIndex - 1; + var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); + if (endIndex < 0) + endIndex = -endIndex - 1; + else + endIndex++; + return this.ranges.splice(startIndex, endIndex - startIndex, range); + }; + RangeList.prototype.addList = function (list) { + var removed = []; + for (var i = list.length; i--;) { + removed.push.apply(removed, this.add(list[i])); + } + return removed; + }; + RangeList.prototype.substractPoint = function (pos) { + var i = this.pointIndex(pos); + if (i >= 0) + return this.ranges.splice(i, 1); + }; + RangeList.prototype.merge = function () { + var removed = []; + var list = this.ranges; + list = list.sort(function (a, b) { + return comparePoints(a.start, b.start); + }); + var next = list[0], range; + for (var i = 1; i < list.length; i++) { + range = next; + next = list[i]; + var cmp = comparePoints(range.end, next.start); + if (cmp < 0) + continue; + if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) + continue; + if (comparePoints(range.end, next.end) < 0) { + range.end.row = next.end.row; + range.end.column = next.end.column; + } + list.splice(i, 1); + removed.push(next); + next = range; + i--; + } + this.ranges = list; + return removed; + }; + RangeList.prototype.contains = function (row, column) { + return this.pointIndex({ row: row, column: column }) >= 0; + }; + RangeList.prototype.containsPoint = function (pos) { + return this.pointIndex(pos) >= 0; + }; + RangeList.prototype.rangeAtPoint = function (pos) { + var i = this.pointIndex(pos); + if (i >= 0) + return this.ranges[i]; + }; + RangeList.prototype.clipRows = function (startRow, endRow) { + var list = this.ranges; + if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) + return []; + var startIndex = this.pointIndex({ row: startRow, column: 0 }); + if (startIndex < 0) + startIndex = -startIndex - 1; + var endIndex = this.pointIndex({ row: endRow, column: 0 }, startIndex); + if (endIndex < 0) + endIndex = -endIndex - 1; + var clipped = []; + for (var i = startIndex; i < endIndex; i++) { + clipped.push(list[i]); + } + return clipped; + }; + RangeList.prototype.removeAll = function () { + return this.ranges.splice(0, this.ranges.length); + }; + RangeList.prototype.attach = function (session) { + if (this.session) + this.detach(); + this.session = session; + this.onChange = this.$onChange.bind(this); + this.session.on('change', this.onChange); + }; + RangeList.prototype.detach = function () { + if (!this.session) + return; + this.session.removeListener('change', this.onChange); + this.session = null; + }; + RangeList.prototype.$onChange = function (delta) { + var start = delta.start; + var end = delta.end; + var startRow = start.row; + var endRow = end.row; + var ranges = this.ranges; + for (var i = 0, n = ranges.length; i < n; i++) { + var r = ranges[i]; + if (r.end.row >= startRow) + break; + } + if (delta.action == "insert") { + var lineDif = endRow - startRow; + var colDiff = -start.column + end.column; + for (; i < n; i++) { + var r = ranges[i]; + if (r.start.row > startRow) + break; + if (r.start.row == startRow && r.start.column >= start.column) { + if (r.start.column == start.column && this.$bias <= 0) { + } + else { + r.start.column += colDiff; + r.start.row += lineDif; + } + } + if (r.end.row == startRow && r.end.column >= start.column) { + if (r.end.column == start.column && this.$bias < 0) { + continue; + } + if (r.end.column == start.column && colDiff > 0 && i < n - 1) { + if (r.end.column > r.start.column && r.end.column == ranges[i + 1].start.column) + r.end.column -= colDiff; + } + r.end.column += colDiff; + r.end.row += lineDif; + } + } + } + else { + var lineDif = startRow - endRow; + var colDiff = start.column - end.column; + for (; i < n; i++) { + var r = ranges[i]; + if (r.start.row > endRow) + break; + if (r.end.row < endRow + && (startRow < r.end.row + || startRow == r.end.row && start.column < r.end.column)) { + r.end.row = startRow; + r.end.column = start.column; + } + else if (r.end.row == endRow) { + if (r.end.column <= end.column) { + if (lineDif || r.end.column > start.column) { + r.end.column = start.column; + r.end.row = start.row; + } + } + else { + r.end.column += colDiff; + r.end.row += lineDif; + } + } + else if (r.end.row > endRow) { + r.end.row += lineDif; + } + if (r.start.row < endRow + && (startRow < r.start.row + || startRow == r.start.row && start.column < r.start.column)) { + r.start.row = startRow; + r.start.column = start.column; + } + else if (r.start.row == endRow) { + if (r.start.column <= end.column) { + if (lineDif || r.start.column > start.column) { + r.start.column = start.column; + r.start.row = start.row; + } + } + else { + r.start.column += colDiff; + r.start.row += lineDif; + } + } + else if (r.start.row > endRow) { + r.start.row += lineDif; + } + } + } + if (lineDif != 0 && i < n) { + for (; i < n; i++) { + var r = ranges[i]; + r.start.row += lineDif; + r.end.row += lineDif; + } + } + }; + return RangeList; +}()); +RangeList.prototype.comparePoints = comparePoints; +exports.RangeList = RangeList; + +}); + +define("ace/edit_session/fold",["require","exports","module","ace/range_list"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var RangeList = require("../range_list").RangeList; +var Fold = /** @class */ (function (_super) { + __extends(Fold, _super); + function Fold(range, placeholder) { + var _this = _super.call(this) || this; + _this.foldLine = null; + _this.placeholder = placeholder; + _this.range = range; + _this.start = range.start; + _this.end = range.end; + _this.sameRow = range.start.row == range.end.row; + _this.subFolds = _this.ranges = []; + return _this; + } + Fold.prototype.toString = function () { + return '"' + this.placeholder + '" ' + this.range.toString(); + }; + Fold.prototype.setFoldLine = function (foldLine) { + this.foldLine = foldLine; + this.subFolds.forEach(function (fold) { + fold.setFoldLine(foldLine); + }); + }; + Fold.prototype.clone = function () { + var range = this.range.clone(); + var fold = new Fold(range, this.placeholder); + this.subFolds.forEach(function (subFold) { + fold.subFolds.push(subFold.clone()); + }); + fold.collapseChildren = this.collapseChildren; + return fold; + }; + Fold.prototype.addSubFold = function (fold) { + if (this.range.isEqual(fold)) + return; + consumeRange(fold, this.start); + var row = fold.start.row, column = fold.start.column; + for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { + cmp = this.subFolds[i].range.compare(row, column); + if (cmp != 1) + break; + } + var afterStart = this.subFolds[i]; + var firstConsumed = 0; + if (cmp == 0) { + if (afterStart.range.containsRange(fold)) + return afterStart.addSubFold(fold); + else + firstConsumed = 1; + } + var row = fold.range.end.row, column = fold.range.end.column; + for (var j = i, cmp = -1; j < this.subFolds.length; j++) { + cmp = this.subFolds[j].range.compare(row, column); + if (cmp != 1) + break; + } + if (cmp == 0) + j++; + var consumedFolds = this.subFolds.splice(i, j - i, fold); + var last = cmp == 0 ? consumedFolds.length - 1 : consumedFolds.length; + for (var k = firstConsumed; k < last; k++) { + fold.addSubFold(consumedFolds[k]); + } + fold.setFoldLine(this.foldLine); + return fold; + }; + Fold.prototype.restoreRange = function (range) { + return restoreRange(range, this.start); + }; + return Fold; +}(RangeList)); +function consumePoint(point, anchor) { + point.row -= anchor.row; + if (point.row == 0) + point.column -= anchor.column; +} +function consumeRange(range, anchor) { + consumePoint(range.start, anchor); + consumePoint(range.end, anchor); +} +function restorePoint(point, anchor) { + if (point.row == 0) + point.column += anchor.column; + point.row += anchor.row; +} +function restoreRange(range, anchor) { + restorePoint(range.start, anchor); + restorePoint(range.end, anchor); +} +exports.Fold = Fold; + +}); + +define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"], function(require, exports, module){// @ts-nocheck +"use strict"; +var Range = require("../range").Range; +var FoldLine = require("./fold_line").FoldLine; +var Fold = require("./fold").Fold; +var TokenIterator = require("../token_iterator").TokenIterator; +var MouseEvent = require("../mouse/mouse_event").MouseEvent; +function Folding() { + this.getFoldAt = function (row, column, side) { + var foldLine = this.getFoldLine(row); + if (!foldLine) + return null; + var folds = foldLine.folds; + for (var i = 0; i < folds.length; i++) { + var range = folds[i].range; + if (range.contains(row, column)) { + if (side == 1 && range.isEnd(row, column) && !range.isEmpty()) { + continue; + } + else if (side == -1 && range.isStart(row, column) && !range.isEmpty()) { + continue; + } + return folds[i]; + } + } + }; + this.getFoldsInRange = function (range) { + var start = range.start; + var end = range.end; + var foldLines = this.$foldData; + var foundFolds = []; + start.column += 1; + end.column -= 1; + for (var i = 0; i < foldLines.length; i++) { + var cmp = foldLines[i].range.compareRange(range); + if (cmp == 2) { + continue; + } + else if (cmp == -2) { + break; + } + var folds = foldLines[i].folds; + for (var j = 0; j < folds.length; j++) { + var fold = folds[j]; + cmp = fold.range.compareRange(range); + if (cmp == -2) { + break; + } + else if (cmp == 2) { + continue; + } + else + if (cmp == 42) { + break; + } + foundFolds.push(fold); + } + } + start.column -= 1; + end.column += 1; + return foundFolds; + }; + this.getFoldsInRangeList = function (ranges) { + if (Array.isArray(ranges)) { + var folds = []; + ranges.forEach(function (range) { + folds = folds.concat(this.getFoldsInRange(range)); + }, this); + } + else { + var folds = this.getFoldsInRange(ranges); + } + return folds; + }; + this.getAllFolds = function () { + var folds = []; + var foldLines = this.$foldData; + for (var i = 0; i < foldLines.length; i++) + for (var j = 0; j < foldLines[i].folds.length; j++) + folds.push(foldLines[i].folds[j]); + return folds; + }; + this.getFoldStringAt = function (row, column, trim, foldLine) { + foldLine = foldLine || this.getFoldLine(row); + if (!foldLine) + return null; + var lastFold = { + end: { column: 0 } + }; + var str, fold; + for (var i = 0; i < foldLine.folds.length; i++) { + fold = foldLine.folds[i]; + var cmp = fold.range.compareEnd(row, column); + if (cmp == -1) { + str = this + .getLine(fold.start.row) + .substring(lastFold.end.column, fold.start.column); + break; + } + else if (cmp === 0) { + return null; + } + lastFold = fold; + } + if (!str) + str = this.getLine(fold.start.row).substring(lastFold.end.column); + if (trim == -1) + return str.substring(0, column - lastFold.end.column); + else if (trim == 1) + return str.substring(column - lastFold.end.column); + else + return str; + }; + this.getFoldLine = function (docRow, startFoldLine) { + var foldData = this.$foldData; + var i = 0; + if (startFoldLine) + i = foldData.indexOf(startFoldLine); + if (i == -1) + i = 0; + for (i; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { + return foldLine; + } + else if (foldLine.end.row > docRow) { + return null; + } + } + return null; + }; + this.getNextFoldLine = function (docRow, startFoldLine) { + var foldData = this.$foldData; + var i = 0; + if (startFoldLine) + i = foldData.indexOf(startFoldLine); + if (i == -1) + i = 0; + for (i; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (foldLine.end.row >= docRow) { + return foldLine; + } + } + return null; + }; + this.getFoldedRowCount = function (first, last) { + var foldData = this.$foldData, rowCount = last - first + 1; + for (var i = 0; i < foldData.length; i++) { + var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row; + if (end >= last) { + if (start < last) { + if (start >= first) + rowCount -= last - start; + else + rowCount = 0; // in one fold + } + break; + } + else if (end >= first) { + if (start >= first) // fold inside range + rowCount -= end - start; + else + rowCount -= end - first + 1; + } + } + return rowCount; + }; + this.$addFoldLine = function (foldLine) { + this.$foldData.push(foldLine); + this.$foldData.sort(function (a, b) { + return a.start.row - b.start.row; + }); + return foldLine; + }; + this.addFold = function (placeholder, range) { + var foldData = this.$foldData; + var added = false; + var fold; + if (placeholder instanceof Fold) + fold = placeholder; + else { + fold = new Fold(range, placeholder); + fold.collapseChildren = range.collapseChildren; + } + this.$clipRangeToDocument(fold.range); + var startRow = fold.start.row; + var startColumn = fold.start.column; + var endRow = fold.end.row; + var endColumn = fold.end.column; + var startFold = this.getFoldAt(startRow, startColumn, 1); + var endFold = this.getFoldAt(endRow, endColumn, -1); + if (startFold && endFold == startFold) + return startFold.addSubFold(fold); + if (startFold && !startFold.range.isStart(startRow, startColumn)) + this.removeFold(startFold); + if (endFold && !endFold.range.isEnd(endRow, endColumn)) + this.removeFold(endFold); + var folds = this.getFoldsInRange(fold.range); + if (folds.length > 0) { + this.removeFolds(folds); + if (!fold.collapseChildren) { + folds.forEach(function (subFold) { + fold.addSubFold(subFold); + }); + } + } + for (var i = 0; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (endRow == foldLine.start.row) { + foldLine.addFold(fold); + added = true; + break; + } + else if (startRow == foldLine.end.row) { + foldLine.addFold(fold); + added = true; + if (!fold.sameRow) { + var foldLineNext = foldData[i + 1]; + if (foldLineNext && foldLineNext.start.row == endRow) { + foldLine.merge(foldLineNext); + break; + } + } + break; + } + else if (endRow <= foldLine.start.row) { + break; + } + } + if (!added) + foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); + if (this.$useWrapMode) + this.$updateWrapData(foldLine.start.row, foldLine.start.row); + else + this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); + this.$modified = true; + this._signal("changeFold", { data: fold, action: "add" }); + return fold; + }; + this.addFolds = function (folds) { + folds.forEach(function (fold) { + this.addFold(fold); + }, this); + }; + this.removeFold = function (fold) { + var foldLine = fold.foldLine; + var startRow = foldLine.start.row; + var endRow = foldLine.end.row; + var foldLines = this.$foldData; + var folds = foldLine.folds; + if (folds.length == 1) { + foldLines.splice(foldLines.indexOf(foldLine), 1); + } + else + if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { + folds.pop(); + foldLine.end.row = folds[folds.length - 1].end.row; + foldLine.end.column = folds[folds.length - 1].end.column; + } + else + if (foldLine.range.isStart(fold.start.row, fold.start.column)) { + folds.shift(); + foldLine.start.row = folds[0].start.row; + foldLine.start.column = folds[0].start.column; + } + else + if (fold.sameRow) { + folds.splice(folds.indexOf(fold), 1); + } + else + { + var newFoldLine = foldLine.split(fold.start.row, fold.start.column); + folds = newFoldLine.folds; + folds.shift(); + newFoldLine.start.row = folds[0].start.row; + newFoldLine.start.column = folds[0].start.column; + } + if (!this.$updating) { + if (this.$useWrapMode) + this.$updateWrapData(startRow, endRow); + else + this.$updateRowLengthCache(startRow, endRow); + } + this.$modified = true; + this._signal("changeFold", { data: fold, action: "remove" }); + }; + this.removeFolds = function (folds) { + var cloneFolds = []; + for (var i = 0; i < folds.length; i++) { + cloneFolds.push(folds[i]); + } + cloneFolds.forEach(function (fold) { + this.removeFold(fold); + }, this); + this.$modified = true; + }; + this.expandFold = function (fold) { + this.removeFold(fold); + fold.subFolds.forEach(function (subFold) { + fold.restoreRange(subFold); + this.addFold(subFold); + }, this); + if (fold.collapseChildren > 0) { + this.foldAll(fold.start.row + 1, fold.end.row, fold.collapseChildren - 1); + } + fold.subFolds = []; + }; + this.expandFolds = function (folds) { + folds.forEach(function (fold) { + this.expandFold(fold); + }, this); + }; + this.unfold = function (location, expandInner) { + var range, folds; + if (location == null) { + range = new Range(0, 0, this.getLength(), 0); + if (expandInner == null) + expandInner = true; + } + else if (typeof location == "number") { + range = new Range(location, 0, location, this.getLine(location).length); + } + else if ("row" in location) { + range = Range.fromPoints(location, location); + } + else if (Array.isArray(location)) { + folds = []; + location.forEach(function (range) { + folds = folds.concat(this.unfold(range)); + }, this); + return folds; + } + else { + range = location; + } + folds = this.getFoldsInRangeList(range); + var outermostFolds = folds; + while (folds.length == 1 + && Range.comparePoints(folds[0].start, range.start) < 0 + && Range.comparePoints(folds[0].end, range.end) > 0) { + this.expandFolds(folds); + folds = this.getFoldsInRangeList(range); + } + if (expandInner != false) { + this.removeFolds(folds); + } + else { + this.expandFolds(folds); + } + if (outermostFolds.length) + return outermostFolds; + }; + this.isRowFolded = function (docRow, startFoldRow) { + return !!this.getFoldLine(docRow, startFoldRow); + }; + this.getRowFoldEnd = function (docRow, startFoldRow) { + var foldLine = this.getFoldLine(docRow, startFoldRow); + return foldLine ? foldLine.end.row : docRow; + }; + this.getRowFoldStart = function (docRow, startFoldRow) { + var foldLine = this.getFoldLine(docRow, startFoldRow); + return foldLine ? foldLine.start.row : docRow; + }; + this.getFoldDisplayLine = function (foldLine, endRow, endColumn, startRow, startColumn) { + if (startRow == null) + startRow = foldLine.start.row; + if (startColumn == null) + startColumn = 0; + if (endRow == null) + endRow = foldLine.end.row; + if (endColumn == null) + endColumn = this.getLine(endRow).length; + var doc = this.doc; + var textLine = ""; + foldLine.walk(function (placeholder, row, column, lastColumn) { + if (row < startRow) + return; + if (row == startRow) { + if (column < startColumn) + return; + lastColumn = Math.max(startColumn, lastColumn); + } + if (placeholder != null) { + textLine += placeholder; + } + else { + textLine += doc.getLine(row).substring(lastColumn, column); + } + }, endRow, endColumn); + return textLine; + }; + this.getDisplayLine = function (row, endColumn, startRow, startColumn) { + var foldLine = this.getFoldLine(row); + if (!foldLine) { + var line; + line = this.doc.getLine(row); + return line.substring(startColumn || 0, endColumn || line.length); + } + else { + return this.getFoldDisplayLine(foldLine, row, endColumn, startRow, startColumn); + } + }; + this.$cloneFoldData = function () { + var fd = []; + fd = this.$foldData.map(function (foldLine) { + var folds = foldLine.folds.map(function (fold) { + return fold.clone(); + }); + return new FoldLine(fd, folds); + }); + return fd; + }; + this.toggleFold = function (tryToUnfold) { + var selection = this.selection; + var range = selection.getRange(); + var fold; + var bracketPos; + if (range.isEmpty()) { + var cursor = range.start; + fold = this.getFoldAt(cursor.row, cursor.column); + if (fold) { + this.expandFold(fold); + return; + } + else if (bracketPos = this.findMatchingBracket(cursor)) { + if (range.comparePoint(bracketPos) == 1) { + range.end = bracketPos; + } + else { + range.start = bracketPos; + range.start.column++; + range.end.column--; + } + } + else if (bracketPos = this.findMatchingBracket({ row: cursor.row, column: cursor.column + 1 })) { + if (range.comparePoint(bracketPos) == 1) + range.end = bracketPos; + else + range.start = bracketPos; + range.start.column++; + } + else { + range = this.getCommentFoldRange(cursor.row, cursor.column) || range; + } + } + else { + var folds = this.getFoldsInRange(range); + if (tryToUnfold && folds.length) { + this.expandFolds(folds); + return; + } + else if (folds.length == 1) { + fold = folds[0]; + } + } + if (!fold) + fold = this.getFoldAt(range.start.row, range.start.column); + if (fold && fold.range.toString() == range.toString()) { + this.expandFold(fold); + return; + } + var placeholder = "..."; + if (!range.isMultiLine()) { + placeholder = this.getTextRange(range); + if (placeholder.length < 4) + return; + placeholder = placeholder.trim().substring(0, 2) + ".."; + } + this.addFold(placeholder, range); + }; + this.getCommentFoldRange = function (row, column, dir) { + var iterator = new TokenIterator(this, row, column); + var token = iterator.getCurrentToken(); + var type = token && token.type; + if (token && /^comment|string/.test(type)) { + type = type.match(/comment|string/)[0]; + if (type == "comment") + type += "|doc-start|\\.doc"; + var re = new RegExp(type); + var range = new Range(); + if (dir != 1) { + do { + token = iterator.stepBackward(); + } while (token && re.test(token.type)); + token = iterator.stepForward(); + } + range.start.row = iterator.getCurrentTokenRow(); + range.start.column = iterator.getCurrentTokenColumn() + token.value.length; + iterator = new TokenIterator(this, row, column); + var initState = this.getState(iterator.$row); + if (dir != -1) { + var lastRow = -1; + do { + token = iterator.stepForward(); + if (lastRow == -1) { + var state = this.getState(iterator.$row); + if (initState.toString() !== state.toString()) + lastRow = iterator.$row; + } + else if (iterator.$row > lastRow) { + break; + } + } while (token && re.test(token.type)); + token = iterator.stepBackward(); + } + else + token = iterator.getCurrentToken(); + range.end.row = iterator.getCurrentTokenRow(); + range.end.column = iterator.getCurrentTokenColumn(); + return range; + } + }; + this.foldAll = function (startRow, endRow, depth, test) { + if (depth == undefined) + depth = 100000; // JSON.stringify doesn't hanle Infinity + var foldWidgets = this.foldWidgets; + if (!foldWidgets) + return; // mode doesn't support folding + endRow = endRow || this.getLength(); + startRow = startRow || 0; + for (var row = startRow; row < endRow; row++) { + if (foldWidgets[row] == null) + foldWidgets[row] = this.getFoldWidget(row); + if (foldWidgets[row] != "start") + continue; + if (test && !test(row)) + continue; + var range = this.getFoldWidgetRange(row); + if (range && range.isMultiLine() + && range.end.row <= endRow + && range.start.row >= startRow) { + row = range.end.row; + range.collapseChildren = depth; + this.addFold("...", range); + } + } + }; + this.foldToLevel = function (level) { + this.foldAll(); + while (level-- > 0) + this.unfold(null, false); + }; + this.foldAllComments = function () { + var session = this; + this.foldAll(null, null, null, function (row) { + var tokens = session.getTokens(row); + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type == "text" && /^\s+$/.test(token.value)) + continue; + if (/comment/.test(token.type)) + return true; + return false; + } + }); + }; + this.$foldStyles = { + "manual": 1, + "markbegin": 1, + "markbeginend": 1 + }; + this.$foldStyle = "markbegin"; + this.setFoldStyle = function (style) { + if (!this.$foldStyles[style]) + throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); + if (this.$foldStyle == style) + return; + this.$foldStyle = style; + if (style == "manual") + this.unfold(); + var mode = this.$foldMode; + this.$setFolding(null); + this.$setFolding(mode); + }; + this.$setFolding = function (foldMode) { + if (this.$foldMode == foldMode) + return; + this.$foldMode = foldMode; + this.off('change', this.$updateFoldWidgets); + this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); + this._signal("changeAnnotation"); + if (!foldMode || this.$foldStyle == "manual") { + this.foldWidgets = null; + return; + } + this.foldWidgets = []; + this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); + this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); + this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); + this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); + this.on('change', this.$updateFoldWidgets); + this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); + }; + this.getParentFoldRangeData = function (row, ignoreCurrent) { + var fw = this.foldWidgets; + if (!fw || (ignoreCurrent && fw[row])) + return {}; + var i = row - 1, firstRange; + while (i >= 0) { + var c = fw[i]; + if (c == null) + c = fw[i] = this.getFoldWidget(i); + if (c == "start") { + var range = this.getFoldWidgetRange(i); + if (!firstRange) + firstRange = range; + if (range && range.end.row >= row) + break; + } + i--; + } + return { + range: i !== -1 && range, + firstRange: firstRange + }; + }; + this.onFoldWidgetClick = function (row, e) { + if (e instanceof MouseEvent) + e = e.domEvent; + var options = { + children: e.shiftKey, + all: e.ctrlKey || e.metaKey, + siblings: e.altKey + }; + var range = this.$toggleFoldWidget(row, options); + if (!range) { + var el = (e.target || e.srcElement); + if (el && /ace_fold-widget/.test(el.className)) + el.className += " ace_invalid"; + } + }; + this.$toggleFoldWidget = function (row, options) { + if (!this.getFoldWidget) + return; + var type = this.getFoldWidget(row); + var line = this.getLine(row); + var dir = type === "end" ? -1 : 1; + var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); + if (fold) { + if (options.children || options.all) + this.removeFold(fold); + else + this.expandFold(fold); + return fold; + } + var range = this.getFoldWidgetRange(row, true); + if (range && !range.isMultiLine()) { + fold = this.getFoldAt(range.start.row, range.start.column, 1); + if (fold && range.isEqual(fold.range)) { + this.removeFold(fold); + return fold; + } + } + if (options.siblings) { + var data = this.getParentFoldRangeData(row); + if (data.range) { + var startRow = data.range.start.row + 1; + var endRow = data.range.end.row; + } + this.foldAll(startRow, endRow, options.all ? 10000 : 0); + } + else if (options.children) { + endRow = range ? range.end.row : this.getLength(); + this.foldAll(row + 1, endRow, options.all ? 10000 : 0); + } + else if (range) { + if (options.all) + range.collapseChildren = 10000; + this.addFold("...", range); + } + return range; + }; + this.toggleFoldWidget = function (toggleParent) { + var row = this.selection.getCursor().row; + row = this.getRowFoldStart(row); + var range = this.$toggleFoldWidget(row, {}); + if (range) + return; + var data = this.getParentFoldRangeData(row, true); + range = data.range || data.firstRange; + if (range) { + row = range.start.row; + var fold = this.getFoldAt(row, this.getLine(row).length, 1); + if (fold) { + this.removeFold(fold); + } + else { + this.addFold("...", range); + } + } + }; + this.updateFoldWidgets = function (delta) { + var firstRow = delta.start.row; + var len = delta.end.row - firstRow; + if (len === 0) { + this.foldWidgets[firstRow] = null; + } + else if (delta.action == 'remove') { + this.foldWidgets.splice(firstRow, len + 1, null); + } + else { + var args = Array(len + 1); + args.unshift(firstRow, 1); + this.foldWidgets.splice.apply(this.foldWidgets, args); + } + }; + this.tokenizerUpdateFoldWidgets = function (e) { + var rows = e.data; + if (rows.first != rows.last) { + if (this.foldWidgets.length > rows.first) + this.foldWidgets.splice(rows.first, this.foldWidgets.length); + } + }; +} +exports.Folding = Folding; + +}); + +define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var Range = require("../range").Range; +function BracketMatch() { + this.findMatchingBracket = function (position, chr) { + if (position.column == 0) + return null; + var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column - 1); + if (charBeforeCursor == "") + return null; + var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); + if (!match) + return null; + if (match[1]) + return this.$findClosingBracket(match[1], position); + else + return this.$findOpeningBracket(match[2], position); + }; + this.getBracketRange = function (pos) { + var line = this.getLine(pos.row); + var before = true, range; + var chr = line.charAt(pos.column - 1); + var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); + if (!match) { + chr = line.charAt(pos.column); + pos = { row: pos.row, column: pos.column + 1 }; + match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); + before = false; + } + if (!match) + return null; + if (match[1]) { + var bracketPos = this.$findClosingBracket(match[1], pos); + if (!bracketPos) + return null; + range = Range.fromPoints(pos, bracketPos); + if (!before) { + range.end.column++; + range.start.column--; + } + range.cursor = range.end; + } + else { + var bracketPos = this.$findOpeningBracket(match[2], pos); + if (!bracketPos) + return null; + range = Range.fromPoints(bracketPos, pos); + if (!before) { + range.start.column++; + range.end.column--; + } + range.cursor = range.start; + } + return range; + }; + this.getMatchingBracketRanges = function (pos, isBackwards) { + var line = this.getLine(pos.row); + var bracketsRegExp = /([\(\[\{])|([\)\]\}])/; + var chr = !isBackwards && line.charAt(pos.column - 1); + var match = chr && chr.match(bracketsRegExp); + if (!match) { + chr = (isBackwards === undefined || isBackwards) && line.charAt(pos.column); + pos = { + row: pos.row, + column: pos.column + 1 + }; + match = chr && chr.match(bracketsRegExp); + } + if (!match) + return null; + var startRange = new Range(pos.row, pos.column - 1, pos.row, pos.column); + var bracketPos = match[1] ? this.$findClosingBracket(match[1], pos) + : this.$findOpeningBracket(match[2], pos); + if (!bracketPos) + return [startRange]; + var endRange = new Range(bracketPos.row, bracketPos.column, bracketPos.row, bracketPos.column + 1); + return [startRange, endRange]; + }; + this.$brackets = { + ")": "(", + "(": ")", + "]": "[", + "[": "]", + "{": "}", + "}": "{", + "<": ">", + ">": "<" + }; + this.$findOpeningBracket = function (bracket, position, typeRe) { + var openBracket = this.$brackets[bracket]; + var depth = 1; + var iterator = new TokenIterator(this, position.row, position.column); + var token = iterator.getCurrentToken(); + if (!token) + token = iterator.stepForward(); + if (!token) + return; + if (!typeRe) { + typeRe = new RegExp("(\\.?" + + token.type.replace(".", "\\.").replace("rparen", ".paren") + .replace(/\b(?:end)\b/, "(?:start|begin|end)") + .replace(/-close\b/, "-(close|open)") + + ")+"); + } + var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; + var value = token.value; + while (true) { + while (valueIndex >= 0) { + var chr = value.charAt(valueIndex); + if (chr == openBracket) { + depth -= 1; + if (depth == 0) { + return { row: iterator.getCurrentTokenRow(), + column: valueIndex + iterator.getCurrentTokenColumn() }; + } + } + else if (chr == bracket) { + depth += 1; + } + valueIndex -= 1; + } + do { + token = iterator.stepBackward(); + } while (token && !typeRe.test(token.type)); + if (token == null) + break; + value = token.value; + valueIndex = value.length - 1; + } + return null; + }; + this.$findClosingBracket = function (bracket, position, typeRe) { + var closingBracket = this.$brackets[bracket]; + var depth = 1; + var iterator = new TokenIterator(this, position.row, position.column); + var token = iterator.getCurrentToken(); + if (!token) + token = iterator.stepForward(); + if (!token) + return; + if (!typeRe) { + typeRe = new RegExp("(\\.?" + + token.type.replace(".", "\\.").replace("lparen", ".paren") + .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)") + .replace(/-open\b/, "-(close|open)") + + ")+"); + } + var valueIndex = position.column - iterator.getCurrentTokenColumn(); + while (true) { + var value = token.value; + var valueLength = value.length; + while (valueIndex < valueLength) { + var chr = value.charAt(valueIndex); + if (chr == closingBracket) { + depth -= 1; + if (depth == 0) { + return { row: iterator.getCurrentTokenRow(), + column: valueIndex + iterator.getCurrentTokenColumn() }; + } + } + else if (chr == bracket) { + depth += 1; + } + valueIndex += 1; + } + do { + token = iterator.stepForward(); + } while (token && !typeRe.test(token.type)); + if (token == null) + break; + valueIndex = 0; + } + return null; + }; + this.getMatchingTags = function (pos) { + var iterator = new TokenIterator(this, pos.row, pos.column); + var token = this.$findTagName(iterator); + if (!token) + return; + var prevToken = iterator.stepBackward(); + if (prevToken.value === '<') { + return this.$findClosingTag(iterator, token); + } + else { + return this.$findOpeningTag(iterator, token); + } + }; + this.$findTagName = function (iterator) { + var token = iterator.getCurrentToken(); + var found = false; + var backward = false; + if (token && token.type.indexOf('tag-name') === -1) { + do { + if (backward) + token = iterator.stepBackward(); + else + token = iterator.stepForward(); + if (token) { + if (token.value === "/>") { + backward = true; + } + else if (token.type.indexOf('tag-name') !== -1) { + found = true; + } + } + } while (token && !found); + } + return token; + }; + this.$findClosingTag = function (iterator, token) { + var prevToken; + var currentTag = token.value; + var tag = token.value; + var depth = 0; + var openTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); + token = iterator.stepForward(); + var openTagName = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + token.value.length); + var foundOpenTagEnd = false; + do { + prevToken = token; + if (prevToken.type.indexOf('tag-close') !== -1 && !foundOpenTagEnd) { + var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for `>` + foundOpenTagEnd = true; + } + token = iterator.stepForward(); + if (token) { + if (token.value === '>' && !foundOpenTagEnd) { + var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for `>` + foundOpenTagEnd = true; + } + if (token.type.indexOf('tag-name') !== -1) { + currentTag = token.value; + if (tag === currentTag) { + if (prevToken.value === '<') { + depth++; + } + else if (prevToken.value === '') { + var closeTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for > + } + else { + return; + } + } + } + } + } + else if (tag === currentTag && token.value === '/>') { // self-closing tag + depth--; + if (depth < 0) { //found self-closing tag end + var closeTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 2); + var closeTagName = closeTagStart; + var closeTagEnd = closeTagName; + var openTagEnd = new Range(openTagName.end.row, openTagName.end.column, openTagName.end.row, openTagName.end.column + 1); + } + } + } + } while (token && depth >= 0); + if (openTagStart && openTagEnd && closeTagStart && closeTagEnd && openTagName && closeTagName) { + return { + openTag: new Range(openTagStart.start.row, openTagStart.start.column, openTagEnd.end.row, openTagEnd.end.column), + closeTag: new Range(closeTagStart.start.row, closeTagStart.start.column, closeTagEnd.end.row, closeTagEnd.end.column), + openTagName: openTagName, + closeTagName: closeTagName + }; + } + }; + this.$findOpeningTag = function (iterator, token) { + var prevToken = iterator.getCurrentToken(); + var tag = token.value; + var depth = 0; + var startRow = iterator.getCurrentTokenRow(); + var startColumn = iterator.getCurrentTokenColumn(); + var endColumn = startColumn + 2; + var closeTagStart = new Range(startRow, startColumn, startRow, endColumn); //Range for ") + return; + var closeTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for > + iterator.stepBackward(); + iterator.stepBackward(); + do { + token = prevToken; + startRow = iterator.getCurrentTokenRow(); + startColumn = iterator.getCurrentTokenColumn(); + endColumn = startColumn + token.value.length; + prevToken = iterator.stepBackward(); + if (token) { + if (token.type.indexOf('tag-name') !== -1) { + if (tag === token.value) { + if (prevToken.value === '<') { + depth++; + if (depth > 0) { //found opening tag + var openTagName = new Range(startRow, startColumn, startRow, endColumn); + var openTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for < + do { + token = iterator.stepForward(); + } while (token && token.value !== '>'); + var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for > + } + } + else if (prevToken.value === '') { // self-closing tag + var stepCount = 0; + var tmpToken = prevToken; + while (tmpToken) { + if (tmpToken.type.indexOf('tag-name') !== -1 && tmpToken.value === tag) { + depth--; + break; + } + else if (tmpToken.value === '<') { + break; + } + tmpToken = iterator.stepBackward(); + stepCount++; + } + for (var i = 0; i < stepCount; i++) { + iterator.stepForward(); + } + } + } + } while (prevToken && depth <= 0); + if (openTagStart && openTagEnd && closeTagStart && closeTagEnd && openTagName && closeTagName) { + return { + openTag: new Range(openTagStart.start.row, openTagStart.start.column, openTagEnd.end.row, openTagEnd.end.column), + closeTag: new Range(closeTagStart.start.row, closeTagStart.start.column, closeTagEnd.end.row, closeTagEnd.end.column), + openTagName: openTagName, + closeTagName: closeTagName + }; + } + }; +} +exports.BracketMatch = BracketMatch; + +}); + +define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var lang = require("./lib/lang"); +var BidiHandler = require("./bidihandler").BidiHandler; +var config = require("./config"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Selection = require("./selection").Selection; +var TextMode = require("./mode/text").Mode; +var Range = require("./range").Range; +var Document = require("./document").Document; +var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer; +var SearchHighlight = require("./search_highlight").SearchHighlight; +var UndoManager = require("./undomanager").UndoManager; +var EditSession = /** @class */ (function () { + function EditSession(text, mode) { this.doc; + this.$breakpoints = []; + this.$decorations = []; + this.$frontMarkers = {}; + this.$backMarkers = {}; + this.$markerId = 1; + this.$undoSelect = true; + this.prevOp = {}; + this.$foldData = []; + this.id = "session" + (++EditSession.$uid); + this.$foldData.toString = function () { + return this.join("\n"); + }; + this.bgTokenizer = new BackgroundTokenizer((new TextMode()).getTokenizer(), this); + var _self = this; + this.bgTokenizer.on("update", function (e) { + _self._signal("tokenizerUpdate", e); + }); + this.on("changeFold", this.onChangeFold.bind(this)); + this.$onChange = this.onChange.bind(this); + if (typeof text != "object" || !text.getLine) + text = new Document(/**@type{string}*/ (text)); + this.setDocument(text); + this.selection = new Selection(this); + this.$onSelectionChange = this.onSelectionChange.bind(this); + this.selection.on("changeSelection", this.$onSelectionChange); + this.selection.on("changeCursor", this.$onSelectionChange); + this.$bidiHandler = new BidiHandler(this); + config.resetOptions(this); + this.setMode(mode); + config._signal("session", this); + this.destroyed = false; + this.$initOperationListeners(); + } + EditSession.prototype.$initOperationListeners = function () { + var _this = this; + this.curOp = null; + this.on("change", function () { + if (!_this.curOp) { + _this.startOperation(); + _this.curOp.selectionBefore = _this.$lastSel; + } + _this.curOp.docChanged = true; + }, true); + this.on("changeSelection", function () { + if (!_this.curOp) { + _this.startOperation(); + _this.curOp.selectionBefore = _this.$lastSel; + } + _this.curOp.selectionChanged = true; + }, true); + this.$operationResetTimer = lang.delayedCall(this.endOperation.bind(this, true)); + }; + EditSession.prototype.startOperation = function (commandEvent) { + if (this.curOp) { + if (!commandEvent || this.curOp.command) { + return; + } + this.prevOp = this.curOp; + } + if (!commandEvent) { + commandEvent = {}; + } + this.$operationResetTimer.schedule(); + this.curOp = { + command: commandEvent.command || {}, + args: commandEvent.args + }; + this.curOp.selectionBefore = this.selection.toJSON(); + this._signal("startOperation", commandEvent); + }; + EditSession.prototype.endOperation = function (e) { + if (this.curOp) { + if (e && e.returnValue === false) { + this.curOp = null; + this._signal("endOperation", e); + return; + } + if (e == true && this.curOp.command && this.curOp.command.name == "mouse") { + return; + } + var currentSelection = this.selection.toJSON(); + this.curOp.selectionAfter = currentSelection; + this.$lastSel = this.selection.toJSON(); + this.getUndoManager().addSelection(currentSelection); + this._signal("beforeEndOperation"); + this.prevOp = this.curOp; + this.curOp = null; + this._signal("endOperation", e); + } + }; + EditSession.prototype.setDocument = function (doc) { + if (this.doc) + this.doc.off("change", this.$onChange); + this.doc = doc; + doc.on("change", this.$onChange, true); + this.bgTokenizer.setDocument(this.getDocument()); + this.resetCaches(); + }; + EditSession.prototype.getDocument = function () { + return this.doc; + }; + EditSession.prototype.$resetRowCache = function (docRow) { + if (!docRow) { + this.$docRowCache = []; + this.$screenRowCache = []; + return; + } + var l = this.$docRowCache.length; + var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; + if (l > i) { + this.$docRowCache.splice(i, l); + this.$screenRowCache.splice(i, l); + } + }; + EditSession.prototype.$getRowCacheIndex = function (cacheArray, val) { + var low = 0; + var hi = cacheArray.length - 1; + while (low <= hi) { + var mid = (low + hi) >> 1; + var c = cacheArray[mid]; + if (val > c) + low = mid + 1; + else if (val < c) + hi = mid - 1; + else + return mid; + } + return low - 1; + }; + EditSession.prototype.resetCaches = function () { + this.$modified = true; + this.$wrapData = []; + this.$rowLengthCache = []; + this.$resetRowCache(0); + if (!this.destroyed) + this.bgTokenizer.start(0); + }; + EditSession.prototype.onChangeFold = function (e) { + var fold = e.data; + this.$resetRowCache(fold.start.row); + }; + EditSession.prototype.onChange = function (delta) { + this.$modified = true; + this.$bidiHandler.onChange(delta); + this.$resetRowCache(delta.start.row); + var removedFolds = this.$updateInternalDataOnChange(delta); + if (!this.$fromUndo && this.$undoManager) { + if (removedFolds && removedFolds.length) { + this.$undoManager.add({ + action: "removeFolds", + folds: removedFolds + }, this.mergeUndoDeltas); + this.mergeUndoDeltas = true; + } + this.$undoManager.add(delta, this.mergeUndoDeltas); + this.mergeUndoDeltas = true; + this.$informUndoManager.schedule(); + } + this.bgTokenizer.$updateOnChange(delta); + this._signal("change", delta); + }; + EditSession.prototype.onSelectionChange = function () { + this._signal("changeSelection"); + }; + EditSession.prototype.setValue = function (text) { + this.doc.setValue(text); + this.selection.moveTo(0, 0); + this.$resetRowCache(0); + this.setUndoManager(this.$undoManager); + this.getUndoManager().reset(); + }; + EditSession.fromJSON = function (session) { + if (typeof session == "string") + session = JSON.parse(session); + var undoManager = new UndoManager(); + undoManager.$undoStack = session.history.undo; + undoManager.$redoStack = session.history.redo; + undoManager.mark = session.history.mark; + undoManager.$rev = session.history.rev; + var editSession = new EditSession(session.value); + session.folds.forEach(function (fold) { + editSession.addFold("...", Range.fromPoints(fold.start, fold.end)); + }); + editSession.setAnnotations(session.annotations); + editSession.setBreakpoints(session.breakpoints); + editSession.setMode(session.mode); + editSession.setScrollLeft(session.scrollLeft); + editSession.setScrollTop(session.scrollTop); + editSession.setUndoManager(undoManager); + editSession.selection.fromJSON(session.selection); + return editSession; + }; + EditSession.prototype.toJSON = function () { + return { + annotations: this.$annotations, + breakpoints: this.$breakpoints, + folds: this.getAllFolds().map(function (fold) { + return fold.range; + }), + history: this.getUndoManager(), + mode: this.$mode.$id, + scrollLeft: this.$scrollLeft, + scrollTop: this.$scrollTop, + selection: this.selection.toJSON(), + value: this.doc.getValue() + }; + }; + EditSession.prototype.toString = function () { + return this.doc.getValue(); + }; + EditSession.prototype.getSelection = function () { + return this.selection; + }; + EditSession.prototype.getState = function (row) { + return this.bgTokenizer.getState(row); + }; + EditSession.prototype.getTokens = function (row) { + return this.bgTokenizer.getTokens(row); + }; + EditSession.prototype.getTokenAt = function (row, column) { + var tokens = this.bgTokenizer.getTokens(row); + var token, c = 0; + if (column == null) { + var i = tokens.length - 1; + c = this.getLine(row).length; + } + else { + for (var i = 0; i < tokens.length; i++) { + c += tokens[i].value.length; + if (c >= column) + break; + } + } + token = tokens[i]; + if (!token) + return null; + token.index = i; + token.start = c - token.value.length; + return token; + }; + EditSession.prototype.setUndoManager = function (undoManager) { + this.$undoManager = undoManager; + if (this.$informUndoManager) + this.$informUndoManager.cancel(); + if (undoManager) { + var self = this; + undoManager.addSession(this); + this.$syncInformUndoManager = function () { + self.$informUndoManager.cancel(); + self.mergeUndoDeltas = false; + }; + this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); + } + else { + this.$syncInformUndoManager = function () { }; + } + }; + EditSession.prototype.markUndoGroup = function () { + if (this.$syncInformUndoManager) + this.$syncInformUndoManager(); + }; + EditSession.prototype.getUndoManager = function () { + return this.$undoManager || this.$defaultUndoManager; + }; + EditSession.prototype.getTabString = function () { + if (this.getUseSoftTabs()) { + return lang.stringRepeat(" ", this.getTabSize()); + } + else { + return "\t"; + } + }; + EditSession.prototype.setUseSoftTabs = function (val) { + this.setOption("useSoftTabs", val); + }; + EditSession.prototype.getUseSoftTabs = function () { + return this.$useSoftTabs && !this.$mode.$indentWithTabs; + }; + EditSession.prototype.setTabSize = function (tabSize) { + this.setOption("tabSize", tabSize); + }; + EditSession.prototype.getTabSize = function () { + return this.$tabSize; + }; + EditSession.prototype.isTabStop = function (position) { + return this.$useSoftTabs && (position.column % this.$tabSize === 0); + }; + EditSession.prototype.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) { + this.setOption("navigateWithinSoftTabs", navigateWithinSoftTabs); + }; + EditSession.prototype.getNavigateWithinSoftTabs = function () { + return this.$navigateWithinSoftTabs; + }; + EditSession.prototype.setOverwrite = function (overwrite) { + this.setOption("overwrite", overwrite); + }; + EditSession.prototype.getOverwrite = function () { + return this.$overwrite; + }; + EditSession.prototype.toggleOverwrite = function () { + this.setOverwrite(!this.$overwrite); + }; + EditSession.prototype.addGutterDecoration = function (row, className) { + if (!this.$decorations[row]) + this.$decorations[row] = ""; + this.$decorations[row] += " " + className; + this._signal("changeBreakpoint", {}); + }; + EditSession.prototype.removeGutterDecoration = function (row, className) { + this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); + this._signal("changeBreakpoint", {}); + }; + EditSession.prototype.getBreakpoints = function () { + return this.$breakpoints; + }; + EditSession.prototype.setBreakpoints = function (rows) { + this.$breakpoints = []; + for (var i = 0; i < rows.length; i++) { + this.$breakpoints[rows[i]] = "ace_breakpoint"; + } + this._signal("changeBreakpoint", {}); + }; + EditSession.prototype.clearBreakpoints = function () { + this.$breakpoints = []; + this._signal("changeBreakpoint", {}); + }; + EditSession.prototype.setBreakpoint = function (row, className) { + if (className === undefined) + className = "ace_breakpoint"; + if (className) + this.$breakpoints[row] = className; + else + delete this.$breakpoints[row]; + this._signal("changeBreakpoint", {}); + }; + EditSession.prototype.clearBreakpoint = function (row) { + delete this.$breakpoints[row]; + this._signal("changeBreakpoint", {}); + }; + EditSession.prototype.addMarker = function (range, clazz, type, inFront) { + var id = this.$markerId++; + var marker = { + range: range, + type: type || "line", + renderer: typeof type == "function" ? type : null, + clazz: clazz, + inFront: !!inFront, + id: id + }; + if (inFront) { + this.$frontMarkers[id] = marker; + this._signal("changeFrontMarker"); + } + else { + this.$backMarkers[id] = marker; + this._signal("changeBackMarker"); + } + return id; + }; + EditSession.prototype.addDynamicMarker = function (marker, inFront) { + if (!marker.update) + return; + var id = this.$markerId++; + marker.id = id; + marker.inFront = !!inFront; + if (inFront) { + this.$frontMarkers[id] = marker; + this._signal("changeFrontMarker"); + } + else { + this.$backMarkers[id] = marker; + this._signal("changeBackMarker"); + } + return marker; + }; + EditSession.prototype.removeMarker = function (markerId) { + var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId]; + if (!marker) + return; + var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers; + delete (markers[markerId]); + this._signal(marker.inFront ? "changeFrontMarker" : "changeBackMarker"); + }; + EditSession.prototype.getMarkers = function (inFront) { + return inFront ? this.$frontMarkers : this.$backMarkers; + }; + EditSession.prototype.highlight = function (re) { + if (!this.$searchHighlight) { + var highlight = new SearchHighlight(null, "ace_selected-word", "text"); + this.$searchHighlight = this.addDynamicMarker(highlight); + } + this.$searchHighlight.setRegexp(re); + }; + EditSession.prototype.highlightLines = function (startRow, endRow, clazz, inFront) { + if (typeof endRow != "number") { + clazz = endRow; + endRow = startRow; + } + if (!clazz) + clazz = "ace_step"; + var range = new Range(startRow, 0, endRow, Infinity); + range.id = this.addMarker(range, clazz, "fullLine", inFront); + return range; + }; + EditSession.prototype.setAnnotations = function (annotations) { + this.$annotations = annotations; + this._signal("changeAnnotation", {}); + }; + EditSession.prototype.getAnnotations = function () { + return this.$annotations || []; + }; + EditSession.prototype.clearAnnotations = function () { + this.setAnnotations([]); + }; + EditSession.prototype.$detectNewLine = function (text) { + var match = text.match(/^.*?(\r?\n)/m); + if (match) { + this.$autoNewLine = match[1]; + } + else { + this.$autoNewLine = "\n"; + } + }; + EditSession.prototype.getWordRange = function (row, column) { + var line = this.getLine(row); + var inToken = false; + if (column > 0) + inToken = !!line.charAt(column - 1).match(this.tokenRe); + if (!inToken) + inToken = !!line.charAt(column).match(this.tokenRe); + if (inToken) + var re = this.tokenRe; + else if (/^\s+$/.test(line.slice(column - 1, column + 1))) + var re = /\s/; + else + var re = this.nonTokenRe; + var start = column; + if (start > 0) { + do { + start--; + } while (start >= 0 && line.charAt(start).match(re)); + start++; + } + var end = column; + while (end < line.length && line.charAt(end).match(re)) { + end++; + } + return new Range(row, start, row, end); + }; + EditSession.prototype.getAWordRange = function (row, column) { + var wordRange = this.getWordRange(row, column); + var line = this.getLine(wordRange.end.row); + while (line.charAt(wordRange.end.column).match(/[ \t]/)) { + wordRange.end.column += 1; + } + return wordRange; + }; + EditSession.prototype.setNewLineMode = function (newLineMode) { + this.doc.setNewLineMode(newLineMode); + }; + EditSession.prototype.getNewLineMode = function () { + return this.doc.getNewLineMode(); + }; + EditSession.prototype.setUseWorker = function (useWorker) { this.setOption("useWorker", useWorker); }; + EditSession.prototype.getUseWorker = function () { return this.$useWorker; }; + EditSession.prototype.onReloadTokenizer = function (e) { + var rows = e.data; + this.bgTokenizer.start(rows.first); + this._signal("tokenizerUpdate", e); + }; + EditSession.prototype.setMode = function (mode, cb) { + if (mode && typeof mode === "object") { + if (mode.getTokenizer) + return this.$onChangeMode(mode); + var options = mode; + var path = options.path; + } + else { + path = /**@type{string}*/ (mode) || "ace/mode/text"; + } + if (!this.$modes["ace/mode/text"]) + this.$modes["ace/mode/text"] = new TextMode(); + if (this.$modes[path] && !options) { + this.$onChangeMode(this.$modes[path]); + cb && cb(); + return; + } + this.$modeId = path; + config.loadModule(["mode", path], function (m) { + if (this.$modeId !== path) + return cb && cb(); + if (this.$modes[path] && !options) { + this.$onChangeMode(this.$modes[path]); + } + else if (m && m.Mode) { + m = new m.Mode(options); + if (!options) { + this.$modes[path] = m; + m.$id = path; + } + this.$onChangeMode(m); + } + cb && cb(); + }.bind(this)); + if (!this.$mode) + this.$onChangeMode(this.$modes["ace/mode/text"], true); + }; + EditSession.prototype.$onChangeMode = function (mode, $isPlaceholder) { + if (!$isPlaceholder) + this.$modeId = mode.$id; + if (this.$mode === mode) + return; + var oldMode = this.$mode; + this.$mode = mode; + this.$stopWorker(); + if (this.$useWorker) + this.$startWorker(); + var tokenizer = mode.getTokenizer(); + if (tokenizer.on !== undefined) { + var onReloadTokenizer = this.onReloadTokenizer.bind(this); + tokenizer.on("update", onReloadTokenizer); + } + this.bgTokenizer.setTokenizer(tokenizer); + this.bgTokenizer.setDocument(this.getDocument()); + this.tokenRe = mode.tokenRe; + this.nonTokenRe = mode.nonTokenRe; + if (!$isPlaceholder) { + if (mode.attachToSession) + mode.attachToSession(this); + this.$options.wrapMethod.set.call(this, this.$wrapMethod); + this.$setFolding(mode.foldingRules); + this.bgTokenizer.start(0); + this._emit("changeMode", { oldMode: oldMode, mode: mode }); + } + }; + EditSession.prototype.$stopWorker = function () { + if (this.$worker) { + this.$worker.terminate(); + this.$worker = null; + } + }; + EditSession.prototype.$startWorker = function () { + try { + this.$worker = this.$mode.createWorker(this); + } + catch (e) { + config.warn("Could not load worker", e); + this.$worker = null; + } + }; + EditSession.prototype.getMode = function () { + return this.$mode; + }; + EditSession.prototype.setScrollTop = function (scrollTop) { + if (this.$scrollTop === scrollTop || isNaN(scrollTop)) + return; + this.$scrollTop = scrollTop; + this._signal("changeScrollTop", scrollTop); + }; + EditSession.prototype.getScrollTop = function () { + return this.$scrollTop; + }; + EditSession.prototype.setScrollLeft = function (scrollLeft) { + if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) + return; + this.$scrollLeft = scrollLeft; + this._signal("changeScrollLeft", scrollLeft); + }; + EditSession.prototype.getScrollLeft = function () { + return this.$scrollLeft; + }; + EditSession.prototype.getScreenWidth = function () { + this.$computeWidth(); + if (this.lineWidgets) + return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); + return this.screenWidth; + }; + EditSession.prototype.getLineWidgetMaxWidth = function () { + if (this.lineWidgetsWidth != null) + return this.lineWidgetsWidth; + var width = 0; + this.lineWidgets.forEach(function (w) { + if (w && w.screenWidth > width) + width = w.screenWidth; + }); + return this.lineWidgetWidth = width; + }; + EditSession.prototype.$computeWidth = function (force) { + if (this.$modified || force) { + this.$modified = false; + if (this.$useWrapMode) + return this.screenWidth = this.$wrapLimit; + var lines = this.doc.getAllLines(); + var cache = this.$rowLengthCache; + var longestScreenLine = 0; + var foldIndex = 0; + var foldLine = this.$foldData[foldIndex]; + var foldStart = foldLine ? foldLine.start.row : Infinity; + var len = lines.length; + for (var i = 0; i < len; i++) { + if (i > foldStart) { + i = foldLine.end.row + 1; + if (i >= len) + break; + foldLine = this.$foldData[foldIndex++]; + foldStart = foldLine ? foldLine.start.row : Infinity; + } + if (cache[i] == null) + cache[i] = this.$getStringScreenWidth(lines[i])[0]; + if (cache[i] > longestScreenLine) + longestScreenLine = cache[i]; + } + this.screenWidth = longestScreenLine; + } + }; + EditSession.prototype.getLine = function (row) { + return this.doc.getLine(row); + }; + EditSession.prototype.getLines = function (firstRow, lastRow) { + return this.doc.getLines(firstRow, lastRow); + }; + EditSession.prototype.getLength = function () { + return this.doc.getLength(); + }; + EditSession.prototype.getTextRange = function (range) { + return this.doc.getTextRange(range || this.selection.getRange()); + }; + EditSession.prototype.insert = function (position, text) { + return this.doc.insert(position, text); + }; + EditSession.prototype.remove = function (range) { + return this.doc.remove(range); + }; + EditSession.prototype.removeFullLines = function (firstRow, lastRow) { + return this.doc.removeFullLines(firstRow, lastRow); + }; + EditSession.prototype.undoChanges = function (deltas, dontSelect) { + if (!deltas.length) + return; + this.$fromUndo = true; + for (var i = deltas.length - 1; i != -1; i--) { + var delta = deltas[i]; + if (delta.action == "insert" || delta.action == "remove") { + this.doc.revertDelta(delta); + } + else if (delta.folds) { + this.addFolds(delta.folds); + } + } + if (!dontSelect && this.$undoSelect) { + if (deltas.selectionBefore) + this.selection.fromJSON(deltas.selectionBefore); + else + this.selection.setRange(this.$getUndoSelection(deltas, true)); + } + this.$fromUndo = false; + }; + EditSession.prototype.redoChanges = function (deltas, dontSelect) { + if (!deltas.length) + return; + this.$fromUndo = true; + for (var i = 0; i < deltas.length; i++) { + var delta = deltas[i]; + if (delta.action == "insert" || delta.action == "remove") { + this.doc.$safeApplyDelta(delta); + } + } + if (!dontSelect && this.$undoSelect) { + if (deltas.selectionAfter) + this.selection.fromJSON(deltas.selectionAfter); + else + this.selection.setRange(this.$getUndoSelection(deltas, false)); + } + this.$fromUndo = false; + }; + EditSession.prototype.setUndoSelect = function (enable) { + this.$undoSelect = enable; + }; + EditSession.prototype.$getUndoSelection = function (deltas, isUndo) { + function isInsert(delta) { + return isUndo ? delta.action !== "insert" : delta.action === "insert"; + } + var range, point; + for (var i = 0; i < deltas.length; i++) { + var delta = deltas[i]; + if (!delta.start) + continue; // skip folds + if (!range) { + if (isInsert(delta)) { + range = Range.fromPoints(delta.start, delta.end); + } + else { + range = Range.fromPoints(delta.start, delta.start); + } + continue; + } + if (isInsert(delta)) { + point = delta.start; + if (range.compare(point.row, point.column) == -1) { + range.setStart(point); + } + point = delta.end; + if (range.compare(point.row, point.column) == 1) { + range.setEnd(point); + } + } + else { + point = delta.start; + if (range.compare(point.row, point.column) == -1) { + range = Range.fromPoints(delta.start, delta.start); + } + } + } + return range; + }; + EditSession.prototype.replace = function (range, text) { + return this.doc.replace(range, text); + }; + EditSession.prototype.moveText = function (fromRange, toPosition, copy) { + var text = this.getTextRange(fromRange); + var folds = this.getFoldsInRange(fromRange); + var toRange = Range.fromPoints(toPosition, toPosition); + if (!copy) { + this.remove(fromRange); + var rowDiff = fromRange.start.row - fromRange.end.row; + var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; + if (collDiff) { + if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) + toRange.start.column += collDiff; + if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) + toRange.end.column += collDiff; + } + if (rowDiff && toRange.start.row >= fromRange.end.row) { + toRange.start.row += rowDiff; + toRange.end.row += rowDiff; + } + } + toRange.end = this.insert(toRange.start, text); + if (folds.length) { + var oldStart = fromRange.start; + var newStart = toRange.start; + var rowDiff = newStart.row - oldStart.row; + var collDiff = newStart.column - oldStart.column; + this.addFolds(folds.map(function (x) { + x = x.clone(); + if (x.start.row == oldStart.row) + x.start.column += collDiff; + if (x.end.row == oldStart.row) + x.end.column += collDiff; + x.start.row += rowDiff; + x.end.row += rowDiff; + return x; + })); + } + return toRange; + }; + EditSession.prototype.indentRows = function (startRow, endRow, indentString) { + indentString = indentString.replace(/\t/g, this.getTabString()); + for (var row = startRow; row <= endRow; row++) + this.doc.insertInLine({ row: row, column: 0 }, indentString); + }; + EditSession.prototype.outdentRows = function (range) { + var rowRange = range.collapseRows(); + var deleteRange = new Range(0, 0, 0, 0); + var size = this.getTabSize(); + for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { + var line = this.getLine(i); + deleteRange.start.row = i; + deleteRange.end.row = i; + for (var j = 0; j < size; ++j) + if (line.charAt(j) != ' ') + break; + if (j < size && line.charAt(j) == '\t') { + deleteRange.start.column = j; + deleteRange.end.column = j + 1; + } + else { + deleteRange.start.column = 0; + deleteRange.end.column = j; + } + this.remove(deleteRange); + } + }; + EditSession.prototype.$moveLines = function (firstRow, lastRow, dir) { + firstRow = this.getRowFoldStart(firstRow); + lastRow = this.getRowFoldEnd(lastRow); + if (dir < 0) { + var row = this.getRowFoldStart(firstRow + dir); + if (row < 0) + return 0; + var diff = row - firstRow; + } + else if (dir > 0) { + var row = this.getRowFoldEnd(lastRow + dir); + if (row > this.doc.getLength() - 1) + return 0; + var diff = row - lastRow; + } + else { + firstRow = this.$clipRowToDocument(firstRow); + lastRow = this.$clipRowToDocument(lastRow); + var diff = lastRow - firstRow + 1; + } + var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); + var folds = this.getFoldsInRange(range).map(function (x) { + x = x.clone(); + x.start.row += diff; + x.end.row += diff; + return x; + }); + var lines = dir == 0 + ? this.doc.getLines(firstRow, lastRow) + : this.doc.removeFullLines(firstRow, lastRow); + this.doc.insertFullLines(firstRow + diff, lines); + folds.length && this.addFolds(folds); + return diff; + }; + EditSession.prototype.moveLinesUp = function (firstRow, lastRow) { + return this.$moveLines(firstRow, lastRow, -1); + }; + EditSession.prototype.moveLinesDown = function (firstRow, lastRow) { + return this.$moveLines(firstRow, lastRow, 1); + }; + EditSession.prototype.duplicateLines = function (firstRow, lastRow) { + return this.$moveLines(firstRow, lastRow, 0); + }; + EditSession.prototype.$clipRowToDocument = function (row) { + return Math.max(0, Math.min(row, this.doc.getLength() - 1)); + }; + EditSession.prototype.$clipColumnToRow = function (row, column) { + if (column < 0) + return 0; + return Math.min(this.doc.getLine(row).length, column); + }; + EditSession.prototype.$clipPositionToDocument = function (row, column) { + column = Math.max(0, column); + if (row < 0) { + row = 0; + column = 0; + } + else { + var len = this.doc.getLength(); + if (row >= len) { + row = len - 1; + column = this.doc.getLine(len - 1).length; + } + else { + column = Math.min(this.doc.getLine(row).length, column); + } + } + return { + row: row, + column: column + }; + }; + EditSession.prototype.$clipRangeToDocument = function (range) { + if (range.start.row < 0) { + range.start.row = 0; + range.start.column = 0; + } + else { + range.start.column = this.$clipColumnToRow(range.start.row, range.start.column); + } + var len = this.doc.getLength() - 1; + if (range.end.row > len) { + range.end.row = len; + range.end.column = this.doc.getLine(len).length; + } + else { + range.end.column = this.$clipColumnToRow(range.end.row, range.end.column); + } + return range; + }; + EditSession.prototype.setUseWrapMode = function (useWrapMode) { + if (useWrapMode != this.$useWrapMode) { + this.$useWrapMode = useWrapMode; + this.$modified = true; + this.$resetRowCache(0); + if (useWrapMode) { + var len = this.getLength(); + this.$wrapData = Array(len); + this.$updateWrapData(0, len - 1); + } + this._signal("changeWrapMode"); + } + }; + EditSession.prototype.getUseWrapMode = function () { + return this.$useWrapMode; + }; + EditSession.prototype.setWrapLimitRange = function (min, max) { + if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { + this.$wrapLimitRange = { min: min, max: max }; + this.$modified = true; + this.$bidiHandler.markAsDirty(); + if (this.$useWrapMode) + this._signal("changeWrapMode"); + } + }; + EditSession.prototype.adjustWrapLimit = function (desiredLimit, $printMargin) { + var limits = this.$wrapLimitRange; + if (limits.max < 0) + limits = { min: $printMargin, max: $printMargin }; + var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); + if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { + this.$wrapLimit = wrapLimit; + this.$modified = true; + if (this.$useWrapMode) { + this.$updateWrapData(0, this.getLength() - 1); + this.$resetRowCache(0); + this._signal("changeWrapLimit"); + } + return true; + } + return false; + }; + EditSession.prototype.$constrainWrapLimit = function (wrapLimit, min, max) { + if (min) + wrapLimit = Math.max(min, wrapLimit); + if (max) + wrapLimit = Math.min(max, wrapLimit); + return wrapLimit; + }; + EditSession.prototype.getWrapLimit = function () { + return this.$wrapLimit; + }; + EditSession.prototype.setWrapLimit = function (limit) { + this.setWrapLimitRange(limit, limit); + }; + EditSession.prototype.getWrapLimitRange = function () { + return { + min: this.$wrapLimitRange.min, + max: this.$wrapLimitRange.max + }; + }; + EditSession.prototype.$updateInternalDataOnChange = function (delta) { + var useWrapMode = this.$useWrapMode; + var action = delta.action; + var start = delta.start; + var end = delta.end; + var firstRow = start.row; + var lastRow = end.row; + var len = lastRow - firstRow; + var removedFolds = null; + this.$updating = true; + if (len != 0) { + if (action === "remove") { + this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); + var foldLines = this.$foldData; + removedFolds = this.getFoldsInRange(delta); + this.removeFolds(removedFolds); + var foldLine = this.getFoldLine(end.row); + var idx = 0; + if (foldLine) { + foldLine.addRemoveChars(end.row, end.column, start.column - end.column); + foldLine.shiftRow(-len); + var foldLineBefore = this.getFoldLine(firstRow); + if (foldLineBefore && foldLineBefore !== foldLine) { + foldLineBefore.merge(foldLine); + foldLine = foldLineBefore; + } + idx = foldLines.indexOf(foldLine) + 1; + } + for (idx; idx < foldLines.length; idx++) { + var foldLine = foldLines[idx]; + if (foldLine.start.row >= end.row) { + foldLine.shiftRow(-len); + } + } + lastRow = firstRow; + } + else { + var args = Array(len); + args.unshift(firstRow, 0); + var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache; + arr.splice.apply(arr, args); + var foldLines = this.$foldData; + var foldLine = this.getFoldLine(firstRow); + var idx = 0; + if (foldLine) { + var cmp = foldLine.range.compareInside(start.row, start.column); + if (cmp == 0) { + foldLine = foldLine.split(start.row, start.column); + if (foldLine) { + foldLine.shiftRow(len); + foldLine.addRemoveChars(lastRow, 0, end.column - start.column); + } + } + else + if (cmp == -1) { + foldLine.addRemoveChars(firstRow, 0, end.column - start.column); + foldLine.shiftRow(len); + } + idx = foldLines.indexOf(foldLine) + 1; + } + for (idx; idx < foldLines.length; idx++) { + var foldLine = foldLines[idx]; + if (foldLine.start.row >= firstRow) { + foldLine.shiftRow(len); + } + } + } + } + else { + len = Math.abs(delta.start.column - delta.end.column); + if (action === "remove") { + removedFolds = this.getFoldsInRange(delta); + this.removeFolds(removedFolds); + len = -len; + } + var foldLine = this.getFoldLine(firstRow); + if (foldLine) { + foldLine.addRemoveChars(firstRow, start.column, len); + } + } + if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { + console.error("doc.getLength() and $wrapData.length have to be the same!"); + } + this.$updating = false; + if (useWrapMode) + this.$updateWrapData(firstRow, lastRow); + else + this.$updateRowLengthCache(firstRow, lastRow); + return removedFolds; + }; + EditSession.prototype.$updateRowLengthCache = function (firstRow, lastRow) { + this.$rowLengthCache[firstRow] = null; + this.$rowLengthCache[lastRow] = null; + }; + EditSession.prototype.$updateWrapData = function (firstRow, lastRow) { + var lines = this.doc.getAllLines(); + var tabSize = this.getTabSize(); + var wrapData = this.$wrapData; + var wrapLimit = this.$wrapLimit; + var tokens; + var foldLine; + var row = firstRow; + lastRow = Math.min(lastRow, lines.length - 1); + while (row <= lastRow) { + foldLine = this.getFoldLine(row, foldLine); + if (!foldLine) { + tokens = this.$getDisplayTokens(lines[row]); + wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); + row++; + } + else { + tokens = []; + foldLine.walk(function (placeholder, row, column, lastColumn) { + var walkTokens; + if (placeholder != null) { + walkTokens = this.$getDisplayTokens(placeholder, tokens.length); + walkTokens[0] = PLACEHOLDER_START; + for (var i = 1; i < walkTokens.length; i++) { + walkTokens[i] = PLACEHOLDER_BODY; + } + } + else { + walkTokens = this.$getDisplayTokens(lines[row].substring(lastColumn, column), tokens.length); + } + tokens = tokens.concat(walkTokens); + }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1); + wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); + row = foldLine.end.row + 1; + } + } + }; + EditSession.prototype.$computeWrapSplits = function (tokens, wrapLimit, tabSize) { + if (tokens.length == 0) { + return []; + } + var splits = []; + var displayLength = tokens.length; + var lastSplit = 0, lastDocSplit = 0; + var isCode = this.$wrapAsCode; + var indentedSoftWrap = this.$indentedSoftWrap; + var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8) + || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2); + function getWrapIndent() { + var indentation = 0; + if (maxIndent === 0) + return indentation; + if (indentedSoftWrap) { + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token == SPACE) + indentation += 1; + else if (token == TAB) + indentation += tabSize; + else if (token == TAB_SPACE) + continue; + else + break; + } + } + if (isCode && indentedSoftWrap !== false) + indentation += tabSize; + return Math.min(indentation, maxIndent); + } + function addSplit(screenPos) { + var len = screenPos - lastSplit; + for (var i = lastSplit; i < screenPos; i++) { + var ch = tokens[i]; + if (ch === 12 || ch === 2) + len -= 1; + } + if (!splits.length) { + indent = getWrapIndent(); + splits.indent = indent; + } + lastDocSplit += len; + splits.push(lastDocSplit); + lastSplit = screenPos; + } + var indent = 0; + while (displayLength - lastSplit > wrapLimit - indent) { + var split = lastSplit + wrapLimit - indent; + if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { + addSplit(split); + continue; + } + if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { + for (split; split != lastSplit - 1; split--) { + if (tokens[split] == PLACEHOLDER_START) { + break; + } + } + if (split > lastSplit) { + addSplit(split); + continue; + } + split = lastSplit + wrapLimit; + for (split; split < tokens.length; split++) { + if (tokens[split] != PLACEHOLDER_BODY) { + break; + } + } + if (split == tokens.length) { + break; // Breaks the while-loop. + } + addSplit(split); + continue; + } + var minSplit = Math.max(split - (wrapLimit - (wrapLimit >> 2)), lastSplit - 1); + while (split > minSplit && tokens[split] < PLACEHOLDER_START) { + split--; + } + if (isCode) { + while (split > minSplit && tokens[split] < PLACEHOLDER_START) { + split--; + } + while (split > minSplit && tokens[split] == PUNCTUATION) { + split--; + } + } + else { + while (split > minSplit && tokens[split] < SPACE) { + split--; + } + } + if (split > minSplit) { + addSplit(++split); + continue; + } + split = lastSplit + wrapLimit; + if (tokens[split] == CHAR_EXT) + split--; + addSplit(split - indent); + } + return splits; + }; + EditSession.prototype.$getDisplayTokens = function (str, offset) { + var arr = []; + var tabSize; + offset = offset || 0; + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + if (c == 9) { + tabSize = this.getScreenTabSize(arr.length + offset); + arr.push(TAB); + for (var n = 1; n < tabSize; n++) { + arr.push(TAB_SPACE); + } + } + else if (c == 32) { + arr.push(SPACE); + } + else if ((c > 39 && c < 48) || (c > 57 && c < 64)) { + arr.push(PUNCTUATION); + } + else if (c >= 0x1100 && isFullWidth(c)) { + arr.push(CHAR, CHAR_EXT); + } + else { + arr.push(CHAR); + } + } + return arr; + }; + EditSession.prototype.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) { + if (maxScreenColumn == 0) + return [0, 0]; + if (maxScreenColumn == null) + maxScreenColumn = Infinity; + screenColumn = screenColumn || 0; + var c, column; + for (column = 0; column < str.length; column++) { + c = str.charCodeAt(column); + if (c == 9) { + screenColumn += this.getScreenTabSize(screenColumn); + } + else if (c >= 0x1100 && isFullWidth(c)) { + screenColumn += 2; + } + else { + screenColumn += 1; + } + if (screenColumn > maxScreenColumn) { + break; + } + } + return [screenColumn, column]; + }; + EditSession.prototype.getRowLength = function (row) { + var h = 1; + if (this.lineWidgets) + h += this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; + if (!this.$useWrapMode || !this.$wrapData[row]) + return h; + else + return this.$wrapData[row].length + h; + }; + EditSession.prototype.getRowLineCount = function (row) { + if (!this.$useWrapMode || !this.$wrapData[row]) { + return 1; + } + else { + return this.$wrapData[row].length + 1; + } + }; + EditSession.prototype.getRowWrapIndent = function (screenRow) { + if (this.$useWrapMode) { + var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); + var splits = this.$wrapData[pos.row]; + return splits.length && splits[0] < pos.column ? splits.indent : 0; + } + else { + return 0; + } + }; + EditSession.prototype.getScreenLastRowColumn = function (screenRow) { + var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); + return this.documentToScreenColumn(pos.row, pos.column); + }; + EditSession.prototype.getDocumentLastRowColumn = function (docRow, docColumn) { + var screenRow = this.documentToScreenRow(docRow, docColumn); + return this.getScreenLastRowColumn(screenRow); + }; + EditSession.prototype.getDocumentLastRowColumnPosition = function (docRow, docColumn) { + var screenRow = this.documentToScreenRow(docRow, docColumn); + return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); + }; + EditSession.prototype.getRowSplitData = function (row) { + if (!this.$useWrapMode) { + return undefined; + } + else { + return this.$wrapData[row]; + } + }; + EditSession.prototype.getScreenTabSize = function (screenColumn) { + return this.$tabSize - (screenColumn % this.$tabSize | 0); + }; + EditSession.prototype.screenToDocumentRow = function (screenRow, screenColumn) { + return this.screenToDocumentPosition(screenRow, screenColumn).row; + }; + EditSession.prototype.screenToDocumentColumn = function (screenRow, screenColumn) { + return this.screenToDocumentPosition(screenRow, screenColumn).column; + }; + EditSession.prototype.screenToDocumentPosition = function (screenRow, screenColumn, offsetX) { + if (screenRow < 0) + return { row: 0, column: 0 }; + var line; + var docRow = 0; + var docColumn = 0; + var column; + var row = 0; + var rowLength = 0; + var rowCache = this.$screenRowCache; + var i = this.$getRowCacheIndex(rowCache, screenRow); + var l = rowCache.length; + if (l && i >= 0) { + var row = rowCache[i]; + var docRow = this.$docRowCache[i]; + var doCache = screenRow > rowCache[l - 1]; + } + else { + var doCache = !l; + } + var maxRow = this.getLength() - 1; + var foldLine = this.getNextFoldLine(docRow); + var foldStart = foldLine ? foldLine.start.row : Infinity; + while (row <= screenRow) { + rowLength = this.getRowLength(docRow); + if (row + rowLength > screenRow || docRow >= maxRow) { + break; + } + else { + row += rowLength; + docRow++; + if (docRow > foldStart) { + docRow = foldLine.end.row + 1; + foldLine = this.getNextFoldLine(docRow, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + } + if (doCache) { + this.$docRowCache.push(docRow); + this.$screenRowCache.push(row); + } + } + if (foldLine && foldLine.start.row <= docRow) { + line = this.getFoldDisplayLine(foldLine); + docRow = foldLine.start.row; + } + else if (row + rowLength <= screenRow || docRow > maxRow) { + return { + row: maxRow, + column: this.getLine(maxRow).length + }; + } + else { + line = this.getLine(docRow); + foldLine = null; + } + var wrapIndent = 0, splitIndex = Math.floor(screenRow - row); + if (this.$useWrapMode) { + var splits = this.$wrapData[docRow]; + if (splits) { + column = splits[splitIndex]; + if (splitIndex > 0 && splits.length) { + wrapIndent = splits.indent; + docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; + line = line.substring(docColumn); + } + } + } + if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex)) + screenColumn = this.$bidiHandler.offsetToCol(offsetX); + docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1]; + if (this.$useWrapMode && docColumn >= column) + docColumn = column - 1; + if (foldLine) + return foldLine.idxToPosition(docColumn); + return { row: docRow, column: docColumn }; + }; + EditSession.prototype.documentToScreenPosition = function (docRow, docColumn) { + if (typeof docColumn === "undefined") + var pos = this.$clipPositionToDocument(/**@type{Point}*/ (docRow).row, /**@type{Point}*/ (docRow).column); + else + pos = this.$clipPositionToDocument(/**@type{number}*/ (docRow), docColumn); + docRow = pos.row; + docColumn = pos.column; + var screenRow = 0; + var foldStartRow = null; + var fold = null; + fold = this.getFoldAt(docRow, docColumn, 1); + if (fold) { + docRow = fold.start.row; + docColumn = fold.start.column; + } + var rowEnd, row = 0; + var rowCache = this.$docRowCache; + var i = this.$getRowCacheIndex(rowCache, docRow); + var l = rowCache.length; + if (l && i >= 0) { + var row = rowCache[i]; + var screenRow = this.$screenRowCache[i]; + var doCache = docRow > rowCache[l - 1]; + } + else { + var doCache = !l; + } + var foldLine = this.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + while (row < docRow) { + if (row >= foldStart) { + rowEnd = foldLine.end.row + 1; + if (rowEnd > docRow) + break; + foldLine = this.getNextFoldLine(rowEnd, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + else { + rowEnd = row + 1; + } + screenRow += this.getRowLength(row); + row = rowEnd; + if (doCache) { + this.$docRowCache.push(row); + this.$screenRowCache.push(screenRow); + } + } + var textLine = ""; + if (foldLine && row >= foldStart) { + textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); + foldStartRow = foldLine.start.row; + } + else { + textLine = this.getLine(docRow).substring(0, docColumn); + foldStartRow = docRow; + } + var wrapIndent = 0; + if (this.$useWrapMode) { + var wrapRow = this.$wrapData[foldStartRow]; + if (wrapRow) { + var screenRowOffset = 0; + while (textLine.length >= wrapRow[screenRowOffset]) { + screenRow++; + screenRowOffset++; + } + textLine = textLine.substring(wrapRow[screenRowOffset - 1] || 0, textLine.length); + wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0; + } + } + if (this.lineWidgets && this.lineWidgets[row] && this.lineWidgets[row].rowsAbove) + screenRow += this.lineWidgets[row].rowsAbove; + return { + row: screenRow, + column: wrapIndent + this.$getStringScreenWidth(textLine)[0] + }; + }; + EditSession.prototype.documentToScreenColumn = function (row, docColumn) { + return this.documentToScreenPosition(row, docColumn).column; + }; + EditSession.prototype.documentToScreenRow = function (docRow, docColumn) { + return this.documentToScreenPosition(docRow, docColumn).row; + }; + EditSession.prototype.getScreenLength = function () { + var screenRows = 0; + var fold = null; + if (!this.$useWrapMode) { + screenRows = this.getLength(); + var foldData = this.$foldData; + for (var i = 0; i < foldData.length; i++) { + fold = foldData[i]; + screenRows -= fold.end.row - fold.start.row; + } + } + else { + var lastRow = this.$wrapData.length; + var row = 0, i = 0; + var fold = this.$foldData[i++]; + var foldStart = fold ? fold.start.row : Infinity; + while (row < lastRow) { + var splits = this.$wrapData[row]; + screenRows += splits ? splits.length + 1 : 1; + row++; + if (row > foldStart) { + row = fold.end.row + 1; + fold = this.$foldData[i++]; + foldStart = fold ? fold.start.row : Infinity; + } + } + } + if (this.lineWidgets) + screenRows += this.$getWidgetScreenLength(); + return screenRows; + }; + EditSession.prototype.$setFontMetrics = function (fm) { + if (!this.$enableVarChar) + return; + this.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) { + if (maxScreenColumn === 0) + return [0, 0]; + if (!maxScreenColumn) + maxScreenColumn = Infinity; + screenColumn = screenColumn || 0; + var c, column; + for (column = 0; column < str.length; column++) { + c = str.charAt(column); + if (c === "\t") { + screenColumn += this.getScreenTabSize(screenColumn); + } + else { + screenColumn += fm.getCharacterWidth(c); + } + if (screenColumn > maxScreenColumn) { + break; + } + } + return [screenColumn, column]; + }; + }; + EditSession.prototype.getPrecedingCharacter = function () { + var pos = this.selection.getCursor(); + if (pos.column === 0) { + return pos.row === 0 ? "" : this.doc.getNewLineCharacter(); + } + var currentLine = this.getLine(pos.row); + return currentLine[pos.column - 1]; + }; + EditSession.prototype.destroy = function () { + if (!this.destroyed) { + this.bgTokenizer.setDocument(null); + this.bgTokenizer.cleanup(); + this.destroyed = true; + } + this.endOperation(); + this.$stopWorker(); + this.removeAllListeners(); + if (this.doc) { + this.doc.off("change", this.$onChange); + } + if (this.selection) { + this.selection.off("changeCursor", this.$onSelectionChange); + this.selection.off("changeSelection", this.$onSelectionChange); + } + this.selection.detach(); + }; + return EditSession; +}()); +EditSession.$uid = 0; +EditSession.prototype.$modes = config.$modes; +EditSession.prototype.getValue = EditSession.prototype.toString; +EditSession.prototype.$defaultUndoManager = { + undo: function () { }, + redo: function () { }, + hasUndo: function () { }, + hasRedo: function () { }, + reset: function () { }, + add: function () { }, + addSelection: function () { }, + startNewGroup: function () { }, + addSession: function () { } +}; +EditSession.prototype.$overwrite = false; +EditSession.prototype.$mode = null; +EditSession.prototype.$modeId = null; +EditSession.prototype.$scrollTop = 0; +EditSession.prototype.$scrollLeft = 0; +EditSession.prototype.$wrapLimit = 80; +EditSession.prototype.$useWrapMode = false; +EditSession.prototype.$wrapLimitRange = { + min: null, + max: null +}; +EditSession.prototype.lineWidgets = null; +EditSession.prototype.isFullWidth = isFullWidth; +oop.implement(EditSession.prototype, EventEmitter); +var CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12; +function isFullWidth(c) { + if (c < 0x1100) + return false; + return c >= 0x1100 && c <= 0x115F || + c >= 0x11A3 && c <= 0x11A7 || + c >= 0x11FA && c <= 0x11FF || + c >= 0x2329 && c <= 0x232A || + c >= 0x2E80 && c <= 0x2E99 || + c >= 0x2E9B && c <= 0x2EF3 || + c >= 0x2F00 && c <= 0x2FD5 || + c >= 0x2FF0 && c <= 0x2FFB || + c >= 0x3000 && c <= 0x303E || + c >= 0x3041 && c <= 0x3096 || + c >= 0x3099 && c <= 0x30FF || + c >= 0x3105 && c <= 0x312D || + c >= 0x3131 && c <= 0x318E || + c >= 0x3190 && c <= 0x31BA || + c >= 0x31C0 && c <= 0x31E3 || + c >= 0x31F0 && c <= 0x321E || + c >= 0x3220 && c <= 0x3247 || + c >= 0x3250 && c <= 0x32FE || + c >= 0x3300 && c <= 0x4DBF || + c >= 0x4E00 && c <= 0xA48C || + c >= 0xA490 && c <= 0xA4C6 || + c >= 0xA960 && c <= 0xA97C || + c >= 0xAC00 && c <= 0xD7A3 || + c >= 0xD7B0 && c <= 0xD7C6 || + c >= 0xD7CB && c <= 0xD7FB || + c >= 0xF900 && c <= 0xFAFF || + c >= 0xFE10 && c <= 0xFE19 || + c >= 0xFE30 && c <= 0xFE52 || + c >= 0xFE54 && c <= 0xFE66 || + c >= 0xFE68 && c <= 0xFE6B || + c >= 0xFF01 && c <= 0xFF60 || + c >= 0xFFE0 && c <= 0xFFE6; +} +require("./edit_session/folding").Folding.call(EditSession.prototype); +require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); +config.defineOptions(EditSession.prototype, "session", { + wrap: { + set: function (value) { + if (!value || value == "off") + value = false; + else if (value == "free") + value = true; + else if (value == "printMargin") + value = -1; + else if (typeof value == "string") + value = parseInt(value, 10) || false; + if (this.$wrap == value) + return; + this.$wrap = value; + if (!value) { + this.setUseWrapMode(false); + } + else { + var col = typeof value == "number" ? value : null; + this.setWrapLimitRange(col, col); + this.setUseWrapMode(true); + } + }, + get: function () { + if (this.getUseWrapMode()) { + if (this.$wrap == -1) + return "printMargin"; + if (!this.getWrapLimitRange().min) + return "free"; + return this.$wrap; + } + return "off"; + }, + handlesSet: true + }, + wrapMethod: { + set: function (val) { + val = val == "auto" + ? this.$mode.type != "text" + : val != "text"; + if (val != this.$wrapAsCode) { + this.$wrapAsCode = val; + if (this.$useWrapMode) { + this.$useWrapMode = false; + this.setUseWrapMode(true); + } + } + }, + initialValue: "auto" + }, + indentedSoftWrap: { + set: function () { + if (this.$useWrapMode) { + this.$useWrapMode = false; + this.setUseWrapMode(true); + } + }, + initialValue: true + }, + firstLineNumber: { + set: function () { this._signal("changeBreakpoint"); }, + initialValue: 1 + }, + useWorker: { + set: function (useWorker) { + this.$useWorker = useWorker; + this.$stopWorker(); + if (useWorker) + this.$startWorker(); + }, + initialValue: true + }, + useSoftTabs: { initialValue: true }, + tabSize: { + set: function (tabSize) { + tabSize = parseInt(tabSize); + if (tabSize > 0 && this.$tabSize !== tabSize) { + this.$modified = true; + this.$rowLengthCache = []; + this.$tabSize = tabSize; + this._signal("changeTabSize"); + } + }, + initialValue: 4, + handlesSet: true + }, + navigateWithinSoftTabs: { initialValue: false }, + foldStyle: { + set: function (val) { this.setFoldStyle(val); }, + handlesSet: true + }, + overwrite: { + set: function (val) { this._signal("changeOverwrite"); }, + initialValue: false + }, + newLineMode: { + set: function (val) { this.doc.setNewLineMode(val); }, + get: function () { return this.doc.getNewLineMode(); }, + handlesSet: true + }, + mode: { + set: function (val) { this.setMode(val); }, + get: function () { return this.$modeId; }, + handlesSet: true + } +}); +exports.EditSession = EditSession; + +}); + +define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module){"use strict"; +var lang = require("./lib/lang"); +var oop = require("./lib/oop"); +var Range = require("./range").Range; +var Search = /** @class */ (function () { + function Search() { + this.$options = {}; + } + Search.prototype.set = function (options) { + oop.mixin(this.$options, options); + return this; + }; + Search.prototype.getOptions = function () { + return lang.copyObject(this.$options); + }; + Search.prototype.setOptions = function (options) { + this.$options = options; + }; + Search.prototype.find = function (session) { + var options = this.$options; + var iterator = this.$matchIterator(session, options); + if (!iterator) + return false; + var firstRange = null; + iterator.forEach(function (sr, sc, er, ec) { + firstRange = new Range(sr, sc, er, ec); + if (sc == ec && options.start && /**@type{Range}*/ (options.start).start + && options.skipCurrent != false && firstRange.isEqual(/**@type{Range}*/ (options.start))) { + firstRange = null; + return false; + } + return true; + }); + return firstRange; + }; + Search.prototype.findAll = function (session) { + var options = this.$options; + if (!options.needle) + return []; + this.$assembleRegExp(options); + var range = options.range; + var lines = range + ? session.getLines(range.start.row, range.end.row) + : session.doc.getAllLines(); + var ranges = []; + var re = options.re; + if (options.$isMultiLine) { + var len = re.length; + var maxRow = lines.length - len; + var prevRange; + outer: for (var row = re.offset || 0; row <= maxRow; row++) { + for (var j = 0; j < len; j++) + if (lines[row + j].search(re[j]) == -1) + continue outer; + var startLine = lines[row]; + var line = lines[row + len - 1]; + var startIndex = startLine.length - startLine.match(re[0])[0].length; + var endIndex = line.match(re[len - 1])[0].length; + if (prevRange && prevRange.end.row === row && + prevRange.end.column > startIndex) { + continue; + } + ranges.push(prevRange = new Range(row, startIndex, row + len - 1, endIndex)); + if (len > 2) + row = row + len - 2; + } + } + else { + for (var i = 0; i < lines.length; i++) { + var matches = lang.getMatchOffsets(lines[i], re); + for (var j = 0; j < matches.length; j++) { + var match = matches[j]; + ranges.push(new Range(i, match.offset, i, match.offset + match.length)); + } + } + } + if (range) { + var startColumn = range.start.column; + var endColumn = range.end.column; + var i = 0, j = ranges.length - 1; + while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == 0) + i++; + var endRow = range.end.row - range.start.row; + while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == endRow) + j--; + ranges = ranges.slice(i, j + 1); + for (i = 0, j = ranges.length; i < j; i++) { + ranges[i].start.row += range.start.row; + ranges[i].end.row += range.start.row; + } + } + return ranges; + }; + Search.prototype.replace = function (input, replacement) { + var options = this.$options; + var re = this.$assembleRegExp(options); + if (options.$isMultiLine) + return replacement; + if (!re) + return; + var match = re.exec(input); + if (!match || match[0].length != input.length) + return null; + if (!options.regExp) { + replacement = replacement.replace(/\$/g, "$$$$"); + } + replacement = input.replace(re, replacement); + if (options.preserveCase) { + replacement = replacement.split(""); + for (var i = Math.min(input.length, input.length); i--;) { + var ch = input[i]; + if (ch && ch.toLowerCase() != ch) + replacement[i] = replacement[i].toUpperCase(); + else + replacement[i] = replacement[i].toLowerCase(); + } + replacement = replacement.join(""); + } + return replacement; + }; + Search.prototype.$assembleRegExp = function (options, $disableFakeMultiline) { + if (options.needle instanceof RegExp) + return options.re = options.needle; + var needle = options.needle; + if (!options.needle) + return options.re = false; + if (!options.regExp) + needle = lang.escapeRegExp(needle); + var modifier = options.caseSensitive ? "gm" : "gmi"; + try { + new RegExp(needle, "u"); + options.$supportsUnicodeFlag = true; + modifier += "u"; + } + catch (e) { + options.$supportsUnicodeFlag = false; //left for backward compatibility with previous versions for cases like /ab\{2}/gu + } + if (options.wholeWord) + needle = addWordBoundary(needle, options); + options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); + if (options.$isMultiLine) + return options.re = this.$assembleMultilineRegExp(needle, modifier); + try { + var re = new RegExp(needle, modifier); + } + catch (e) { + re = false; + } + return options.re = re; + }; + Search.prototype.$assembleMultilineRegExp = function (needle, modifier) { + var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); + var re = []; + for (var i = 0; i < parts.length; i++) + try { + re.push(new RegExp(parts[i], modifier)); + } + catch (e) { + return false; + } + return re; + }; + Search.prototype.$matchIterator = function (session, options) { + var re = this.$assembleRegExp(options); + if (!re) + return false; + var backwards = options.backwards == true; + var skipCurrent = options.skipCurrent != false; + var supportsUnicodeFlag = re.unicode; + var range = options.range; + var start = options.start; + if (!start) + start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); + if (start.start) + start = start[skipCurrent != backwards ? "end" : "start"]; + var firstRow = range ? range.start.row : 0; + var lastRow = range ? range.end.row : session.getLength() - 1; + if (backwards) { + var forEach = function (callback) { + var row = start.row; + if (forEachInLine(row, start.column, callback)) + return; + for (row--; row >= firstRow; row--) + if (forEachInLine(row, Number.MAX_VALUE, callback)) + return; + if (options.wrap == false) + return; + for (row = lastRow, firstRow = start.row; row >= firstRow; row--) + if (forEachInLine(row, Number.MAX_VALUE, callback)) + return; + }; + } + else { + var forEach = function (callback) { + var row = start.row; + if (forEachInLine(row, start.column, callback)) + return; + for (row = row + 1; row <= lastRow; row++) + if (forEachInLine(row, 0, callback)) + return; + if (options.wrap == false) + return; + for (row = firstRow, lastRow = start.row; row <= lastRow; row++) + if (forEachInLine(row, 0, callback)) + return; + }; + } + if (options.$isMultiLine) { + var len = re.length; + var forEachInLine = function (row, offset, callback) { + var startRow = backwards ? row - len + 1 : row; + if (startRow < 0 || startRow + len > session.getLength()) + return; + var line = session.getLine(startRow); + var startIndex = line.search(re[0]); + if (!backwards && startIndex < offset || startIndex === -1) + return; + for (var i = 1; i < len; i++) { + line = session.getLine(startRow + i); + if (line.search(re[i]) == -1) + return; + } + var endIndex = line.match(re[len - 1])[0].length; + if (backwards && endIndex > offset) + return; + if (callback(startRow, startIndex, startRow + len - 1, endIndex)) + return true; + }; + } + else if (backwards) { + var forEachInLine = function (row, endIndex, callback) { + var line = session.getLine(row); + var matches = []; + var m, last = 0; + re.lastIndex = 0; + while ((m = re.exec(line))) { + var length = m[0].length; + last = m.index; + if (!length) { + if (last >= line.length) + break; + re.lastIndex = last += lang.skipEmptyMatch(line, last, supportsUnicodeFlag); + } + if (m.index + length > endIndex) + break; + matches.push(m.index, length); + } + for (var i = matches.length - 1; i >= 0; i -= 2) { + var column = matches[i - 1]; + var length = matches[i]; + if (callback(row, column, row, column + length)) + return true; + } + }; + } + else { + var forEachInLine = function (row, startIndex, callback) { + var line = session.getLine(row); + var last; + var m; + re.lastIndex = startIndex; + while ((m = re.exec(line))) { + var length = m[0].length; + last = m.index; + if (callback(row, last, row, last + length)) + return true; + if (!length) { + re.lastIndex = last += lang.skipEmptyMatch(line, last, supportsUnicodeFlag); + if (last >= line.length) + return false; + } + } + }; + } + return { forEach: forEach }; + }; + return Search; +}()); +function addWordBoundary(needle, options) { + var supportsLookbehind = lang.supportsLookbehind(); + function wordBoundary(c, firstChar) { + if (firstChar === void 0) { firstChar = true; } + var wordRegExp = supportsLookbehind && options.$supportsUnicodeFlag ? new RegExp("[\\p{L}\\p{N}_]", "u") : new RegExp("\\w"); + if (wordRegExp.test(c) || options.regExp) { + if (supportsLookbehind && options.$supportsUnicodeFlag) { + if (firstChar) + return "(?<=^|[^\\p{L}\\p{N}_])"; + return "(?=[^\\p{L}\\p{N}_]|$)"; + } + return "\\b"; + } + return ""; + } + var needleArray = Array.from(needle); + var firstChar = needleArray[0]; + var lastChar = needleArray[needleArray.length - 1]; + return wordBoundary(firstChar) + needle + wordBoundary(lastChar, false); +} +exports.Search = Search; + +}); + +define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var keyUtil = require("../lib/keys"); +var useragent = require("../lib/useragent"); +var KEY_MODS = keyUtil.KEY_MODS; +var MultiHashHandler = /** @class */ (function () { + function MultiHashHandler(config, platform) { + this.$init(config, platform, false); + } + MultiHashHandler.prototype.$init = function (config, platform, $singleCommand) { + this.platform = platform || (useragent.isMac ? "mac" : "win"); + this.commands = {}; + this.commandKeyBinding = {}; + this.addCommands(config); + this.$singleCommand = $singleCommand; + }; + MultiHashHandler.prototype.addCommand = function (command) { + if (this.commands[command.name]) + this.removeCommand(command); + this.commands[command.name] = command; + if (command.bindKey) + this._buildKeyHash(command); + }; + MultiHashHandler.prototype.removeCommand = function (command, keepCommand) { + var name = command && (typeof command === 'string' ? command : command.name); + command = this.commands[name]; + if (!keepCommand) + delete this.commands[name]; + var ckb = this.commandKeyBinding; + for (var keyId in ckb) { + var cmdGroup = ckb[keyId]; + if (cmdGroup == command) { + delete ckb[keyId]; + } + else if (Array.isArray(cmdGroup)) { + var i = cmdGroup.indexOf(command); + if (i != -1) { + cmdGroup.splice(i, 1); + if (cmdGroup.length == 1) + ckb[keyId] = cmdGroup[0]; + } + } + } + }; + MultiHashHandler.prototype.bindKey = function (key, command, position) { + if (typeof key == "object" && key) { + if (position == undefined) + position = key.position; + key = key[this.platform]; + } + if (!key) + return; + if (typeof command == "function") + return this.addCommand({ exec: command, bindKey: key, name: command.name || /**@type{string}*/ (key) }); (key).split("|").forEach(function (keyPart) { + var chain = ""; + if (keyPart.indexOf(" ") != -1) { + var parts = keyPart.split(/\s+/); + keyPart = parts.pop(); + parts.forEach(function (keyPart) { + var binding = this.parseKeys(keyPart); + var id = KEY_MODS[binding.hashId] + binding.key; + chain += (chain ? " " : "") + id; + this._addCommandToBinding(chain, "chainKeys"); + }, this); + chain += " "; + } + var binding = this.parseKeys(keyPart); + var id = KEY_MODS[binding.hashId] + binding.key; + this._addCommandToBinding(chain + id, command, position); + }, this); + }; + MultiHashHandler.prototype._addCommandToBinding = function (keyId, command, position) { + var ckb = this.commandKeyBinding, i; + if (!command) { + delete ckb[keyId]; + } + else if (!ckb[keyId] || this.$singleCommand) { + ckb[keyId] = command; + } + else { + if (!Array.isArray(ckb[keyId])) { + ckb[keyId] = [ckb[keyId]]; + } + else if ((i = ckb[keyId].indexOf(command)) != -1) { + ckb[keyId].splice(i, 1); + } + if (typeof position != "number") { + position = getPosition(command); + } + var commands = ckb[keyId]; + for (i = 0; i < commands.length; i++) { + var other = commands[i]; + var otherPos = getPosition(other); + if (otherPos > position) + break; + } + commands.splice(i, 0, command); + } + }; + MultiHashHandler.prototype.addCommands = function (commands) { + commands && Object.keys(commands).forEach(function (name) { + var command = commands[name]; + if (!command) + return; + if (typeof command === "string") + return this.bindKey(command, name); + if (typeof command === "function") + command = { exec: command }; + if (typeof command !== "object") + return; + if (!command.name) + command.name = name; + this.addCommand(command); + }, this); + }; + MultiHashHandler.prototype.removeCommands = function (commands) { + Object.keys(commands).forEach(function (name) { + this.removeCommand(commands[name]); + }, this); + }; + MultiHashHandler.prototype.bindKeys = function (keyList) { + Object.keys(keyList).forEach(function (key) { + this.bindKey(key, keyList[key]); + }, this); + }; + MultiHashHandler.prototype._buildKeyHash = function (command) { + this.bindKey(command.bindKey, command); + }; + MultiHashHandler.prototype.parseKeys = function (keys) { + var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function (x) { return x; }); + var key = parts.pop(); + var keyCode = keyUtil[key]; + if (keyUtil.FUNCTION_KEYS[keyCode]) + key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); + else if (!parts.length) + return { key: key, hashId: -1 }; + else if (parts.length == 1 && parts[0] == "shift") + return { key: key.toUpperCase(), hashId: -1 }; + var hashId = 0; + for (var i = parts.length; i--;) { + var modifier = keyUtil.KEY_MODS[parts[i]]; + if (modifier == null) { + if (typeof console != "undefined") + console.error("invalid modifier " + parts[i] + " in " + keys); + return false; + } + hashId |= modifier; + } + return { key: key, hashId: hashId }; + }; + MultiHashHandler.prototype.findKeyCommand = function (hashId, keyString) { + var key = KEY_MODS[hashId] + keyString; + return this.commandKeyBinding[key]; + }; + MultiHashHandler.prototype.handleKeyboard = function (data, hashId, keyString, keyCode) { + if (keyCode < 0) + return; + var key = KEY_MODS[hashId] + keyString; + var command = this.commandKeyBinding[key]; + if (data.$keyChain) { + data.$keyChain += " " + key; + command = this.commandKeyBinding[data.$keyChain] || command; + } + if (command) { + if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { + data.$keyChain = data.$keyChain || key; + return { command: "null" }; + } + } + if (data.$keyChain) { + if ((!hashId || hashId == 4) && keyString.length == 1) + data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input + else if (hashId == -1 || keyCode > 0) + data.$keyChain = ""; // reset keyChain + } + return { command: command }; + }; + MultiHashHandler.prototype.getStatusText = function (editor, data) { + return data.$keyChain || ""; + }; + return MultiHashHandler; +}()); +function getPosition(command) { + return typeof command == "object" && command.bindKey + && command.bindKey.position + || (command.isDefault ? -100 : 0); +} +var HashHandler = /** @class */ (function (_super) { + __extends(HashHandler, _super); + function HashHandler(config, platform) { + var _this = _super.call(this, config, platform) || this; + _this.$singleCommand = true; + return _this; + } + return HashHandler; +}(MultiHashHandler)); +HashHandler.call = function (thisArg, config, platform) { + MultiHashHandler.prototype.$init.call(thisArg, config, platform, true); +}; +MultiHashHandler.call = function (thisArg, config, platform) { + MultiHashHandler.prototype.$init.call(thisArg, config, platform, false); +}; +exports.HashHandler = HashHandler; +exports.MultiHashHandler = MultiHashHandler; + +}); + +define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var oop = require("../lib/oop"); +var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler; +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var CommandManager = /** @class */ (function (_super) { + __extends(CommandManager, _super); + function CommandManager(platform, commands) { + var _this = _super.call(this, commands, platform) || this; + _this.byName = _this.commands; + _this.setDefaultHandler("exec", function (e) { + if (!e.args) { + return e.command.exec(e.editor, {}, e.event, true); + } + return e.command.exec(e.editor, e.args, e.event, false); + }); + return _this; + } + CommandManager.prototype.exec = function (command, editor, args) { + if (Array.isArray(command)) { + for (var i = command.length; i--;) { + if (this.exec(command[i], editor, args)) + return true; + } + return false; + } + if (typeof command === "string") + command = this.commands[command]; + if (!this.canExecute(command, editor)) { + return false; + } + var e = { editor: editor, command: command, args: args }; + e.returnValue = this._emit("exec", e); + this._signal("afterExec", e); + return e.returnValue === false ? false : true; + }; + CommandManager.prototype.canExecute = function (command, editor) { + if (typeof command === "string") + command = this.commands[command]; + if (!command) + return false; + if (editor && editor.$readOnly && !command.readOnly) + return false; + if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor)) + return false; + return true; + }; + CommandManager.prototype.toggleRecording = function (editor) { + if (this.$inReplay) + return; + editor && editor._emit("changeStatus"); + if (this.recording) { + this.macro.pop(); + this.off("exec", this.$addCommandToMacro); + if (!this.macro.length) + this.macro = this.oldMacro; + return this.recording = false; + } + if (!this.$addCommandToMacro) { + this.$addCommandToMacro = function (e) { + this.macro.push([e.command, e.args]); + }.bind(this); + } + this.oldMacro = this.macro; + this.macro = []; + this.on("exec", this.$addCommandToMacro); + return this.recording = true; + }; + CommandManager.prototype.replay = function (editor) { + if (this.$inReplay || !this.macro) + return; + if (this.recording) + return this.toggleRecording(editor); + try { + this.$inReplay = true; + this.macro.forEach(function (x) { + if (typeof x == "string") + this.exec(x, editor); + else + this.exec(x[0], editor, x[1]); + }, this); + } + finally { + this.$inReplay = false; + } + }; + CommandManager.prototype.trimMacro = function (m) { + return m.map(function (x) { + if (typeof x[0] != "string") + x[0] = x[0].name; + if (!x[1]) + x = x[0]; + return x; + }); + }; + return CommandManager; +}(MultiHashHandler)); +oop.implement(CommandManager.prototype, EventEmitter); +exports.CommandManager = CommandManager; + +}); + +define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module){"use strict"; +var lang = require("../lib/lang"); +var config = require("../config"); +var Range = require("../range").Range; +function bindKey(win, mac) { + return { win: win, mac: mac }; +} +exports.commands = [{ + name: "showSettingsMenu", + description: "Show settings menu", + bindKey: bindKey("Ctrl-,", "Command-,"), + exec: function (editor) { + config.loadModule("ace/ext/settings_menu", function (module) { + module.init(editor); + editor.showSettingsMenu(); + }); + }, + readOnly: true + }, { + name: "goToNextError", + description: "Go to next error", + bindKey: bindKey("Alt-E", "F4"), + exec: function (editor) { + config.loadModule("ace/ext/error_marker", function (module) { + module.showErrorMarker(editor, 1); + }); + }, + scrollIntoView: "animate", + readOnly: true + }, { + name: "goToPreviousError", + description: "Go to previous error", + bindKey: bindKey("Alt-Shift-E", "Shift-F4"), + exec: function (editor) { + config.loadModule("ace/ext/error_marker", function (module) { + module.showErrorMarker(editor, -1); + }); + }, + scrollIntoView: "animate", + readOnly: true + }, { + name: "selectall", + description: "Select all", + bindKey: bindKey("Ctrl-A", "Command-A"), + exec: function (editor) { editor.selectAll(); }, + readOnly: true + }, { + name: "centerselection", + description: "Center selection", + bindKey: bindKey(null, "Ctrl-L"), + exec: function (editor) { editor.centerSelection(); }, + readOnly: true + }, { + name: "gotoline", + description: "Go to line...", + bindKey: bindKey("Ctrl-L", "Command-L"), + exec: function (editor, line) { + if (typeof line === "number" && !isNaN(line)) + editor.gotoLine(line); + editor.prompt({ $type: "gotoLine" }); + }, + readOnly: true + }, { + name: "fold", + bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), + exec: function (editor) { editor.session.toggleFold(false); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true + }, { + name: "unfold", + bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), + exec: function (editor) { editor.session.toggleFold(true); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true + }, { + name: "toggleFoldWidget", + description: "Toggle fold widget", + bindKey: bindKey("F2", "F2"), + exec: function (editor) { editor.session.toggleFoldWidget(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true + }, { + name: "toggleParentFoldWidget", + description: "Toggle parent fold widget", + bindKey: bindKey("Alt-F2", "Alt-F2"), + exec: function (editor) { editor.session.toggleFoldWidget(true); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true + }, { + name: "foldall", + description: "Fold all", + bindKey: bindKey(null, "Ctrl-Command-Option-0"), + exec: function (editor) { editor.session.foldAll(); }, + scrollIntoView: "center", + readOnly: true + }, { + name: "foldAllComments", + description: "Fold all comments", + bindKey: bindKey(null, "Ctrl-Command-Option-0"), + exec: function (editor) { editor.session.foldAllComments(); }, + scrollIntoView: "center", + readOnly: true + }, { + name: "foldOther", + description: "Fold other", + bindKey: bindKey("Alt-0", "Command-Option-0"), + exec: function (editor) { + editor.session.foldAll(); + editor.session.unfold(editor.selection.getAllRanges()); + }, + scrollIntoView: "center", + readOnly: true + }, { + name: "unfoldall", + description: "Unfold all", + bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), + exec: function (editor) { editor.session.unfold(); }, + scrollIntoView: "center", + readOnly: true + }, { + name: "findnext", + description: "Find next", + bindKey: bindKey("Ctrl-K", "Command-G"), + exec: function (editor) { editor.findNext(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true + }, { + name: "findprevious", + description: "Find previous", + bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), + exec: function (editor) { editor.findPrevious(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true + }, { + name: "selectOrFindNext", + description: "Select or find next", + bindKey: bindKey("Alt-K", "Ctrl-G"), + exec: function (editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + else + editor.findNext(); + }, + readOnly: true + }, { + name: "selectOrFindPrevious", + description: "Select or find previous", + bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), + exec: function (editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + else + editor.findPrevious(); + }, + readOnly: true + }, { + name: "find", + description: "Find", + bindKey: bindKey("Ctrl-F", "Command-F"), + exec: function (editor) { + config.loadModule("ace/ext/searchbox", function (e) { e.Search(editor); }); + }, + readOnly: true + }, { + name: "overwrite", + description: "Overwrite", + bindKey: "Insert", + exec: function (editor) { editor.toggleOverwrite(); }, + readOnly: true + }, { + name: "selecttostart", + description: "Select to start", + bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Home|Command-Shift-Up"), + exec: function (editor) { editor.getSelection().selectFileStart(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" + }, { + name: "gotostart", + description: "Go to start", + bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), + exec: function (editor) { editor.navigateFileStart(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" + }, { + name: "selectup", + description: "Select up", + bindKey: bindKey("Shift-Up", "Shift-Up|Ctrl-Shift-P"), + exec: function (editor) { editor.getSelection().selectUp(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "golineup", + description: "Go line up", + bindKey: bindKey("Up", "Up|Ctrl-P"), + exec: function (editor, args) { editor.navigateUp(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selecttoend", + description: "Select to end", + bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-End|Command-Shift-Down"), + exec: function (editor) { editor.getSelection().selectFileEnd(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" + }, { + name: "gotoend", + description: "Go to end", + bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), + exec: function (editor) { editor.navigateFileEnd(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" + }, { + name: "selectdown", + description: "Select down", + bindKey: bindKey("Shift-Down", "Shift-Down|Ctrl-Shift-N"), + exec: function (editor) { editor.getSelection().selectDown(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "golinedown", + description: "Go line down", + bindKey: bindKey("Down", "Down|Ctrl-N"), + exec: function (editor, args) { editor.navigateDown(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectwordleft", + description: "Select word left", + bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), + exec: function (editor) { editor.getSelection().selectWordLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "gotowordleft", + description: "Go to word left", + bindKey: bindKey("Ctrl-Left", "Option-Left"), + exec: function (editor) { editor.navigateWordLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selecttolinestart", + description: "Select to line start", + bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left|Ctrl-Shift-A"), + exec: function (editor) { editor.getSelection().selectLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "gotolinestart", + description: "Go to line start", + bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), + exec: function (editor) { editor.navigateLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectleft", + description: "Select left", + bindKey: bindKey("Shift-Left", "Shift-Left|Ctrl-Shift-B"), + exec: function (editor) { editor.getSelection().selectLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "gotoleft", + description: "Go to left", + bindKey: bindKey("Left", "Left|Ctrl-B"), + exec: function (editor, args) { editor.navigateLeft(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectwordright", + description: "Select word right", + bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), + exec: function (editor) { editor.getSelection().selectWordRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "gotowordright", + description: "Go to word right", + bindKey: bindKey("Ctrl-Right", "Option-Right"), + exec: function (editor) { editor.navigateWordRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selecttolineend", + description: "Select to line end", + bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right|Shift-End|Ctrl-Shift-E"), + exec: function (editor) { editor.getSelection().selectLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "gotolineend", + description: "Go to line end", + bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), + exec: function (editor) { editor.navigateLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectright", + description: "Select right", + bindKey: bindKey("Shift-Right", "Shift-Right"), + exec: function (editor) { editor.getSelection().selectRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "gotoright", + description: "Go to right", + bindKey: bindKey("Right", "Right|Ctrl-F"), + exec: function (editor, args) { editor.navigateRight(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectpagedown", + description: "Select page down", + bindKey: "Shift-PageDown", + exec: function (editor) { editor.selectPageDown(); }, + readOnly: true + }, { + name: "pagedown", + description: "Page down", + bindKey: bindKey(null, "Option-PageDown"), + exec: function (editor) { editor.scrollPageDown(); }, + readOnly: true + }, { + name: "gotopagedown", + description: "Go to page down", + bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), + exec: function (editor) { editor.gotoPageDown(); }, + readOnly: true + }, { + name: "selectpageup", + description: "Select page up", + bindKey: "Shift-PageUp", + exec: function (editor) { editor.selectPageUp(); }, + readOnly: true + }, { + name: "pageup", + description: "Page up", + bindKey: bindKey(null, "Option-PageUp"), + exec: function (editor) { editor.scrollPageUp(); }, + readOnly: true + }, { + name: "gotopageup", + description: "Go to page up", + bindKey: "PageUp", + exec: function (editor) { editor.gotoPageUp(); }, + readOnly: true + }, { + name: "scrollup", + description: "Scroll up", + bindKey: bindKey("Ctrl-Up", null), + exec: function (e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, + readOnly: true + }, { + name: "scrolldown", + description: "Scroll down", + bindKey: bindKey("Ctrl-Down", null), + exec: function (e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, + readOnly: true + }, { + name: "selectlinestart", + description: "Select line start", + bindKey: "Shift-Home", + exec: function (editor) { editor.getSelection().selectLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectlineend", + description: "Select line end", + bindKey: "Shift-End", + exec: function (editor) { editor.getSelection().selectLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "togglerecording", + description: "Toggle recording", + bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), + exec: function (editor) { editor.commands.toggleRecording(editor); }, + readOnly: true + }, { + name: "replaymacro", + description: "Replay macro", + bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), + exec: function (editor) { editor.commands.replay(editor); }, + readOnly: true + }, { + name: "jumptomatching", + description: "Jump to matching", + bindKey: bindKey("Ctrl-\\|Ctrl-P", "Command-\\"), + exec: function (editor) { editor.jumpToMatching(); }, + multiSelectAction: "forEach", + scrollIntoView: "animate", + readOnly: true + }, { + name: "selecttomatching", + description: "Select to matching", + bindKey: bindKey("Ctrl-Shift-\\|Ctrl-Shift-P", "Command-Shift-\\"), + exec: function (editor) { editor.jumpToMatching(true); }, + multiSelectAction: "forEach", + scrollIntoView: "animate", + readOnly: true + }, { + name: "expandToMatching", + description: "Expand to matching", + bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), + exec: function (editor) { editor.jumpToMatching(true, true); }, + multiSelectAction: "forEach", + scrollIntoView: "animate", + readOnly: true + }, { + name: "passKeysToBrowser", + description: "Pass keys to browser", + bindKey: bindKey(null, null), + exec: function () { }, + passEvent: true, + readOnly: true + }, { + name: "copy", + description: "Copy", + exec: function (editor) { + }, + readOnly: true + }, + { + name: "cut", + description: "Cut", + exec: function (editor) { + var cutLine = editor.$copyWithEmptySelection && editor.selection.isEmpty(); + var range = cutLine ? editor.selection.getLineRange() : editor.selection.getRange(); + editor._emit("cut", range); + if (!range.isEmpty()) + editor.session.remove(range); + editor.clearSelection(); + }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" + }, { + name: "paste", + description: "Paste", + exec: function (editor, args) { + editor.$handlePaste(args); + }, + scrollIntoView: "cursor" + }, { + name: "removeline", + description: "Remove line", + bindKey: bindKey("Ctrl-D", "Command-D"), + exec: function (editor) { editor.removeLines(); }, + scrollIntoView: "cursor", + multiSelectAction: "forEachLine" + }, { + name: "duplicateSelection", + description: "Duplicate selection", + bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), + exec: function (editor) { editor.duplicateSelection(); }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" + }, { + name: "sortlines", + description: "Sort lines", + bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), + exec: function (editor) { editor.sortLines(); }, + scrollIntoView: "selection", + multiSelectAction: "forEachLine" + }, { + name: "togglecomment", + description: "Toggle comment", + bindKey: bindKey("Ctrl-/", "Command-/"), + exec: function (editor) { editor.toggleCommentLines(); }, + multiSelectAction: "forEachLine", + scrollIntoView: "selectionPart" + }, { + name: "toggleBlockComment", + description: "Toggle block comment", + bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), + exec: function (editor) { editor.toggleBlockComment(); }, + multiSelectAction: "forEach", + scrollIntoView: "selectionPart" + }, { + name: "modifyNumberUp", + description: "Modify number up", + bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), + exec: function (editor) { editor.modifyNumber(1); }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" + }, { + name: "modifyNumberDown", + description: "Modify number down", + bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), + exec: function (editor) { editor.modifyNumber(-1); }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" + }, { + name: "replace", + description: "Replace", + bindKey: bindKey("Ctrl-H", "Command-Option-F"), + exec: function (editor) { + config.loadModule("ace/ext/searchbox", function (e) { e.Search(editor, true); }); + } + }, { + name: "undo", + description: "Undo", + bindKey: bindKey("Ctrl-Z", "Command-Z"), + exec: function (editor) { editor.undo(); } + }, { + name: "redo", + description: "Redo", + bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), + exec: function (editor) { editor.redo(); } + }, { + name: "copylinesup", + description: "Copy lines up", + bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), + exec: function (editor) { editor.copyLinesUp(); }, + scrollIntoView: "cursor" + }, { + name: "movelinesup", + description: "Move lines up", + bindKey: bindKey("Alt-Up", "Option-Up"), + exec: function (editor) { editor.moveLinesUp(); }, + scrollIntoView: "cursor" + }, { + name: "copylinesdown", + description: "Copy lines down", + bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), + exec: function (editor) { editor.copyLinesDown(); }, + scrollIntoView: "cursor" + }, { + name: "movelinesdown", + description: "Move lines down", + bindKey: bindKey("Alt-Down", "Option-Down"), + exec: function (editor) { editor.moveLinesDown(); }, + scrollIntoView: "cursor" + }, { + name: "del", + description: "Delete", + bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), + exec: function (editor) { editor.remove("right"); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "backspace", + description: "Backspace", + bindKey: bindKey("Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"), + exec: function (editor) { editor.remove("left"); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "cut_or_delete", + description: "Cut or delete", + bindKey: bindKey("Shift-Delete", null), + exec: function (editor) { + if (editor.selection.isEmpty()) { + editor.remove("left"); + } + else { + return false; + } + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "removetolinestart", + description: "Remove to line start", + bindKey: bindKey("Alt-Backspace", "Command-Backspace"), + exec: function (editor) { editor.removeToLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "removetolineend", + description: "Remove to line end", + bindKey: bindKey("Alt-Delete", "Ctrl-K|Command-Delete"), + exec: function (editor) { editor.removeToLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "removetolinestarthard", + description: "Remove to line start hard", + bindKey: bindKey("Ctrl-Shift-Backspace", null), + exec: function (editor) { + var range = editor.selection.getRange(); + range.start.column = 0; + editor.session.remove(range); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "removetolineendhard", + description: "Remove to line end hard", + bindKey: bindKey("Ctrl-Shift-Delete", null), + exec: function (editor) { + var range = editor.selection.getRange(); + range.end.column = Number.MAX_VALUE; + editor.session.remove(range); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "removewordleft", + description: "Remove word left", + bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), + exec: function (editor) { editor.removeWordLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "removewordright", + description: "Remove word right", + bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), + exec: function (editor) { editor.removeWordRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "outdent", + description: "Outdent", + bindKey: bindKey("Shift-Tab", "Shift-Tab"), + exec: function (editor) { editor.blockOutdent(); }, + multiSelectAction: "forEach", + scrollIntoView: "selectionPart" + }, { + name: "indent", + description: "Indent", + bindKey: bindKey("Tab", "Tab"), + exec: function (editor) { editor.indent(); }, + multiSelectAction: "forEach", + scrollIntoView: "selectionPart" + }, { + name: "blockoutdent", + description: "Block outdent", + bindKey: bindKey("Ctrl-[", "Ctrl-["), + exec: function (editor) { editor.blockOutdent(); }, + multiSelectAction: "forEachLine", + scrollIntoView: "selectionPart" + }, { + name: "blockindent", + description: "Block indent", + bindKey: bindKey("Ctrl-]", "Ctrl-]"), + exec: function (editor) { editor.blockIndent(); }, + multiSelectAction: "forEachLine", + scrollIntoView: "selectionPart" + }, { + name: "insertstring", + description: "Insert string", + exec: function (editor, str) { editor.insert(str); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "inserttext", + description: "Insert text", + exec: function (editor, args) { + editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "splitline", + description: "Split line", + bindKey: bindKey(null, "Ctrl-O"), + exec: function (editor) { editor.splitLine(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "transposeletters", + description: "Transpose letters", + bindKey: bindKey("Alt-Shift-X", "Ctrl-T"), + exec: function (editor) { editor.transposeLetters(); }, + multiSelectAction: function (editor) { editor.transposeSelections(1); }, + scrollIntoView: "cursor" + }, { + name: "touppercase", + description: "To uppercase", + bindKey: bindKey("Ctrl-U", "Ctrl-U"), + exec: function (editor) { editor.toUpperCase(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "tolowercase", + description: "To lowercase", + bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), + exec: function (editor) { editor.toLowerCase(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "autoindent", + description: "Auto Indent", + bindKey: bindKey(null, null), + exec: function (editor) { editor.autoIndent(); }, + scrollIntoView: "animate" + }, { + name: "expandtoline", + description: "Expand to line", + bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), + exec: function (editor) { + var range = editor.selection.getRange(); + range.start.column = range.end.column = 0; + range.end.row++; + editor.selection.setRange(range, false); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "openlink", + bindKey: bindKey("Ctrl+F3", "F3"), + exec: function (editor) { editor.openLink(); } + }, { + name: "joinlines", + description: "Join lines", + bindKey: bindKey(null, null), + exec: function (editor) { + var isBackwards = editor.selection.isBackwards(); + var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); + var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); + var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; + var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); + var selectedCount = selectedText.replace(/\n\s*/, " ").length; + var insertLine = editor.session.doc.getLine(selectionStart.row); + for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { + var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); + if (curLine.length !== 0) { + curLine = " " + curLine; + } + insertLine += curLine; + } + if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { + insertLine += editor.session.doc.getNewLineCharacter(); + } + editor.clearSelection(); + editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); + if (selectedCount > 0) { + editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); + editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); + } + else { + firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; + editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); + } + }, + multiSelectAction: "forEach", + readOnly: true + }, { + name: "invertSelection", + description: "Invert selection", + bindKey: bindKey(null, null), + exec: function (editor) { + var endRow = editor.session.doc.getLength() - 1; + var endCol = editor.session.doc.getLine(endRow).length; + var ranges = editor.selection.rangeList.ranges; + var newRanges = []; + if (ranges.length < 1) { + ranges = [editor.selection.getRange()]; + } + for (var i = 0; i < ranges.length; i++) { + if (i == (ranges.length - 1)) { + if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { + newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); + } + } + if (i === 0) { + if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { + newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); + } + } + else { + newRanges.push(new Range(ranges[i - 1].end.row, ranges[i - 1].end.column, ranges[i].start.row, ranges[i].start.column)); + } + } + editor.exitMultiSelectMode(); + editor.clearSelection(); + for (var i = 0; i < newRanges.length; i++) { + editor.selection.addRange(newRanges[i], false); + } + }, + readOnly: true, + scrollIntoView: "none" + }, { + name: "addLineAfter", + description: "Add new line after the current line", + exec: function (editor) { + editor.selection.clearSelection(); + editor.navigateLineEnd(); + editor.insert("\n"); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "addLineBefore", + description: "Add new line before the current line", + exec: function (editor) { + editor.selection.clearSelection(); + var cursor = editor.getCursorPosition(); + editor.selection.moveTo(cursor.row - 1, Number.MAX_VALUE); + editor.insert("\n"); + if (cursor.row === 0) + editor.navigateUp(); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "openCommandPallete", + exec: function (editor) { + console.warn("This is an obsolete command. Please use `openCommandPalette` instead."); + editor.prompt({ $type: "commands" }); + }, + readOnly: true + }, { + name: "openCommandPalette", + description: "Open command palette", + bindKey: bindKey("F1", "F1"), + exec: function (editor) { + editor.prompt({ $type: "commands" }); + }, + readOnly: true + }, { + name: "modeSelect", + description: "Change language mode...", + bindKey: bindKey(null, null), + exec: function (editor) { + editor.prompt({ $type: "modes" }); + }, + readOnly: true + }]; +for (var i = 1; i < 9; i++) { + exports.commands.push({ + name: "foldToLevel" + i, + description: "Fold To Level " + i, + level: i, + exec: function (editor) { editor.session.foldToLevel(this.level); }, + scrollIntoView: "center", + readOnly: true + }); +} + +}); + +define("ace/line_widgets",["require","exports","module","ace/lib/dom"], function(require, exports, module){"use strict"; +var dom = require("./lib/dom"); +var LineWidgets = /** @class */ (function () { + function LineWidgets(session) { + this.session = session; + this.session.widgetManager = this; + this.session.getRowLength = this.getRowLength; + this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; + this.updateOnChange = this.updateOnChange.bind(this); + this.renderWidgets = this.renderWidgets.bind(this); + this.measureWidgets = this.measureWidgets.bind(this); + this.session._changedWidgets = []; + this.$onChangeEditor = this.$onChangeEditor.bind(this); + this.session.on("change", this.updateOnChange); + this.session.on("changeFold", this.updateOnFold); + this.session.on("changeEditor", this.$onChangeEditor); + } + LineWidgets.prototype.getRowLength = function (row) { + var h; + if (this.lineWidgets) + h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; + else + h = 0; + if (!this["$useWrapMode"] || !this["$wrapData"][row]) { + return 1 + h; + } + else { + return this["$wrapData"][row].length + 1 + h; + } + }; + LineWidgets.prototype.$getWidgetScreenLength = function () { + var screenRows = 0; + this.lineWidgets.forEach(function (w) { + if (w && w.rowCount && !w.hidden) + screenRows += w.rowCount; + }); + return screenRows; + }; + LineWidgets.prototype.$onChangeEditor = function (e) { + this.attach(e.editor); + }; + LineWidgets.prototype.attach = function (editor) { + if (editor && editor.widgetManager && editor.widgetManager != this) + editor.widgetManager.detach(); + if (this.editor == editor) + return; + this.detach(); + this.editor = editor; + if (editor) { + editor.widgetManager = this; + editor.renderer.on("beforeRender", this.measureWidgets); + editor.renderer.on("afterRender", this.renderWidgets); + } + }; + LineWidgets.prototype.detach = function (e) { + var editor = this.editor; + if (!editor) + return; + this.editor = null; + editor.widgetManager = null; + editor.renderer.off("beforeRender", this.measureWidgets); + editor.renderer.off("afterRender", this.renderWidgets); + var lineWidgets = this.session.lineWidgets; + lineWidgets && lineWidgets.forEach(function (w) { + if (w && w.el && w.el.parentNode) { + w._inDocument = false; + w.el.parentNode.removeChild(w.el); + } + }); + }; + LineWidgets.prototype.updateOnFold = function (e, session) { + var lineWidgets = session.lineWidgets; + if (!lineWidgets || !e.action) + return; + var fold = e.data; + var start = fold.start.row; + var end = fold.end.row; + var hide = e.action == "add"; + for (var i = start + 1; i < end; i++) { + if (lineWidgets[i]) + lineWidgets[i].hidden = hide; + } + if (lineWidgets[end]) { + if (hide) { + if (!lineWidgets[start]) + lineWidgets[start] = lineWidgets[end]; + else + lineWidgets[end].hidden = hide; + } + else { + if (lineWidgets[start] == lineWidgets[end]) + lineWidgets[start] = undefined; + lineWidgets[end].hidden = hide; + } + } + }; + LineWidgets.prototype.updateOnChange = function (delta) { + var lineWidgets = this.session.lineWidgets; + if (!lineWidgets) + return; + var startRow = delta.start.row; + var len = delta.end.row - startRow; + if (len === 0) { + } + else if (delta.action == "remove") { + var removed = lineWidgets.splice(startRow + 1, len); + if (!lineWidgets[startRow] && removed[removed.length - 1]) { + lineWidgets[startRow] = removed.pop(); + } + removed.forEach(function (w) { + w && this.removeLineWidget(w); + }, this); + this.$updateRows(); + } + else { + var args = new Array(len); + if (lineWidgets[startRow] && lineWidgets[startRow].column != null) { + if (delta.start.column > lineWidgets[startRow].column) + startRow++; + } + args.unshift(startRow, 0); + lineWidgets.splice.apply(lineWidgets, args); + this.$updateRows(); + } + }; + LineWidgets.prototype.$updateRows = function () { + var lineWidgets = this.session.lineWidgets; + if (!lineWidgets) + return; + var noWidgets = true; + lineWidgets.forEach(function (w, i) { + if (w) { + noWidgets = false; + w.row = i; + while (w.$oldWidget) { + w.$oldWidget.row = i; + w = w.$oldWidget; + } + } + }); + if (noWidgets) + this.session.lineWidgets = null; + }; + LineWidgets.prototype.$registerLineWidget = function (w) { + if (!this.session.lineWidgets) + this.session.lineWidgets = new Array(this.session.getLength()); + var old = this.session.lineWidgets[w.row]; + if (old) { + w.$oldWidget = old; + if (old.el && old.el.parentNode) { + old.el.parentNode.removeChild(old.el); + old._inDocument = false; + } + } + this.session.lineWidgets[w.row] = w; + return w; + }; + LineWidgets.prototype.addLineWidget = function (w) { + this.$registerLineWidget(w); + w.session = this.session; + if (!this.editor) + return w; + var renderer = this.editor.renderer; + if (w.html && !w.el) { + w.el = dom.createElement("div"); + w.el.innerHTML = w.html; + } + if (w.text && !w.el) { + w.el = dom.createElement("div"); + w.el.textContent = w.text; + } + if (w.el) { + dom.addCssClass(w.el, "ace_lineWidgetContainer"); + if (w.className) { + dom.addCssClass(w.el, w.className); + } + w.el.style.position = "absolute"; + w.el.style.zIndex = "5"; + renderer.container.appendChild(w.el); + w._inDocument = true; + if (!w.coverGutter) { + w.el.style.zIndex = "3"; + } + if (w.pixelHeight == null) { + w.pixelHeight = w.el.offsetHeight; + } + } + if (w.rowCount == null) { + w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; + } + var fold = this.session.getFoldAt(w.row, 0); + w.$fold = fold; + if (fold) { + var lineWidgets = this.session.lineWidgets; + if (w.row == fold.end.row && !lineWidgets[fold.start.row]) + lineWidgets[fold.start.row] = w; + else + w.hidden = true; + } + this.session._emit("changeFold", { data: { start: { row: w.row } } }); + this.$updateRows(); + this.renderWidgets(null, renderer); + this.onWidgetChanged(w); + return w; + }; + LineWidgets.prototype.removeLineWidget = function (w) { + w._inDocument = false; + w.session = null; + if (w.el && w.el.parentNode) + w.el.parentNode.removeChild(w.el); + if (w.editor && w.editor.destroy) + try { + w.editor.destroy(); + } + catch (e) { } + if (this.session.lineWidgets) { + var w1 = this.session.lineWidgets[w.row]; + if (w1 == w) { + this.session.lineWidgets[w.row] = w.$oldWidget; + if (w.$oldWidget) + this.onWidgetChanged(w.$oldWidget); + } + else { + while (w1) { + if (w1.$oldWidget == w) { + w1.$oldWidget = w.$oldWidget; + break; + } + w1 = w1.$oldWidget; + } + } + } + this.session._emit("changeFold", { data: { start: { row: w.row } } }); + this.$updateRows(); + }; + LineWidgets.prototype.getWidgetsAtRow = function (row) { + var lineWidgets = this.session.lineWidgets; + var w = lineWidgets && lineWidgets[row]; + var list = []; + while (w) { + list.push(w); + w = w.$oldWidget; + } + return list; + }; + LineWidgets.prototype.onWidgetChanged = function (w) { + this.session._changedWidgets.push(w); + this.editor && this.editor.renderer.updateFull(); + }; + LineWidgets.prototype.measureWidgets = function (e, renderer) { + var changedWidgets = this.session._changedWidgets; + var config = renderer.layerConfig; + if (!changedWidgets || !changedWidgets.length) + return; + var min = Infinity; + for (var i = 0; i < changedWidgets.length; i++) { + var w = changedWidgets[i]; + if (!w || !w.el) + continue; + if (w.session != this.session) + continue; + if (!w._inDocument) { + if (this.session.lineWidgets[w.row] != w) + continue; + w._inDocument = true; + renderer.container.appendChild(w.el); + } + w.h = w.el.offsetHeight; + if (!w.fixedWidth) { + w.w = w.el.offsetWidth; + w.screenWidth = Math.ceil(w.w / config.characterWidth); + } + var rowCount = w.h / config.lineHeight; + if (w.coverLine) { + rowCount -= this.session.getRowLineCount(w.row); + if (rowCount < 0) + rowCount = 0; + } + if (w.rowCount != rowCount) { + w.rowCount = rowCount; + if (w.row < min) + min = w.row; + } + } + if (min != Infinity) { + this.session._emit("changeFold", { data: { start: { row: min } } }); + this.session.lineWidgetWidth = null; + } + this.session._changedWidgets = []; + }; + LineWidgets.prototype.renderWidgets = function (e, renderer) { + var config = renderer.layerConfig; + var lineWidgets = this.session.lineWidgets; + if (!lineWidgets) + return; + var first = Math.min(this.firstRow, config.firstRow); + var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); + while (first > 0 && !lineWidgets[first]) + first--; + this.firstRow = config.firstRow; + this.lastRow = config.lastRow; + renderer.$cursorLayer.config = config; + for (var i = first; i <= last; i++) { + var w = lineWidgets[i]; + if (!w || !w.el) + continue; + if (w.hidden) { + w.el.style.top = -100 - (w.pixelHeight || 0) + "px"; + continue; + } + if (!w._inDocument) { + w._inDocument = true; + renderer.container.appendChild(w.el); + } + var top = renderer.$cursorLayer.getPixelPosition({ row: i, column: 0 }, true).top; + if (!w.coverLine) + top += config.lineHeight * this.session.getRowLineCount(w.row); + w.el.style.top = top - config.offset + "px"; + var left = w.coverGutter ? 0 : renderer.gutterWidth; + if (!w.fixedWidth) + left -= renderer.scrollLeft; + w.el.style.left = left + "px"; + if (w.fullWidth && w.screenWidth) { + w.el.style.minWidth = config.width + 2 * config.padding + "px"; + } + if (w.fixedWidth) { + w.el.style.right = renderer.scrollBar.getWidth() + "px"; + } + else { + w.el.style.right = ""; + } + } + }; + return LineWidgets; +}()); +exports.LineWidgets = LineWidgets; + +}); + +define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"], function(require, exports, module){"use strict"; +var keys = require('../lib/keys'); +var GutterTooltip = require("../mouse/default_gutter_handler").GutterTooltip; +var GutterKeyboardHandler = /** @class */ (function () { + function GutterKeyboardHandler(editor) { + this.editor = editor; + this.gutterLayer = editor.renderer.$gutterLayer; + this.element = editor.renderer.$gutter; + this.lines = editor.renderer.$gutterLayer.$lines; + this.activeRowIndex = null; + this.activeLane = null; + this.annotationTooltip = new GutterTooltip(this.editor); + } + GutterKeyboardHandler.prototype.addListener = function () { + this.element.addEventListener("keydown", this.$onGutterKeyDown.bind(this)); + this.element.addEventListener("focusout", this.$blurGutter.bind(this)); + this.editor.on("mousewheel", this.$blurGutter.bind(this)); + }; + GutterKeyboardHandler.prototype.removeListener = function () { + this.element.removeEventListener("keydown", this.$onGutterKeyDown.bind(this)); + this.element.removeEventListener("focusout", this.$blurGutter.bind(this)); + this.editor.off("mousewheel", this.$blurGutter.bind(this)); + }; + GutterKeyboardHandler.prototype.$onGutterKeyDown = function (e) { + if (this.annotationTooltip.isOpen) { + e.preventDefault(); + if (e.keyCode === keys["escape"]) + this.annotationTooltip.hideTooltip(); + return; + } + if (e.target === this.element) { + if (e.keyCode != keys["enter"]) { + return; + } + e.preventDefault(); + var row = this.editor.getCursorPosition().row; + if (!this.editor.isRowVisible(row)) + this.editor.scrollToLine(row, true, true); + setTimeout( + function () { + var index = this.$rowToRowIndex(this.gutterLayer.$cursorCell.row); + var nearestFoldIndex = this.$findNearestFoldWidget(index); + var nearestAnnotationIndex = this.$findNearestAnnotation(index); + if (nearestFoldIndex === null && nearestAnnotationIndex === null) + return; + if (nearestFoldIndex === null && nearestAnnotationIndex !== null) { + this.activeRowIndex = nearestAnnotationIndex; + this.activeLane = "annotation"; + this.$focusAnnotation(this.activeRowIndex); + return; + } + if (nearestFoldIndex !== null && nearestAnnotationIndex === null) { + this.activeRowIndex = nearestFoldIndex; + this.activeLane = "fold"; + this.$focusFoldWidget(this.activeRowIndex); + return; + } + if (Math.abs(nearestAnnotationIndex - index) < Math.abs(nearestFoldIndex - index)) { + this.activeRowIndex = nearestAnnotationIndex; + this.activeLane = "annotation"; + this.$focusAnnotation(this.activeRowIndex); + return; + } + else { + this.activeRowIndex = nearestFoldIndex; + this.activeLane = "fold"; + this.$focusFoldWidget(this.activeRowIndex); + return; + } + }.bind(this), 10); + return; + } + this.$handleGutterKeyboardInteraction(e); + setTimeout(function () { + this.editor._signal("gutterkeydown", new GutterKeyboardEvent(e, this)); + }.bind(this), 10); + }; + GutterKeyboardHandler.prototype.$handleGutterKeyboardInteraction = function (e) { + if (e.keyCode === keys["tab"]) { + e.preventDefault(); + return; + } + if (e.keyCode === keys["escape"]) { + e.preventDefault(); + this.$blurGutter(); + this.element.focus(); + this.lane = null; + return; + } + if (e.keyCode === keys["up"]) { + e.preventDefault(); + switch (this.activeLane) { + case "fold": + this.$moveFoldWidgetUp(); + break; + case "annotation": + this.$moveAnnotationUp(); + break; + } + return; + } + if (e.keyCode === keys["down"]) { + e.preventDefault(); + switch (this.activeLane) { + case "fold": + this.$moveFoldWidgetDown(); + break; + case "annotation": + this.$moveAnnotationDown(); + break; + } + return; + } + if (e.keyCode === keys["left"]) { + e.preventDefault(); + this.$switchLane("annotation"); + return; + } + if (e.keyCode === keys["right"]) { + e.preventDefault(); + this.$switchLane("fold"); + return; + } + if (e.keyCode === keys["enter"] || e.keyCode === keys["space"]) { + e.preventDefault(); + switch (this.activeLane) { + case "fold": + if (this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)] === 'start') { + var rowFoldingWidget = this.$rowIndexToRow(this.activeRowIndex); + this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex), e); + setTimeout( + function () { + if (this.$rowIndexToRow(this.activeRowIndex) !== rowFoldingWidget) { + this.$blurFoldWidget(this.activeRowIndex); + this.activeRowIndex = this.$rowToRowIndex(rowFoldingWidget); + this.$focusFoldWidget(this.activeRowIndex); + } + }.bind(this), 10); + break; + } + else if (this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)] === 'end') { + break; + } + return; + case "annotation": + var gutterElement = this.lines.cells[this.activeRowIndex].element.childNodes[2]; + var rect = gutterElement.getBoundingClientRect(); + var style = this.annotationTooltip.getElement().style; + style.left = rect.right + "px"; + style.top = rect.bottom + "px"; + this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)); + break; + } + return; + } + }; + GutterKeyboardHandler.prototype.$blurGutter = function () { + if (this.activeRowIndex !== null) { + switch (this.activeLane) { + case "fold": + this.$blurFoldWidget(this.activeRowIndex); + break; + case "annotation": + this.$blurAnnotation(this.activeRowIndex); + break; + } + } + if (this.annotationTooltip.isOpen) + this.annotationTooltip.hideTooltip(); + return; + }; + GutterKeyboardHandler.prototype.$isFoldWidgetVisible = function (index) { + var isRowFullyVisible = this.editor.isRowFullyVisible(this.$rowIndexToRow(index)); + var isIconVisible = this.$getFoldWidget(index).style.display !== "none"; + return isRowFullyVisible && isIconVisible; + }; + GutterKeyboardHandler.prototype.$isAnnotationVisible = function (index) { + var isRowFullyVisible = this.editor.isRowFullyVisible(this.$rowIndexToRow(index)); + var isIconVisible = this.$getAnnotation(index).style.display !== "none"; + return isRowFullyVisible && isIconVisible; + }; + GutterKeyboardHandler.prototype.$getFoldWidget = function (index) { + var cell = this.lines.get(index); + var element = cell.element; + return element.childNodes[1]; + }; + GutterKeyboardHandler.prototype.$getAnnotation = function (index) { + var cell = this.lines.get(index); + var element = cell.element; + return element.childNodes[2]; + }; + GutterKeyboardHandler.prototype.$findNearestFoldWidget = function (index) { + if (this.$isFoldWidgetVisible(index)) + return index; + var i = 0; + while (index - i > 0 || index + i < this.lines.getLength() - 1) { + i++; + if (index - i >= 0 && this.$isFoldWidgetVisible(index - i)) + return index - i; + if (index + i <= this.lines.getLength() - 1 && this.$isFoldWidgetVisible(index + i)) + return index + i; + } + return null; + }; + GutterKeyboardHandler.prototype.$findNearestAnnotation = function (index) { + if (this.$isAnnotationVisible(index)) + return index; + var i = 0; + while (index - i > 0 || index + i < this.lines.getLength() - 1) { + i++; + if (index - i >= 0 && this.$isAnnotationVisible(index - i)) + return index - i; + if (index + i <= this.lines.getLength() - 1 && this.$isAnnotationVisible(index + i)) + return index + i; + } + return null; + }; + GutterKeyboardHandler.prototype.$focusFoldWidget = function (index) { + if (index == null) + return; + var foldWidget = this.$getFoldWidget(index); + foldWidget.classList.add(this.editor.renderer.keyboardFocusClassName); + foldWidget.focus(); + }; + GutterKeyboardHandler.prototype.$focusAnnotation = function (index) { + if (index == null) + return; + var annotation = this.$getAnnotation(index); + annotation.classList.add(this.editor.renderer.keyboardFocusClassName); + annotation.focus(); + }; + GutterKeyboardHandler.prototype.$blurFoldWidget = function (index) { + var foldWidget = this.$getFoldWidget(index); + foldWidget.classList.remove(this.editor.renderer.keyboardFocusClassName); + foldWidget.blur(); + }; + GutterKeyboardHandler.prototype.$blurAnnotation = function (index) { + var annotation = this.$getAnnotation(index); + annotation.classList.remove(this.editor.renderer.keyboardFocusClassName); + annotation.blur(); + }; + GutterKeyboardHandler.prototype.$moveFoldWidgetUp = function () { + var index = this.activeRowIndex; + while (index > 0) { + index--; + if (this.$isFoldWidgetVisible(index)) { + this.$blurFoldWidget(this.activeRowIndex); + this.activeRowIndex = index; + this.$focusFoldWidget(this.activeRowIndex); + return; + } + } + return; + }; + GutterKeyboardHandler.prototype.$moveFoldWidgetDown = function () { + var index = this.activeRowIndex; + while (index < this.lines.getLength() - 1) { + index++; + if (this.$isFoldWidgetVisible(index)) { + this.$blurFoldWidget(this.activeRowIndex); + this.activeRowIndex = index; + this.$focusFoldWidget(this.activeRowIndex); + return; + } + } + return; + }; + GutterKeyboardHandler.prototype.$moveAnnotationUp = function () { + var index = this.activeRowIndex; + while (index > 0) { + index--; + if (this.$isAnnotationVisible(index)) { + this.$blurAnnotation(this.activeRowIndex); + this.activeRowIndex = index; + this.$focusAnnotation(this.activeRowIndex); + return; + } + } + return; + }; + GutterKeyboardHandler.prototype.$moveAnnotationDown = function () { + var index = this.activeRowIndex; + while (index < this.lines.getLength() - 1) { + index++; + if (this.$isAnnotationVisible(index)) { + this.$blurAnnotation(this.activeRowIndex); + this.activeRowIndex = index; + this.$focusAnnotation(this.activeRowIndex); + return; + } + } + return; + }; + GutterKeyboardHandler.prototype.$switchLane = function (desinationLane) { + switch (desinationLane) { + case "annotation": + if (this.activeLane === "annotation") { + break; + } + var annotationIndex = this.$findNearestAnnotation(this.activeRowIndex); + if (annotationIndex == null) { + break; + } + this.activeLane = "annotation"; + this.$blurFoldWidget(this.activeRowIndex); + this.activeRowIndex = annotationIndex; + this.$focusAnnotation(this.activeRowIndex); + break; + case "fold": + if (this.activeLane === "fold") { + break; + } + var foldWidgetIndex = this.$findNearestFoldWidget(this.activeRowIndex); + if (foldWidgetIndex == null) { + break; + } + this.activeLane = "fold"; + this.$blurAnnotation(this.activeRowIndex); + this.activeRowIndex = foldWidgetIndex; + this.$focusFoldWidget(this.activeRowIndex); + break; + } + return; + }; + GutterKeyboardHandler.prototype.$rowIndexToRow = function (index) { + var cell = this.lines.get(index); + if (cell) + return cell.row; + return null; + }; + GutterKeyboardHandler.prototype.$rowToRowIndex = function (row) { + for (var i = 0; i < this.lines.getLength(); i++) { + var cell = this.lines.get(i); + if (cell.row == row) + return i; + } + return null; + }; + return GutterKeyboardHandler; +}()); +exports.GutterKeyboardHandler = GutterKeyboardHandler; +var GutterKeyboardEvent = /** @class */ (function () { + function GutterKeyboardEvent(domEvent, gutterKeyboardHandler) { + this.gutterKeyboardHandler = gutterKeyboardHandler; + this.domEvent = domEvent; + } + GutterKeyboardEvent.prototype.getKey = function () { + return keys.keyCodeToString(this.domEvent.keyCode); + }; + GutterKeyboardEvent.prototype.getRow = function () { + return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex); + }; + GutterKeyboardEvent.prototype.isInAnnotationLane = function () { + return this.gutterKeyboardHandler.activeLane === "annotation"; + }; + GutterKeyboardEvent.prototype.isInFoldLane = function () { + return this.gutterKeyboardHandler.activeLane === "fold"; + }; + return GutterKeyboardEvent; +}()); +exports.GutterKeyboardEvent = GutterKeyboardEvent; + +}); + +define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"], function(require, exports, module){"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var oop = require("./lib/oop"); +var dom = require("./lib/dom"); +var lang = require("./lib/lang"); +var useragent = require("./lib/useragent"); +var TextInput = require("./keyboard/textinput").TextInput; +var MouseHandler = require("./mouse/mouse_handler").MouseHandler; +var FoldHandler = require("./mouse/fold_handler").FoldHandler; +var KeyBinding = require("./keyboard/keybinding").KeyBinding; +var EditSession = require("./edit_session").EditSession; +var Search = require("./search").Search; +var Range = require("./range").Range; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var CommandManager = require("./commands/command_manager").CommandManager; +var defaultCommands = require("./commands/default_commands").commands; +var config = require("./config"); +var TokenIterator = require("./token_iterator").TokenIterator; +var LineWidgets = require("./line_widgets").LineWidgets; +var GutterKeyboardHandler = require("./keyboard/gutter_handler").GutterKeyboardHandler; +var nls = require("./config").nls; +var clipboard = require("./clipboard"); +var keys = require('./lib/keys'); +var Editor = /** @class */ (function () { + function Editor(renderer, session, options) { this.session; + this.$toDestroy = []; + var container = renderer.getContainerElement(); + this.container = container; + this.renderer = renderer; + this.id = "editor" + (++Editor.$uid); + this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); + if (typeof document == "object") { + this.textInput = new TextInput(renderer.getTextAreaContainer(), this); + this.renderer.textarea = this.textInput.getElement(); + this.$mouseHandler = new MouseHandler(this); + new FoldHandler(this); + } + this.keyBinding = new KeyBinding(this); + this.$search = new Search().set({ + wrap: true + }); + this.$historyTracker = this.$historyTracker.bind(this); + this.commands.on("exec", this.$historyTracker); + this.$initOperationListeners(); + this._$emitInputEvent = lang.delayedCall(function () { + this._signal("input", {}); + if (this.session && !this.session.destroyed) + this.session.bgTokenizer.scheduleStart(); + }.bind(this)); + this.on("change", function (_, _self) { + _self._$emitInputEvent.schedule(31); + }); + this.setSession(session || options && options.session || new EditSession("")); + config.resetOptions(this); + if (options) + this.setOptions(options); + config._signal("editor", this); + } + Editor.prototype.$initOperationListeners = function () { + this.commands.on("exec", this.startOperation.bind(this), true); + this.commands.on("afterExec", this.endOperation.bind(this), true); + }; + Editor.prototype.startOperation = function (commandEvent) { + this.session.startOperation(commandEvent); + }; + Editor.prototype.endOperation = function (e) { + this.session.endOperation(e); + }; + Editor.prototype.onStartOperation = function (commandEvent) { + this.curOp = this.session.curOp; + this.curOp.scrollTop = this.renderer.scrollTop; + this.prevOp = this.session.prevOp; + if (!commandEvent) { + this.previousCommand = null; + } + }; + Editor.prototype.onEndOperation = function (e) { + if (this.curOp && this.session) { + if (e && e.returnValue === false) { + this.curOp = null; + return; + } + this._signal("beforeEndOperation"); + if (!this.curOp) + return; + var command = this.curOp.command; + var scrollIntoView = command && command.scrollIntoView; + if (scrollIntoView) { + switch (scrollIntoView) { + case "center-animate": + scrollIntoView = "animate"; + case "center": + this.renderer.scrollCursorIntoView(null, 0.5); + break; + case "animate": + case "cursor": + this.renderer.scrollCursorIntoView(); + break; + case "selectionPart": + var range = this.selection.getRange(); + var config = this.renderer.layerConfig; + if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { + this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); + } + break; + default: + break; + } + if (scrollIntoView == "animate") + this.renderer.animateScrolling(this.curOp.scrollTop); + } + this.$lastSel = this.session.selection.toJSON(); + this.prevOp = this.curOp; + this.curOp = null; + } + }; + Editor.prototype.$historyTracker = function (e) { + if (!this.$mergeUndoDeltas) + return; + var prev = this.prevOp; + var mergeableCommands = this.$mergeableCommands; + var shouldMerge = prev.command && (e.command.name == prev.command.name); + if (e.command.name == "insertstring") { + var text = e.args; + if (this.mergeNextCommand === undefined) + this.mergeNextCommand = true; + shouldMerge = shouldMerge + && this.mergeNextCommand // previous command allows to coalesce with + && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type + this.mergeNextCommand = true; + } + else { + shouldMerge = shouldMerge + && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable + } + if (this.$mergeUndoDeltas != "always" + && Date.now() - this.sequenceStartTime > 2000) { + shouldMerge = false; // the sequence is too long + } + if (shouldMerge) + this.session.mergeUndoDeltas = true; + else if (mergeableCommands.indexOf(e.command.name) !== -1) + this.sequenceStartTime = Date.now(); + }; + Editor.prototype.setKeyboardHandler = function (keyboardHandler, cb) { + if (keyboardHandler && typeof keyboardHandler === "string" && keyboardHandler != "ace") { + this.$keybindingId = keyboardHandler; + var _self = this; + config.loadModule(["keybinding", keyboardHandler], function (module) { + if (_self.$keybindingId == keyboardHandler) + _self.keyBinding.setKeyboardHandler(module && module.handler); + cb && cb(); + }); + } + else { + this.$keybindingId = null; + this.keyBinding.setKeyboardHandler(keyboardHandler); + cb && cb(); + } + }; + Editor.prototype.getKeyboardHandler = function () { + return this.keyBinding.getKeyboardHandler(); + }; + Editor.prototype.setSession = function (session) { + if (this.session == session) + return; + if (this.curOp) + this.endOperation(); + this.curOp = {}; + var oldSession = this.session; + if (oldSession) { + this.session.off("change", this.$onDocumentChange); + this.session.off("changeMode", this.$onChangeMode); + this.session.off("tokenizerUpdate", this.$onTokenizerUpdate); + this.session.off("changeTabSize", this.$onChangeTabSize); + this.session.off("changeWrapLimit", this.$onChangeWrapLimit); + this.session.off("changeWrapMode", this.$onChangeWrapMode); + this.session.off("changeFold", this.$onChangeFold); + this.session.off("changeFrontMarker", this.$onChangeFrontMarker); + this.session.off("changeBackMarker", this.$onChangeBackMarker); + this.session.off("changeBreakpoint", this.$onChangeBreakpoint); + this.session.off("changeAnnotation", this.$onChangeAnnotation); + this.session.off("changeOverwrite", this.$onCursorChange); + this.session.off("changeScrollTop", this.$onScrollTopChange); + this.session.off("changeScrollLeft", this.$onScrollLeftChange); + this.session.off("startOperation", this.$onStartOperation); + this.session.off("endOperation", this.$onEndOperation); + var selection = this.session.getSelection(); + selection.off("changeCursor", this.$onCursorChange); + selection.off("changeSelection", this.$onSelectionChange); + } + this.session = session; + if (session) { + this.$onDocumentChange = this.onDocumentChange.bind(this); + session.on("change", this.$onDocumentChange); + this.renderer.setSession(session); + this.$onChangeMode = this.onChangeMode.bind(this); + session.on("changeMode", this.$onChangeMode); + this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); + session.on("tokenizerUpdate", this.$onTokenizerUpdate); + this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); + session.on("changeTabSize", this.$onChangeTabSize); + this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); + session.on("changeWrapLimit", this.$onChangeWrapLimit); + this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); + session.on("changeWrapMode", this.$onChangeWrapMode); + this.$onChangeFold = this.onChangeFold.bind(this); + session.on("changeFold", this.$onChangeFold); + this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); + this.session.on("changeFrontMarker", this.$onChangeFrontMarker); + this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); + this.session.on("changeBackMarker", this.$onChangeBackMarker); + this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); + this.session.on("changeBreakpoint", this.$onChangeBreakpoint); + this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); + this.session.on("changeAnnotation", this.$onChangeAnnotation); + this.$onCursorChange = this.onCursorChange.bind(this); + this.session.on("changeOverwrite", this.$onCursorChange); + this.$onScrollTopChange = this.onScrollTopChange.bind(this); + this.session.on("changeScrollTop", this.$onScrollTopChange); + this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); + this.session.on("changeScrollLeft", this.$onScrollLeftChange); + this.selection = session.getSelection(); + this.selection.on("changeCursor", this.$onCursorChange); + this.$onSelectionChange = this.onSelectionChange.bind(this); + this.selection.on("changeSelection", this.$onSelectionChange); + this.$onStartOperation = this.onStartOperation.bind(this); + this.session.on("startOperation", this.$onStartOperation); + this.$onEndOperation = this.onEndOperation.bind(this); + this.session.on("endOperation", this.$onEndOperation); + this.onChangeMode(); + this.onCursorChange(); + this.onScrollTopChange(); + this.onScrollLeftChange(); + this.onSelectionChange(); + this.onChangeFrontMarker(); + this.onChangeBackMarker(); + this.onChangeBreakpoint(); + this.onChangeAnnotation(); + this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); + this.renderer.updateFull(); + } + else { + this.selection = null; + this.renderer.setSession(session); + } + this._signal("changeSession", { + session: session, + oldSession: oldSession + }); + this.curOp = null; + oldSession && oldSession._signal("changeEditor", { oldEditor: this }); + session && session._signal("changeEditor", { editor: this }); + if (session && !session.destroyed) + session.bgTokenizer.scheduleStart(); + }; + Editor.prototype.getSession = function () { + return this.session; + }; + Editor.prototype.setValue = function (val, cursorPos) { + this.session.doc.setValue(val); + if (!cursorPos) + this.selectAll(); + else if (cursorPos == 1) + this.navigateFileEnd(); + else if (cursorPos == -1) + this.navigateFileStart(); + return val; + }; + Editor.prototype.getValue = function () { + return this.session.getValue(); + }; + Editor.prototype.getSelection = function () { + return this.selection; + }; + Editor.prototype.resize = function (force) { + this.renderer.onResize(force); + }; + Editor.prototype.setTheme = function (theme, cb) { + this.renderer.setTheme(theme, cb); + }; + Editor.prototype.getTheme = function () { + return this.renderer.getTheme(); + }; + Editor.prototype.setStyle = function (style) { + this.renderer.setStyle(style); + }; + Editor.prototype.unsetStyle = function (style) { + this.renderer.unsetStyle(style); + }; + Editor.prototype.getFontSize = function () { + return this.getOption("fontSize") || + dom.computedStyle(this.container).fontSize; + }; + Editor.prototype.setFontSize = function (size) { + this.setOption("fontSize", size); + }; + Editor.prototype.$highlightBrackets = function () { + if (this.$highlightPending) { + return; + } + var self = this; + this.$highlightPending = true; + setTimeout(function () { + self.$highlightPending = false; + var session = self.session; + if (!session || session.destroyed) + return; + if (session.$bracketHighlight) { + session.$bracketHighlight.markerIds.forEach(function (id) { + session.removeMarker(id); + }); + session.$bracketHighlight = null; + } + var pos = self.getCursorPosition(); + var handler = self.getKeyboardHandler(); + var isBackwards = handler && handler.$getDirectionForHighlight && handler.$getDirectionForHighlight(self); + var ranges = session.getMatchingBracketRanges(pos, isBackwards); + if (!ranges) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (token && /\b(?:tag-open|tag-name)/.test(token.type)) { + var tagNamesRanges = session.getMatchingTags(pos); + if (tagNamesRanges) { + ranges = [ + tagNamesRanges.openTagName.isEmpty() ? tagNamesRanges.openTag : tagNamesRanges.openTagName, + tagNamesRanges.closeTagName.isEmpty() ? tagNamesRanges.closeTag : tagNamesRanges.closeTagName + ]; + } + } + } + if (!ranges && session.$mode.getMatching) + ranges = session.$mode.getMatching(self.session); + if (!ranges) { + if (self.getHighlightIndentGuides()) + self.renderer.$textLayer.$highlightIndentGuide(); + return; + } + var markerType = "ace_bracket"; + if (!Array.isArray(ranges)) { + ranges = [ranges]; + } + else if (ranges.length == 1) { + markerType = "ace_error_bracket"; + } + if (ranges.length == 2) { + if (Range.comparePoints(ranges[0].end, ranges[1].start) == 0) + ranges = [Range.fromPoints(ranges[0].start, ranges[1].end)]; + else if (Range.comparePoints(ranges[0].start, ranges[1].end) == 0) + ranges = [Range.fromPoints(ranges[1].start, ranges[0].end)]; + } + session.$bracketHighlight = { + ranges: ranges, + markerIds: ranges.map(function (range) { + return session.addMarker(range, markerType, "text"); + }) + }; + if (self.getHighlightIndentGuides()) + self.renderer.$textLayer.$highlightIndentGuide(); + }, 50); + }; + Editor.prototype.focus = function () { + this.textInput.focus(); + }; + Editor.prototype.isFocused = function () { + return this.textInput.isFocused(); + }; + Editor.prototype.blur = function () { + this.textInput.blur(); + }; + Editor.prototype.onFocus = function (e) { + if (this.$isFocused) + return; + this.$isFocused = true; + this.renderer.showCursor(); + this.renderer.visualizeFocus(); + this._emit("focus", e); + }; + Editor.prototype.onBlur = function (e) { + if (!this.$isFocused) + return; + this.$isFocused = false; + this.renderer.hideCursor(); + this.renderer.visualizeBlur(); + this._emit("blur", e); + }; + Editor.prototype.$cursorChange = function () { + this.renderer.updateCursor(); + this.$highlightBrackets(); + this.$updateHighlightActiveLine(); + }; + Editor.prototype.onDocumentChange = function (delta) { + var wrap = this.session.$useWrapMode; + var lastRow = (delta.start.row == delta.end.row ? delta.end.row : Infinity); + this.renderer.updateLines(delta.start.row, lastRow, wrap); + this._signal("change", delta); + this.$cursorChange(); + }; + Editor.prototype.onTokenizerUpdate = function (e) { + var rows = e.data; + this.renderer.updateLines(rows.first, rows.last); + }; + Editor.prototype.onScrollTopChange = function () { + this.renderer.scrollToY(this.session.getScrollTop()); + }; + Editor.prototype.onScrollLeftChange = function () { + this.renderer.scrollToX(this.session.getScrollLeft()); + }; + Editor.prototype.onCursorChange = function () { + this.$cursorChange(); + this._signal("changeSelection"); + }; + Editor.prototype.$updateHighlightActiveLine = function () { + var session = this.getSession(); + var highlight; + if (this.$highlightActiveLine) { + if (this.$selectionStyle != "line" || !this.selection.isMultiLine()) + highlight = this.getCursorPosition(); + if (this.renderer.theme && this.renderer.theme.$selectionColorConflict && !this.selection.isEmpty()) + highlight = false; + if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1)) + highlight = false; + } + if (session.$highlightLineMarker && !highlight) { + session.removeMarker(session.$highlightLineMarker.id); + session.$highlightLineMarker = null; + } + else if (!session.$highlightLineMarker && highlight) { + var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); + range.id = session.addMarker(range, "ace_active-line", "screenLine"); + session.$highlightLineMarker = range; + } + else if (highlight) { + session.$highlightLineMarker.start.row = highlight.row; + session.$highlightLineMarker.end.row = highlight.row; + session.$highlightLineMarker.start.column = highlight.column; + session._signal("changeBackMarker"); + } + }; + Editor.prototype.onSelectionChange = function (e) { + var session = this.session; + if (session.$selectionMarker) { + session.removeMarker(session.$selectionMarker); + } + session.$selectionMarker = null; + if (!this.selection.isEmpty()) { + var range = this.selection.getRange(); + var style = this.getSelectionStyle(); + session.$selectionMarker = session.addMarker(range, "ace_selection", style); + } + else { + this.$updateHighlightActiveLine(); + } + var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); + this.session.highlight(re); + this._signal("changeSelection"); + }; + Editor.prototype.$getSelectionHighLightRegexp = function () { + var session = this.session; + var selection = this.getSelectionRange(); + if (selection.isEmpty() || selection.isMultiLine()) + return; + var startColumn = selection.start.column; + var endColumn = selection.end.column; + var line = session.getLine(selection.start.row); + var needle = line.substring(startColumn, endColumn); + if (needle.length > 5000 || !/[\w\d]/.test(needle)) + return; + var re = this.$search.$assembleRegExp({ + wholeWord: true, + caseSensitive: true, + needle: needle + }); + var wordWithBoundary = line.substring(startColumn - 1, endColumn + 1); + if (!re.test(wordWithBoundary)) + return; + return re; + }; + Editor.prototype.onChangeFrontMarker = function () { + this.renderer.updateFrontMarkers(); + }; + Editor.prototype.onChangeBackMarker = function () { + this.renderer.updateBackMarkers(); + }; + Editor.prototype.onChangeBreakpoint = function () { + this.renderer.updateBreakpoints(); + }; + Editor.prototype.onChangeAnnotation = function () { + this.renderer.setAnnotations(this.session.getAnnotations()); + }; + Editor.prototype.onChangeMode = function (e) { + this.renderer.updateText(); + this._emit("changeMode", e); + }; + Editor.prototype.onChangeWrapLimit = function () { + this.renderer.updateFull(); + }; + Editor.prototype.onChangeWrapMode = function () { + this.renderer.onResize(true); + }; + Editor.prototype.onChangeFold = function () { + this.$updateHighlightActiveLine(); + this.renderer.updateFull(); + }; + Editor.prototype.getSelectedText = function () { + return this.session.getTextRange(this.getSelectionRange()); + }; + Editor.prototype.getCopyText = function () { + var text = this.getSelectedText(); + var nl = this.session.doc.getNewLineCharacter(); + var copyLine = false; + if (!text && this.$copyWithEmptySelection) { + copyLine = true; + var ranges = this.selection.getAllRanges(); + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (i && ranges[i - 1].start.row == range.start.row) + continue; + text += this.session.getLine(range.start.row) + nl; + } + } + var e = { text: text }; + this._signal("copy", e); + clipboard.lineMode = copyLine ? e.text : false; + return e.text; + }; + Editor.prototype.onCopy = function () { + this.commands.exec("copy", this); + }; + Editor.prototype.onCut = function () { + this.commands.exec("cut", this); + }; + Editor.prototype.onPaste = function (text, event) { + var e = { text: text, event: event }; + this.commands.exec("paste", this, e); + }; + Editor.prototype.$handlePaste = function (e) { + if (typeof e == "string") + e = { text: e }; + this._signal("paste", e); + var text = e.text; + var lineMode = text === clipboard.lineMode; + var session = this.session; + if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { + if (lineMode) + session.insert({ row: this.selection.lead.row, column: 0 }, text); + else + this.insert(text); + } + else if (lineMode) { + this.selection.rangeList.ranges.forEach(function (range) { + session.insert({ row: range.start.row, column: 0 }, text); + }); + } + else { + var lines = text.split(/\r\n|\r|\n/); + var ranges = this.selection.rangeList.ranges; + var isFullLine = lines.length == 2 && (!lines[0] || !lines[1]); + if (lines.length != ranges.length || isFullLine) + return this.commands.exec("insertstring", this, text); + for (var i = ranges.length; i--;) { + var range = ranges[i]; + if (!range.isEmpty()) + session.remove(range); + session.insert(range.start, lines[i]); + } + } + }; + Editor.prototype.execCommand = function (command, args) { + return this.commands.exec(command, this, args); + }; + Editor.prototype.insert = function (text, pasted) { + var session = this.session; + var mode = session.getMode(); + var cursor = this.getCursorPosition(); + if (this.getBehavioursEnabled() && !pasted) { + var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); + if (transform) { + if (text !== transform.text) { + if (!this.inVirtualSelectionMode) { + this.session.mergeUndoDeltas = false; + this.mergeNextCommand = false; + } + } + text = transform.text; + } + } + if (text == "\t") + text = this.session.getTabString(); + if (!this.selection.isEmpty()) { + var range = this.getSelectionRange(); + cursor = this.session.remove(range); + this.clearSelection(); + } + else if (this.session.getOverwrite() && text.indexOf("\n") == -1) { + var range = Range.fromPoints(cursor, cursor); + range.end.column += text.length; + this.session.remove(range); + } + if (text == "\n" || text == "\r\n") { + var line = session.getLine(cursor.row); + if (cursor.column > line.search(/\S|$/)) { + var d = line.substr(cursor.column).search(/\S|$/); + session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); + } + } + this.clearSelection(); + var start = cursor.column; + var lineState = session.getState(cursor.row); + var line = session.getLine(cursor.row); + var shouldOutdent = mode.checkOutdent(lineState, line, text); + session.insert(cursor, text); + if (transform && transform.selection) { + if (transform.selection.length == 2) { // Transform relative to the current column + this.selection.setSelectionRange(new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1])); + } + else { // Transform relative to the current row. + this.selection.setSelectionRange(new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3])); + } + } + if (this.$enableAutoIndent) { + if (session.getDocument().isNewLine(text)) { + var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); + session.insert({ row: cursor.row + 1, column: 0 }, lineIndent); + } + if (shouldOutdent) + mode.autoOutdent(lineState, session, cursor.row); + } + }; + Editor.prototype.autoIndent = function () { + var session = this.session; + var mode = session.getMode(); + var ranges = this.selection.isEmpty() + ? [new Range(0, 0, session.doc.getLength() - 1, 0)] + : this.selection.getAllRanges(); + var prevLineState = ""; + var prevLine = ""; + var lineIndent = ""; + var tab = session.getTabString(); + for (var i = 0; i < ranges.length; i++) { + var startRow = ranges[i].start.row; + var endRow = ranges[i].end.row; + for (var row = startRow; row <= endRow; row++) { + if (row > 0) { + prevLineState = session.getState(row - 1); + prevLine = session.getLine(row - 1); + lineIndent = mode.getNextLineIndent(prevLineState, prevLine, tab); + } + var line = session.getLine(row); + var currIndent = mode.$getIndent(line); + if (lineIndent !== currIndent) { + if (currIndent.length > 0) { + var range = new Range(row, 0, row, currIndent.length); + session.remove(range); + } + if (lineIndent.length > 0) { + session.insert({ row: row, column: 0 }, lineIndent); + } + } + mode.autoOutdent(prevLineState, session, row); + } + } + }; + Editor.prototype.onTextInput = function (text, composition) { + if (!composition) + return this.keyBinding.onTextInput(text); + this.startOperation({ command: { name: "insertstring" } }); + var applyComposition = this.applyComposition.bind(this, text, composition); + if (this.selection.rangeCount) + this.forEachSelection(applyComposition); + else + applyComposition(); + this.endOperation(); + }; + Editor.prototype.applyComposition = function (text, composition) { + if (composition.extendLeft || composition.extendRight) { + var r = this.selection.getRange(); + r.start.column -= composition.extendLeft; + r.end.column += composition.extendRight; + if (r.start.column < 0) { + r.start.row--; + r.start.column += this.session.getLine(r.start.row).length + 1; + } + this.selection.setRange(r); + if (!text && !r.isEmpty()) + this.remove(); + } + if (text || !this.selection.isEmpty()) + this.insert(text, true); + if (composition.restoreStart || composition.restoreEnd) { + var r = this.selection.getRange(); + r.start.column -= composition.restoreStart; + r.end.column -= composition.restoreEnd; + this.selection.setRange(r); + } + }; + Editor.prototype.onCommandKey = function (e, hashId, keyCode) { + return this.keyBinding.onCommandKey(e, hashId, keyCode); + }; + Editor.prototype.setOverwrite = function (overwrite) { + this.session.setOverwrite(overwrite); + }; + Editor.prototype.getOverwrite = function () { + return this.session.getOverwrite(); + }; + Editor.prototype.toggleOverwrite = function () { + this.session.toggleOverwrite(); + }; + Editor.prototype.setScrollSpeed = function (speed) { + this.setOption("scrollSpeed", speed); + }; + Editor.prototype.getScrollSpeed = function () { + return this.getOption("scrollSpeed"); + }; + Editor.prototype.setDragDelay = function (dragDelay) { + this.setOption("dragDelay", dragDelay); + }; + Editor.prototype.getDragDelay = function () { + return this.getOption("dragDelay"); + }; + Editor.prototype.setSelectionStyle = function (val) { + this.setOption("selectionStyle", val); + }; + Editor.prototype.getSelectionStyle = function () { + return this.getOption("selectionStyle"); + }; + Editor.prototype.setHighlightActiveLine = function (shouldHighlight) { + this.setOption("highlightActiveLine", shouldHighlight); + }; + Editor.prototype.getHighlightActiveLine = function () { + return this.getOption("highlightActiveLine"); + }; + Editor.prototype.setHighlightGutterLine = function (shouldHighlight) { + this.setOption("highlightGutterLine", shouldHighlight); + }; + Editor.prototype.getHighlightGutterLine = function () { + return this.getOption("highlightGutterLine"); + }; + Editor.prototype.setHighlightSelectedWord = function (shouldHighlight) { + this.setOption("highlightSelectedWord", shouldHighlight); + }; + Editor.prototype.getHighlightSelectedWord = function () { + return this.$highlightSelectedWord; + }; + Editor.prototype.setAnimatedScroll = function (shouldAnimate) { + this.renderer.setAnimatedScroll(shouldAnimate); + }; + Editor.prototype.getAnimatedScroll = function () { + return this.renderer.getAnimatedScroll(); + }; + Editor.prototype.setShowInvisibles = function (showInvisibles) { + this.renderer.setShowInvisibles(showInvisibles); + }; + Editor.prototype.getShowInvisibles = function () { + return this.renderer.getShowInvisibles(); + }; + Editor.prototype.setDisplayIndentGuides = function (display) { + this.renderer.setDisplayIndentGuides(display); + }; + Editor.prototype.getDisplayIndentGuides = function () { + return this.renderer.getDisplayIndentGuides(); + }; + Editor.prototype.setHighlightIndentGuides = function (highlight) { + this.renderer.setHighlightIndentGuides(highlight); + }; + Editor.prototype.getHighlightIndentGuides = function () { + return this.renderer.getHighlightIndentGuides(); + }; + Editor.prototype.setShowPrintMargin = function (showPrintMargin) { + this.renderer.setShowPrintMargin(showPrintMargin); + }; + Editor.prototype.getShowPrintMargin = function () { + return this.renderer.getShowPrintMargin(); + }; + Editor.prototype.setPrintMarginColumn = function (showPrintMargin) { + this.renderer.setPrintMarginColumn(showPrintMargin); + }; + Editor.prototype.getPrintMarginColumn = function () { + return this.renderer.getPrintMarginColumn(); + }; + Editor.prototype.setReadOnly = function (readOnly) { + this.setOption("readOnly", readOnly); + }; + Editor.prototype.getReadOnly = function () { + return this.getOption("readOnly"); + }; + Editor.prototype.setBehavioursEnabled = function (enabled) { + this.setOption("behavioursEnabled", enabled); + }; + Editor.prototype.getBehavioursEnabled = function () { + return this.getOption("behavioursEnabled"); + }; + Editor.prototype.setWrapBehavioursEnabled = function (enabled) { + this.setOption("wrapBehavioursEnabled", enabled); + }; + Editor.prototype.getWrapBehavioursEnabled = function () { + return this.getOption("wrapBehavioursEnabled"); + }; + Editor.prototype.setShowFoldWidgets = function (show) { + this.setOption("showFoldWidgets", show); + }; + Editor.prototype.getShowFoldWidgets = function () { + return this.getOption("showFoldWidgets"); + }; + Editor.prototype.setFadeFoldWidgets = function (fade) { + this.setOption("fadeFoldWidgets", fade); + }; + Editor.prototype.getFadeFoldWidgets = function () { + return this.getOption("fadeFoldWidgets"); + }; + Editor.prototype.remove = function (dir) { + if (this.selection.isEmpty()) { + if (dir == "left") + this.selection.selectLeft(); + else + this.selection.selectRight(); + } + var range = this.getSelectionRange(); + if (this.getBehavioursEnabled()) { + var session = this.session; + var state = session.getState(range.start.row); + var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); + if (range.end.column === 0) { + var text = session.getTextRange(range); + if (text[text.length - 1] == "\n") { + var line = session.getLine(range.end.row); + if (/^\s+$/.test(line)) { + range.end.column = line.length; + } + } + } + if (new_range) + range = new_range; + } + this.session.remove(range); + this.clearSelection(); + }; + Editor.prototype.removeWordRight = function () { + if (this.selection.isEmpty()) + this.selection.selectWordRight(); + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + Editor.prototype.removeWordLeft = function () { + if (this.selection.isEmpty()) + this.selection.selectWordLeft(); + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + Editor.prototype.removeToLineStart = function () { + if (this.selection.isEmpty()) + this.selection.selectLineStart(); + if (this.selection.isEmpty()) + this.selection.selectLeft(); + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + Editor.prototype.removeToLineEnd = function () { + if (this.selection.isEmpty()) + this.selection.selectLineEnd(); + var range = this.getSelectionRange(); + if (range.start.column == range.end.column && range.start.row == range.end.row) { + range.end.column = 0; + range.end.row++; + } + this.session.remove(range); + this.clearSelection(); + }; + Editor.prototype.splitLine = function () { + if (!this.selection.isEmpty()) { + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + } + var cursor = this.getCursorPosition(); + this.insert("\n"); + this.moveCursorToPosition(cursor); + }; + Editor.prototype.setGhostText = function (text, position) { + if (!this.session.widgetManager) { + this.session.widgetManager = new LineWidgets(this.session); + this.session.widgetManager.attach(this); + } + this.renderer.setGhostText(text, position); + }; + Editor.prototype.removeGhostText = function () { + if (!this.session.widgetManager) + return; + this.renderer.removeGhostText(); + }; + Editor.prototype.transposeLetters = function () { + if (!this.selection.isEmpty()) { + return; + } + var cursor = this.getCursorPosition(); + var column = cursor.column; + if (column === 0) + return; + var line = this.session.getLine(cursor.row); + var swap, range; + if (column < line.length) { + swap = line.charAt(column) + line.charAt(column - 1); + range = new Range(cursor.row, column - 1, cursor.row, column + 1); + } + else { + swap = line.charAt(column - 1) + line.charAt(column - 2); + range = new Range(cursor.row, column - 2, cursor.row, column); + } + this.session.replace(range, swap); + this.session.selection.moveToPosition(range.end); + }; + Editor.prototype.toLowerCase = function () { + var originalRange = this.getSelectionRange(); + if (this.selection.isEmpty()) { + this.selection.selectWord(); + } + var range = this.getSelectionRange(); + var text = this.session.getTextRange(range); + this.session.replace(range, text.toLowerCase()); + this.selection.setSelectionRange(originalRange); + }; + Editor.prototype.toUpperCase = function () { + var originalRange = this.getSelectionRange(); + if (this.selection.isEmpty()) { + this.selection.selectWord(); + } + var range = this.getSelectionRange(); + var text = this.session.getTextRange(range); + this.session.replace(range, text.toUpperCase()); + this.selection.setSelectionRange(originalRange); + }; + Editor.prototype.indent = function () { + var session = this.session; + var range = this.getSelectionRange(); + if (range.start.row < range.end.row) { + var rows = this.$getSelectedRows(); + session.indentRows(rows.first, rows.last, "\t"); + return; + } + else if (range.start.column < range.end.column) { + var text = session.getTextRange(range); + if (!/^\s+$/.test(text)) { + var rows = this.$getSelectedRows(); + session.indentRows(rows.first, rows.last, "\t"); + return; + } + } + var line = session.getLine(range.start.row); + var position = range.start; + var size = session.getTabSize(); + var column = session.documentToScreenColumn(position.row, position.column); + if (this.session.getUseSoftTabs()) { + var count = (size - column % size); + var indentString = lang.stringRepeat(" ", count); + } + else { + var count = column % size; + while (line[range.start.column - 1] == " " && count) { + range.start.column--; + count--; + } + this.selection.setSelectionRange(range); + indentString = "\t"; + } + return this.insert(indentString); + }; + Editor.prototype.blockIndent = function () { + var rows = this.$getSelectedRows(); + this.session.indentRows(rows.first, rows.last, "\t"); + }; + Editor.prototype.blockOutdent = function () { + var selection = this.session.getSelection(); + this.session.outdentRows(selection.getRange()); + }; + Editor.prototype.sortLines = function () { + var rows = this.$getSelectedRows(); + var session = this.session; + var lines = []; + for (var i = rows.first; i <= rows.last; i++) + lines.push(session.getLine(i)); + lines.sort(function (a, b) { + if (a.toLowerCase() < b.toLowerCase()) + return -1; + if (a.toLowerCase() > b.toLowerCase()) + return 1; + return 0; + }); + var deleteRange = new Range(0, 0, 0, 0); + for (var i = rows.first; i <= rows.last; i++) { + var line = session.getLine(i); + deleteRange.start.row = i; + deleteRange.end.row = i; + deleteRange.end.column = line.length; + session.replace(deleteRange, lines[i - rows.first]); + } + }; + Editor.prototype.toggleCommentLines = function () { + var state = this.session.getState(this.getCursorPosition().row); + var rows = this.$getSelectedRows(); + this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); + }; + Editor.prototype.toggleBlockComment = function () { + var cursor = this.getCursorPosition(); + var state = this.session.getState(cursor.row); + var range = this.getSelectionRange(); + this.session.getMode().toggleBlockComment(state, this.session, range, cursor); + }; + Editor.prototype.getNumberAt = function (row, column) { + var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; + _numberRx.lastIndex = 0; + var s = this.session.getLine(row); + while (_numberRx.lastIndex < column) { + var m = _numberRx.exec(s); + if (m.index <= column && m.index + m[0].length >= column) { + var number = { + value: m[0], + start: m.index, + end: m.index + m[0].length + }; + return number; + } + } + return null; + }; + Editor.prototype.modifyNumber = function (amount) { + var row = this.selection.getCursor().row; + var column = this.selection.getCursor().column; + var charRange = new Range(row, column - 1, row, column); + var c = this.session.getTextRange(charRange); + if (!isNaN(parseFloat(c)) && isFinite(c)) { + var nr = this.getNumberAt(row, column); + if (nr) { + var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; + var decimals = nr.start + nr.value.length - fp; + var t = parseFloat(nr.value); + t *= Math.pow(10, decimals); + if (fp !== nr.end && column < fp) { + amount *= Math.pow(10, nr.end - column - 1); + } + else { + amount *= Math.pow(10, nr.end - column); + } + t += amount; + t /= Math.pow(10, decimals); + var nnr = t.toFixed(decimals); + var replaceRange = new Range(row, nr.start, row, nr.end); + this.session.replace(replaceRange, nnr); + this.moveCursorTo(row, Math.max(nr.start + 1, column + nnr.length - nr.value.length)); + } + } + else { + this.toggleWord(); + } + }; + Editor.prototype.toggleWord = function () { + var row = this.selection.getCursor().row; + var column = this.selection.getCursor().column; + this.selection.selectWord(); + var currentState = this.getSelectedText(); + var currWordStart = this.selection.getWordRange().start.column; + var wordParts = currentState.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, '$1 ').split(/\s/); + var delta = column - currWordStart - 1; + if (delta < 0) + delta = 0; + var curLength = 0, itLength = 0; + var that = this; + if (currentState.match(/[A-Za-z0-9_]+/)) { + wordParts.forEach(function (item, i) { + itLength = curLength + item.length; + if (delta >= curLength && delta <= itLength) { + currentState = item; + that.selection.clearSelection(); + that.moveCursorTo(row, curLength + currWordStart); + that.selection.selectTo(row, itLength + currWordStart); + } + curLength = itLength; + }); + } + var wordPairs = this.$toggleWordPairs; + var reg; + for (var i = 0; i < wordPairs.length; i++) { + var item = wordPairs[i]; + for (var j = 0; j <= 1; j++) { + var negate = +!j; + var firstCondition = currentState.match(new RegExp('^\\s?_?(' + lang.escapeRegExp(item[j]) + ')\\s?$', 'i')); + if (firstCondition) { + var secondCondition = currentState.match(new RegExp('([_]|^|\\s)(' + lang.escapeRegExp(firstCondition[1]) + ')($|\\s)', 'g')); + if (secondCondition) { + reg = currentState.replace(new RegExp(lang.escapeRegExp(item[j]), 'i'), function (result) { + var res = item[negate]; + if (result.toUpperCase() == result) { + res = res.toUpperCase(); + } + else if (result.charAt(0).toUpperCase() == result.charAt(0)) { + res = res.substr(0, 0) + item[negate].charAt(0).toUpperCase() + res.substr(1); + } + return res; + }); + this.insert(reg); + reg = ""; + } + } + } + } + }; + Editor.prototype.findLinkAt = function (row, column) { + var e_1, _a; + var line = this.session.getLine(row); + var wordParts = line.split(/((?:https?|ftp):\/\/[\S]+)/); + var columnPosition = column; + if (columnPosition < 0) + columnPosition = 0; + var previousPosition = 0, currentPosition = 0, match; + try { + for (var wordParts_1 = __values(wordParts), wordParts_1_1 = wordParts_1.next(); !wordParts_1_1.done; wordParts_1_1 = wordParts_1.next()) { + var item = wordParts_1_1.value; + currentPosition = previousPosition + item.length; + if (columnPosition >= previousPosition && columnPosition <= currentPosition) { + if (item.match(/((?:https?|ftp):\/\/[\S]+)/)) { + match = item.replace(/[\s:.,'";}\]]+$/, ""); + break; + } + } + previousPosition = currentPosition; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (wordParts_1_1 && !wordParts_1_1.done && (_a = wordParts_1.return)) _a.call(wordParts_1); + } + finally { if (e_1) throw e_1.error; } + } + return match; + }; + Editor.prototype.openLink = function () { + var cursor = this.selection.getCursor(); + var url = this.findLinkAt(cursor.row, cursor.column); + if (url) + window.open(url, '_blank'); + return url != null; + }; + Editor.prototype.removeLines = function () { + var rows = this.$getSelectedRows(); + this.session.removeFullLines(rows.first, rows.last); + this.clearSelection(); + }; + Editor.prototype.duplicateSelection = function () { + var sel = this.selection; + var doc = this.session; + var range = sel.getRange(); + var reverse = sel.isBackwards(); + if (range.isEmpty()) { + var row = range.start.row; + doc.duplicateLines(row, row); + } + else { + var point = reverse ? range.start : range.end; + var endPoint = doc.insert(point, doc.getTextRange(range)); + range.start = point; + range.end = endPoint; + sel.setSelectionRange(range, reverse); + } + }; + Editor.prototype.moveLinesDown = function () { + this.$moveLines(1, false); + }; + Editor.prototype.moveLinesUp = function () { + this.$moveLines(-1, false); + }; + Editor.prototype.moveText = function (range, toPosition, copy) { + return this.session.moveText(range, toPosition, copy); + }; + Editor.prototype.copyLinesUp = function () { + this.$moveLines(-1, true); + }; + Editor.prototype.copyLinesDown = function () { + this.$moveLines(1, true); + }; + Editor.prototype.$moveLines = function (dir, copy) { + var rows, moved; + var selection = this.selection; + if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { + var range = selection.toOrientedRange(); + rows = this.$getSelectedRows(range); + moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); + if (copy && dir == -1) + moved = 0; + range.moveBy(moved, 0); + selection.fromOrientedRange(range); + } + else { + var ranges = selection.rangeList.ranges; + selection.rangeList.detach(this.session); + this.inVirtualSelectionMode = true; + var diff = 0; + var totalDiff = 0; + var l = ranges.length; + for (var i = 0; i < l; i++) { + var rangeIndex = i; + ranges[i].moveBy(diff, 0); + rows = this.$getSelectedRows(ranges[i]); + var first = rows.first; + var last = rows.last; + while (++i < l) { + if (totalDiff) + ranges[i].moveBy(totalDiff, 0); + var subRows = this.$getSelectedRows(ranges[i]); + if (copy && subRows.first != last) + break; + else if (!copy && subRows.first > last + 1) + break; + last = subRows.last; + } + i--; + diff = this.session.$moveLines(first, last, copy ? 0 : dir); + if (copy && dir == -1) + rangeIndex = i + 1; + while (rangeIndex <= i) { + ranges[rangeIndex].moveBy(diff, 0); + rangeIndex++; + } + if (!copy) + diff = 0; + totalDiff += diff; + } + selection.fromOrientedRange(selection.ranges[0]); + selection.rangeList.attach(this.session); + this.inVirtualSelectionMode = false; + } + }; + Editor.prototype.$getSelectedRows = function (range) { + range = (range || this.getSelectionRange()).collapseRows(); + return { + first: this.session.getRowFoldStart(range.start.row), + last: this.session.getRowFoldEnd(range.end.row) + }; + }; + Editor.prototype.onCompositionStart = function (compositionState) { + this.renderer.showComposition(compositionState); + }; + Editor.prototype.onCompositionUpdate = function (text) { + this.renderer.setCompositionText(text); + }; + Editor.prototype.onCompositionEnd = function () { + this.renderer.hideComposition(); + }; + Editor.prototype.getFirstVisibleRow = function () { + return this.renderer.getFirstVisibleRow(); + }; + Editor.prototype.getLastVisibleRow = function () { + return this.renderer.getLastVisibleRow(); + }; + Editor.prototype.isRowVisible = function (row) { + return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); + }; + Editor.prototype.isRowFullyVisible = function (row) { + return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); + }; + Editor.prototype.$getVisibleRowCount = function () { + return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; + }; + Editor.prototype.$moveByPage = function (dir, select) { + var renderer = this.renderer; + var config = this.renderer.layerConfig; + var rows = dir * Math.floor(config.height / config.lineHeight); + if (select === true) { + this.selection.$moveSelection(function () { + this.moveCursorBy(rows, 0); + }); + } + else if (select === false) { + this.selection.moveCursorBy(rows, 0); + this.selection.clearSelection(); + } + var scrollTop = renderer.scrollTop; + renderer.scrollBy(0, rows * config.lineHeight); + if (select != null) + renderer.scrollCursorIntoView(null, 0.5); + renderer.animateScrolling(scrollTop); + }; + Editor.prototype.selectPageDown = function () { + this.$moveByPage(1, true); + }; + Editor.prototype.selectPageUp = function () { + this.$moveByPage(-1, true); + }; + Editor.prototype.gotoPageDown = function () { + this.$moveByPage(1, false); + }; + Editor.prototype.gotoPageUp = function () { + this.$moveByPage(-1, false); + }; + Editor.prototype.scrollPageDown = function () { + this.$moveByPage(1); + }; + Editor.prototype.scrollPageUp = function () { + this.$moveByPage(-1); + }; + Editor.prototype.scrollToRow = function (row) { + this.renderer.scrollToRow(row); + }; + Editor.prototype.scrollToLine = function (line, center, animate, callback) { + this.renderer.scrollToLine(line, center, animate, callback); + }; + Editor.prototype.centerSelection = function () { + var range = this.getSelectionRange(); + var pos = { + row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), + column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) + }; + this.renderer.alignCursor(pos, 0.5); + }; + Editor.prototype.getCursorPosition = function () { + return this.selection.getCursor(); + }; + Editor.prototype.getCursorPositionScreen = function () { + return this.session.documentToScreenPosition(this.getCursorPosition()); + }; + Editor.prototype.getSelectionRange = function () { + return this.selection.getRange(); + }; + Editor.prototype.selectAll = function () { + this.selection.selectAll(); + }; + Editor.prototype.clearSelection = function () { + this.selection.clearSelection(); + }; + Editor.prototype.moveCursorTo = function (row, column) { + this.selection.moveCursorTo(row, column); + }; + Editor.prototype.moveCursorToPosition = function (pos) { + this.selection.moveCursorToPosition(pos); + }; + Editor.prototype.jumpToMatching = function (select, expand) { + var cursor = this.getCursorPosition(); + var iterator = new TokenIterator(this.session, cursor.row, cursor.column); + var prevToken = iterator.getCurrentToken(); + var tokenCount = 0; + if (prevToken && prevToken.type.indexOf('tag-name') !== -1) { + prevToken = iterator.stepBackward(); + } + var token = prevToken || iterator.stepForward(); + if (!token) + return; + var matchType; + var found = false; + var depth = {}; + var i = cursor.column - token.start; + var bracketType; + var brackets = { + ")": "(", + "(": "(", + "]": "[", + "[": "[", + "{": "{", + "}": "{" + }; + do { + if (token.value.match(/[{}()\[\]]/g)) { + for (; i < token.value.length && !found; i++) { + if (!brackets[token.value[i]]) { + continue; + } + bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); + if (isNaN(depth[bracketType])) { + depth[bracketType] = 0; + } + switch (token.value[i]) { + case '(': + case '[': + case '{': + depth[bracketType]++; + break; + case ')': + case ']': + case '}': + depth[bracketType]--; + if (depth[bracketType] === -1) { + matchType = 'bracket'; + found = true; + } + break; + } + } + } + else if (token.type.indexOf('tag-name') !== -1) { + if (isNaN(depth[token.value])) { + depth[token.value] = 0; + } + if (prevToken.value === '<' && tokenCount > 1) { + depth[token.value]++; + } + else if (prevToken.value === '= 0; --i) { + if (this.$tryReplace(ranges[i], replacement)) { + replaced++; + } + } + this.selection.setSelectionRange(selection); + return replaced; + }; + Editor.prototype.$tryReplace = function (range, replacement) { + var input = this.session.getTextRange(range); + replacement = this.$search.replace(input, replacement); + if (replacement !== null) { + range.end = this.session.replace(range, replacement); + return range; + } + else { + return null; + } + }; + Editor.prototype.getLastSearchOptions = function () { + return this.$search.getOptions(); + }; + Editor.prototype.find = function (needle, options, animate) { + if (!options) + options = {}; + if (typeof needle == "string" || needle instanceof RegExp) + options.needle = needle; + else if (typeof needle == "object") + oop.mixin(options, needle); + var range = this.selection.getRange(); + if (options.needle == null) { + needle = this.session.getTextRange(range) + || this.$search.$options.needle; + if (!needle) { + range = this.session.getWordRange(range.start.row, range.start.column); + needle = this.session.getTextRange(range); + } + this.$search.set({ needle: needle }); + } + this.$search.set(options); + if (!options.start) + this.$search.set({ start: range }); + var newRange = this.$search.find(this.session); + if (options.preventScroll) + return newRange; + if (newRange) { + this.revealRange(newRange, animate); + return newRange; + } + if (options.backwards) + range.start = range.end; + else + range.end = range.start; + this.selection.setRange(range); + }; + Editor.prototype.findNext = function (options, animate) { + this.find({ skipCurrent: true, backwards: false }, options, animate); + }; + Editor.prototype.findPrevious = function (options, animate) { + this.find(options, { skipCurrent: true, backwards: true }, animate); + }; + Editor.prototype.revealRange = function (range, animate) { + this.session.unfold(range); + this.selection.setSelectionRange(range); + var scrollTop = this.renderer.scrollTop; + this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); + if (animate !== false) + this.renderer.animateScrolling(scrollTop); + }; + Editor.prototype.undo = function () { + this.session.getUndoManager().undo(this.session); + this.renderer.scrollCursorIntoView(null, 0.5); + }; + Editor.prototype.redo = function () { + this.session.getUndoManager().redo(this.session); + this.renderer.scrollCursorIntoView(null, 0.5); + }; + Editor.prototype.destroy = function () { + if (this.$toDestroy) { + this.$toDestroy.forEach(function (el) { + el.destroy(); + }); + this.$toDestroy = null; + } + if (this.$mouseHandler) + this.$mouseHandler.destroy(); + this.renderer.destroy(); + this._signal("destroy", this); + if (this.session) + this.session.destroy(); + if (this._$emitInputEvent) + this._$emitInputEvent.cancel(); + this.removeAllListeners(); + }; + Editor.prototype.setAutoScrollEditorIntoView = function (enable) { + if (!enable) + return; + var rect; + var self = this; + var shouldScroll = false; + if (!this.$scrollAnchor) + this.$scrollAnchor = document.createElement("div"); + var scrollAnchor = this.$scrollAnchor; + scrollAnchor.style.cssText = "position:absolute"; + this.container.insertBefore(scrollAnchor, this.container.firstChild); + var onChangeSelection = this.on("changeSelection", function () { + shouldScroll = true; + }); + var onBeforeRender = this.renderer.on("beforeRender", function () { + if (shouldScroll) + rect = self.renderer.container.getBoundingClientRect(); + }); + var onAfterRender = this.renderer.on("afterRender", function () { + if (shouldScroll && rect && (self.isFocused() + || self.searchBox && self.searchBox.isFocused())) { + var renderer = self.renderer; + var pos = renderer.$cursorLayer.$pixelPos; + var config = renderer.layerConfig; + var top = pos.top - config.offset; + if (pos.top >= 0 && top + rect.top < 0) { + shouldScroll = true; + } + else if (pos.top < config.height && + pos.top + rect.top + config.lineHeight > window.innerHeight) { + shouldScroll = false; + } + else { + shouldScroll = null; + } + if (shouldScroll != null) { + scrollAnchor.style.top = top + "px"; + scrollAnchor.style.left = pos.left + "px"; + scrollAnchor.style.height = config.lineHeight + "px"; + scrollAnchor.scrollIntoView(shouldScroll); + } + shouldScroll = rect = null; + } + }); + this.setAutoScrollEditorIntoView = function (enable) { + if (enable) + return; + delete this.setAutoScrollEditorIntoView; + this.off("changeSelection", onChangeSelection); + this.renderer.off("afterRender", onAfterRender); + this.renderer.off("beforeRender", onBeforeRender); + }; + }; + Editor.prototype.$resetCursorStyle = function () { + var style = this.$cursorStyle || "ace"; + var cursorLayer = this.renderer.$cursorLayer; + if (!cursorLayer) + return; + cursorLayer.setSmoothBlinking(/smooth/.test(style)); + cursorLayer.isBlinking = !this.$readOnly && style != "wide"; + dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); + }; + Editor.prototype.prompt = function (message, options, callback) { + var editor = this; + config.loadModule("ace/ext/prompt", function (module) { + module.prompt(editor, message, options, callback); + }); + }; + return Editor; +}()); +Editor.$uid = 0; +Editor.prototype.curOp = null; +Editor.prototype.prevOp = {}; +Editor.prototype.$mergeableCommands = ["backspace", "del", "insertstring"]; +Editor.prototype.$toggleWordPairs = [ + ["first", "last"], + ["true", "false"], + ["yes", "no"], + ["width", "height"], + ["top", "bottom"], + ["right", "left"], + ["on", "off"], + ["x", "y"], + ["get", "set"], + ["max", "min"], + ["horizontal", "vertical"], + ["show", "hide"], + ["add", "remove"], + ["up", "down"], + ["before", "after"], + ["even", "odd"], + ["in", "out"], + ["inside", "outside"], + ["next", "previous"], + ["increase", "decrease"], + ["attach", "detach"], + ["&&", "||"], + ["==", "!="] +]; +oop.implement(Editor.prototype, EventEmitter); +config.defineOptions(Editor.prototype, "editor", { + selectionStyle: { + set: function (style) { + this.onSelectionChange(); + this._signal("changeSelectionStyle", { data: style }); + }, + initialValue: "line" + }, + highlightActiveLine: { + set: function () { this.$updateHighlightActiveLine(); }, + initialValue: true + }, + highlightSelectedWord: { + set: function (shouldHighlight) { this.$onSelectionChange(); }, + initialValue: true + }, + readOnly: { + set: function (readOnly) { + this.textInput.setReadOnly(readOnly); + this.$resetCursorStyle(); + }, + initialValue: false + }, + copyWithEmptySelection: { + set: function (value) { + this.textInput.setCopyWithEmptySelection(value); + }, + initialValue: false + }, + cursorStyle: { + set: function (val) { this.$resetCursorStyle(); }, + values: ["ace", "slim", "smooth", "wide"], + initialValue: "ace" + }, + mergeUndoDeltas: { + values: [false, true, "always"], + initialValue: true + }, + behavioursEnabled: { initialValue: true }, + wrapBehavioursEnabled: { initialValue: true }, + enableAutoIndent: { initialValue: true }, + autoScrollEditorIntoView: { + set: function (val) { this.setAutoScrollEditorIntoView(val); } + }, + keyboardHandler: { + set: function (val) { this.setKeyboardHandler(val); }, + get: function () { return this.$keybindingId; }, + handlesSet: true + }, + value: { + set: function (val) { this.session.setValue(val); }, + get: function () { return this.getValue(); }, + handlesSet: true, + hidden: true + }, + session: { + set: function (val) { this.setSession(val); }, + get: function () { return this.session; }, + handlesSet: true, + hidden: true + }, + showLineNumbers: { + set: function (show) { + this.renderer.$gutterLayer.setShowLineNumbers(show); + this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER); + if (show && this.$relativeLineNumbers) + relativeNumberRenderer.attach(this); + else + relativeNumberRenderer.detach(this); + }, + initialValue: true + }, + relativeLineNumbers: { + set: function (value) { + if (this.$showLineNumbers && value) + relativeNumberRenderer.attach(this); + else + relativeNumberRenderer.detach(this); + } + }, + placeholder: { + set: function (message) { + if (!this.$updatePlaceholder) { + this.$updatePlaceholder = function () { + var hasValue = this.session && (this.renderer.$composition || + this.session.getLength() > 1 || this.session.getLine(0).length > 0); + if (hasValue && this.renderer.placeholderNode) { + this.renderer.off("afterRender", this.$updatePlaceholder); + dom.removeCssClass(this.container, "ace_hasPlaceholder"); + this.renderer.placeholderNode.remove(); + this.renderer.placeholderNode = null; + } + else if (!hasValue && !this.renderer.placeholderNode) { + this.renderer.on("afterRender", this.$updatePlaceholder); + dom.addCssClass(this.container, "ace_hasPlaceholder"); + var el = dom.createElement("div"); + el.className = "ace_placeholder"; + el.textContent = this.$placeholder || ""; + this.renderer.placeholderNode = el; + this.renderer.content.appendChild(this.renderer.placeholderNode); + } + else if (!hasValue && this.renderer.placeholderNode) { + this.renderer.placeholderNode.textContent = this.$placeholder || ""; + } + }.bind(this); + this.on("input", this.$updatePlaceholder); + } + this.$updatePlaceholder(); + } + }, + enableKeyboardAccessibility: { + set: function (value) { + var blurCommand = { + name: "blurTextInput", + description: "Set focus to the editor content div to allow tabbing through the page", + bindKey: "Esc", + exec: function (editor) { + editor.blur(); + editor.renderer.scroller.focus(); + }, + readOnly: true + }; + var focusOnEnterKeyup = function (e) { + if (e.target == this.renderer.scroller && e.keyCode === keys['enter']) { + e.preventDefault(); + var row = this.getCursorPosition().row; + if (!this.isRowVisible(row)) + this.scrollToLine(row, true, true); + this.focus(); + } + }; + var gutterKeyboardHandler; + if (value) { + this.renderer.enableKeyboardAccessibility = true; + this.renderer.keyboardFocusClassName = "ace_keyboard-focus"; + this.textInput.getElement().setAttribute("tabindex", -1); + this.textInput.setNumberOfExtraLines(useragent.isWin ? 3 : 0); + this.renderer.scroller.setAttribute("tabindex", 0); + this.renderer.scroller.setAttribute("role", "group"); + this.renderer.scroller.setAttribute("aria-roledescription", nls("editor.scroller.aria-roledescription", "editor")); + this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName); + this.renderer.scroller.setAttribute("aria-label", nls("editor.scroller.aria-label", "Editor content, press Enter to start editing, press Escape to exit")); + this.renderer.scroller.addEventListener("keyup", focusOnEnterKeyup.bind(this)); + this.commands.addCommand(blurCommand); + this.renderer.$gutter.setAttribute("tabindex", 0); + this.renderer.$gutter.setAttribute("aria-hidden", false); + this.renderer.$gutter.setAttribute("role", "group"); + this.renderer.$gutter.setAttribute("aria-roledescription", nls("editor.gutter.aria-roledescription", "editor")); + this.renderer.$gutter.setAttribute("aria-label", nls("editor.gutter.aria-label", "Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")); + this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName); + this.renderer.content.setAttribute("aria-hidden", true); + if (!gutterKeyboardHandler) + gutterKeyboardHandler = new GutterKeyboardHandler(this); + gutterKeyboardHandler.addListener(); + this.textInput.setAriaOptions({ + setLabel: true + }); + } + else { + this.renderer.enableKeyboardAccessibility = false; + this.textInput.getElement().setAttribute("tabindex", 0); + this.textInput.setNumberOfExtraLines(0); + this.renderer.scroller.setAttribute("tabindex", -1); + this.renderer.scroller.removeAttribute("role"); + this.renderer.scroller.removeAttribute("aria-roledescription"); + this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName); + this.renderer.scroller.removeAttribute("aria-label"); + this.renderer.scroller.removeEventListener("keyup", focusOnEnterKeyup.bind(this)); + this.commands.removeCommand(blurCommand); + this.renderer.content.removeAttribute("aria-hidden"); + this.renderer.$gutter.setAttribute("tabindex", -1); + this.renderer.$gutter.setAttribute("aria-hidden", true); + this.renderer.$gutter.removeAttribute("role"); + this.renderer.$gutter.removeAttribute("aria-roledescription"); + this.renderer.$gutter.removeAttribute("aria-label"); + this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName); + if (gutterKeyboardHandler) + gutterKeyboardHandler.removeListener(); + } + }, + initialValue: false + }, + textInputAriaLabel: { + set: function (val) { this.$textInputAriaLabel = val; }, + initialValue: "" + }, + enableMobileMenu: { + set: function (val) { this.$enableMobileMenu = val; }, + initialValue: true + }, + customScrollbar: "renderer", + hScrollBarAlwaysVisible: "renderer", + vScrollBarAlwaysVisible: "renderer", + highlightGutterLine: "renderer", + animatedScroll: "renderer", + showInvisibles: "renderer", + showPrintMargin: "renderer", + printMarginColumn: "renderer", + printMargin: "renderer", + fadeFoldWidgets: "renderer", + showFoldWidgets: "renderer", + displayIndentGuides: "renderer", + highlightIndentGuides: "renderer", + showGutter: "renderer", + fontSize: "renderer", + fontFamily: "renderer", + maxLines: "renderer", + minLines: "renderer", + scrollPastEnd: "renderer", + fixedWidthGutter: "renderer", + theme: "renderer", + hasCssTransforms: "renderer", + maxPixelHeight: "renderer", + useTextareaForIME: "renderer", + useResizeObserver: "renderer", + useSvgGutterIcons: "renderer", + showFoldedAnnotations: "renderer", + scrollSpeed: "$mouseHandler", + dragDelay: "$mouseHandler", + dragEnabled: "$mouseHandler", + focusTimeout: "$mouseHandler", + tooltipFollowsMouse: "$mouseHandler", + firstLineNumber: "session", + overwrite: "session", + newLineMode: "session", + useWorker: "session", + useSoftTabs: "session", + navigateWithinSoftTabs: "session", + tabSize: "session", + wrap: "session", + indentedSoftWrap: "session", + foldStyle: "session", + mode: "session" +}); +var relativeNumberRenderer = { + getText: function (/**@type{EditSession}*/ session, /**@type{number}*/ row) { + return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9 ? "\xb7" : ""))) + ""; + }, + getWidth: function (session, /**@type{number}*/ lastLineNumber, config) { + return Math.max(lastLineNumber.toString().length, (config.lastRow + 1).toString().length, 2) * config.characterWidth; + }, + update: function (e, /**@type{Editor}*/ editor) { + editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER); + }, + attach: function (/**@type{Editor}*/ editor) { + editor.renderer.$gutterLayer.$renderer = this; + editor.on("changeSelection", this.update); + this.update(null, editor); + }, + detach: function (/**@type{Editor}*/ editor) { + if (editor.renderer.$gutterLayer.$renderer == this) + editor.renderer.$gutterLayer.$renderer = null; + editor.off("changeSelection", this.update); + this.update(null, editor); + } +}; +exports.Editor = Editor; + +}); + +define("ace/layer/lines",["require","exports","module","ace/lib/dom"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var Lines = /** @class */ (function () { + function Lines(element, canvasHeight) { + this.element = element; + this.canvasHeight = canvasHeight || 500000; + this.element.style.height = (this.canvasHeight * 2) + "px"; + this.cells = []; + this.cellCache = []; + this.$offsetCoefficient = 0; + } + Lines.prototype.moveContainer = function (config) { + dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient); + }; + Lines.prototype.pageChanged = function (oldConfig, newConfig) { + return (Math.floor((oldConfig.firstRowScreen * oldConfig.lineHeight) / this.canvasHeight) !== + Math.floor((newConfig.firstRowScreen * newConfig.lineHeight) / this.canvasHeight)); + }; + Lines.prototype.computeLineTop = function (row, config, session) { + var screenTop = config.firstRowScreen * config.lineHeight; + var screenPage = Math.floor(screenTop / this.canvasHeight); + var lineTop = session.documentToScreenRow(row, 0) * config.lineHeight; + return lineTop - (screenPage * this.canvasHeight); + }; + Lines.prototype.computeLineHeight = function (row, config, session) { + return config.lineHeight * session.getRowLineCount(row); + }; + Lines.prototype.getLength = function () { + return this.cells.length; + }; + Lines.prototype.get = function (index) { + return this.cells[index]; + }; + Lines.prototype.shift = function () { + this.$cacheCell(this.cells.shift()); + }; + Lines.prototype.pop = function () { + this.$cacheCell(this.cells.pop()); + }; + Lines.prototype.push = function (cell) { + if (Array.isArray(cell)) { + this.cells.push.apply(this.cells, cell); + var fragment = dom.createFragment(this.element); + for (var i = 0; i < cell.length; i++) { + fragment.appendChild(cell[i].element); + } + this.element.appendChild(fragment); + } + else { + this.cells.push(cell); + this.element.appendChild(cell.element); + } + }; + Lines.prototype.unshift = function (cell) { + if (Array.isArray(cell)) { + this.cells.unshift.apply(this.cells, cell); + var fragment = dom.createFragment(this.element); + for (var i = 0; i < cell.length; i++) { + fragment.appendChild(cell[i].element); + } + if (this.element.firstChild) + this.element.insertBefore(fragment, this.element.firstChild); + else + this.element.appendChild(fragment); + } + else { + this.cells.unshift(cell); + this.element.insertAdjacentElement("afterbegin", cell.element); + } + }; + Lines.prototype.last = function () { + if (this.cells.length) + return this.cells[this.cells.length - 1]; + else + return null; + }; + Lines.prototype.$cacheCell = function (cell) { + if (!cell) + return; + cell.element.remove(); + this.cellCache.push(cell); + }; + Lines.prototype.createCell = function (row, config, session, initElement) { + var cell = this.cellCache.pop(); + if (!cell) { + var element = dom.createElement("div"); + if (initElement) + initElement(element); + this.element.appendChild(element); + cell = { + element: element, + text: "", + row: row + }; + } + cell.row = row; + return cell; + }; + return Lines; +}()); +exports.Lines = Lines; + +}); + +define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var Lines = require("./lines").Lines; +var nls = require("../config").nls; +var Gutter = /** @class */ (function () { + function Gutter(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_gutter-layer"; + parentEl.appendChild(this.element); + this.setShowFoldWidgets(this.$showFoldWidgets); + this.gutterWidth = 0; + this.$annotations = []; + this.$updateAnnotations = this.$updateAnnotations.bind(this); + this.$lines = new Lines(this.element); + this.$lines.$offsetCoefficient = 1; + } + Gutter.prototype.setSession = function (session) { + if (this.session) + this.session.off("change", this.$updateAnnotations); + this.session = session; + if (session) + session.on("change", this.$updateAnnotations); + }; + Gutter.prototype.addGutterDecoration = function (row, className) { + if (window.console) + console.warn && console.warn("deprecated use session.addGutterDecoration"); + this.session.addGutterDecoration(row, className); + }; + Gutter.prototype.removeGutterDecoration = function (row, className) { + if (window.console) + console.warn && console.warn("deprecated use session.removeGutterDecoration"); + this.session.removeGutterDecoration(row, className); + }; + Gutter.prototype.setAnnotations = function (annotations) { + this.$annotations = []; + for (var i = 0; i < annotations.length; i++) { + var annotation = annotations[i]; + var row = annotation.row; + var rowInfo = this.$annotations[row]; + if (!rowInfo) + rowInfo = this.$annotations[row] = { text: [], type: [], displayText: [] }; + var annoText = annotation.text; + var displayAnnoText = annotation.text; + var annoType = annotation.type; + annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; + displayAnnoText = displayAnnoText ? displayAnnoText : annotation.html || ""; + if (rowInfo.text.indexOf(annoText) === -1) { + rowInfo.text.push(annoText); + rowInfo.type.push(annoType); + rowInfo.displayText.push(displayAnnoText); + } + var className = annotation.className; + if (className) { + rowInfo.className = className; + } + else if (annoType === "error") { + rowInfo.className = " ace_error"; + } + else if (annoType === "security" && !/\bace_error\b/.test(rowInfo.className)) { + rowInfo.className = " ace_security"; + } + else if (annoType === "warning" && !/\bace_(error|security)\b/.test(rowInfo.className)) { + rowInfo.className = " ace_warning"; + } + else if (annoType === "info" && !rowInfo.className) { + rowInfo.className = " ace_info"; + } + else if (annoType === "hint" && !rowInfo.className) { + rowInfo.className = " ace_hint"; + } + } + }; + Gutter.prototype.$updateAnnotations = function (delta) { + if (!this.$annotations.length) + return; + var firstRow = delta.start.row; + var len = delta.end.row - firstRow; + if (len === 0) { + } + else if (delta.action == 'remove') { + this.$annotations.splice(firstRow, len + 1, null); + } + else { + var args = new Array(len + 1); + args.unshift(firstRow, 1); + this.$annotations.splice.apply(this.$annotations, args); + } + }; + Gutter.prototype.update = function (config) { + this.config = config; + var session = this.session; + var firstRow = config.firstRow; + var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar + session.getLength() - 1); + this.oldLastRow = lastRow; + this.config = config; + this.$lines.moveContainer(config); + this.$updateCursorRow(); + var fold = session.getNextFoldLine(firstRow); + var foldStart = fold ? fold.start.row : Infinity; + var cell = null; + var index = -1; + var row = firstRow; + while (true) { + if (row > foldStart) { + row = fold.end.row + 1; + fold = session.getNextFoldLine(row, fold); + foldStart = fold ? fold.start.row : Infinity; + } + if (row > lastRow) { + while (this.$lines.getLength() > index + 1) + this.$lines.pop(); + break; + } + cell = this.$lines.get(++index); + if (cell) { + cell.row = row; + } + else { + cell = this.$lines.createCell(row, config, this.session, onCreateCell); + this.$lines.push(cell); + } + this.$renderCell(cell, config, fold, row); + row++; + } + this._signal("afterRender"); + this.$updateGutterWidth(config); + }; + Gutter.prototype.$updateGutterWidth = function (config) { + var session = this.session; + var gutterRenderer = session.gutterRenderer || this.$renderer; + var firstLineNumber = session.$firstLineNumber; + var lastLineText = this.$lines.last() ? this.$lines.last().text : ""; + if (this.$fixedWidth || session.$useWrapMode) + lastLineText = session.getLength() + firstLineNumber - 1; + var gutterWidth = gutterRenderer + ? gutterRenderer.getWidth(session, lastLineText, config) + : lastLineText.toString().length * config.characterWidth; + var padding = this.$padding || this.$computePadding(); + gutterWidth += padding.left + padding.right; + if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { + this.gutterWidth = gutterWidth; (this.element.parentNode).style.width = + this.element.style.width = Math.ceil(this.gutterWidth) + "px"; + this._signal("changeGutterWidth", gutterWidth); + } + }; + Gutter.prototype.$updateCursorRow = function () { + if (!this.$highlightGutterLine) + return; + var position = this.session.selection.getCursor(); + if (this.$cursorRow === position.row) + return; + this.$cursorRow = position.row; + }; + Gutter.prototype.updateLineHighlight = function () { + if (!this.$highlightGutterLine) + return; + var row = this.session.selection.cursor.row; + this.$cursorRow = row; + if (this.$cursorCell && this.$cursorCell.row == row) + return; + if (this.$cursorCell) + this.$cursorCell.element.className = this.$cursorCell.element.className.replace("ace_gutter-active-line ", ""); + var cells = this.$lines.cells; + this.$cursorCell = null; + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + if (cell.row >= this.$cursorRow) { + if (cell.row > this.$cursorRow) { + var fold = this.session.getFoldLine(this.$cursorRow); + if (i > 0 && fold && fold.start.row == cells[i - 1].row) + cell = cells[i - 1]; + else + break; + } + cell.element.className = "ace_gutter-active-line " + cell.element.className; + this.$cursorCell = cell; + break; + } + } + }; + Gutter.prototype.scrollLines = function (config) { + var oldConfig = this.config; + this.config = config; + this.$updateCursorRow(); + if (this.$lines.pageChanged(oldConfig, config)) + return this.update(config); + this.$lines.moveContainer(config); + var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar + this.session.getLength() - 1); + var oldLastRow = this.oldLastRow; + this.oldLastRow = lastRow; + if (!oldConfig || oldLastRow < config.firstRow) + return this.update(config); + if (lastRow < oldConfig.firstRow) + return this.update(config); + if (oldConfig.firstRow < config.firstRow) + for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--) + this.$lines.shift(); + if (oldLastRow > lastRow) + for (var row = this.session.getFoldedRowCount(lastRow + 1, oldLastRow); row > 0; row--) + this.$lines.pop(); + if (config.firstRow < oldConfig.firstRow) { + this.$lines.unshift(this.$renderLines(config, config.firstRow, oldConfig.firstRow - 1)); + } + if (lastRow > oldLastRow) { + this.$lines.push(this.$renderLines(config, oldLastRow + 1, lastRow)); + } + this.updateLineHighlight(); + this._signal("afterRender"); + this.$updateGutterWidth(config); + }; + Gutter.prototype.$renderLines = function (config, firstRow, lastRow) { + var fragment = []; + var row = firstRow; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + while (true) { + if (row > foldStart) { + row = foldLine.end.row + 1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + if (row > lastRow) + break; + var cell = this.$lines.createCell(row, config, this.session, onCreateCell); + this.$renderCell(cell, config, foldLine, row); + fragment.push(cell); + row++; + } + return fragment; + }; + Gutter.prototype.$renderCell = function (cell, config, fold, row) { + var element = cell.element; + var session = this.session; + var textNode = element.childNodes[0]; + var foldWidget = element.childNodes[1]; + var annotationNode = element.childNodes[2]; + var annotationIconNode = annotationNode.firstChild; + var firstLineNumber = session.$firstLineNumber; + var breakpoints = session.$breakpoints; + var decorations = session.$decorations; + var gutterRenderer = session.gutterRenderer || this.$renderer; + var foldWidgets = this.$showFoldWidgets && session.foldWidgets; + var foldStart = fold ? fold.start.row : Number.MAX_VALUE; + var lineHeight = config.lineHeight + "px"; + var className = this.$useSvgGutterIcons ? "ace_gutter-cell_svg-icons " : "ace_gutter-cell "; + var iconClassName = this.$useSvgGutterIcons ? "ace_icon_svg" : "ace_icon"; + var rowText = (gutterRenderer + ? gutterRenderer.getText(session, row) + : row + firstLineNumber).toString(); + if (this.$highlightGutterLine) { + if (row == this.$cursorRow || (fold && row < this.$cursorRow && row >= foldStart && this.$cursorRow <= fold.end.row)) { + className += "ace_gutter-active-line "; + if (this.$cursorCell != cell) { + if (this.$cursorCell) + this.$cursorCell.element.className = this.$cursorCell.element.className.replace("ace_gutter-active-line ", ""); + this.$cursorCell = cell; + } + } + } + if (breakpoints[row]) + className += breakpoints[row]; + if (decorations[row]) + className += decorations[row]; + if (this.$annotations[row] && row !== foldStart) + className += this.$annotations[row].className; + if (foldWidgets) { + var c = foldWidgets[row]; + if (c == null) + c = foldWidgets[row] = session.getFoldWidget(row); + } + if (c) { + var foldClass = "ace_fold-widget ace_" + c; + var isClosedFold = c == "start" && row == foldStart && row < fold.end.row; + if (isClosedFold) { + foldClass += " ace_closed"; + var foldAnnotationClass = ""; + var annotationInFold = false; + for (var i = row + 1; i <= fold.end.row; i++) { + if (!this.$annotations[i]) + continue; + if (this.$annotations[i].className === " ace_error") { + annotationInFold = true; + foldAnnotationClass = " ace_error_fold"; + break; + } + if (this.$annotations[i].className === " ace_security") { + annotationInFold = true; + foldAnnotationClass = " ace_security_fold"; + } + else if (this.$annotations[i].className === " ace_warning" && + foldAnnotationClass !== " ace_security_fold") { + annotationInFold = true; + foldAnnotationClass = " ace_warning_fold"; + } + } + className += foldAnnotationClass; + } + else + foldClass += " ace_open"; + if (foldWidget.className != foldClass) + foldWidget.className = foldClass; + dom.setStyle(foldWidget.style, "height", lineHeight); + dom.setStyle(foldWidget.style, "display", "inline-block"); + foldWidget.setAttribute("role", "button"); + foldWidget.setAttribute("tabindex", "-1"); + var foldRange = session.getFoldWidgetRange(row); + if (foldRange) + foldWidget.setAttribute("aria-label", nls("gutter.code-folding.range.aria-label", "Toggle code folding, rows $0 through $1", [ + foldRange.start.row + 1, + foldRange.end.row + 1 + ])); + else { + if (fold) + foldWidget.setAttribute("aria-label", nls("gutter.code-folding.closed.aria-label", "Toggle code folding, rows $0 through $1", [ + fold.start.row + 1, + fold.end.row + 1 + ])); + else + foldWidget.setAttribute("aria-label", nls("gutter.code-folding.open.aria-label", "Toggle code folding, row $0", [row + 1])); + } + if (isClosedFold) { + foldWidget.setAttribute("aria-expanded", "false"); + foldWidget.setAttribute("title", nls("gutter.code-folding.closed.title", "Unfold code")); + } + else { + foldWidget.setAttribute("aria-expanded", "true"); + foldWidget.setAttribute("title", nls("gutter.code-folding.open.title", "Fold code")); + } + } + else { + if (foldWidget) { + dom.setStyle(foldWidget.style, "display", "none"); + foldWidget.setAttribute("tabindex", "0"); + foldWidget.removeAttribute("role"); + foldWidget.removeAttribute("aria-label"); + } + } + if (annotationInFold && this.$showFoldedAnnotations) { + annotationNode.className = "ace_gutter_annotation"; + annotationIconNode.className = iconClassName; + annotationIconNode.className += foldAnnotationClass; + dom.setStyle(annotationIconNode.style, "height", lineHeight); + dom.setStyle(annotationNode.style, "display", "block"); + dom.setStyle(annotationNode.style, "height", lineHeight); + var ariaLabel; + switch (foldAnnotationClass) { + case " ace_error_fold": + ariaLabel = nls("gutter.annotation.aria-label.error", "Error, read annotations row $0", [rowText]); + break; + case " ace_security_fold": + ariaLabel = nls("gutter.annotation.aria-label.security", "Security finding, read annotations row $0", [rowText]); + break; + case " ace_warning_fold": + ariaLabel = nls("gutter.annotation.aria-label.warning", "Warning, read annotations row $0", [rowText]); + break; + } + annotationNode.setAttribute("aria-label", ariaLabel); + annotationNode.setAttribute("tabindex", "-1"); + annotationNode.setAttribute("role", "button"); + } + else if (this.$annotations[row]) { + annotationNode.className = "ace_gutter_annotation"; + annotationIconNode.className = iconClassName; + if (this.$useSvgGutterIcons) + annotationIconNode.className += this.$annotations[row].className; + else + element.classList.add(this.$annotations[row].className.replace(" ", "")); + dom.setStyle(annotationIconNode.style, "height", lineHeight); + dom.setStyle(annotationNode.style, "display", "block"); + dom.setStyle(annotationNode.style, "height", lineHeight); + var ariaLabel; + switch (this.$annotations[row].className) { + case " ace_error": + ariaLabel = nls("gutter.annotation.aria-label.error", "Error, read annotations row $0", [rowText]); + break; + case " ace_security": + ariaLabel = nls("gutter.annotation.aria-label.security", "Security finding, read annotations row $0", [rowText]); + break; + case " ace_warning": + ariaLabel = nls("gutter.annotation.aria-label.warning", "Warning, read annotations row $0", [rowText]); + break; + case " ace_info": + ariaLabel = nls("gutter.annotation.aria-label.info", "Info, read annotations row $0", [rowText]); + break; + case " ace_hint": + ariaLabel = nls("gutter.annotation.aria-label.hint", "Suggestion, read annotations row $0", [rowText]); + break; + } + annotationNode.setAttribute("aria-label", ariaLabel); + annotationNode.setAttribute("tabindex", "-1"); + annotationNode.setAttribute("role", "button"); + } + else { + dom.setStyle(annotationNode.style, "display", "none"); + annotationNode.removeAttribute("aria-label"); + annotationNode.removeAttribute("role"); + annotationNode.setAttribute("tabindex", "0"); + } + if (rowText !== textNode.data) { + textNode.data = rowText; + } + if (element.className != className) + element.className = className; + dom.setStyle(cell.element.style, "height", this.$lines.computeLineHeight(row, config, session) + "px"); + dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px"); + cell.text = rowText; + if (annotationNode.style.display === "none" && foldWidget.style.display === "none") + cell.element.setAttribute("aria-hidden", true); + else + cell.element.setAttribute("aria-hidden", false); + return cell; + }; + Gutter.prototype.setHighlightGutterLine = function (highlightGutterLine) { + this.$highlightGutterLine = highlightGutterLine; + }; + Gutter.prototype.setShowLineNumbers = function (show) { + this.$renderer = !show && { + getWidth: function () { return 0; }, + getText: function () { return ""; } + }; + }; + Gutter.prototype.getShowLineNumbers = function () { + return this.$showLineNumbers; + }; + Gutter.prototype.setShowFoldWidgets = function (show) { + if (show) + dom.addCssClass(this.element, "ace_folding-enabled"); + else + dom.removeCssClass(this.element, "ace_folding-enabled"); + this.$showFoldWidgets = show; + this.$padding = null; + }; + Gutter.prototype.getShowFoldWidgets = function () { + return this.$showFoldWidgets; + }; + Gutter.prototype.$computePadding = function () { + if (!this.element.firstChild) + return { left: 0, right: 0 }; + var style = dom.computedStyle(/**@type{Element}*/ (this.element.firstChild)); + this.$padding = {}; + this.$padding.left = (parseInt(style.borderLeftWidth) || 0) + + (parseInt(style.paddingLeft) || 0) + 1; + this.$padding.right = (parseInt(style.borderRightWidth) || 0) + + (parseInt(style.paddingRight) || 0); + return this.$padding; + }; + Gutter.prototype.getRegion = function (point) { + var padding = this.$padding || this.$computePadding(); + var rect = this.element.getBoundingClientRect(); + if (point.x < padding.left + rect.left) + return "markers"; + if (this.$showFoldWidgets && point.x > rect.right - padding.right) + return "foldWidgets"; + }; + return Gutter; +}()); +Gutter.prototype.$fixedWidth = false; +Gutter.prototype.$highlightGutterLine = true; +Gutter.prototype.$renderer = ""; +Gutter.prototype.$showLineNumbers = true; +Gutter.prototype.$showFoldWidgets = true; +oop.implement(Gutter.prototype, EventEmitter); +function onCreateCell(element) { + var textNode = document.createTextNode(''); + element.appendChild(textNode); + var foldWidget = dom.createElement("span"); + element.appendChild(foldWidget); + var annotationNode = dom.createElement("span"); + element.appendChild(annotationNode); + var annotationIconNode = dom.createElement("span"); + annotationNode.appendChild(annotationIconNode); + return element; +} +exports.Gutter = Gutter; + +}); + +define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var dom = require("../lib/dom"); +var Marker = /** @class */ (function () { + function Marker(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_marker-layer"; + parentEl.appendChild(this.element); + } + Marker.prototype.setPadding = function (padding) { + this.$padding = padding; + }; + Marker.prototype.setSession = function (session) { + this.session = session; + }; + Marker.prototype.setMarkers = function (markers) { + this.markers = markers; + }; + Marker.prototype.elt = function (className, css) { + var x = this.i != -1 && this.element.childNodes[this.i]; + if (!x) { + x = document.createElement("div"); + this.element.appendChild(x); + this.i = -1; + } + else { + this.i++; + } + x.style.cssText = css; + x.className = className; + }; + Marker.prototype.update = function (config) { + if (!config) + return; + this.config = config; + this.i = 0; + var html; + for (var key in this.markers) { + var marker = this.markers[key]; + if (!marker.range) { + marker.update(html, this, this.session, config); + continue; + } + var range = marker.range.clipRows(config.firstRow, config.lastRow); + if (range.isEmpty()) + continue; + range = range.toScreenRange(this.session); + if (marker.renderer) { + var top = this.$getTop(range.start.row, config); + var left = this.$padding + range.start.column * config.characterWidth; + marker.renderer(html, range, left, top, config); + } + else if (marker.type == "fullLine") { + this.drawFullLineMarker(html, range, marker.clazz, config); + } + else if (marker.type == "screenLine") { + this.drawScreenLineMarker(html, range, marker.clazz, config); + } + else if (range.isMultiLine()) { + if (marker.type == "text") + this.drawTextMarker(html, range, marker.clazz, config); + else + this.drawMultiLineMarker(html, range, marker.clazz, config); + } + else { + this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config); + } + } + if (this.i != -1) { + while (this.i < this.element.childElementCount) + this.element.removeChild(this.element.lastChild); + } + }; + Marker.prototype.$getTop = function (row, layerConfig) { + return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; + }; + Marker.prototype.drawTextMarker = function (stringBuilder, range, clazz, layerConfig, extraStyle) { + var session = this.session; + var start = range.start.row; + var end = range.end.row; + var row = start; + var prev = 0; + var curr = 0; + var next = session.getScreenLastRowColumn(row); + var lineRange = new Range(row, range.start.column, row, curr); + for (; row <= end; row++) { + lineRange.start.row = lineRange.end.row = row; + lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row); + lineRange.end.column = next; + prev = curr; + curr = next; + next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column; + this.drawSingleLineMarker(stringBuilder, lineRange, clazz + (row == start ? " ace_start" : "") + " ace_br" + + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), layerConfig, row == end ? 0 : 1, extraStyle); + } + }; + Marker.prototype.drawMultiLineMarker = function (stringBuilder, range, clazz, config, extraStyle) { + var padding = this.$padding; + var height = config.lineHeight; + var top = this.$getTop(range.start.row, config); + var left = padding + range.start.column * config.characterWidth; + extraStyle = extraStyle || ""; + if (this.session.$bidiHandler.isBidiRow(range.start.row)) { + var range1 = range.clone(); + range1.end.row = range1.start.row; + range1.end.column = this.session.getLine(range1.start.row).length; + this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br1 ace_start", config, null, extraStyle); + } + else { + this.elt(clazz + " ace_br1 ace_start", "height:" + height + "px;" + "right:" + padding + "px;" + "top:" + top + "px;left:" + left + "px;" + (extraStyle || "")); + } + if (this.session.$bidiHandler.isBidiRow(range.end.row)) { + var range1 = range.clone(); + range1.start.row = range1.end.row; + range1.start.column = 0; + this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br12", config, null, extraStyle); + } + else { + top = this.$getTop(range.end.row, config); + var width = range.end.column * config.characterWidth; + this.elt(clazz + " ace_br12", "height:" + height + "px;" + + "width:" + width + "px;" + + "top:" + top + "px;" + + "left:" + padding + "px;" + (extraStyle || "")); + } + height = (range.end.row - range.start.row - 1) * config.lineHeight; + if (height <= 0) + return; + top = this.$getTop(range.start.row + 1, config); + var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8); + this.elt(clazz + (radiusClass ? " ace_br" + radiusClass : ""), "height:" + height + "px;" + + "right:" + padding + "px;" + + "top:" + top + "px;" + + "left:" + padding + "px;" + (extraStyle || "")); + }; + Marker.prototype.drawSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) { + if (this.session.$bidiHandler.isBidiRow(range.start.row)) + return this.drawBidiSingleLineMarker(stringBuilder, range, clazz, config, extraLength, extraStyle); + var height = config.lineHeight; + var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; + var top = this.$getTop(range.start.row, config); + var left = this.$padding + range.start.column * config.characterWidth; + this.elt(clazz, "height:" + height + "px;" + + "width:" + width + "px;" + + "top:" + top + "px;" + + "left:" + left + "px;" + (extraStyle || "")); + }; + Marker.prototype.drawBidiSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) { + var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding; + var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column); + selections.forEach(function (selection) { + this.elt(clazz, "height:" + height + "px;" + + "width:" + (selection.width + (extraLength || 0)) + "px;" + + "top:" + top + "px;" + + "left:" + (padding + selection.left) + "px;" + (extraStyle || "")); + }, this); + }; + Marker.prototype.drawFullLineMarker = function (stringBuilder, range, clazz, config, extraStyle) { + var top = this.$getTop(range.start.row, config); + var height = config.lineHeight; + if (range.start.row != range.end.row) + height += this.$getTop(range.end.row, config) - top; + this.elt(clazz, "height:" + height + "px;" + + "top:" + top + "px;" + + "left:0;right:0;" + (extraStyle || "")); + }; + Marker.prototype.drawScreenLineMarker = function (stringBuilder, range, clazz, config, extraStyle) { + var top = this.$getTop(range.start.row, config); + var height = config.lineHeight; + this.elt(clazz, "height:" + height + "px;" + + "top:" + top + "px;" + + "left:0;right:0;" + (extraStyle || "")); + }; + return Marker; +}()); +Marker.prototype.$padding = 0; +function getBorderClass(tl, tr, br, bl) { + return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0); +} +exports.Marker = Marker; + +}); + +define("ace/layer/text_util",["require","exports","module"], function(require, exports, module){// Tokens for which Ace just uses a simple TextNode and does not add any special className. +var textTokens = new Set(["text", "rparen", "lparen"]); +exports.isTextToken = function (tokenType) { + return textTokens.has(tokenType); +}; + +}); + +define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var Lines = require("./lines").Lines; +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var nls = require("../config").nls; +var isTextToken = require("./text_util").isTextToken; +var Text = /** @class */ (function () { + function Text(parentEl) { + this.dom = dom; + this.element = this.dom.createElement("div"); + this.element.className = "ace_layer ace_text-layer"; + parentEl.appendChild(this.element); + this.$updateEolChar = this.$updateEolChar.bind(this); + this.$lines = new Lines(this.element); + } + Text.prototype.$updateEolChar = function () { + var doc = this.session.doc; + var unixMode = doc.getNewLineCharacter() == "\n" && doc.getNewLineMode() != "windows"; + var EOL_CHAR = unixMode ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF; + if (this.EOL_CHAR != EOL_CHAR) { + this.EOL_CHAR = EOL_CHAR; + return true; + } + }; + Text.prototype.setPadding = function (padding) { + this.$padding = padding; + this.element.style.margin = "0 " + padding + "px"; + }; + Text.prototype.getLineHeight = function () { + return this.$fontMetrics.$characterSize.height || 0; + }; + Text.prototype.getCharacterWidth = function () { + return this.$fontMetrics.$characterSize.width || 0; + }; + Text.prototype.$setFontMetrics = function (measure) { + this.$fontMetrics = measure; + this.$fontMetrics.on("changeCharacterSize", + function (e) { + this._signal("changeCharacterSize", e); + }.bind(this)); + this.$pollSizeChanges(); + }; + Text.prototype.checkForSizeChanges = function () { + this.$fontMetrics.checkForSizeChanges(); + }; + Text.prototype.$pollSizeChanges = function () { + return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); + }; + Text.prototype.setSession = function (session) { + this.session = session; + if (session) + this.$computeTabString(); + }; + Text.prototype.setShowInvisibles = function (showInvisibles) { + if (this.showInvisibles == showInvisibles) + return false; + this.showInvisibles = showInvisibles; + if (typeof showInvisibles == "string") { + this.showSpaces = /tab/i.test(showInvisibles); + this.showTabs = /space/i.test(showInvisibles); + this.showEOL = /eol/i.test(showInvisibles); + } + else { + this.showSpaces = this.showTabs = this.showEOL = showInvisibles; + } + this.$computeTabString(); + return true; + }; + Text.prototype.setDisplayIndentGuides = function (display) { + if (this.displayIndentGuides == display) + return false; + this.displayIndentGuides = display; + this.$computeTabString(); + return true; + }; + Text.prototype.setHighlightIndentGuides = function (highlight) { + if (this.$highlightIndentGuides === highlight) + return false; + this.$highlightIndentGuides = highlight; + return highlight; + }; + Text.prototype.$computeTabString = function () { + var tabSize = this.session.getTabSize(); + this.tabSize = tabSize; var tabStr = this.$tabStrings = [0]; + for (var i = 1; i < tabSize + 1; i++) { + if (this.showTabs) { + var span = this.dom.createElement("span"); + span.className = "ace_invisible ace_invisible_tab"; + span.textContent = lang.stringRepeat(this.TAB_CHAR, i); + tabStr.push(span); + } + else { + tabStr.push(this.dom.createTextNode(lang.stringRepeat(" ", i), this.element)); + } + } + if (this.displayIndentGuides) { + this.$indentGuideRe = /\s\S| \t|\t |\s$/; + var className = "ace_indent-guide"; + var spaceClass = this.showSpaces ? " ace_invisible ace_invisible_space" : ""; + var spaceContent = this.showSpaces + ? lang.stringRepeat(this.SPACE_CHAR, this.tabSize) + : lang.stringRepeat(" ", this.tabSize); + var tabClass = this.showTabs ? " ace_invisible ace_invisible_tab" : ""; + var tabContent = this.showTabs + ? lang.stringRepeat(this.TAB_CHAR, this.tabSize) + : spaceContent; + var span = this.dom.createElement("span"); + span.className = className + spaceClass; + span.textContent = spaceContent; + this.$tabStrings[" "] = span; + var span = this.dom.createElement("span"); + span.className = className + tabClass; + span.textContent = tabContent; + this.$tabStrings["\t"] = span; + } + }; + Text.prototype.updateLines = function (config, firstRow, lastRow) { + if (this.config.lastRow != config.lastRow || + this.config.firstRow != config.firstRow) { + return this.update(config); + } + this.config = config; + var first = Math.max(firstRow, config.firstRow); + var last = Math.min(lastRow, config.lastRow); + var lineElements = this.element.childNodes; + var lineElementsIdx = 0; + for (var row = config.firstRow; row < first; row++) { + var foldLine = this.session.getFoldLine(row); + if (foldLine) { + if (foldLine.containsRow(first)) { + first = foldLine.start.row; + break; + } + else { + row = foldLine.end.row; + } + } + lineElementsIdx++; + } + var heightChanged = false; + var row = first; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + while (true) { + if (row > foldStart) { + row = foldLine.end.row + 1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + if (row > last) + break; var lineElement = lineElements[lineElementsIdx++]; + if (lineElement) { + this.dom.removeChildren(lineElement); + this.$renderLine(lineElement, row, row == foldStart ? foldLine : false); + if (heightChanged) + lineElement.style.top = this.$lines.computeLineTop(row, config, this.session) + "px"; + var height = (config.lineHeight * this.session.getRowLength(row)) + "px"; + if (lineElement.style.height != height) { + heightChanged = true; + lineElement.style.height = height; + } + } + row++; + } + if (heightChanged) { + while (lineElementsIdx < this.$lines.cells.length) { + var cell = this.$lines.cells[lineElementsIdx++]; + cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + "px"; + } + } + }; + Text.prototype.scrollLines = function (config) { + var oldConfig = this.config; + this.config = config; + if (this.$lines.pageChanged(oldConfig, config)) + return this.update(config); + this.$lines.moveContainer(config); + var lastRow = config.lastRow; + var oldLastRow = oldConfig ? oldConfig.lastRow : -1; + if (!oldConfig || oldLastRow < config.firstRow) + return this.update(config); + if (lastRow < oldConfig.firstRow) + return this.update(config); + if (!oldConfig || oldConfig.lastRow < config.firstRow) + return this.update(config); + if (config.lastRow < oldConfig.firstRow) + return this.update(config); + if (oldConfig.firstRow < config.firstRow) + for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--) + this.$lines.shift(); + if (oldConfig.lastRow > config.lastRow) + for (var row = this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row > 0; row--) + this.$lines.pop(); + if (config.firstRow < oldConfig.firstRow) { + this.$lines.unshift(this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1)); + } + if (config.lastRow > oldConfig.lastRow) { + this.$lines.push(this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow)); + } + this.$highlightIndentGuide(); + }; + Text.prototype.$renderLinesFragment = function (config, firstRow, lastRow) { + var fragment = []; + var row = firstRow; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + while (true) { + if (row > foldStart) { + row = foldLine.end.row + 1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + if (row > lastRow) + break; + var line = this.$lines.createCell(row, config, this.session); + var lineEl = line.element; + this.dom.removeChildren(lineEl); + dom.setStyle(lineEl.style, "height", this.$lines.computeLineHeight(row, config, this.session) + "px"); + dom.setStyle(lineEl.style, "top", this.$lines.computeLineTop(row, config, this.session) + "px"); + this.$renderLine(lineEl, row, row == foldStart ? foldLine : false); + if (this.$useLineGroups()) { + lineEl.className = "ace_line_group"; + } + else { + lineEl.className = "ace_line"; + } + fragment.push(line); + row++; + } + return fragment; + }; + Text.prototype.update = function (config) { + this.$lines.moveContainer(config); + this.config = config; + var firstRow = config.firstRow; + var lastRow = config.lastRow; + var lines = this.$lines; + while (lines.getLength()) + lines.pop(); + lines.push(this.$renderLinesFragment(config, firstRow, lastRow)); + }; + Text.prototype.$renderToken = function (parent, screenColumn, token, value) { + var self = this; + var re = /(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g; + var valueFragment = this.dom.createFragment(this.element); + var m; + var i = 0; + while (m = re.exec(value)) { + var tab = m[1]; + var simpleSpace = m[2]; + var controlCharacter = m[3]; + var cjkSpace = m[4]; + var cjk = m[5]; + if (!self.showSpaces && simpleSpace) + continue; + var before = i != m.index ? value.slice(i, m.index) : ""; + i = m.index + m[0].length; + if (before) { + valueFragment.appendChild(this.dom.createTextNode(before, this.element)); + } + if (tab) { + var tabSize = self.session.getScreenTabSize(screenColumn + m.index); + valueFragment.appendChild(self.$tabStrings[tabSize].cloneNode(true)); + screenColumn += tabSize - 1; + } + else if (simpleSpace) { + if (self.showSpaces) { + var span = this.dom.createElement("span"); + span.className = "ace_invisible ace_invisible_space"; + span.textContent = lang.stringRepeat(self.SPACE_CHAR, simpleSpace.length); + valueFragment.appendChild(span); + } + else { + valueFragment.appendChild(this.dom.createTextNode(simpleSpace, this.element)); + } + } + else if (controlCharacter) { + var span = this.dom.createElement("span"); + span.className = "ace_invisible ace_invisible_space ace_invalid"; + span.textContent = lang.stringRepeat(self.SPACE_CHAR, controlCharacter.length); + valueFragment.appendChild(span); + } + else if (cjkSpace) { + screenColumn += 1; + var span = this.dom.createElement("span"); + span.style.width = (self.config.characterWidth * 2) + "px"; + span.className = self.showSpaces ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; + span.textContent = self.showSpaces ? self.SPACE_CHAR : cjkSpace; + valueFragment.appendChild(span); + } + else if (cjk) { + screenColumn += 1; + var span = this.dom.createElement("span"); + span.style.width = (self.config.characterWidth * 2) + "px"; + span.className = "ace_cjk"; + span.textContent = cjk; + valueFragment.appendChild(span); + } + } + valueFragment.appendChild(this.dom.createTextNode(i ? value.slice(i) : value, this.element)); + if (!isTextToken(token.type)) { + var classes = "ace_" + token.type.replace(/\./g, " ace_"); + var span = this.dom.createElement("span"); + if (token.type == "fold") { + span.style.width = (token.value.length * this.config.characterWidth) + "px"; + span.setAttribute("title", nls("inline-fold.closed.title", "Unfold code")); + } + span.className = classes; + span.appendChild(valueFragment); + parent.appendChild(span); + } + else { + parent.appendChild(valueFragment); + } + return screenColumn + value.length; + }; + Text.prototype.renderIndentGuide = function (parent, value, max) { + var cols = value.search(this.$indentGuideRe); + if (cols <= 0 || cols >= max) + return value; + if (value[0] == " ") { + cols -= cols % this.tabSize; + var count = cols / this.tabSize; + for (var i = 0; i < count; i++) { + parent.appendChild(this.$tabStrings[" "].cloneNode(true)); + } + this.$highlightIndentGuide(); + return value.substr(cols); + } + else if (value[0] == "\t") { + for (var i = 0; i < cols; i++) { + parent.appendChild(this.$tabStrings["\t"].cloneNode(true)); + } + this.$highlightIndentGuide(); + return value.substr(cols); + } + this.$highlightIndentGuide(); + return value; + }; + Text.prototype.$highlightIndentGuide = function () { + if (!this.$highlightIndentGuides || !this.displayIndentGuides) + return; + this.$highlightIndentGuideMarker = { + indentLevel: undefined, + start: undefined, + end: undefined, + dir: undefined + }; + var lines = this.session.doc.$lines; + if (!lines) + return; + var cursor = this.session.selection.getCursor(); + var initialIndent = /^\s*/.exec(this.session.doc.getLine(cursor.row))[0].length; + var elementIndentLevel = Math.floor(initialIndent / this.tabSize); + this.$highlightIndentGuideMarker = { + indentLevel: elementIndentLevel, + start: cursor.row + }; + var bracketHighlight = this.session.$bracketHighlight; + if (bracketHighlight) { + var ranges = this.session.$bracketHighlight.ranges; + for (var i = 0; i < ranges.length; i++) { + if (cursor.row !== ranges[i].start.row) { + this.$highlightIndentGuideMarker.end = ranges[i].start.row; + if (cursor.row > ranges[i].start.row) { + this.$highlightIndentGuideMarker.dir = -1; + } + else { + this.$highlightIndentGuideMarker.dir = 1; + } + break; + } + } + } + if (!this.$highlightIndentGuideMarker.end) { + if (lines[cursor.row] !== '' && cursor.column === lines[cursor.row].length) { + this.$highlightIndentGuideMarker.dir = 1; + for (var i = cursor.row + 1; i < lines.length; i++) { + var line = lines[i]; + var currentIndent = /^\s*/.exec(line)[0].length; + if (line !== '') { + this.$highlightIndentGuideMarker.end = i; + if (currentIndent <= initialIndent) + break; + } + } + } + } + this.$renderHighlightIndentGuide(); + }; + Text.prototype.$clearActiveIndentGuide = function () { + var cells = this.$lines.cells; + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + var childNodes = cell.element.childNodes; + if (childNodes.length > 0) { + for (var j = 0; j < childNodes.length; j++) { + if (childNodes[j].classList && childNodes[j].classList.contains("ace_indent-guide-active")) { + childNodes[j].classList.remove("ace_indent-guide-active"); + break; + } + } + } + } + }; + Text.prototype.$setIndentGuideActive = function (cell, indentLevel) { + var line = this.session.doc.getLine(cell.row); + if (line !== "") { + var childNodes = cell.element.childNodes; + if (childNodes) { + var node = childNodes[indentLevel - 1]; + if (node && node.classList && node.classList.contains("ace_indent-guide")) + node.classList.add("ace_indent-guide-active"); + } + } + }; + Text.prototype.$renderHighlightIndentGuide = function () { + if (!this.$lines) + return; + var cells = this.$lines.cells; + this.$clearActiveIndentGuide(); + var indentLevel = this.$highlightIndentGuideMarker.indentLevel; + if (indentLevel !== 0) { + if (this.$highlightIndentGuideMarker.dir === 1) { + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + if (this.$highlightIndentGuideMarker.end && cell.row >= this.$highlightIndentGuideMarker.start + + 1) { + if (cell.row >= this.$highlightIndentGuideMarker.end) + break; + this.$setIndentGuideActive(cell, indentLevel); + } + } + } + else { + for (var i = cells.length - 1; i >= 0; i--) { + var cell = cells[i]; + if (this.$highlightIndentGuideMarker.end && cell.row < this.$highlightIndentGuideMarker.start) { + if (cell.row <= this.$highlightIndentGuideMarker.end) + break; + this.$setIndentGuideActive(cell, indentLevel); + } + } + } + } + }; + Text.prototype.$createLineElement = function (parent) { + var lineEl = this.dom.createElement("div"); + lineEl.className = "ace_line"; + lineEl.style.height = this.config.lineHeight + "px"; + return lineEl; + }; + Text.prototype.$renderWrappedLine = function (parent, tokens, splits) { + var chars = 0; + var split = 0; + var splitChars = splits[0]; + var screenColumn = 0; + var lineEl = this.$createLineElement(); + parent.appendChild(lineEl); + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + var value = token.value; + if (i == 0 && this.displayIndentGuides) { + chars = value.length; + value = this.renderIndentGuide(lineEl, value, splitChars); + if (!value) + continue; + chars -= value.length; + } + if (chars + value.length < splitChars) { + screenColumn = this.$renderToken(lineEl, screenColumn, token, value); + chars += value.length; + } + else { + while (chars + value.length >= splitChars) { + screenColumn = this.$renderToken(lineEl, screenColumn, token, value.substring(0, splitChars - chars)); + value = value.substring(splitChars - chars); + chars = splitChars; + lineEl = this.$createLineElement(); + parent.appendChild(lineEl); + lineEl.appendChild(this.dom.createTextNode(lang.stringRepeat("\xa0", splits.indent), this.element)); + split++; + screenColumn = 0; + splitChars = splits[split] || Number.MAX_VALUE; + } + if (value.length != 0) { + chars += value.length; + screenColumn = this.$renderToken(lineEl, screenColumn, token, value); + } + } + } + if (splits[splits.length - 1] > this.MAX_LINE_LENGTH) + this.$renderOverflowMessage(lineEl, screenColumn, null, "", true); + }; + Text.prototype.$renderSimpleLine = function (parent, tokens) { + var screenColumn = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + var value = token.value; + if (i == 0 && this.displayIndentGuides) { + value = this.renderIndentGuide(parent, value); + if (!value) + continue; + } + if (screenColumn + value.length > this.MAX_LINE_LENGTH) + return this.$renderOverflowMessage(parent, screenColumn, token, value); + screenColumn = this.$renderToken(parent, screenColumn, token, value); + } + }; + Text.prototype.$renderOverflowMessage = function (parent, screenColumn, token, value, hide) { + token && this.$renderToken(parent, screenColumn, token, value.slice(0, this.MAX_LINE_LENGTH - screenColumn)); + var overflowEl = this.dom.createElement("span"); + overflowEl.className = "ace_inline_button ace_keyword ace_toggle_wrap"; + overflowEl.textContent = hide ? "" : ""; + parent.appendChild(overflowEl); + }; + Text.prototype.$renderLine = function (parent, row, foldLine) { + if (!foldLine && foldLine != false) + foldLine = this.session.getFoldLine(row); + if (foldLine) + var tokens = this.$getFoldLineTokens(row, foldLine); + else + var tokens = this.session.getTokens(row); + var lastLineEl = parent; + if (tokens.length) { + var splits = this.session.getRowSplitData(row); + if (splits && splits.length) { + this.$renderWrappedLine(parent, tokens, splits); + var lastLineEl = parent.lastChild; + } + else { + var lastLineEl = parent; + if (this.$useLineGroups()) { + lastLineEl = this.$createLineElement(); + parent.appendChild(lastLineEl); + } + this.$renderSimpleLine(lastLineEl, tokens); + } + } + else if (this.$useLineGroups()) { + lastLineEl = this.$createLineElement(); + parent.appendChild(lastLineEl); + } + if (this.showEOL && lastLineEl) { + if (foldLine) + row = foldLine.end.row; + var invisibleEl = this.dom.createElement("span"); + invisibleEl.className = "ace_invisible ace_invisible_eol"; + invisibleEl.textContent = row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR; + lastLineEl.appendChild(invisibleEl); + } + }; + Text.prototype.$getFoldLineTokens = function (row, foldLine) { + var session = this.session; + var renderTokens = []; + function addTokens(tokens, from, to) { + var idx = 0, col = 0; + while ((col + tokens[idx].value.length) < from) { + col += tokens[idx].value.length; + idx++; + if (idx == tokens.length) + return; + } + if (col != from) { + var value = tokens[idx].value.substring(from - col); + if (value.length > (to - from)) + value = value.substring(0, to - from); + renderTokens.push({ + type: tokens[idx].type, + value: value + }); + col = from + value.length; + idx += 1; + } + while (col < to && idx < tokens.length) { + var value = tokens[idx].value; + if (value.length + col > to) { + renderTokens.push({ + type: tokens[idx].type, + value: value.substring(0, to - col) + }); + } + else + renderTokens.push(tokens[idx]); + col += value.length; + idx += 1; + } + } + var tokens = session.getTokens(row); + foldLine.walk(function (placeholder, row, column, lastColumn, isNewRow) { + if (placeholder != null) { + renderTokens.push({ + type: "fold", + value: placeholder + }); + } + else { + if (isNewRow) + tokens = session.getTokens(row); + if (tokens.length) + addTokens(tokens, lastColumn, column); + } + }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); + return renderTokens; + }; + Text.prototype.$useLineGroups = function () { + return this.session.getUseWrapMode(); + }; + return Text; +}()); +Text.prototype.EOF_CHAR = "\xB6"; +Text.prototype.EOL_CHAR_LF = "\xAC"; +Text.prototype.EOL_CHAR_CRLF = "\xa4"; +Text.prototype.EOL_CHAR = Text.prototype.EOL_CHAR_LF; +Text.prototype.TAB_CHAR = "\u2014"; //"\u21E5"; +Text.prototype.SPACE_CHAR = "\xB7"; +Text.prototype.$padding = 0; +Text.prototype.MAX_LINE_LENGTH = 10000; +Text.prototype.showInvisibles = false; +Text.prototype.showSpaces = false; +Text.prototype.showTabs = false; +Text.prototype.showEOL = false; +Text.prototype.displayIndentGuides = true; +Text.prototype.$highlightIndentGuides = true; +Text.prototype.$tabStrings = []; +Text.prototype.destroy = {}; +Text.prototype.onChangeTabSize = Text.prototype.$computeTabString; +oop.implement(Text.prototype, EventEmitter); +exports.Text = Text; + +}); + +define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var Cursor = /** @class */ (function () { + function Cursor(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_cursor-layer"; + parentEl.appendChild(this.element); + this.isVisible = false; + this.isBlinking = true; + this.blinkInterval = 1000; + this.smoothBlinking = false; + this.cursors = []; + this.cursor = this.addCursor(); + dom.addCssClass(this.element, "ace_hidden-cursors"); + this.$updateCursors = this.$updateOpacity.bind(this); + } + Cursor.prototype.$updateOpacity = function (val) { + var cursors = this.cursors; + for (var i = cursors.length; i--;) + dom.setStyle(cursors[i].style, "opacity", val ? "" : "0"); + }; + Cursor.prototype.$startCssAnimation = function () { + var cursors = this.cursors; + for (var i = cursors.length; i--;) + cursors[i].style.animationDuration = this.blinkInterval + "ms"; + this.$isAnimating = true; + setTimeout(function () { + if (this.$isAnimating) { + dom.addCssClass(this.element, "ace_animate-blinking"); + } + }.bind(this)); + }; + Cursor.prototype.$stopCssAnimation = function () { + this.$isAnimating = false; + dom.removeCssClass(this.element, "ace_animate-blinking"); + }; + Cursor.prototype.setPadding = function (padding) { + this.$padding = padding; + }; + Cursor.prototype.setSession = function (session) { + this.session = session; + }; + Cursor.prototype.setBlinking = function (blinking) { + if (blinking != this.isBlinking) { + this.isBlinking = blinking; + this.restartTimer(); + } + }; + Cursor.prototype.setBlinkInterval = function (blinkInterval) { + if (blinkInterval != this.blinkInterval) { + this.blinkInterval = blinkInterval; + this.restartTimer(); + } + }; + Cursor.prototype.setSmoothBlinking = function (smoothBlinking) { + if (smoothBlinking != this.smoothBlinking) { + this.smoothBlinking = smoothBlinking; + dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); + this.$updateCursors(true); + this.restartTimer(); + } + }; + Cursor.prototype.addCursor = function () { + var el = dom.createElement("div"); + el.className = "ace_cursor"; + this.element.appendChild(el); + this.cursors.push(el); + return el; + }; + Cursor.prototype.removeCursor = function () { + if (this.cursors.length > 1) { + var el = this.cursors.pop(); + el.parentNode.removeChild(el); + return el; + } + }; + Cursor.prototype.hideCursor = function () { + this.isVisible = false; + dom.addCssClass(this.element, "ace_hidden-cursors"); + this.restartTimer(); + }; + Cursor.prototype.showCursor = function () { + this.isVisible = true; + dom.removeCssClass(this.element, "ace_hidden-cursors"); + this.restartTimer(); + }; + Cursor.prototype.restartTimer = function () { + var update = this.$updateCursors; + clearInterval(this.intervalId); + clearTimeout(this.timeoutId); + this.$stopCssAnimation(); + if (this.smoothBlinking) { + this.$isSmoothBlinking = false; + dom.removeCssClass(this.element, "ace_smooth-blinking"); + } + update(true); + if (!this.isBlinking || !this.blinkInterval || !this.isVisible) { + this.$stopCssAnimation(); + return; + } + if (this.smoothBlinking) { + this.$isSmoothBlinking = true; + setTimeout(function () { + if (this.$isSmoothBlinking) { + dom.addCssClass(this.element, "ace_smooth-blinking"); + } + }.bind(this)); + } + if (dom.HAS_CSS_ANIMATION) { + this.$startCssAnimation(); + } + else { + var blink = /**@this{Cursor}*/ function () { + this.timeoutId = setTimeout(function () { + update(false); + }, 0.6 * this.blinkInterval); + }.bind(this); + this.intervalId = setInterval(function () { + update(true); + blink(); + }, this.blinkInterval); + blink(); + } + }; + Cursor.prototype.getPixelPosition = function (position, onScreen) { + if (!this.config || !this.session) + return { left: 0, top: 0 }; + if (!position) + position = this.session.selection.getCursor(); + var pos = this.session.documentToScreenPosition(position); + var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row) + ? this.session.$bidiHandler.getPosLeft(pos.column) + : pos.column * this.config.characterWidth); + var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * + this.config.lineHeight; + return { left: cursorLeft, top: cursorTop }; + }; + Cursor.prototype.isCursorInView = function (pixelPos, config) { + return pixelPos.top >= 0 && pixelPos.top < config.maxHeight; + }; + Cursor.prototype.update = function (config) { + this.config = config; + var selections = this.session.$selectionMarkers; + var i = 0, cursorIndex = 0; + if (selections === undefined || selections.length === 0) { + selections = [{ cursor: null }]; + } + for (var i = 0, n = selections.length; i < n; i++) { + var pixelPos = this.getPixelPosition(selections[i].cursor, true); + if ((pixelPos.top > config.height + config.offset || + pixelPos.top < 0) && i > 1) { + continue; + } + var element = this.cursors[cursorIndex++] || this.addCursor(); + var style = element.style; + if (!this.drawCursor) { + if (!this.isCursorInView(pixelPos, config)) { + dom.setStyle(style, "display", "none"); + } + else { + dom.setStyle(style, "display", "block"); + dom.translate(element, pixelPos.left, pixelPos.top); + dom.setStyle(style, "width", Math.round(config.characterWidth) + "px"); + dom.setStyle(style, "height", config.lineHeight + "px"); + } + } + else { + this.drawCursor(element, pixelPos, config, selections[i], this.session); + } + } + while (this.cursors.length > cursorIndex) + this.removeCursor(); + var overwrite = this.session.getOverwrite(); + this.$setOverwrite(overwrite); + this.$pixelPos = pixelPos; + this.restartTimer(); + }; + Cursor.prototype.$setOverwrite = function (overwrite) { + if (overwrite != this.overwrite) { + this.overwrite = overwrite; + if (overwrite) + dom.addCssClass(this.element, "ace_overwrite-cursors"); + else + dom.removeCssClass(this.element, "ace_overwrite-cursors"); + } + }; + Cursor.prototype.destroy = function () { + clearInterval(this.intervalId); + clearTimeout(this.timeoutId); + }; + return Cursor; +}()); +Cursor.prototype.$padding = 0; +Cursor.prototype.drawCursor = null; +exports.Cursor = Cursor; + +}); + +define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var oop = require("./lib/oop"); +var dom = require("./lib/dom"); +var event = require("./lib/event"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var MAX_SCROLL_H = 0x8000; +var Scrollbar = /** @class */ (function () { + function Scrollbar(parent, classSuffix) { + this.element = dom.createElement("div"); + this.element.className = "ace_scrollbar ace_scrollbar" + classSuffix; + this.inner = dom.createElement("div"); + this.inner.className = "ace_scrollbar-inner"; + this.inner.textContent = "\xa0"; + this.element.appendChild(this.inner); + parent.appendChild(this.element); + this.setVisible(false); + this.skipEvent = false; + event.addListener(this.element, "scroll", this.onScroll.bind(this)); + event.addListener(this.element, "mousedown", event.preventDefault); + } + Scrollbar.prototype.setVisible = function (isVisible) { + this.element.style.display = isVisible ? "" : "none"; + this.isVisible = isVisible; + this.coeff = 1; + }; + return Scrollbar; +}()); +oop.implement(Scrollbar.prototype, EventEmitter); +var VScrollBar = /** @class */ (function (_super) { + __extends(VScrollBar, _super); + function VScrollBar(parent, renderer) { + var _this = _super.call(this, parent, '-v') || this; + _this.scrollTop = 0; + _this.scrollHeight = 0; + renderer.$scrollbarWidth = + _this.width = dom.scrollbarWidth(parent.ownerDocument); + _this.inner.style.width = + _this.element.style.width = (_this.width || 15) + 5 + "px"; + _this.$minWidth = 0; + return _this; + } + VScrollBar.prototype.onScroll = function () { + if (!this.skipEvent) { + this.scrollTop = this.element.scrollTop; + if (this.coeff != 1) { + var h = this.element.clientHeight / this.scrollHeight; + this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h); + } + this._emit("scroll", { data: this.scrollTop }); + } + this.skipEvent = false; + }; + VScrollBar.prototype.getWidth = function () { + return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0); + }; + VScrollBar.prototype.setHeight = function (height) { + this.element.style.height = height + "px"; + }; + VScrollBar.prototype.setScrollHeight = function (height) { + this.scrollHeight = height; + if (height > MAX_SCROLL_H) { + this.coeff = MAX_SCROLL_H / height; + height = MAX_SCROLL_H; + } + else if (this.coeff != 1) { + this.coeff = 1; + } + this.inner.style.height = height + "px"; + }; + VScrollBar.prototype.setScrollTop = function (scrollTop) { + if (this.scrollTop != scrollTop) { + this.skipEvent = true; + this.scrollTop = scrollTop; + this.element.scrollTop = scrollTop * this.coeff; + } + }; + return VScrollBar; +}(Scrollbar)); +VScrollBar.prototype.setInnerHeight = VScrollBar.prototype.setScrollHeight; +var HScrollBar = /** @class */ (function (_super) { + __extends(HScrollBar, _super); + function HScrollBar(parent, renderer) { + var _this = _super.call(this, parent, '-h') || this; + _this.scrollLeft = 0; + _this.height = renderer.$scrollbarWidth; + _this.inner.style.height = + _this.element.style.height = (_this.height || 15) + 5 + "px"; + return _this; + } + HScrollBar.prototype.onScroll = function () { + if (!this.skipEvent) { + this.scrollLeft = this.element.scrollLeft; + this._emit("scroll", { data: this.scrollLeft }); + } + this.skipEvent = false; + }; + HScrollBar.prototype.getHeight = function () { + return this.isVisible ? this.height : 0; + }; + HScrollBar.prototype.setWidth = function (width) { + this.element.style.width = width + "px"; + }; + HScrollBar.prototype.setInnerWidth = function (width) { + this.inner.style.width = width + "px"; + }; + HScrollBar.prototype.setScrollWidth = function (width) { + this.inner.style.width = width + "px"; + }; + HScrollBar.prototype.setScrollLeft = function (scrollLeft) { + if (this.scrollLeft != scrollLeft) { + this.skipEvent = true; + this.scrollLeft = this.element.scrollLeft = scrollLeft; + } + }; + return HScrollBar; +}(Scrollbar)); +exports.ScrollBar = VScrollBar; // backward compatibility +exports.ScrollBarV = VScrollBar; // backward compatibility +exports.ScrollBarH = HScrollBar; // backward compatibility +exports.VScrollBar = VScrollBar; +exports.HScrollBar = HScrollBar; + +}); + +define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var oop = require("./lib/oop"); +var dom = require("./lib/dom"); +var event = require("./lib/event"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +dom.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}", "ace_scrollbar.css", false); +var ScrollBar = /** @class */ (function () { + function ScrollBar(parent, classSuffix) { + this.element = dom.createElement("div"); + this.element.className = "ace_sb" + classSuffix; + this.inner = dom.createElement("div"); + this.inner.className = ""; + this.element.appendChild(this.inner); + this.VScrollWidth = 12; + this.HScrollHeight = 12; + parent.appendChild(this.element); + this.setVisible(false); + this.skipEvent = false; + event.addMultiMouseDownListener(this.element, [500, 300, 300], this, "onMouseDown"); + } + ScrollBar.prototype.setVisible = function (isVisible) { + this.element.style.display = isVisible ? "" : "none"; + this.isVisible = isVisible; + this.coeff = 1; + }; + return ScrollBar; +}()); +oop.implement(ScrollBar.prototype, EventEmitter); +var VScrollBar = /** @class */ (function (_super) { + __extends(VScrollBar, _super); + function VScrollBar(parent, renderer) { + var _this = _super.call(this, parent, '-v') || this; + _this.scrollTop = 0; + _this.scrollHeight = 0; + _this.parent = parent; + _this.width = _this.VScrollWidth; + _this.renderer = renderer; + _this.inner.style.width = _this.element.style.width = (_this.width || 15) + "px"; + _this.$minWidth = 0; + return _this; + } + VScrollBar.prototype.onMouseDown = function (eType, e) { + if (eType !== "mousedown") + return; + if (event.getButton(e) !== 0 || e.detail === 2) { + return; + } + if (e.target === this.inner) { + var self = this; + var mousePageY = e.clientY; + var onMouseMove = function (e) { + mousePageY = e.clientY; + }; + var onMouseUp = function () { + clearInterval(timerId); + }; + var startY = e.clientY; + var startTop = this.thumbTop; + var onScrollInterval = function () { + if (mousePageY === undefined) + return; + var scrollTop = self.scrollTopFromThumbTop(startTop + mousePageY - startY); + if (scrollTop === self.scrollTop) + return; + self._emit("scroll", { data: scrollTop }); + }; + event.capture(this.inner, onMouseMove, onMouseUp); + var timerId = setInterval(onScrollInterval, 20); + return event.preventDefault(e); + } + var top = e.clientY - this.element.getBoundingClientRect().top - this.thumbHeight / 2; + this._emit("scroll", { data: this.scrollTopFromThumbTop(top) }); + return event.preventDefault(e); + }; + VScrollBar.prototype.getHeight = function () { + return this.height; + }; + VScrollBar.prototype.scrollTopFromThumbTop = function (thumbTop) { + var scrollTop = thumbTop * (this.pageHeight - this.viewHeight) / (this.slideHeight - this.thumbHeight); + scrollTop = scrollTop >> 0; + if (scrollTop < 0) { + scrollTop = 0; + } + else if (scrollTop > this.pageHeight - this.viewHeight) { + scrollTop = this.pageHeight - this.viewHeight; + } + return scrollTop; + }; + VScrollBar.prototype.getWidth = function () { + return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0); + }; + VScrollBar.prototype.setHeight = function (height) { + this.height = Math.max(0, height); + this.slideHeight = this.height; + this.viewHeight = this.height; + this.setScrollHeight(this.pageHeight, true); + }; + VScrollBar.prototype.setScrollHeight = function (height, force) { + if (this.pageHeight === height && !force) + return; + this.pageHeight = height; + this.thumbHeight = this.slideHeight * this.viewHeight / this.pageHeight; + if (this.thumbHeight > this.slideHeight) + this.thumbHeight = this.slideHeight; + if (this.thumbHeight < 15) + this.thumbHeight = 15; + this.inner.style.height = this.thumbHeight + "px"; + if (this.scrollTop > (this.pageHeight - this.viewHeight)) { + this.scrollTop = (this.pageHeight - this.viewHeight); + if (this.scrollTop < 0) + this.scrollTop = 0; + this._emit("scroll", { data: this.scrollTop }); + } + }; + VScrollBar.prototype.setScrollTop = function (scrollTop) { + this.scrollTop = scrollTop; + if (scrollTop < 0) + scrollTop = 0; + this.thumbTop = scrollTop * (this.slideHeight - this.thumbHeight) / (this.pageHeight - this.viewHeight); + this.inner.style.top = this.thumbTop + "px"; + }; + return VScrollBar; +}(ScrollBar)); +VScrollBar.prototype.setInnerHeight = VScrollBar.prototype.setScrollHeight; +var HScrollBar = /** @class */ (function (_super) { + __extends(HScrollBar, _super); + function HScrollBar(parent, renderer) { + var _this = _super.call(this, parent, '-h') || this; + _this.scrollLeft = 0; + _this.scrollWidth = 0; + _this.height = _this.HScrollHeight; + _this.inner.style.height = _this.element.style.height = (_this.height || 12) + "px"; + _this.renderer = renderer; + return _this; + } + HScrollBar.prototype.onMouseDown = function (eType, e) { + if (eType !== "mousedown") + return; + if (event.getButton(e) !== 0 || e.detail === 2) { + return; + } + if (e.target === this.inner) { + var self = this; + var mousePageX = e.clientX; + var onMouseMove = function (e) { + mousePageX = e.clientX; + }; + var onMouseUp = function () { + clearInterval(timerId); + }; + var startX = e.clientX; + var startLeft = this.thumbLeft; + var onScrollInterval = function () { + if (mousePageX === undefined) + return; + var scrollLeft = self.scrollLeftFromThumbLeft(startLeft + mousePageX - startX); + if (scrollLeft === self.scrollLeft) + return; + self._emit("scroll", { data: scrollLeft }); + }; + event.capture(this.inner, onMouseMove, onMouseUp); + var timerId = setInterval(onScrollInterval, 20); + return event.preventDefault(e); + } + var left = e.clientX - this.element.getBoundingClientRect().left - this.thumbWidth / 2; + this._emit("scroll", { data: this.scrollLeftFromThumbLeft(left) }); + return event.preventDefault(e); + }; + HScrollBar.prototype.getHeight = function () { + return this.isVisible ? this.height : 0; + }; + HScrollBar.prototype.scrollLeftFromThumbLeft = function (thumbLeft) { + var scrollLeft = thumbLeft * (this.pageWidth - this.viewWidth) / (this.slideWidth - this.thumbWidth); + scrollLeft = scrollLeft >> 0; + if (scrollLeft < 0) { + scrollLeft = 0; + } + else if (scrollLeft > this.pageWidth - this.viewWidth) { + scrollLeft = this.pageWidth - this.viewWidth; + } + return scrollLeft; + }; + HScrollBar.prototype.setWidth = function (width) { + this.width = Math.max(0, width); + this.element.style.width = this.width + "px"; + this.slideWidth = this.width; + this.viewWidth = this.width; + this.setScrollWidth(this.pageWidth, true); + }; + HScrollBar.prototype.setScrollWidth = function (width, force) { + if (this.pageWidth === width && !force) + return; + this.pageWidth = width; + this.thumbWidth = this.slideWidth * this.viewWidth / this.pageWidth; + if (this.thumbWidth > this.slideWidth) + this.thumbWidth = this.slideWidth; + if (this.thumbWidth < 15) + this.thumbWidth = 15; + this.inner.style.width = this.thumbWidth + "px"; + if (this.scrollLeft > (this.pageWidth - this.viewWidth)) { + this.scrollLeft = (this.pageWidth - this.viewWidth); + if (this.scrollLeft < 0) + this.scrollLeft = 0; + this._emit("scroll", { data: this.scrollLeft }); + } + }; + HScrollBar.prototype.setScrollLeft = function (scrollLeft) { + this.scrollLeft = scrollLeft; + if (scrollLeft < 0) + scrollLeft = 0; + this.thumbLeft = scrollLeft * (this.slideWidth - this.thumbWidth) / (this.pageWidth - this.viewWidth); + this.inner.style.left = (this.thumbLeft) + "px"; + }; + return HScrollBar; +}(ScrollBar)); +HScrollBar.prototype.setInnerWidth = HScrollBar.prototype.setScrollWidth; +exports.ScrollBar = VScrollBar; // backward compatibility +exports.ScrollBarV = VScrollBar; // backward compatibility +exports.ScrollBarH = HScrollBar; // backward compatibility +exports.VScrollBar = VScrollBar; +exports.HScrollBar = HScrollBar; + +}); + +define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module){"use strict"; +var event = require("./lib/event"); +var RenderLoop = /** @class */ (function () { + function RenderLoop(onRender, win) { + this.onRender = onRender; + this.pending = false; + this.changes = 0; + this.$recursionLimit = 2; + this.window = win || window; + var _self = this; + this._flush = function (ts) { + _self.pending = false; + var changes = _self.changes; + if (changes) { + event.blockIdle(100); + _self.changes = 0; + _self.onRender(changes); + } + if (_self.changes) { + if (_self.$recursionLimit-- < 0) + return; + _self.schedule(); + } + else { + _self.$recursionLimit = 2; + } + }; + } + RenderLoop.prototype.schedule = function (change) { + this.changes = this.changes | change; + if (this.changes && !this.pending) { + event.nextFrame(this._flush); + this.pending = true; + } + }; + RenderLoop.prototype.clear = function (change) { + var changes = this.changes; + this.changes = 0; + return changes; + }; + return RenderLoop; +}()); +exports.RenderLoop = RenderLoop; + +}); + +define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module){var oop = require("../lib/oop"); +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var CHAR_COUNT = 512; +var USE_OBSERVER = typeof ResizeObserver == "function"; +var L = 200; +var FontMetrics = /** @class */ (function () { + function FontMetrics(parentEl) { + this.el = dom.createElement("div"); + this.$setMeasureNodeStyles(this.el.style, true); + this.$main = dom.createElement("div"); + this.$setMeasureNodeStyles(this.$main.style); + this.$measureNode = dom.createElement("div"); + this.$setMeasureNodeStyles(this.$measureNode.style); + this.el.appendChild(this.$main); + this.el.appendChild(this.$measureNode); + parentEl.appendChild(this.el); + this.$measureNode.textContent = lang.stringRepeat("X", CHAR_COUNT); + this.$characterSize = { width: 0, height: 0 }; + if (USE_OBSERVER) + this.$addObserver(); + else + this.checkForSizeChanges(); + } + FontMetrics.prototype.$setMeasureNodeStyles = function (style, isRoot) { + style.width = style.height = "auto"; + style.left = style.top = "0px"; + style.visibility = "hidden"; + style.position = "absolute"; + style.whiteSpace = "pre"; + if (useragent.isIE < 8) { + style["font-family"] = "inherit"; + } + else { + style.font = "inherit"; + } + style.overflow = isRoot ? "hidden" : "visible"; + }; + FontMetrics.prototype.checkForSizeChanges = function (size) { + if (size === undefined) + size = this.$measureSizes(); + if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { + this.$measureNode.style.fontWeight = "bold"; + var boldSize = this.$measureSizes(); + this.$measureNode.style.fontWeight = ""; + this.$characterSize = size; + this.charSizes = Object.create(null); + this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; + this._emit("changeCharacterSize", { data: size }); + } + }; + FontMetrics.prototype.$addObserver = function () { + var self = this; + this.$observer = new window.ResizeObserver(function (e) { + self.checkForSizeChanges(); + }); + this.$observer.observe(this.$measureNode); + }; + FontMetrics.prototype.$pollSizeChanges = function () { + if (this.$pollSizeChangesTimer || this.$observer) + return this.$pollSizeChangesTimer; + var self = this; + return this.$pollSizeChangesTimer = event.onIdle(function cb() { + self.checkForSizeChanges(); + event.onIdle(cb, 500); + }, 500); + }; + FontMetrics.prototype.setPolling = function (val) { + if (val) { + this.$pollSizeChanges(); + } + else if (this.$pollSizeChangesTimer) { + clearInterval(this.$pollSizeChangesTimer); + this.$pollSizeChangesTimer = 0; + } + }; + FontMetrics.prototype.$measureSizes = function (node) { + var size = { + height: (node || this.$measureNode).clientHeight, + width: (node || this.$measureNode).clientWidth / CHAR_COUNT + }; + if (size.width === 0 || size.height === 0) + return null; + return size; + }; + FontMetrics.prototype.$measureCharWidth = function (ch) { + this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT); + var rect = this.$main.getBoundingClientRect(); + return rect.width / CHAR_COUNT; + }; + FontMetrics.prototype.getCharacterWidth = function (ch) { + var w = this.charSizes[ch]; + if (w === undefined) { + w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; + } + return w; + }; + FontMetrics.prototype.destroy = function () { + clearInterval(this.$pollSizeChangesTimer); + if (this.$observer) + this.$observer.disconnect(); + if (this.el && this.el.parentNode) + this.el.parentNode.removeChild(this.el); + }; + FontMetrics.prototype.$getZoom = function (element) { + if (!element || !element.parentElement) + return 1; + return (Number(window.getComputedStyle(element)["zoom"]) || 1) * this.$getZoom(element.parentElement); + }; + FontMetrics.prototype.$initTransformMeasureNodes = function () { + var t = function (t, l) { + return ["div", { + style: "position: absolute;top:" + t + "px;left:" + l + "px;" + }]; + }; + this.els = dom.buildDom([t(0, 0), t(L, 0), t(0, L), t(L, L)], this.el); + }; + FontMetrics.prototype.transformCoordinates = function (clientPos, elPos) { + if (clientPos) { + var zoom = this.$getZoom(this.el); + clientPos = mul(1 / zoom, clientPos); + } + function solve(l1, l2, r) { + var det = l1[1] * l2[0] - l1[0] * l2[1]; + return [ + (-l2[1] * r[0] + l2[0] * r[1]) / det, + (+l1[1] * r[0] - l1[0] * r[1]) / det + ]; + } + function sub(a, b) { return [a[0] - b[0], a[1] - b[1]]; } + function add(a, b) { return [a[0] + b[0], a[1] + b[1]]; } + function mul(a, b) { return [a * b[0], a * b[1]]; } + if (!this.els) + this.$initTransformMeasureNodes(); + function p(el) { + var r = el.getBoundingClientRect(); + return [r.left, r.top]; + } + var a = p(this.els[0]); + var b = p(this.els[1]); + var c = p(this.els[2]); + var d = p(this.els[3]); + var h = solve(sub(d, b), sub(d, c), sub(add(b, c), add(d, a))); + var m1 = mul(1 + h[0], sub(b, a)); + var m2 = mul(1 + h[1], sub(c, a)); + if (elPos) { + var x = elPos; + var k = h[0] * x[0] / L + h[1] * x[1] / L + 1; + var ut = add(mul(x[0], m1), mul(x[1], m2)); + return add(mul(1 / k / L, ut), a); + } + var u = sub(clientPos, a); + var f = solve(sub(m1, mul(h[0], u)), sub(m2, mul(h[1], u)), u); + return mul(L, f); + }; + return FontMetrics; +}()); +FontMetrics.prototype.$characterSize = { width: 0, height: 0 }; +oop.implement(FontMetrics.prototype, EventEmitter); +exports.FontMetrics = FontMetrics; + +}); + +define("ace/css/editor-css",["require","exports","module"], function(require, exports, module){/* +styles = [] +for (var i = 1; i < 16; i++) { + styles.push(".ace_br" + i + "{" + ( + ["top-left", "top-right", "bottom-right", "bottom-left"] + ).map(function(x, j) { + return i & (1< .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\n url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\n url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: \"\u21A9\";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}"; + +}); + +define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var Decorator = /** @class */ (function () { + function Decorator(parent, renderer) { + this.canvas = dom.createElement("canvas"); + this.renderer = renderer; + this.pixelRatio = 1; + this.maxHeight = renderer.layerConfig.maxHeight; + this.lineHeight = renderer.layerConfig.lineHeight; + this.canvasHeight = parent.parent.scrollHeight; + this.heightRatio = this.canvasHeight / this.maxHeight; + this.canvasWidth = parent.width; + this.minDecorationHeight = (2 * this.pixelRatio) | 0; + this.halfMinDecorationHeight = (this.minDecorationHeight / 2) | 0; + this.canvas.width = this.canvasWidth; + this.canvas.height = this.canvasHeight; + this.canvas.style.top = 0 + "px"; + this.canvas.style.right = 0 + "px"; + this.canvas.style.zIndex = 7 + "px"; + this.canvas.style.position = "absolute"; + this.colors = {}; + this.colors.dark = { + "error": "rgba(255, 18, 18, 1)", + "warning": "rgba(18, 136, 18, 1)", + "info": "rgba(18, 18, 136, 1)" + }; + this.colors.light = { + "error": "rgb(255,51,51)", + "warning": "rgb(32,133,72)", + "info": "rgb(35,68,138)" + }; + parent.element.appendChild(this.canvas); + } + Decorator.prototype.$updateDecorators = function (config) { + var colors = (this.renderer.theme.isDark === true) ? this.colors.dark : this.colors.light; + if (config) { + this.maxHeight = config.maxHeight; + this.lineHeight = config.lineHeight; + this.canvasHeight = config.height; + var allLineHeight = (config.lastRow + 1) * this.lineHeight; + if (allLineHeight < this.canvasHeight) { + this.heightRatio = 1; + } + else { + this.heightRatio = this.canvasHeight / this.maxHeight; + } + } + var ctx = this.canvas.getContext("2d"); + function compare(a, b) { + if (a.priority < b.priority) + return -1; + if (a.priority > b.priority) + return 1; + return 0; + } + var annotations = this.renderer.session.$annotations; + ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + if (annotations) { + var priorities = { + "info": 1, + "warning": 2, + "error": 3 + }; + annotations.forEach(function (item) { + item.priority = priorities[item.type] || null; + }); + annotations = annotations.sort(compare); + var foldData = this.renderer.session.$foldData; + for (var i = 0; i < annotations.length; i++) { + var row = annotations[i].row; + var compensateFold = this.compensateFoldRows(row, foldData); + var currentY = Math.round((row - compensateFold) * this.lineHeight * this.heightRatio); + var y1 = Math.round(((row - compensateFold) * this.lineHeight * this.heightRatio)); + var y2 = Math.round((((row - compensateFold) * this.lineHeight + this.lineHeight) * this.heightRatio)); + var height = y2 - y1; + if (height < this.minDecorationHeight) { + var yCenter = ((y1 + y2) / 2) | 0; + if (yCenter < this.halfMinDecorationHeight) { + yCenter = this.halfMinDecorationHeight; + } + else if (yCenter + this.halfMinDecorationHeight > this.canvasHeight) { + yCenter = this.canvasHeight - this.halfMinDecorationHeight; + } + y1 = Math.round(yCenter - this.halfMinDecorationHeight); + y2 = Math.round(yCenter + this.halfMinDecorationHeight); + } + ctx.fillStyle = colors[annotations[i].type] || null; + ctx.fillRect(0, currentY, this.canvasWidth, y2 - y1); + } + } + var cursor = this.renderer.session.selection.getCursor(); + if (cursor) { + var compensateFold = this.compensateFoldRows(cursor.row, foldData); + var currentY = Math.round((cursor.row - compensateFold) * this.lineHeight * this.heightRatio); + ctx.fillStyle = "rgba(0, 0, 0, 0.5)"; + ctx.fillRect(0, currentY, this.canvasWidth, 2); + } + }; + Decorator.prototype.compensateFoldRows = function (row, foldData) { + var compensateFold = 0; + if (foldData && foldData.length > 0) { + for (var j = 0; j < foldData.length; j++) { + if (row > foldData[j].start.row && row < foldData[j].end.row) { + compensateFold += row - foldData[j].start.row; + } + else if (row >= foldData[j].end.row) { + compensateFold += foldData[j].end.row - foldData[j].start.row; + } + } + } + return compensateFold; + }; + return Decorator; +}()); +oop.implement(Decorator.prototype, EventEmitter); +exports.Decorator = Decorator; + +}); + +define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var dom = require("./lib/dom"); +var lang = require("./lib/lang"); +var config = require("./config"); +var GutterLayer = require("./layer/gutter").Gutter; +var MarkerLayer = require("./layer/marker").Marker; +var TextLayer = require("./layer/text").Text; +var CursorLayer = require("./layer/cursor").Cursor; +var HScrollBar = require("./scrollbar").HScrollBar; +var VScrollBar = require("./scrollbar").VScrollBar; +var HScrollBarCustom = require("./scrollbar_custom").HScrollBar; +var VScrollBarCustom = require("./scrollbar_custom").VScrollBar; +var RenderLoop = require("./renderloop").RenderLoop; +var FontMetrics = require("./layer/font_metrics").FontMetrics; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var editorCss = require("./css/editor-css"); +var Decorator = require("./layer/decorators").Decorator; +var useragent = require("./lib/useragent"); +var isTextToken = require("./layer/text_util").isTextToken; +dom.importCssString(editorCss, "ace_editor.css", false); +var VirtualRenderer = /** @class */ (function () { + function VirtualRenderer(container, theme) { + var _self = this; + this.container = container || dom.createElement("div"); + dom.addCssClass(this.container, "ace_editor"); + if (dom.HI_DPI) + dom.addCssClass(this.container, "ace_hidpi"); + this.setTheme(theme); + if (config.get("useStrictCSP") == null) + config.set("useStrictCSP", false); + this.$gutter = dom.createElement("div"); + this.$gutter.className = "ace_gutter"; + this.container.appendChild(this.$gutter); + this.$gutter.setAttribute("aria-hidden", "true"); + this.scroller = dom.createElement("div"); + this.scroller.className = "ace_scroller"; + this.container.appendChild(this.scroller); + this.content = dom.createElement("div"); + this.content.className = "ace_content"; + this.scroller.appendChild(this.content); + this.$gutterLayer = new GutterLayer(this.$gutter); + this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); + this.$markerBack = new MarkerLayer(this.content); + var textLayer = this.$textLayer = new TextLayer(this.content); + this.canvas = textLayer.element; + this.$markerFront = new MarkerLayer(this.content); + this.$cursorLayer = new CursorLayer(this.content); + this.$horizScroll = false; + this.$vScroll = false; + this.scrollBar = + this.scrollBarV = new VScrollBar(this.container, this); + this.scrollBarH = new HScrollBar(this.container, this); + this.scrollBarV.on("scroll", function (e) { + if (!_self.$scrollAnimation) + _self.session.setScrollTop(e.data - _self.scrollMargin.top); + }); + this.scrollBarH.on("scroll", function (e) { + if (!_self.$scrollAnimation) + _self.session.setScrollLeft(e.data - _self.scrollMargin.left); + }); + this.scrollTop = 0; + this.scrollLeft = 0; + this.cursorPos = { + row: 0, + column: 0 + }; + this.$fontMetrics = new FontMetrics(this.container); + this.$textLayer.$setFontMetrics(this.$fontMetrics); + this.$textLayer.on("changeCharacterSize", function (e) { + _self.updateCharacterSize(); + _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); + _self._signal("changeCharacterSize", e); + }); + this.$size = { + width: 0, + height: 0, + scrollerHeight: 0, + scrollerWidth: 0, + $dirty: true + }; + this.layerConfig = { + width: 1, + padding: 0, + firstRow: 0, + firstRowScreen: 0, + lastRow: 0, + lineHeight: 0, + characterWidth: 0, + minHeight: 1, + maxHeight: 1, + offset: 0, + height: 1, + gutterOffset: 1 + }; + this.scrollMargin = { + left: 0, + right: 0, + top: 0, + bottom: 0, + v: 0, + h: 0 + }; + this.margin = { + left: 0, + right: 0, + top: 0, + bottom: 0, + v: 0, + h: 0 + }; + this.$keepTextAreaAtCursor = !useragent.isIOS; + this.$loop = new RenderLoop(this.$renderChanges.bind(this), this.container.ownerDocument.defaultView); + this.$loop.schedule(this.CHANGE_FULL); + this.updateCharacterSize(); + this.setPadding(4); + this.$addResizeObserver(); + config.resetOptions(this); + config._signal("renderer", this); + } + VirtualRenderer.prototype.updateCharacterSize = function () { + if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { + this.$allowBoldFonts = this.$textLayer.allowBoldFonts; + this.setStyle("ace_nobold", !this.$allowBoldFonts); + } + this.layerConfig.characterWidth = + this.characterWidth = this.$textLayer.getCharacterWidth(); + this.layerConfig.lineHeight = + this.lineHeight = this.$textLayer.getLineHeight(); + this.$updatePrintMargin(); + dom.setStyle(this.scroller.style, "line-height", this.lineHeight + "px"); + }; + VirtualRenderer.prototype.setSession = function (session) { + if (this.session) + this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); + this.session = session; + if (session && this.scrollMargin.top && session.getScrollTop() <= 0) + session.setScrollTop(-this.scrollMargin.top); + this.$cursorLayer.setSession(session); + this.$markerBack.setSession(session); + this.$markerFront.setSession(session); + this.$gutterLayer.setSession(session); + this.$textLayer.setSession(session); + if (!session) + return; + this.$loop.schedule(this.CHANGE_FULL); + this.session.$setFontMetrics(this.$fontMetrics); + this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null; + this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); + this.onChangeNewLineMode(); + this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); + }; + VirtualRenderer.prototype.updateLines = function (firstRow, lastRow, force) { + if (lastRow === undefined) + lastRow = Infinity; + if (!this.$changedLines) { + this.$changedLines = { + firstRow: firstRow, + lastRow: lastRow + }; + } + else { + if (this.$changedLines.firstRow > firstRow) + this.$changedLines.firstRow = firstRow; + if (this.$changedLines.lastRow < lastRow) + this.$changedLines.lastRow = lastRow; + } + if (this.$changedLines.lastRow < this.layerConfig.firstRow) { + if (force) + this.$changedLines.lastRow = this.layerConfig.lastRow; + else + return; + } + if (this.$changedLines.firstRow > this.layerConfig.lastRow) + return; + this.$loop.schedule(this.CHANGE_LINES); + }; + VirtualRenderer.prototype.onChangeNewLineMode = function () { + this.$loop.schedule(this.CHANGE_TEXT); + this.$textLayer.$updateEolChar(); + this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR); + }; + VirtualRenderer.prototype.onChangeTabSize = function () { + this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); + this.$textLayer.onChangeTabSize(); + }; + VirtualRenderer.prototype.updateText = function () { + this.$loop.schedule(this.CHANGE_TEXT); + }; + VirtualRenderer.prototype.updateFull = function (force) { + if (force) + this.$renderChanges(this.CHANGE_FULL, true); + else + this.$loop.schedule(this.CHANGE_FULL); + }; + VirtualRenderer.prototype.updateFontSize = function () { + this.$textLayer.checkForSizeChanges(); + }; + VirtualRenderer.prototype.$updateSizeAsync = function () { + if (this.$loop.pending) + this.$size.$dirty = true; + else + this.onResize(); + }; + VirtualRenderer.prototype.onResize = function (force, gutterWidth, width, height) { + if (this.resizing > 2) + return; + else if (this.resizing > 0) + this.resizing++; + else + this.resizing = force ? 1 : 0; + var el = this.container; + if (!height) + height = el.clientHeight || el.scrollHeight; + if (!height && this.$maxLines && this.lineHeight > 1) { + if (!el.style.height || el.style.height == "0px") { + el.style.height = "1px"; + height = el.clientHeight || el.scrollHeight; + } + } + if (!width) + width = el.clientWidth || el.scrollWidth; + var changes = this.$updateCachedSize(force, gutterWidth, width, height); + if (this.$resizeTimer) + this.$resizeTimer.cancel(); + if (!this.$size.scrollerHeight || (!width && !height)) + return this.resizing = 0; + if (force) + this.$gutterLayer.$padding = null; + if (force) + this.$renderChanges(changes | this.$changes, true); + else + this.$loop.schedule(changes | this.$changes); + if (this.resizing) + this.resizing = 0; + this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null; + if (this.$customScrollbar) { + this.$updateCustomScrollbar(true); + } + }; + VirtualRenderer.prototype.$updateCachedSize = function (force, gutterWidth, width, height) { + height -= (this.$extraHeight || 0); + var changes = 0; + var size = this.$size; + var oldSize = { + width: size.width, + height: size.height, + scrollerHeight: size.scrollerHeight, + scrollerWidth: size.scrollerWidth + }; + if (height && (force || size.height != height)) { + size.height = height; + changes |= this.CHANGE_SIZE; + size.scrollerHeight = size.height; + if (this.$horizScroll) + size.scrollerHeight -= this.scrollBarH.getHeight(); + this.scrollBarV.setHeight(size.scrollerHeight); + this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; + changes = changes | this.CHANGE_SCROLL; + } + if (width && (force || size.width != width)) { + changes |= this.CHANGE_SIZE; + size.width = width; + if (gutterWidth == null) + gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; + this.gutterWidth = gutterWidth; + dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px"); + dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px"); + size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h); + dom.setStyle(this.$gutter.style, "left", this.margin.left + "px"); + var right = this.scrollBarV.getWidth() + "px"; + dom.setStyle(this.scrollBarH.element.style, "right", right); + dom.setStyle(this.scroller.style, "right", right); + dom.setStyle(this.scroller.style, "bottom", this.scrollBarH.getHeight()); + this.scrollBarH.setWidth(size.scrollerWidth); + if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) { + changes |= this.CHANGE_FULL; + } + } + size.$dirty = !width || !height; + if (changes) + this._signal("resize", oldSize); + return changes; + }; + VirtualRenderer.prototype.onGutterResize = function (width) { + var gutterWidth = this.$showGutter ? width : 0; + if (gutterWidth != this.gutterWidth) + this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); + if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { + this.$loop.schedule(this.CHANGE_FULL); + } + else if (this.$size.$dirty) { + this.$loop.schedule(this.CHANGE_FULL); + } + else { + this.$computeLayerConfig(); + } + }; + VirtualRenderer.prototype.adjustWrapLimit = function () { + var availableWidth = this.$size.scrollerWidth - this.$padding * 2; + var limit = Math.floor(availableWidth / this.characterWidth); + return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); + }; + VirtualRenderer.prototype.setAnimatedScroll = function (shouldAnimate) { + this.setOption("animatedScroll", shouldAnimate); + }; + VirtualRenderer.prototype.getAnimatedScroll = function () { + return this.$animatedScroll; + }; + VirtualRenderer.prototype.setShowInvisibles = function (showInvisibles) { + this.setOption("showInvisibles", showInvisibles); + this.session.$bidiHandler.setShowInvisibles(showInvisibles); + }; + VirtualRenderer.prototype.getShowInvisibles = function () { + return this.getOption("showInvisibles"); + }; + VirtualRenderer.prototype.getDisplayIndentGuides = function () { + return this.getOption("displayIndentGuides"); + }; + VirtualRenderer.prototype.setDisplayIndentGuides = function (display) { + this.setOption("displayIndentGuides", display); + }; + VirtualRenderer.prototype.getHighlightIndentGuides = function () { + return this.getOption("highlightIndentGuides"); + }; + VirtualRenderer.prototype.setHighlightIndentGuides = function (highlight) { + this.setOption("highlightIndentGuides", highlight); + }; + VirtualRenderer.prototype.setShowPrintMargin = function (showPrintMargin) { + this.setOption("showPrintMargin", showPrintMargin); + }; + VirtualRenderer.prototype.getShowPrintMargin = function () { + return this.getOption("showPrintMargin"); + }; + VirtualRenderer.prototype.setPrintMarginColumn = function (printMarginColumn) { + this.setOption("printMarginColumn", printMarginColumn); + }; + VirtualRenderer.prototype.getPrintMarginColumn = function () { + return this.getOption("printMarginColumn"); + }; + VirtualRenderer.prototype.getShowGutter = function () { + return this.getOption("showGutter"); + }; + VirtualRenderer.prototype.setShowGutter = function (show) { + return this.setOption("showGutter", show); + }; + VirtualRenderer.prototype.getFadeFoldWidgets = function () { + return this.getOption("fadeFoldWidgets"); + }; + VirtualRenderer.prototype.setFadeFoldWidgets = function (show) { + this.setOption("fadeFoldWidgets", show); + }; + VirtualRenderer.prototype.setHighlightGutterLine = function (shouldHighlight) { + this.setOption("highlightGutterLine", shouldHighlight); + }; + VirtualRenderer.prototype.getHighlightGutterLine = function () { + return this.getOption("highlightGutterLine"); + }; + VirtualRenderer.prototype.$updatePrintMargin = function () { + if (!this.$showPrintMargin && !this.$printMarginEl) + return; + if (!this.$printMarginEl) { + var containerEl = dom.createElement("div"); + containerEl.className = "ace_layer ace_print-margin-layer"; + this.$printMarginEl = dom.createElement("div"); + this.$printMarginEl.className = "ace_print-margin"; + containerEl.appendChild(this.$printMarginEl); + this.content.insertBefore(containerEl, this.content.firstChild); + } + var style = this.$printMarginEl.style; + style.left = Math.round(this.characterWidth * this.$printMarginColumn + this.$padding) + "px"; + style.visibility = this.$showPrintMargin ? "visible" : "hidden"; + if (this.session && this.session.$wrap == -1) + this.adjustWrapLimit(); + }; + VirtualRenderer.prototype.getContainerElement = function () { + return this.container; + }; + VirtualRenderer.prototype.getMouseEventTarget = function () { + return this.scroller; + }; + VirtualRenderer.prototype.getTextAreaContainer = function () { + return this.container; + }; + VirtualRenderer.prototype.$moveTextAreaToCursor = function () { + if (this.$isMousePressed) + return; + var style = this.textarea.style; + var composition = this.$composition; + if (!this.$keepTextAreaAtCursor && !composition) { + dom.translate(this.textarea, -100, 0); + return; + } + var pixelPos = this.$cursorLayer.$pixelPos; + if (!pixelPos) + return; + if (composition && composition.markerRange) + pixelPos = this.$cursorLayer.getPixelPosition(composition.markerRange.start, true); + var config = this.layerConfig; + var posTop = pixelPos.top; + var posLeft = pixelPos.left; + posTop -= config.offset; + var h = composition && composition.useTextareaForIME || useragent.isMobile ? this.lineHeight : 1; + if (posTop < 0 || posTop > config.height - h) { + dom.translate(this.textarea, 0, 0); + return; + } + var w = 1; + var maxTop = this.$size.height - h; + if (!composition) { + posTop += this.lineHeight; + } + else { + if (composition.useTextareaForIME) { + var val = this.textarea.value; + w = this.characterWidth * (this.session.$getStringScreenWidth(val)[0]); + } + else { + posTop += this.lineHeight + 2; + } + } + posLeft -= this.scrollLeft; + if (posLeft > this.$size.scrollerWidth - w) + posLeft = this.$size.scrollerWidth - w; + posLeft += this.gutterWidth + this.margin.left; + dom.setStyle(style, "height", h + "px"); + dom.setStyle(style, "width", w + "px"); + dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, maxTop)); + }; + VirtualRenderer.prototype.getFirstVisibleRow = function () { + return this.layerConfig.firstRow; + }; + VirtualRenderer.prototype.getFirstFullyVisibleRow = function () { + return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); + }; + VirtualRenderer.prototype.getLastFullyVisibleRow = function () { + var config = this.layerConfig; + var lastRow = config.lastRow; + var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight; + if (top - this.session.getScrollTop() > config.height - config.lineHeight) + return lastRow - 1; + return lastRow; + }; + VirtualRenderer.prototype.getLastVisibleRow = function () { + return this.layerConfig.lastRow; + }; + VirtualRenderer.prototype.setPadding = function (padding) { + this.$padding = padding; + this.$textLayer.setPadding(padding); + this.$cursorLayer.setPadding(padding); + this.$markerFront.setPadding(padding); + this.$markerBack.setPadding(padding); + this.$loop.schedule(this.CHANGE_FULL); + this.$updatePrintMargin(); + }; + VirtualRenderer.prototype.setScrollMargin = function (top, bottom, left, right) { + var sm = this.scrollMargin; + sm.top = top | 0; + sm.bottom = bottom | 0; + sm.right = right | 0; + sm.left = left | 0; + sm.v = sm.top + sm.bottom; + sm.h = sm.left + sm.right; + if (sm.top && this.scrollTop <= 0 && this.session) + this.session.setScrollTop(-sm.top); + this.updateFull(); + }; + VirtualRenderer.prototype.setMargin = function (top, bottom, left, right) { + var sm = this.margin; + sm.top = top | 0; + sm.bottom = bottom | 0; + sm.right = right | 0; + sm.left = left | 0; + sm.v = sm.top + sm.bottom; + sm.h = sm.left + sm.right; + this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height); + this.updateFull(); + }; + VirtualRenderer.prototype.getHScrollBarAlwaysVisible = function () { + return this.$hScrollBarAlwaysVisible; + }; + VirtualRenderer.prototype.setHScrollBarAlwaysVisible = function (alwaysVisible) { + this.setOption("hScrollBarAlwaysVisible", alwaysVisible); + }; + VirtualRenderer.prototype.getVScrollBarAlwaysVisible = function () { + return this.$vScrollBarAlwaysVisible; + }; + VirtualRenderer.prototype.setVScrollBarAlwaysVisible = function (alwaysVisible) { + this.setOption("vScrollBarAlwaysVisible", alwaysVisible); + }; + VirtualRenderer.prototype.$updateScrollBarV = function () { + var scrollHeight = this.layerConfig.maxHeight; + var scrollerHeight = this.$size.scrollerHeight; + if (!this.$maxLines && this.$scrollPastEnd) { + scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; + if (this.scrollTop > scrollHeight - scrollerHeight) { + scrollHeight = this.scrollTop + scrollerHeight; + this.scrollBarV.scrollTop = null; + } + } + this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); + this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); + }; + VirtualRenderer.prototype.$updateScrollBarH = function () { + this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); + this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); + }; + VirtualRenderer.prototype.freeze = function () { + this.$frozen = true; + }; + VirtualRenderer.prototype.unfreeze = function () { + this.$frozen = false; + }; + VirtualRenderer.prototype.$renderChanges = function (changes, force) { + if (this.$changes) { + changes |= this.$changes; + this.$changes = 0; + } + if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { + this.$changes |= changes; + return; + } + if (this.$size.$dirty) { + this.$changes |= changes; + return this.onResize(true); + } + if (!this.lineHeight) { + this.$textLayer.checkForSizeChanges(); + } + this._signal("beforeRender", changes); + if (this.session && this.session.$bidiHandler) + this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics); + var config = this.layerConfig; + if (changes & this.CHANGE_FULL || + changes & this.CHANGE_SIZE || + changes & this.CHANGE_TEXT || + changes & this.CHANGE_LINES || + changes & this.CHANGE_SCROLL || + changes & this.CHANGE_H_SCROLL) { + changes |= this.$computeLayerConfig() | this.$loop.clear(); + if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { + var st = this.scrollTop + (config.firstRow - Math.max(this.layerConfig.firstRow, 0)) * this.lineHeight; + if (st > 0) { + this.scrollTop = st; + changes = changes | this.CHANGE_SCROLL; + changes |= this.$computeLayerConfig() | this.$loop.clear(); + } + } + config = this.layerConfig; + this.$updateScrollBarV(); + if (changes & this.CHANGE_H_SCROLL) + this.$updateScrollBarH(); + dom.translate(this.content, -this.scrollLeft, -config.offset); + var width = config.width + 2 * this.$padding + "px"; + var height = config.minHeight + "px"; + dom.setStyle(this.content.style, "width", width); + dom.setStyle(this.content.style, "height", height); + } + if (changes & this.CHANGE_H_SCROLL) { + dom.translate(this.content, -this.scrollLeft, -config.offset); + this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller " : "ace_scroller ace_scroll-left "; + if (this.enableKeyboardAccessibility) + this.scroller.className += this.keyboardFocusClassName; + } + if (changes & this.CHANGE_FULL) { + this.$changedLines = null; + this.$textLayer.update(config); + if (this.$showGutter) + this.$gutterLayer.update(config); + if (this.$customScrollbar) { + this.$scrollDecorator.$updateDecorators(config); + } + this.$markerBack.update(config); + this.$markerFront.update(config); + this.$cursorLayer.update(config); + this.$moveTextAreaToCursor(); + this._signal("afterRender", changes); + return; + } + if (changes & this.CHANGE_SCROLL) { + this.$changedLines = null; + if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) + this.$textLayer.update(config); + else + this.$textLayer.scrollLines(config); + if (this.$showGutter) { + if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES) + this.$gutterLayer.update(config); + else + this.$gutterLayer.scrollLines(config); + } + if (this.$customScrollbar) { + this.$scrollDecorator.$updateDecorators(config); + } + this.$markerBack.update(config); + this.$markerFront.update(config); + this.$cursorLayer.update(config); + this.$moveTextAreaToCursor(); + this._signal("afterRender", changes); + return; + } + if (changes & this.CHANGE_TEXT) { + this.$changedLines = null; + this.$textLayer.update(config); + if (this.$showGutter) + this.$gutterLayer.update(config); + if (this.$customScrollbar) { + this.$scrollDecorator.$updateDecorators(config); + } + } + else if (changes & this.CHANGE_LINES) { + if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) + this.$gutterLayer.update(config); + if (this.$customScrollbar) { + this.$scrollDecorator.$updateDecorators(config); + } + } + else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { + if (this.$showGutter) + this.$gutterLayer.update(config); + if (this.$customScrollbar) { + this.$scrollDecorator.$updateDecorators(config); + } + } + else if (changes & this.CHANGE_CURSOR) { + if (this.$highlightGutterLine) + this.$gutterLayer.updateLineHighlight(config); + if (this.$customScrollbar) { + this.$scrollDecorator.$updateDecorators(config); + } + } + if (changes & this.CHANGE_CURSOR) { + this.$cursorLayer.update(config); + this.$moveTextAreaToCursor(); + } + if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { + this.$markerFront.update(config); + } + if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { + this.$markerBack.update(config); + } + this._signal("afterRender", changes); + }; + VirtualRenderer.prototype.$autosize = function () { + var height = this.session.getScreenLength() * this.lineHeight; + var maxHeight = this.$maxLines * this.lineHeight; + var desiredHeight = Math.min(maxHeight, Math.max((this.$minLines || 1) * this.lineHeight, height)) + this.scrollMargin.v + (this.$extraHeight || 0); + if (this.$horizScroll) + desiredHeight += this.scrollBarH.getHeight(); + if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight) + desiredHeight = this.$maxPixelHeight; + var hideScrollbars = desiredHeight <= 2 * this.lineHeight; + var vScroll = !hideScrollbars && height > maxHeight; + if (desiredHeight != this.desiredHeight || + this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { + if (vScroll != this.$vScroll) { + this.$vScroll = vScroll; + this.scrollBarV.setVisible(vScroll); + } + var w = this.container.clientWidth; + this.container.style.height = desiredHeight + "px"; + this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); + this.desiredHeight = desiredHeight; + this._signal("autosize"); + } + }; + VirtualRenderer.prototype.$computeLayerConfig = function () { + var session = this.session; + var size = this.$size; + var hideScrollbars = size.height <= 2 * this.lineHeight; + var screenLines = this.session.getScreenLength(); + var maxHeight = screenLines * this.lineHeight; + var longestLine = this.$getLongestLine(); + var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || + size.scrollerWidth - longestLine - 2 * this.$padding < 0); + var hScrollChanged = this.$horizScroll !== horizScroll; + if (hScrollChanged) { + this.$horizScroll = horizScroll; + this.scrollBarH.setVisible(horizScroll); + } + var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine + if (this.$maxLines && this.lineHeight > 1) + this.$autosize(); + var minHeight = size.scrollerHeight + this.lineHeight; + var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd + ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd + : 0; + maxHeight += scrollPastEnd; + var sm = this.scrollMargin; + this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom))); + this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right))); + var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || + size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top); + var vScrollChanged = vScrollBefore !== vScroll; + if (vScrollChanged) { + this.$vScroll = vScroll; + this.scrollBarV.setVisible(vScroll); + } + var offset = this.scrollTop % this.lineHeight; + var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; + var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); + var lastRow = firstRow + lineCount; + var firstRowScreen, firstRowHeight; + var lineHeight = this.lineHeight; + firstRow = session.screenToDocumentRow(firstRow, 0); + var foldLine = session.getFoldLine(firstRow); + if (foldLine) { + firstRow = foldLine.start.row; + } + firstRowScreen = session.documentToScreenRow(firstRow, 0); + firstRowHeight = session.getRowLength(firstRow) * lineHeight; + lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); + minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + + firstRowHeight; + offset = this.scrollTop - firstRowScreen * lineHeight; + var changes = 0; + if (this.layerConfig.width != longestLine || hScrollChanged) + changes = this.CHANGE_H_SCROLL; + if (hScrollChanged || vScrollChanged) { + changes |= this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); + this._signal("scrollbarVisibilityChanged"); + if (vScrollChanged) + longestLine = this.$getLongestLine(); + } + this.layerConfig = { + width: longestLine, + padding: this.$padding, + firstRow: firstRow, + firstRowScreen: firstRowScreen, + lastRow: lastRow, + lineHeight: lineHeight, + characterWidth: this.characterWidth, + minHeight: minHeight, + maxHeight: maxHeight, + offset: offset, + gutterOffset: lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0, + height: this.$size.scrollerHeight + }; + if (this.session.$bidiHandler) + this.session.$bidiHandler.setContentWidth(longestLine - this.$padding); + return changes; + }; + VirtualRenderer.prototype.$updateLines = function () { + if (!this.$changedLines) + return; + var firstRow = this.$changedLines.firstRow; + var lastRow = this.$changedLines.lastRow; + this.$changedLines = null; + var layerConfig = this.layerConfig; + if (firstRow > layerConfig.lastRow + 1) { + return; + } + if (lastRow < layerConfig.firstRow) { + return; + } + if (lastRow === Infinity) { + if (this.$showGutter) + this.$gutterLayer.update(layerConfig); + this.$textLayer.update(layerConfig); + return; + } + this.$textLayer.updateLines(layerConfig, firstRow, lastRow); + return true; + }; + VirtualRenderer.prototype.$getLongestLine = function () { + var charCount = this.session.getScreenWidth(); + if (this.showInvisibles && !this.session.$useWrapMode) + charCount += 1; + if (this.$textLayer && charCount > this.$textLayer.MAX_LINE_LENGTH) + charCount = this.$textLayer.MAX_LINE_LENGTH + 30; + return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); + }; + VirtualRenderer.prototype.updateFrontMarkers = function () { + this.$markerFront.setMarkers(this.session.getMarkers(true)); + this.$loop.schedule(this.CHANGE_MARKER_FRONT); + }; + VirtualRenderer.prototype.updateBackMarkers = function () { + this.$markerBack.setMarkers(this.session.getMarkers()); + this.$loop.schedule(this.CHANGE_MARKER_BACK); + }; + VirtualRenderer.prototype.addGutterDecoration = function (row, className) { + this.$gutterLayer.addGutterDecoration(row, className); + }; + VirtualRenderer.prototype.removeGutterDecoration = function (row, className) { + this.$gutterLayer.removeGutterDecoration(row, className); + }; + VirtualRenderer.prototype.updateBreakpoints = function (rows) { + this._rows = rows; + this.$loop.schedule(this.CHANGE_GUTTER); + }; + VirtualRenderer.prototype.setAnnotations = function (annotations) { + this.$gutterLayer.setAnnotations(annotations); + this.$loop.schedule(this.CHANGE_GUTTER); + }; + VirtualRenderer.prototype.updateCursor = function () { + this.$loop.schedule(this.CHANGE_CURSOR); + }; + VirtualRenderer.prototype.hideCursor = function () { + this.$cursorLayer.hideCursor(); + }; + VirtualRenderer.prototype.showCursor = function () { + this.$cursorLayer.showCursor(); + }; + VirtualRenderer.prototype.scrollSelectionIntoView = function (anchor, lead, offset) { + this.scrollCursorIntoView(anchor, offset); + this.scrollCursorIntoView(lead, offset); + }; + VirtualRenderer.prototype.scrollCursorIntoView = function (cursor, offset, $viewMargin) { + if (this.$size.scrollerHeight === 0) + return; + var pos = this.$cursorLayer.getPixelPosition(cursor); + var newLeft = pos.left; + var newTop = pos.top; + var topMargin = $viewMargin && $viewMargin.top || 0; + var bottomMargin = $viewMargin && $viewMargin.bottom || 0; + if (this.$scrollAnimation) { + this.$stopAnimation = true; + } + var currentTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; + if (currentTop + topMargin > newTop) { + if (offset && currentTop + topMargin > newTop + this.lineHeight) + newTop -= offset * this.$size.scrollerHeight; + if (newTop === 0) + newTop = -this.scrollMargin.top; + this.session.setScrollTop(newTop); + } + else if (currentTop + this.$size.scrollerHeight - bottomMargin < newTop + this.lineHeight) { + if (offset && currentTop + this.$size.scrollerHeight - bottomMargin < newTop - this.lineHeight) + newTop += offset * this.$size.scrollerHeight; + this.session.setScrollTop(newTop + this.lineHeight + bottomMargin - this.$size.scrollerHeight); + } + var currentLeft = this.scrollLeft; + var twoCharsWidth = 2 * this.layerConfig.characterWidth; + if (newLeft - twoCharsWidth < currentLeft) { + newLeft -= twoCharsWidth; + if (newLeft < this.$padding + twoCharsWidth) { + newLeft = -this.scrollMargin.left; + } + this.session.setScrollLeft(newLeft); + } + else { + newLeft += twoCharsWidth; + if (currentLeft + this.$size.scrollerWidth < newLeft + this.characterWidth) { + this.session.setScrollLeft(Math.round(newLeft + this.characterWidth - this.$size.scrollerWidth)); + } + else if (currentLeft <= this.$padding && newLeft - currentLeft < this.characterWidth) { + this.session.setScrollLeft(0); + } + } + }; + VirtualRenderer.prototype.getScrollTop = function () { + return this.session.getScrollTop(); + }; + VirtualRenderer.prototype.getScrollLeft = function () { + return this.session.getScrollLeft(); + }; + VirtualRenderer.prototype.getScrollTopRow = function () { + return this.scrollTop / this.lineHeight; + }; + VirtualRenderer.prototype.getScrollBottomRow = function () { + return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); + }; + VirtualRenderer.prototype.scrollToRow = function (row) { + this.session.setScrollTop(row * this.lineHeight); + }; + VirtualRenderer.prototype.alignCursor = function (cursor, alignment) { + if (typeof cursor == "number") + cursor = { row: cursor, column: 0 }; + var pos = this.$cursorLayer.getPixelPosition(cursor); + var h = this.$size.scrollerHeight - this.lineHeight; + var offset = pos.top - h * (alignment || 0); + this.session.setScrollTop(offset); + return offset; + }; + VirtualRenderer.prototype.$calcSteps = function (fromValue, toValue) { + var i = 0; + var l = this.STEPS; + var steps = []; + var func = function (t, x_min, dx) { + return dx * (Math.pow(t - 1, 3) + 1) + x_min; + }; + for (i = 0; i < l; ++i) + steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); + return steps; + }; + VirtualRenderer.prototype.scrollToLine = function (line, center, animate, callback) { + var pos = this.$cursorLayer.getPixelPosition({ row: line, column: 0 }); + var offset = pos.top; + if (center) + offset -= this.$size.scrollerHeight / 2; + var initialScroll = this.scrollTop; + this.session.setScrollTop(offset); + if (animate !== false) + this.animateScrolling(initialScroll, callback); + }; + VirtualRenderer.prototype.animateScrolling = function (fromValue, callback) { + var toValue = this.scrollTop; + if (!this.$animatedScroll) + return; + var _self = this; + if (fromValue == toValue) + return; + if (this.$scrollAnimation) { + var oldSteps = this.$scrollAnimation.steps; + if (oldSteps.length) { + fromValue = oldSteps[0]; + if (fromValue == toValue) + return; + } + } + var steps = _self.$calcSteps(fromValue, toValue); + this.$scrollAnimation = { from: fromValue, to: toValue, steps: steps }; + clearInterval(this.$timer); + _self.session.setScrollTop(steps.shift()); + _self.session.$scrollTop = toValue; + function endAnimation() { + _self.$timer = clearInterval(_self.$timer); + _self.$scrollAnimation = null; + _self.$stopAnimation = false; + callback && callback(); + } + this.$timer = setInterval(function () { + if (_self.$stopAnimation) { + endAnimation(); + return; + } + if (!_self.session) + return clearInterval(_self.$timer); + if (steps.length) { + _self.session.setScrollTop(steps.shift()); + _self.session.$scrollTop = toValue; + } + else if (toValue != null) { + _self.session.$scrollTop = -1; + _self.session.setScrollTop(toValue); + toValue = null; + } + else { + endAnimation(); + } + }, 10); + }; + VirtualRenderer.prototype.scrollToY = function (scrollTop) { + if (this.scrollTop !== scrollTop) { + this.$loop.schedule(this.CHANGE_SCROLL); + this.scrollTop = scrollTop; + } + }; + VirtualRenderer.prototype.scrollToX = function (scrollLeft) { + if (this.scrollLeft !== scrollLeft) + this.scrollLeft = scrollLeft; + this.$loop.schedule(this.CHANGE_H_SCROLL); + }; + VirtualRenderer.prototype.scrollTo = function (x, y) { + this.session.setScrollTop(y); + this.session.setScrollLeft(x); + }; + VirtualRenderer.prototype.scrollBy = function (deltaX, deltaY) { + deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); + deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); + }; + VirtualRenderer.prototype.isScrollableBy = function (deltaX, deltaY) { + if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) + return true; + if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight + - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) + return true; + if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) + return true; + if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth + - this.layerConfig.width < -1 + this.scrollMargin.right) + return true; + }; + VirtualRenderer.prototype.pixelToScreenCoordinates = function (x, y) { + var canvasPos; + if (this.$hasCssTransforms) { + canvasPos = { top: 0, left: 0 }; + var p = this.$fontMetrics.transformCoordinates([x, y]); + x = p[1] - this.gutterWidth - this.margin.left; + y = p[0]; + } + else { + canvasPos = this.scroller.getBoundingClientRect(); + } + var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding; + var offset = offsetX / this.characterWidth; + var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); + var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset); + return { row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX }; + }; + VirtualRenderer.prototype.screenToTextCoordinates = function (x, y) { + var canvasPos; + if (this.$hasCssTransforms) { + canvasPos = { top: 0, left: 0 }; + var p = this.$fontMetrics.transformCoordinates([x, y]); + x = p[1] - this.gutterWidth - this.margin.left; + y = p[0]; + } + else { + canvasPos = this.scroller.getBoundingClientRect(); + } + var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding; + var offset = offsetX / this.characterWidth; + var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset); + var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); + return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX); + }; + VirtualRenderer.prototype.textToScreenCoordinates = function (row, column) { + var canvasPos = this.scroller.getBoundingClientRect(); + var pos = this.session.documentToScreenPosition(row, column); + var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row) + ? this.session.$bidiHandler.getPosLeft(pos.column) + : Math.round(pos.column * this.characterWidth)); + var y = pos.row * this.lineHeight; + return { + pageX: canvasPos.left + x - this.scrollLeft, + pageY: canvasPos.top + y - this.scrollTop + }; + }; + VirtualRenderer.prototype.visualizeFocus = function () { + dom.addCssClass(this.container, "ace_focus"); + }; + VirtualRenderer.prototype.visualizeBlur = function () { + dom.removeCssClass(this.container, "ace_focus"); + }; + VirtualRenderer.prototype.showComposition = function (composition) { + this.$composition = composition; + if (!composition.cssText) { + composition.cssText = this.textarea.style.cssText; + } + if (composition.useTextareaForIME == undefined) + composition.useTextareaForIME = this.$useTextareaForIME; + if (this.$useTextareaForIME) { + dom.addCssClass(this.textarea, "ace_composition"); + this.textarea.style.cssText = ""; + this.$moveTextAreaToCursor(); + this.$cursorLayer.element.style.display = "none"; + } + else { + composition.markerId = this.session.addMarker(composition.markerRange, "ace_composition_marker", "text"); + } + }; + VirtualRenderer.prototype.setCompositionText = function (text) { + var cursor = this.session.selection.cursor; + this.addToken(text, "composition_placeholder", cursor.row, cursor.column); + this.$moveTextAreaToCursor(); + }; + VirtualRenderer.prototype.hideComposition = function () { + if (!this.$composition) + return; + if (this.$composition.markerId) + this.session.removeMarker(this.$composition.markerId); + dom.removeCssClass(this.textarea, "ace_composition"); + this.textarea.style.cssText = this.$composition.cssText; + var cursor = this.session.selection.cursor; + this.removeExtraToken(cursor.row, cursor.column); + this.$composition = null; + this.$cursorLayer.element.style.display = ""; + }; + VirtualRenderer.prototype.setGhostText = function (text, position) { + var cursor = this.session.selection.cursor; + var insertPosition = position || { row: cursor.row, column: cursor.column }; + this.removeGhostText(); + var textChunks = this.$calculateWrappedTextChunks(text, insertPosition); + this.addToken(textChunks[0].text, "ghost_text", insertPosition.row, insertPosition.column); + this.$ghostText = { + text: text, + position: { + row: insertPosition.row, + column: insertPosition.column + } + }; + var widgetDiv = dom.createElement("div"); + if (textChunks.length > 1) { + var hiddenTokens = this.hideTokensAfterPosition(insertPosition.row, insertPosition.column); + var lastLineDiv; + textChunks.slice(1).forEach(function (el) { + var chunkDiv = dom.createElement("div"); + var chunkSpan = dom.createElement("span"); + chunkSpan.className = "ace_ghost_text"; + if (el.wrapped) + chunkDiv.className = "ghost_text_line_wrapped"; + if (el.text.length === 0) + el.text = " "; + chunkSpan.appendChild(dom.createTextNode(el.text)); + chunkDiv.appendChild(chunkSpan); + widgetDiv.appendChild(chunkDiv); + lastLineDiv = chunkDiv; + }); + hiddenTokens.forEach(function (token) { + var element = dom.createElement("span"); + if (!isTextToken(token.type)) + element.className = "ace_" + token.type.replace(/\./g, " ace_"); + element.appendChild(dom.createTextNode(token.value)); + lastLineDiv.appendChild(element); + }); + this.$ghostTextWidget = { + el: widgetDiv, + row: insertPosition.row, + column: insertPosition.column, + className: "ace_ghost_text_container" + }; + this.session.widgetManager.addLineWidget(this.$ghostTextWidget); + var pixelPosition = this.$cursorLayer.getPixelPosition(insertPosition, true); + var el = this.container; + var height = el.getBoundingClientRect().height; + var ghostTextHeight = textChunks.length * this.lineHeight; + var fitsY = ghostTextHeight < (height - pixelPosition.top); + if (fitsY) + return; + if (ghostTextHeight < height) { + this.scrollBy(0, (textChunks.length - 1) * this.lineHeight); + } + else { + this.scrollToRow(insertPosition.row); + } + } + }; + VirtualRenderer.prototype.$calculateWrappedTextChunks = function (text, position) { + var availableWidth = this.$size.scrollerWidth - this.$padding * 2; + var limit = Math.floor(availableWidth / this.characterWidth) - 2; + limit = limit <= 0 ? 60 : limit; // this is a hack to prevent the editor from crashing when the window is too small + var textLines = text.split(/\r?\n/); + var textChunks = []; + for (var i = 0; i < textLines.length; i++) { + var displayTokens = this.session.$getDisplayTokens(textLines[i], position.column); + var wrapSplits = this.session.$computeWrapSplits(displayTokens, limit, this.session.$tabSize); + if (wrapSplits.length > 0) { + var start = 0; + wrapSplits.push(textLines[i].length); + for (var j = 0; j < wrapSplits.length; j++) { + var textSlice = textLines[i].slice(start, wrapSplits[j]); + textChunks.push({ text: textSlice, wrapped: true }); + start = wrapSplits[j]; + } + } + else { + textChunks.push({ text: textLines[i], wrapped: false }); + } + } + return textChunks; + }; + VirtualRenderer.prototype.removeGhostText = function () { + if (!this.$ghostText) + return; + var position = this.$ghostText.position; + this.removeExtraToken(position.row, position.column); + if (this.$ghostTextWidget) { + this.session.widgetManager.removeLineWidget(this.$ghostTextWidget); + this.$ghostTextWidget = null; + } + this.$ghostText = null; + }; + VirtualRenderer.prototype.addToken = function (text, type, row, column) { + var session = this.session; + session.bgTokenizer.lines[row] = null; + var newToken = { type: type, value: text }; + var tokens = session.getTokens(row); + if (column == null || !tokens.length) { + tokens.push(newToken); + } + else { + var l = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + l += token.value.length; + if (column <= l) { + var diff = token.value.length - (l - column); + var before = token.value.slice(0, diff); + var after = token.value.slice(diff); + tokens.splice(i, 1, { type: token.type, value: before }, newToken, { type: token.type, value: after }); + break; + } + } + } + this.updateLines(row, row); + }; + VirtualRenderer.prototype.hideTokensAfterPosition = function (row, column) { + var tokens = this.session.getTokens(row); + var l = 0; + var hasPassedCursor = false; + var hiddenTokens = []; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + l += token.value.length; + if (token.type === "ghost_text") + continue; + if (hasPassedCursor) { + hiddenTokens.push({ type: token.type, value: token.value }); + token.type = "hidden_token"; + continue; + } + if (l === column) { + hasPassedCursor = true; + } + } + this.updateLines(row, row); + return hiddenTokens; + }; + VirtualRenderer.prototype.removeExtraToken = function (row, column) { + this.session.bgTokenizer.lines[row] = null; + this.updateLines(row, row); + }; + VirtualRenderer.prototype.setTheme = function (theme, cb) { + var _self = this; + this.$themeId = theme; + _self._dispatchEvent('themeChange', { theme: theme }); + if (!theme || typeof theme == "string") { + var moduleName = theme || this.$options.theme.initialValue; + config.loadModule(["theme", moduleName], afterLoad); + } + else { + afterLoad(theme); + } + function afterLoad(module) { + if (_self.$themeId != theme) + return cb && cb(); + if (!module || !module.cssClass) + throw new Error("couldn't load module " + theme + " or it didn't call define"); + if (module.$id) + _self.$themeId = module.$id; + dom.importCssString(module.cssText, module.cssClass, _self.container); + if (_self.theme) + dom.removeCssClass(_self.container, _self.theme.cssClass); + var padding = "padding" in module ? module.padding + : "padding" in (_self.theme || {}) ? 4 : _self.$padding; + if (_self.$padding && padding != _self.$padding) + _self.setPadding(padding); + _self.$theme = module.cssClass; + _self.theme = module; + dom.addCssClass(_self.container, module.cssClass); + dom.setCssClass(_self.container, "ace_dark", module.isDark); + if (_self.$size) { + _self.$size.width = 0; + _self.$updateSizeAsync(); + } + _self._dispatchEvent('themeLoaded', { theme: module }); + cb && cb(); + if (useragent.isSafari && _self.scroller) { + _self.scroller.style.background = "red"; + _self.scroller.style.background = ""; + } + } + }; + VirtualRenderer.prototype.getTheme = function () { + return this.$themeId; + }; + VirtualRenderer.prototype.setStyle = function (style, include) { + dom.setCssClass(this.container, style, include !== false); + }; + VirtualRenderer.prototype.unsetStyle = function (style) { + dom.removeCssClass(this.container, style); + }; + VirtualRenderer.prototype.setCursorStyle = function (style) { + dom.setStyle(this.scroller.style, "cursor", style); + }; + VirtualRenderer.prototype.setMouseCursor = function (cursorStyle) { + dom.setStyle(this.scroller.style, "cursor", cursorStyle); + }; + VirtualRenderer.prototype.attachToShadowRoot = function () { + dom.importCssString(editorCss, "ace_editor.css", this.container); + }; + VirtualRenderer.prototype.destroy = function () { + this.freeze(); + this.$fontMetrics.destroy(); + this.$cursorLayer.destroy(); + this.removeAllListeners(); + this.container.textContent = ""; + this.setOption("useResizeObserver", false); + }; + VirtualRenderer.prototype.$updateCustomScrollbar = function (val) { + var _self = this; + this.$horizScroll = this.$vScroll = null; + this.scrollBarV.element.remove(); + this.scrollBarH.element.remove(); + if (this.$scrollDecorator) { + delete this.$scrollDecorator; + } + if (val === true) { + this.scrollBarV = new VScrollBarCustom(this.container, this); + this.scrollBarH = new HScrollBarCustom(this.container, this); + this.scrollBarV.setHeight(this.$size.scrollerHeight); + this.scrollBarH.setWidth(this.$size.scrollerWidth); + this.scrollBarV.addEventListener("scroll", function (e) { + if (!_self.$scrollAnimation) + _self.session.setScrollTop(e.data - _self.scrollMargin.top); + }); + this.scrollBarH.addEventListener("scroll", function (e) { + if (!_self.$scrollAnimation) + _self.session.setScrollLeft(e.data - _self.scrollMargin.left); + }); + this.$scrollDecorator = new Decorator(this.scrollBarV, this); + this.$scrollDecorator.$updateDecorators(); + } + else { + this.scrollBarV = new VScrollBar(this.container, this); + this.scrollBarH = new HScrollBar(this.container, this); + this.scrollBarV.addEventListener("scroll", function (e) { + if (!_self.$scrollAnimation) + _self.session.setScrollTop(e.data - _self.scrollMargin.top); + }); + this.scrollBarH.addEventListener("scroll", function (e) { + if (!_self.$scrollAnimation) + _self.session.setScrollLeft(e.data - _self.scrollMargin.left); + }); + } + }; + VirtualRenderer.prototype.$addResizeObserver = function () { + if (!window.ResizeObserver || this.$resizeObserver) + return; + var self = this; + this.$resizeTimer = lang.delayedCall(function () { + if (!self.destroyed) + self.onResize(); + }, 50); + this.$resizeObserver = new window.ResizeObserver(function (e) { + var w = e[0].contentRect.width; + var h = e[0].contentRect.height; + if (Math.abs(self.$size.width - w) > 1 + || Math.abs(self.$size.height - h) > 1) { + self.$resizeTimer.delay(); + } + else { + self.$resizeTimer.cancel(); + } + }); + this.$resizeObserver.observe(this.container); + }; + return VirtualRenderer; +}()); +VirtualRenderer.prototype.CHANGE_CURSOR = 1; +VirtualRenderer.prototype.CHANGE_MARKER = 2; +VirtualRenderer.prototype.CHANGE_GUTTER = 4; +VirtualRenderer.prototype.CHANGE_SCROLL = 8; +VirtualRenderer.prototype.CHANGE_LINES = 16; +VirtualRenderer.prototype.CHANGE_TEXT = 32; +VirtualRenderer.prototype.CHANGE_SIZE = 64; +VirtualRenderer.prototype.CHANGE_MARKER_BACK = 128; +VirtualRenderer.prototype.CHANGE_MARKER_FRONT = 256; +VirtualRenderer.prototype.CHANGE_FULL = 512; +VirtualRenderer.prototype.CHANGE_H_SCROLL = 1024; +VirtualRenderer.prototype.$changes = 0; +VirtualRenderer.prototype.$padding = null; +VirtualRenderer.prototype.$frozen = false; +VirtualRenderer.prototype.STEPS = 8; +oop.implement(VirtualRenderer.prototype, EventEmitter); +config.defineOptions(VirtualRenderer.prototype, "renderer", { + useResizeObserver: { + set: function (value) { + if (!value && this.$resizeObserver) { + this.$resizeObserver.disconnect(); + this.$resizeTimer.cancel(); + this.$resizeTimer = this.$resizeObserver = null; + } + else if (value && !this.$resizeObserver) { + this.$addResizeObserver(); + } + } + }, + animatedScroll: { initialValue: false }, + showInvisibles: { + set: function (value) { + if (this.$textLayer.setShowInvisibles(value)) + this.$loop.schedule(this.CHANGE_TEXT); + }, + initialValue: false + }, + showPrintMargin: { + set: function () { this.$updatePrintMargin(); }, + initialValue: true + }, + printMarginColumn: { + set: function () { this.$updatePrintMargin(); }, + initialValue: 80 + }, + printMargin: { + set: function (val) { + if (typeof val == "number") + this.$printMarginColumn = val; + this.$showPrintMargin = !!val; + this.$updatePrintMargin(); + }, + get: function () { + return this.$showPrintMargin && this.$printMarginColumn; + } + }, + showGutter: { + set: function (show) { + this.$gutter.style.display = show ? "block" : "none"; + this.$loop.schedule(this.CHANGE_FULL); + this.onGutterResize(); + }, + initialValue: true + }, + useSvgGutterIcons: { + set: function (value) { + this.$gutterLayer.$useSvgGutterIcons = value; + }, + initialValue: false + }, + showFoldedAnnotations: { + set: function (value) { + this.$gutterLayer.$showFoldedAnnotations = value; + }, + initialValue: false + }, + fadeFoldWidgets: { + set: function (show) { + dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); + }, + initialValue: false + }, + showFoldWidgets: { + set: function (show) { + this.$gutterLayer.setShowFoldWidgets(show); + this.$loop.schedule(this.CHANGE_GUTTER); + }, + initialValue: true + }, + displayIndentGuides: { + set: function (show) { + if (this.$textLayer.setDisplayIndentGuides(show)) + this.$loop.schedule(this.CHANGE_TEXT); + }, + initialValue: true + }, + highlightIndentGuides: { + set: function (show) { + if (this.$textLayer.setHighlightIndentGuides(show) == true) { + this.$textLayer.$highlightIndentGuide(); + } + else { + this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells); + } + }, + initialValue: true + }, + highlightGutterLine: { + set: function (shouldHighlight) { + this.$gutterLayer.setHighlightGutterLine(shouldHighlight); + this.$loop.schedule(this.CHANGE_GUTTER); + }, + initialValue: true + }, + hScrollBarAlwaysVisible: { + set: function (val) { + if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) + this.$loop.schedule(this.CHANGE_SCROLL); + }, + initialValue: false + }, + vScrollBarAlwaysVisible: { + set: function (val) { + if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) + this.$loop.schedule(this.CHANGE_SCROLL); + }, + initialValue: false + }, + fontSize: { + set: function (size) { + if (typeof size == "number") + size = size + "px"; + this.container.style.fontSize = size; + this.updateFontSize(); + }, + initialValue: 12 + }, + fontFamily: { + set: function (name) { + this.container.style.fontFamily = name; + this.updateFontSize(); + } + }, + maxLines: { + set: function (val) { + this.updateFull(); + } + }, + minLines: { + set: function (val) { + if (!(this.$minLines < 0x1ffffffffffff)) + this.$minLines = 0; + this.updateFull(); + } + }, + maxPixelHeight: { + set: function (val) { + this.updateFull(); + }, + initialValue: 0 + }, + scrollPastEnd: { + set: function (val) { + val = +val || 0; + if (this.$scrollPastEnd == val) + return; + this.$scrollPastEnd = val; + this.$loop.schedule(this.CHANGE_SCROLL); + }, + initialValue: 0, + handlesSet: true + }, + fixedWidthGutter: { + set: function (val) { + this.$gutterLayer.$fixedWidth = !!val; + this.$loop.schedule(this.CHANGE_GUTTER); + } + }, + customScrollbar: { + set: function (val) { + this.$updateCustomScrollbar(val); + }, + initialValue: false + }, + theme: { + set: function (val) { this.setTheme(val); }, + get: function () { return this.$themeId || this.theme; }, + initialValue: "./theme/textmate", + handlesSet: true + }, + hasCssTransforms: {}, + useTextareaForIME: { + initialValue: !useragent.isMobile && !useragent.isIE + } +}); +exports.VirtualRenderer = VirtualRenderer; + +}); + +define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var net = require("../lib/net"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var config = require("../config"); + +function $workerBlob(workerUrl) { + var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; + try { + return new Blob([script], {"type": "application/javascript"}); + } catch (e) { // Backwards-compatibility + var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; + var blobBuilder = new BlobBuilder(); + blobBuilder.append(script); + return blobBuilder.getBlob("application/javascript"); + } +} + +function createWorker(workerUrl) { + if (typeof Worker == "undefined") + return { postMessage: function() {}, terminate: function() {} }; + if (config.get("loadWorkerFromBlob")) { + var blob = $workerBlob(workerUrl); + var URL = window.URL || window.webkitURL; + var blobURL = URL.createObjectURL(blob); + return new Worker(blobURL); + } + return new Worker(workerUrl); +} + +var WorkerClient = function(worker) { + if (!worker.postMessage) + worker = this.$createWorkerFromOldConfig.apply(this, arguments); + + this.$worker = worker; + this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); + this.changeListener = this.changeListener.bind(this); + this.onMessage = this.onMessage.bind(this); + + this.callbackId = 1; + this.callbacks = {}; + + this.$worker.onmessage = this.onMessage; +}; + +(function(){ + + oop.implement(this, EventEmitter); + + this.$createWorkerFromOldConfig = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) { + if (require.nameToUrl && !require.toUrl) + require.toUrl = require.nameToUrl; + + if (config.get("packaged") || !require.toUrl) { + workerUrl = workerUrl || config.moduleUrl(mod, "worker"); + } else { + var normalizePath = this.$normalizePath; + workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); + + var tlns = {}; + topLevelNamespaces.forEach(function(ns) { + tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); + }); + } + + this.$worker = createWorker(workerUrl); + if (importScripts) { + this.send("importScripts", importScripts); + } + this.$worker.postMessage({ + init : true, + tlns : tlns, + module : mod, + classname : classname + }); + return this.$worker; + }; + + this.onMessage = function(e) { + var msg = e.data; + switch (msg.type) { + case "event": + this._signal(msg.name, {data: msg.data}); + break; + case "call": + var callback = this.callbacks[msg.id]; + if (callback) { + callback(msg.data); + delete this.callbacks[msg.id]; + } + break; + case "error": + this.reportError(msg.data); + break; + case "log": + window.console && console.log && console.log.apply(console, msg.data); + break; + } + }; + + this.reportError = function(err) { + window.console && console.error && console.error(err); + }; + + this.$normalizePath = function(path) { + return net.qualifyURL(path); + }; + + this.terminate = function() { + this._signal("terminate", {}); + this.deltaQueue = null; + this.$worker.terminate(); + this.$worker.onerror = function(e) { + e.preventDefault(); + }; + this.$worker = null; + if (this.$doc) + this.$doc.off("change", this.changeListener); + this.$doc = null; + }; + + this.send = function(cmd, args) { + this.$worker.postMessage({command: cmd, args: args}); + }; + + this.call = function(cmd, args, callback) { + if (callback) { + var id = this.callbackId++; + this.callbacks[id] = callback; + args.push(id); + } + this.send(cmd, args); + }; + + this.emit = function(event, data) { + try { + if (data.data && data.data.err) + data.data.err = {message: data.data.err.message, stack: data.data.err.stack, code: data.data.err.code}; + this.$worker && this.$worker.postMessage({event: event, data: {data: data.data}}); + } + catch(ex) { + console.error(ex.stack); + } + }; + + this.attachToDocument = function(doc) { + if (this.$doc) + this.terminate(); + + this.$doc = doc; + this.call("setValue", [doc.getValue()]); + doc.on("change", this.changeListener, true); + }; + + this.changeListener = function(delta) { + if (!this.deltaQueue) { + this.deltaQueue = []; + setTimeout(this.$sendDeltaQueue, 0); + } + if (delta.action == "insert") + this.deltaQueue.push(delta.start, delta.lines); + else + this.deltaQueue.push(delta.start, delta.end); + }; + + this.$sendDeltaQueue = function() { + var q = this.deltaQueue; + if (!q) return; + this.deltaQueue = null; + if (q.length > 50 && q.length > this.$doc.getLength() >> 1) { + this.call("setValue", [this.$doc.getValue()]); + } else + this.emit("change", {data: q}); + }; + +}).call(WorkerClient.prototype); + + +var UIWorkerClient = function(topLevelNamespaces, mod, classname) { + var main = null; + var emitSync = false; + var sender = Object.create(EventEmitter); + + var messageBuffer = []; + var workerClient = new WorkerClient({ + messageBuffer: messageBuffer, + terminate: function() {}, + postMessage: function(e) { + messageBuffer.push(e); + if (!main) return; + if (emitSync) + setTimeout(processNext); + else + processNext(); + } + }); + + workerClient.setEmitSync = function(val) { emitSync = val; }; + + var processNext = function() { + var msg = messageBuffer.shift(); + if (msg.command) + main[msg.command].apply(main, msg.args); + else if (msg.event) + sender._signal(msg.event, msg.data); + }; + + sender.postMessage = function(msg) { + workerClient.onMessage({data: msg}); + }; + sender.callback = function(data, callbackId) { + this.postMessage({type: "call", id: callbackId, data: data}); + }; + sender.emit = function(name, data) { + this.postMessage({type: "event", name: name, data: data}); + }; + + config.loadModule(["worker", mod], function(Main) { + main = new Main[classname](sender); + while (messageBuffer.length) + processNext(); + }); + + return workerClient; +}; + +exports.UIWorkerClient = UIWorkerClient; +exports.WorkerClient = WorkerClient; +exports.createWorker = createWorker; + + +}); + +define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module){"use strict"; +var Range = require("./range").Range; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var oop = require("./lib/oop"); +var PlaceHolder = /** @class */ (function () { + function PlaceHolder(session, length, pos, others, mainClass, othersClass) { + var _self = this; + this.length = length; + this.session = session; + this.doc = session.getDocument(); + this.mainClass = mainClass; + this.othersClass = othersClass; + this.$onUpdate = this.onUpdate.bind(this); + this.doc.on("change", this.$onUpdate, true); + this.$others = others; + this.$onCursorChange = function () { + setTimeout(function () { + _self.onCursorChange(); + }); + }; + this.$pos = pos; + var undoStack = session.getUndoManager().$undoStack || session.getUndoManager()["$undostack"] || { length: -1 }; + this.$undoStackDepth = undoStack.length; + this.setup(); + session.selection.on("changeCursor", this.$onCursorChange); + } + PlaceHolder.prototype.setup = function () { + var _self = this; + var doc = this.doc; + var session = this.session; + this.selectionBefore = session.selection.toJSON(); + if (session.selection.inMultiSelectMode) + session.selection.toSingleRange(); + this.pos = doc.createAnchor(this.$pos.row, this.$pos.column); + var pos = this.pos; + pos.$insertRight = true; + pos.detach(); + pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); + this.others = []; + this.$others.forEach(function (other) { + var anchor = doc.createAnchor(other.row, other.column); + anchor.$insertRight = true; + anchor.detach(); + _self.others.push(anchor); + }); + session.setUndoSelect(false); + }; + PlaceHolder.prototype.showOtherMarkers = function () { + if (this.othersActive) + return; + var session = this.session; + var _self = this; + this.othersActive = true; + this.others.forEach(function (anchor) { + anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column + _self.length), _self.othersClass, null, false); + }); + }; + PlaceHolder.prototype.hideOtherMarkers = function () { + if (!this.othersActive) + return; + this.othersActive = false; + for (var i = 0; i < this.others.length; i++) { + this.session.removeMarker(this.others[i].markerId); + } + }; + PlaceHolder.prototype.onUpdate = function (delta) { + if (this.$updating) + return this.updateAnchors(delta); + var range = delta; + if (range.start.row !== range.end.row) + return; + if (range.start.row !== this.pos.row) + return; + this.$updating = true; + var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column; + var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1; + var distanceFromStart = range.start.column - this.pos.column; + this.updateAnchors(delta); + if (inMainRange) + this.length += lengthDiff; + if (inMainRange && !this.session.$fromUndo) { + if (delta.action === 'insert') { + for (var i = this.others.length - 1; i >= 0; i--) { + var otherPos = this.others[i]; + var newPos = { row: otherPos.row, column: otherPos.column + distanceFromStart }; + this.doc.insertMergedLines(newPos, delta.lines); + } + } + else if (delta.action === 'remove') { + for (var i = this.others.length - 1; i >= 0; i--) { + var otherPos = this.others[i]; + var newPos = { row: otherPos.row, column: otherPos.column + distanceFromStart }; + this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); + } + } + } + this.$updating = false; + this.updateMarkers(); + }; + PlaceHolder.prototype.updateAnchors = function (delta) { + this.pos.onChange(delta); + for (var i = this.others.length; i--;) + this.others[i].onChange(delta); + this.updateMarkers(); + }; + PlaceHolder.prototype.updateMarkers = function () { + if (this.$updating) + return; + var _self = this; + var session = this.session; + var updateMarker = function (pos, className) { + session.removeMarker(pos.markerId); + pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + _self.length), className, null, false); + }; + updateMarker(this.pos, this.mainClass); + for (var i = this.others.length; i--;) + updateMarker(this.others[i], this.othersClass); + }; + PlaceHolder.prototype.onCursorChange = function (event) { + if (this.$updating || !this.session) + return; + var pos = this.session.selection.getCursor(); + if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { + this.showOtherMarkers(); + this._emit("cursorEnter", event); + } + else { + this.hideOtherMarkers(); + this._emit("cursorLeave", event); + } + }; + PlaceHolder.prototype.detach = function () { + this.session.removeMarker(this.pos && this.pos.markerId); + this.hideOtherMarkers(); + this.doc.off("change", this.$onUpdate); + this.session.selection.off("changeCursor", this.$onCursorChange); + this.session.setUndoSelect(true); + this.session = null; + }; + PlaceHolder.prototype.cancel = function () { + if (this.$undoStackDepth === -1) + return; + var undoManager = this.session.getUndoManager(); + var undosRequired = (undoManager.$undoStack || undoManager["$undostack"]).length - this.$undoStackDepth; + for (var i = 0; i < undosRequired; i++) { + undoManager.undo(this.session, true); + } + if (this.selectionBefore) + this.session.selection.fromJSON(this.selectionBefore); + }; + return PlaceHolder; +}()); +oop.implement(PlaceHolder.prototype, EventEmitter); +exports.PlaceHolder = PlaceHolder; + +}); + +define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module){var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +function isSamePoint(p1, p2) { + return p1.row == p2.row && p1.column == p2.column; +} +function onMouseDown(e) { + var ev = e.domEvent; + var alt = ev.altKey; + var shift = ev.shiftKey; + var ctrl = ev.ctrlKey; + var accel = e.getAccelKey(); + var button = e.getButton(); + if (ctrl && useragent.isMac) + button = ev.button; + if (e.editor.inMultiSelectMode && button == 2) { + e.editor.textInput.onContextMenu(e.domEvent); + return; + } + if (!ctrl && !alt && !accel) { + if (button === 0 && e.editor.inMultiSelectMode) + e.editor.exitMultiSelectMode(); + return; + } + if (button !== 0) + return; + var editor = e.editor; + var selection = editor.selection; + var isMultiSelect = editor.inMultiSelectMode; + var pos = e.getDocumentPosition(); + var cursor = selection.getCursor(); + var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); + var mouseX = e.x, mouseY = e.y; + var onMouseSelection = function (e) { + mouseX = e.clientX; + mouseY = e.clientY; + }; + var session = editor.session; + var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); + var screenCursor = screenAnchor; + var selectionMode; + if (editor.$mouseHandler.$enableJumpToDef) { + if (ctrl && alt || accel && alt) + selectionMode = shift ? "block" : "add"; + else if (alt && editor.$blockSelectEnabled) + selectionMode = "block"; + } + else { + if (accel && !alt) { + selectionMode = "add"; + if (!isMultiSelect && shift) + return; + } + else if (alt && editor.$blockSelectEnabled) { + selectionMode = "block"; + } + } + if (selectionMode && useragent.isMac && ev.ctrlKey) { + editor.$mouseHandler.cancelContextMenu(); + } + if (selectionMode == "add") { + if (!isMultiSelect && inSelection) + return; // dragging + if (!isMultiSelect) { + var range = selection.toOrientedRange(); + editor.addSelectionMarker(range); + } + var oldRange = selection.rangeList.rangeAtPoint(pos); + editor.inVirtualSelectionMode = true; + if (shift) { + oldRange = null; + range = selection.ranges[0] || range; + editor.removeSelectionMarker(range); + } + editor.once("mouseup", function () { + var tmpSel = selection.toOrientedRange(); + if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) + selection.substractPoint(tmpSel.cursor); + else { + if (shift) { + selection.substractPoint(range.cursor); + } + else if (range) { + editor.removeSelectionMarker(range); + selection.addRange(range); + } + selection.addRange(tmpSel); + } + editor.inVirtualSelectionMode = false; + }); + } + else if (selectionMode == "block") { + e.stop(); + editor.inVirtualSelectionMode = true; + var initialRange; + var rectSel = []; + var blockSelect = function () { + var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); + var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX); + if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) + return; + screenCursor = newCursor; + editor.selection.moveToPosition(cursor); + editor.renderer.scrollCursorIntoView(); + editor.removeSelectionMarkers(rectSel); + rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); + if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) + rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); + rectSel.forEach(editor.addSelectionMarker, editor); + editor.updateSelectionMarkers(); + }; + if (isMultiSelect && !accel) { + selection.toSingleRange(); + } + else if (!isMultiSelect && accel) { + initialRange = selection.toOrientedRange(); + editor.addSelectionMarker(initialRange); + } + if (shift) + screenAnchor = session.documentToScreenPosition(selection.lead); + else + selection.moveToPosition(pos); + screenCursor = { row: -1, column: -1 }; + var onMouseSelectionEnd = function (e) { + blockSelect(); + clearInterval(timerId); + editor.removeSelectionMarkers(rectSel); + if (!rectSel.length) + rectSel = [selection.toOrientedRange()]; + if (initialRange) { + editor.removeSelectionMarker(initialRange); + selection.toSingleRange(initialRange); + } + for (var i = 0; i < rectSel.length; i++) + selection.addRange(rectSel[i]); + editor.inVirtualSelectionMode = false; + editor.$mouseHandler.$clickSelection = null; + }; + var onSelectionInterval = blockSelect; + event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); + var timerId = setInterval(function () { onSelectionInterval(); }, 20); + return e.preventDefault(); + } +} +exports.onMouseDown = onMouseDown; + +}); + +define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module){/** + * commands to enter multiselect mode + * @type {import("../../ace-internal").Ace.Command[]} + */ +exports.defaultCommands = [{ + name: "addCursorAbove", + description: "Add cursor above", + exec: function (editor) { editor.selectMoreLines(-1); }, + bindKey: { win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "addCursorBelow", + description: "Add cursor below", + exec: function (editor) { editor.selectMoreLines(1); }, + bindKey: { win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "addCursorAboveSkipCurrent", + description: "Add cursor above (skip current)", + exec: function (editor) { editor.selectMoreLines(-1, true); }, + bindKey: { win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "addCursorBelowSkipCurrent", + description: "Add cursor below (skip current)", + exec: function (editor) { editor.selectMoreLines(1, true); }, + bindKey: { win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectMoreBefore", + description: "Select more before", + exec: function (editor) { editor.selectMore(-1); }, + bindKey: { win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectMoreAfter", + description: "Select more after", + exec: function (editor) { editor.selectMore(1); }, + bindKey: { win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectNextBefore", + description: "Select next before", + exec: function (editor) { editor.selectMore(-1, true); }, + bindKey: { win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectNextAfter", + description: "Select next after", + exec: function (editor) { editor.selectMore(1, true); }, + bindKey: { win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right" }, + scrollIntoView: "cursor", + readOnly: true + }, { + name: "toggleSplitSelectionIntoLines", + description: "Split selection into lines", + exec: function (editor) { + if (editor.multiSelect.rangeCount > 1) + editor.multiSelect.joinSelections(); + else + editor.multiSelect.splitIntoLines(); + }, + bindKey: { win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L" }, + readOnly: true + }, { + name: "splitSelectionIntoLines", + description: "Split into lines", + exec: function (editor) { editor.multiSelect.splitIntoLines(); }, + readOnly: true + }, { + name: "alignCursors", + description: "Align cursors", + exec: function (editor) { editor.alignCursors(); }, + bindKey: { win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A" }, + scrollIntoView: "cursor" + }, { + name: "findAll", + description: "Find all", + exec: function (editor) { editor.findAll(); }, + bindKey: { win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G" }, + scrollIntoView: "cursor", + readOnly: true + }]; +exports.multiSelectCommands = [{ + name: "singleSelection", + description: "Single selection", + bindKey: "esc", + exec: function (editor) { editor.exitMultiSelectMode(); }, + scrollIntoView: "cursor", + readOnly: true, + isAvailable: function (editor) { return editor && editor.inMultiSelectMode; } + }]; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); + +}); + +define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module){/** + * @typedef {import("./anchor").Anchor} Anchor + * @typedef {import("../ace-internal").Ace.Point} Point + * @typedef {import("../ace-internal").Ace.ScreenCoordinates} ScreenCoordinates + */ +var RangeList = require("./range_list").RangeList; +var Range = require("./range").Range; +var Selection = require("./selection").Selection; +var onMouseDown = require("./mouse/multi_select_handler").onMouseDown; +var event = require("./lib/event"); +var lang = require("./lib/lang"); +var commands = require("./commands/multi_select_commands"); +exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); +var Search = require("./search").Search; +var search = new Search(); +function find(session, needle, dir) { + search.$options.wrap = true; + search.$options.needle = needle; + search.$options.backwards = dir == -1; + return search.find(session); +} +var EditSession = require("./edit_session").EditSession; +(function () { + this.getSelectionMarkers = function () { + return this.$selectionMarkers; + }; +}).call(EditSession.prototype); +(function () { + this.ranges = null; + this.rangeList = null; + this.addRange = function (range, $blockChangeEvents) { + if (!range) + return; + if (!this.inMultiSelectMode && this.rangeCount === 0) { + var oldRange = this.toOrientedRange(); + this.rangeList.add(oldRange); + this.rangeList.add(range); + if (this.rangeList.ranges.length != 2) { + this.rangeList.removeAll(); + return $blockChangeEvents || this.fromOrientedRange(range); + } + this.rangeList.removeAll(); + this.rangeList.add(oldRange); + this.$onAddRange(oldRange); + } + if (!range.cursor) + range.cursor = range.end; + var removed = this.rangeList.add(range); + this.$onAddRange(range); + if (removed.length) + this.$onRemoveRange(removed); + if (this.rangeCount > 1 && !this.inMultiSelectMode) { + this._signal("multiSelect"); + this.inMultiSelectMode = true; + this.session.$undoSelect = false; + this.rangeList.attach(this.session); + } + return $blockChangeEvents || this.fromOrientedRange(range); + }; + this.toSingleRange = function (range) { + range = range || this.ranges[0]; + var removed = this.rangeList.removeAll(); + if (removed.length) + this.$onRemoveRange(removed); + range && this.fromOrientedRange(range); + }; + this.substractPoint = function (pos) { + var removed = this.rangeList.substractPoint(pos); + if (removed) { + this.$onRemoveRange(removed); + return removed[0]; + } + }; + this.mergeOverlappingRanges = function () { + var removed = this.rangeList.merge(); + if (removed.length) + this.$onRemoveRange(removed); + }; + this.$onAddRange = function (range) { + this.rangeCount = this.rangeList.ranges.length; + this.ranges.unshift(range); + this._signal("addRange", { range: range }); + }; + this.$onRemoveRange = function (removed) { + this.rangeCount = this.rangeList.ranges.length; + if (this.rangeCount == 1 && this.inMultiSelectMode) { + var lastRange = this.rangeList.ranges.pop(); + removed.push(lastRange); + this.rangeCount = 0; + } + for (var i = removed.length; i--;) { + var index = this.ranges.indexOf(removed[i]); + this.ranges.splice(index, 1); + } + this._signal("removeRange", { ranges: removed }); + if (this.rangeCount === 0 && this.inMultiSelectMode) { + this.inMultiSelectMode = false; + this._signal("singleSelect"); + this.session.$undoSelect = true; + this.rangeList.detach(this.session); + } + lastRange = lastRange || this.ranges[0]; + if (lastRange && !lastRange.isEqual(this.getRange())) + this.fromOrientedRange(lastRange); + }; + this.$initRangeList = function () { + if (this.rangeList) + return; + this.rangeList = new RangeList(); + this.ranges = []; + this.rangeCount = 0; + }; + this.getAllRanges = function () { + return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; + }; + this.splitIntoLines = function () { + var ranges = this.ranges.length ? this.ranges : [this.getRange()]; + var newRanges = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + var row = range.start.row; + var endRow = range.end.row; + if (row === endRow) { + newRanges.push(range.clone()); + } + else { + newRanges.push(new Range(row, range.start.column, row, this.session.getLine(row).length)); + while (++row < endRow) + newRanges.push(this.getLineRange(row, true)); + newRanges.push(new Range(endRow, 0, endRow, range.end.column)); + } + if (i == 0 && !this.isBackwards()) + newRanges = newRanges.reverse(); + } + this.toSingleRange(); + for (var i = newRanges.length; i--;) + this.addRange(newRanges[i]); + }; + this.joinSelections = function () { + var ranges = this.rangeList.ranges; + var lastRange = ranges[ranges.length - 1]; + var range = Range.fromPoints(ranges[0].start, lastRange.end); + this.toSingleRange(); + this.setSelectionRange(range, lastRange.cursor == lastRange.start); + }; + this.toggleBlockSelection = function () { + if (this.rangeCount > 1) { + var ranges = this.rangeList.ranges; + var lastRange = ranges[ranges.length - 1]; + var range = Range.fromPoints(ranges[0].start, lastRange.end); + this.toSingleRange(); + this.setSelectionRange(range, lastRange.cursor == lastRange.start); + } + else { + var cursor = this.session.documentToScreenPosition(this.cursor); + var anchor = this.session.documentToScreenPosition(this.anchor); + var rectSel = this.rectangularRangeBlock(cursor, anchor); + rectSel.forEach(this.addRange, this); + } + }; + this.rectangularRangeBlock = function (screenCursor, screenAnchor, includeEmptyLines) { + var rectSel = []; + var xBackwards = screenCursor.column < screenAnchor.column; + if (xBackwards) { + var startColumn = screenCursor.column; + var endColumn = screenAnchor.column; + var startOffsetX = screenCursor.offsetX; + var endOffsetX = screenAnchor.offsetX; + } + else { + var startColumn = screenAnchor.column; + var endColumn = screenCursor.column; + var startOffsetX = screenAnchor.offsetX; + var endOffsetX = screenCursor.offsetX; + } + var yBackwards = screenCursor.row < screenAnchor.row; + if (yBackwards) { + var startRow = screenCursor.row; + var endRow = screenAnchor.row; + } + else { + var startRow = screenAnchor.row; + var endRow = screenCursor.row; + } + if (startColumn < 0) + startColumn = 0; + if (startRow < 0) + startRow = 0; + if (startRow == endRow) + includeEmptyLines = true; + var docEnd; + for (var row = startRow; row <= endRow; row++) { + var range = Range.fromPoints(this.session.screenToDocumentPosition(row, startColumn, startOffsetX), this.session.screenToDocumentPosition(row, endColumn, endOffsetX)); + if (range.isEmpty()) { + if (docEnd && isSamePoint(range.end, docEnd)) + break; + docEnd = range.end; + } + range.cursor = xBackwards ? range.start : range.end; + rectSel.push(range); + } + if (yBackwards) + rectSel.reverse(); + if (!includeEmptyLines) { + var end = rectSel.length - 1; + while (rectSel[end].isEmpty() && end > 0) + end--; + if (end > 0) { + var start = 0; + while (rectSel[start].isEmpty()) + start++; + } + for (var i = end; i >= start; i--) { + if (rectSel[i].isEmpty()) + rectSel.splice(i, 1); + } + } + return rectSel; + }; +}).call(Selection.prototype); +var Editor = require("./editor").Editor; +(function () { + this.updateSelectionMarkers = function () { + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + this.addSelectionMarker = function (orientedRange) { + if (!orientedRange.cursor) + orientedRange.cursor = orientedRange.end; + var style = this.getSelectionStyle(); + orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); + this.session.$selectionMarkers.push(orientedRange); + this.session.selectionMarkerCount = this.session.$selectionMarkers.length; + return orientedRange; + }; + this.removeSelectionMarker = function (range) { + if (!range.marker) + return; + this.session.removeMarker(range.marker); + var index = this.session.$selectionMarkers.indexOf(range); + if (index != -1) + this.session.$selectionMarkers.splice(index, 1); + this.session.selectionMarkerCount = this.session.$selectionMarkers.length; + }; + this.removeSelectionMarkers = function (ranges) { + var markerList = this.session.$selectionMarkers; + for (var i = ranges.length; i--;) { + var range = ranges[i]; + if (!range.marker) + continue; + this.session.removeMarker(range.marker); + var index = markerList.indexOf(range); + if (index != -1) + markerList.splice(index, 1); + } + this.session.selectionMarkerCount = markerList.length; + }; + this.$onAddRange = function (e) { + this.addSelectionMarker(e.range); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + this.$onRemoveRange = function (e) { + this.removeSelectionMarkers(e.ranges); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + this.$onMultiSelect = function (e) { + if (this.inMultiSelectMode) + return; + this.inMultiSelectMode = true; + this.setStyle("ace_multiselect"); + this.keyBinding.addKeyboardHandler(commands.keyboardHandler); + this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + this.$onSingleSelect = function (e) { + if (this.session.multiSelect.inVirtualMode) + return; + this.inMultiSelectMode = false; + this.unsetStyle("ace_multiselect"); + this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); + this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + this._emit("changeSelection"); + }; + this.$onMultiSelectExec = function (e) { + var command = e.command; + var editor = e.editor; + if (!editor.multiSelect) + return; + if (!command.multiSelectAction) { + var result = command.exec(editor, e.args || {}); + editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); + editor.multiSelect.mergeOverlappingRanges(); + } + else if (command.multiSelectAction == "forEach") { + result = editor.forEachSelection(command, e.args); + } + else if (command.multiSelectAction == "forEachLine") { + result = editor.forEachSelection(command, e.args, true); + } + else if (command.multiSelectAction == "single") { + editor.exitMultiSelectMode(); + result = command.exec(editor, e.args || {}); + } + else { + result = command.multiSelectAction(editor, e.args || {}); + } + return result; + }; + this.forEachSelection = function (cmd, args, options) { + if (this.inVirtualSelectionMode) + return; + var keepOrder = options && options.keepOrder; + var $byLines = options == true || options && options.$byLines; + var session = this.session; + var selection = this.selection; + var rangeList = selection.rangeList; + var ranges = (keepOrder ? selection : rangeList).ranges; + var result; + if (!ranges.length) + return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); + var reg = selection._eventRegistry; + selection._eventRegistry = {}; + var tmpSel = new Selection(session); + this.inVirtualSelectionMode = true; + for (var i = ranges.length; i--;) { + if ($byLines) { + while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) + i--; + } + tmpSel.fromOrientedRange(ranges[i]); + tmpSel.index = i; + this.selection = session.selection = tmpSel; + var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); + if (!result && cmdResult !== undefined) + result = cmdResult; + tmpSel.toOrientedRange(ranges[i]); + } + tmpSel.detach(); + this.selection = session.selection = selection; + this.inVirtualSelectionMode = false; + selection._eventRegistry = reg; + selection.mergeOverlappingRanges(); + if (selection.ranges[0]) + selection.fromOrientedRange(selection.ranges[0]); + var anim = this.renderer.$scrollAnimation; + this.onCursorChange(); + this.onSelectionChange(); + if (anim && anim.from == anim.to) + this.renderer.animateScrolling(anim.from); + return result; + }; + this.exitMultiSelectMode = function () { + if (!this.inMultiSelectMode || this.inVirtualSelectionMode) + return; + this.multiSelect.toSingleRange(); + }; + this.getSelectedText = function () { + var text = ""; + if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { + var ranges = this.multiSelect.rangeList.ranges; + var buf = []; + for (var i = 0; i < ranges.length; i++) { + buf.push(this.session.getTextRange(ranges[i])); + } + var nl = this.session.getDocument().getNewLineCharacter(); + text = buf.join(nl); + if (text.length == (buf.length - 1) * nl.length) + text = ""; + } + else if (!this.selection.isEmpty()) { + text = this.session.getTextRange(this.getSelectionRange()); + } + return text; + }; + this.$checkMultiselectChange = function (e, anchor) { + if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { + var range = this.multiSelect.ranges[0]; + if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) + return; + var pos = anchor == this.multiSelect.anchor + ? range.cursor == range.start ? range.end : range.start + : range.cursor; + if (pos.row != anchor.row + || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) + this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); + else + this.multiSelect.mergeOverlappingRanges(); + } + }; + this.findAll = function (needle, options, additive) { + options = options || {}; + options.needle = needle || options.needle; + if (options.needle == undefined) { + var range = this.selection.isEmpty() + ? this.selection.getWordRange() + : this.selection.getRange(); + options.needle = this.session.getTextRange(range); + } + this.$search.set(options); + var ranges = this.$search.findAll(this.session); + if (!ranges.length) + return 0; + var selection = this.multiSelect; + if (!additive) + selection.toSingleRange(ranges[0]); + for (var i = ranges.length; i--;) + selection.addRange(ranges[i], true); + if (range && selection.rangeList.rangeAtPoint(range.start)) + selection.addRange(range, true); + return ranges.length; + }; + this.selectMoreLines = function (dir, skip) { + var range = this.selection.toOrientedRange(); + var isBackwards = range.cursor == range.end; + var screenLead = this.session.documentToScreenPosition(range.cursor); + if (this.selection.$desiredColumn) + screenLead.column = this.selection.$desiredColumn; + var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); + if (!range.isEmpty()) { + var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); + var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); + } + else { + var anchor = lead; + } + if (isBackwards) { + var newRange = Range.fromPoints(lead, anchor); + newRange.cursor = newRange.start; + } + else { + var newRange = Range.fromPoints(anchor, lead); + newRange.cursor = newRange.end; + } + newRange.desiredColumn = screenLead.column; + if (!this.selection.inMultiSelectMode) { + this.selection.addRange(range); + } + else { + if (skip) + var toRemove = range.cursor; + } + this.selection.addRange(newRange); + if (toRemove) + this.selection.substractPoint(toRemove); + }; + this.transposeSelections = function (dir) { + var session = this.session; + var sel = session.multiSelect; + var all = sel.ranges; + for (var i = all.length; i--;) { + var range = all[i]; + if (range.isEmpty()) { + var tmp_1 = session.getWordRange(range.start.row, range.start.column); + range.start.row = tmp_1.start.row; + range.start.column = tmp_1.start.column; + range.end.row = tmp_1.end.row; + range.end.column = tmp_1.end.column; + } + } + sel.mergeOverlappingRanges(); + var words = []; + for (var i = all.length; i--;) { + var range = all[i]; + words.unshift(session.getTextRange(range)); + } + if (dir < 0) + words.unshift(words.pop()); + else + words.push(words.shift()); + for (var i = all.length; i--;) { + var range = all[i]; + var tmp = range.clone(); + session.replace(range, words[i]); + range.start.row = tmp.start.row; + range.start.column = tmp.start.column; + } + sel.fromOrientedRange(sel.ranges[0]); + }; + this.selectMore = function (dir, skip, stopAtFirst) { + var session = this.session; + var sel = session.multiSelect; + var range = sel.toOrientedRange(); + if (range.isEmpty()) { + range = session.getWordRange(range.start.row, range.start.column); + range.cursor = dir == -1 ? range.start : range.end; + this.multiSelect.addRange(range); + if (stopAtFirst) + return; + } + var needle = session.getTextRange(range); + var newRange = find(session, needle, dir); + if (newRange) { + newRange.cursor = dir == -1 ? newRange.start : newRange.end; + this.session.unfold(newRange); + this.multiSelect.addRange(newRange); + this.renderer.scrollCursorIntoView(null, 0.5); + } + if (skip) + this.multiSelect.substractPoint(range.cursor); + }; + this.alignCursors = function () { + var session = this.session; + var sel = session.multiSelect; + var ranges = sel.ranges; + var row = -1; + var sameRowRanges = ranges.filter(function (r) { + if (r.cursor.row == row) + return true; + row = r.cursor.row; + }); + if (!ranges.length || sameRowRanges.length == ranges.length - 1) { + var range = this.selection.getRange(); + var fr = range.start.row, lr = range.end.row; + var guessRange = fr == lr; + if (guessRange) { + var max = this.session.getLength(); + var line; + do { + line = this.session.getLine(lr); + } while (/[=:]/.test(line) && ++lr < max); + do { + line = this.session.getLine(fr); + } while (/[=:]/.test(line) && --fr > 0); + if (fr < 0) + fr = 0; + if (lr >= max) + lr = max - 1; + } + var lines = this.session.removeFullLines(fr, lr); + lines = this.$reAlignText(lines, guessRange); + this.session.insert({ row: fr, column: 0 }, lines.join("\n") + "\n"); + if (!guessRange) { + range.start.column = 0; + range.end.column = lines[lines.length - 1].length; + } + this.selection.setRange(range); + } + else { + sameRowRanges.forEach(function (r) { + sel.substractPoint(r.cursor); + }); + var maxCol = 0; + var minSpace = Infinity; + var spaceOffsets = ranges.map(function (r) { + var p = r.cursor; + var line = session.getLine(p.row); + var spaceOffset = line.substr(p.column).search(/\S/g); + if (spaceOffset == -1) + spaceOffset = 0; + if (p.column > maxCol) + maxCol = p.column; + if (spaceOffset < minSpace) + minSpace = spaceOffset; + return spaceOffset; + }); + ranges.forEach(function (r, i) { + var p = r.cursor; + var l = maxCol - p.column; + var d = spaceOffsets[i] - minSpace; + if (l > d) + session.insert(p, lang.stringRepeat(" ", l - d)); + else + session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); + r.start.column = r.end.column = maxCol; + r.start.row = r.end.row = p.row; + r.cursor = r.end; + }); + sel.fromOrientedRange(ranges[0]); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + } + }; + this.$reAlignText = function (lines, forceLeft) { + var isLeftAligned = true, isRightAligned = true; + var startW, textW, endW; + return lines.map(function (line) { + var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); + if (!m) + return [line]; + if (startW == null) { + startW = m[1].length; + textW = m[2].length; + endW = m[3].length; + return m; + } + if (startW + textW + endW != m[1].length + m[2].length + m[3].length) + isRightAligned = false; + if (startW != m[1].length) + isLeftAligned = false; + if (startW > m[1].length) + startW = m[1].length; + if (textW < m[2].length) + textW = m[2].length; + if (endW > m[3].length) + endW = m[3].length; + return m; + }).map(forceLeft ? alignLeft : + isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); + function spaces(n) { + return lang.stringRepeat(" ", n); + } + function alignLeft(m) { + return !m[2] ? m[0] : spaces(startW) + m[2] + + spaces(textW - m[2].length + endW) + + m[4].replace(/^([=:])\s+/, "$1 "); + } + function alignRight(m) { + return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + + spaces(endW) + + m[4].replace(/^([=:])\s+/, "$1 "); + } + function unAlign(m) { + return !m[2] ? m[0] : spaces(startW) + m[2] + + spaces(endW) + + m[4].replace(/^([=:])\s+/, "$1 "); + } + }; +}).call(Editor.prototype); +function isSamePoint(p1, p2) { + return p1.row == p2.row && p1.column == p2.column; +} +exports.onSessionChange = function (e) { + var session = e.session; + if (session && !session.multiSelect) { + session.$selectionMarkers = []; + session.selection.$initRangeList(); + session.multiSelect = session.selection; + } + this.multiSelect = session && session.multiSelect; + var oldSession = e.oldSession; + if (oldSession) { + oldSession.multiSelect.off("addRange", this.$onAddRange); + oldSession.multiSelect.off("removeRange", this.$onRemoveRange); + oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); + oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); + oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); + oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); + } + if (session) { + session.multiSelect.on("addRange", this.$onAddRange); + session.multiSelect.on("removeRange", this.$onRemoveRange); + session.multiSelect.on("multiSelect", this.$onMultiSelect); + session.multiSelect.on("singleSelect", this.$onSingleSelect); + session.multiSelect.lead.on("change", this.$checkMultiselectChange); + session.multiSelect.anchor.on("change", this.$checkMultiselectChange); + } + if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { + if (session.selection.inMultiSelectMode) + this.$onMultiSelect(); + else + this.$onSingleSelect(); + } +}; +function MultiSelect(editor) { + if (editor.$multiselectOnSessionChange) + return; + editor.$onAddRange = editor.$onAddRange.bind(editor); + editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); + editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); + editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); + editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); + editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); + editor.$multiselectOnSessionChange(editor); + editor.on("changeSession", editor.$multiselectOnSessionChange); + editor.on("mousedown", onMouseDown); + editor.commands.addCommands(commands.defaultCommands); + addAltCursorListeners(editor); +} +function addAltCursorListeners(editor) { + if (!editor.textInput) + return; + var el = editor.textInput.getElement(); + var altCursor = false; + event.addListener(el, "keydown", function (e) { + var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey); + if (editor.$blockSelectEnabled && altDown) { + if (!altCursor) { + editor.renderer.setMouseCursor("crosshair"); + altCursor = true; + } + } + else if (altCursor) { + reset(); + } + }, editor); + event.addListener(el, "keyup", reset, editor); + event.addListener(el, "blur", reset, editor); + function reset(e) { + if (altCursor) { + editor.renderer.setMouseCursor(""); + altCursor = false; + } + } +} +exports.MultiSelect = MultiSelect; +require("./config").defineOptions(Editor.prototype, "editor", { + enableMultiselect: { + set: function (val) { + MultiSelect(this); + if (val) { + this.on("mousedown", onMouseDown); + } + else { + this.off("mousedown", onMouseDown); + } + }, + value: true + }, + enableBlockSelect: { + set: function (val) { + this.$blockSelectEnabled = val; + }, + value: true + } +}); + +}); + +define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +(function () { + this.foldingStartMarker = null; + this.foldingStopMarker = null; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.foldingStartMarker.test(line)) + return "start"; + if (foldStyle == "markbeginend" + && this.foldingStopMarker + && this.foldingStopMarker.test(line)) + return "end"; + return ""; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + return null; + }; + this.indentationBlock = function (session, row, column) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1) + return; + var startColumn = column || line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + var level = session.getLine(row).search(re); + if (level == -1) + continue; + if (level <= startLevel) { + var token = session.getTokenAt(row, 0); + if (!token || token.type !== "string") + break; + } + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.openingBracketBlock = function (session, bracket, row, column, typeRe) { + var start = { row: row, column: column + 1 }; + var end = session.$findClosingBracket(bracket, start, typeRe); + if (!end) + return; + var fw = session.foldWidgets[end.row]; + if (fw == null) + fw = session.getFoldWidget(end.row); + if (fw == "start" && end.row > start.row) { + end.row--; + end.column = session.getLine(end.row).length; + } + return Range.fromPoints(start, end); + }; + this.closingBracketBlock = function (session, bracket, row, column, typeRe) { + var end = { row: row, column: column }; + var start = session.$findOpeningBracket(bracket, end); + if (!start) + return; + start.column++; + end.column--; + return Range.fromPoints(start, end); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"], function(require, exports, module){"use strict"; +var LineWidgets = require("../line_widgets").LineWidgets; +var dom = require("../lib/dom"); +var Range = require("../range").Range; +var nls = require("../config").nls; +function binarySearch(array, needle, comparator) { + var first = 0; + var last = array.length - 1; + while (first <= last) { + var mid = (first + last) >> 1; + var c = comparator(needle, array[mid]); + if (c > 0) + first = mid + 1; + else if (c < 0) + last = mid - 1; + else + return mid; + } + return -(first + 1); +} +function findAnnotations(session, row, dir) { + var annotations = session.getAnnotations().sort(Range.comparePoints); + if (!annotations.length) + return; + var i = binarySearch(annotations, { row: row, column: -1 }, Range.comparePoints); + if (i < 0) + i = -i - 1; + if (i >= annotations.length) + i = dir > 0 ? 0 : annotations.length - 1; + else if (i === 0 && dir < 0) + i = annotations.length - 1; + var annotation = annotations[i]; + if (!annotation || !dir) + return; + if (annotation.row === row) { + do { + annotation = annotations[i += dir]; + } while (annotation && annotation.row === row); + if (!annotation) + return annotations.slice(); + } + var matched = []; + row = annotation.row; + do { + matched[dir < 0 ? "unshift" : "push"](annotation); + annotation = annotations[i += dir]; + } while (annotation && annotation.row == row); + return matched.length && matched; +} +exports.showErrorMarker = function (editor, dir) { + var session = editor.session; + if (!session.widgetManager) { + session.widgetManager = new LineWidgets(session); + session.widgetManager.attach(editor); + } + var pos = editor.getCursorPosition(); + var row = pos.row; + var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function (w) { + return w.type == "errorMarker"; + })[0]; + if (oldWidget) { + oldWidget.destroy(); + } + else { + row -= dir; + } + var annotations = findAnnotations(session, row, dir); + var gutterAnno; + if (annotations) { + var annotation = annotations[0]; + pos.column = (annotation.pos && typeof annotation.column != "number" + ? annotation.pos.sc + : annotation.column) || 0; + pos.row = annotation.row; + gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; + } + else if (oldWidget) { + return; + } + else { + gutterAnno = { + displayText: [nls("error-marker.good-state", "Looks good!")], + className: "ace_ok" + }; + } + editor.session.unfold(pos.row); + editor.selection.moveToPosition(pos); + var w = { + row: pos.row, + fixedWidth: true, + coverGutter: true, + el: dom.createElement("div"), + type: "errorMarker" + }; + var el = w.el.appendChild(dom.createElement("div")); + var arrow = w.el.appendChild(dom.createElement("div")); + arrow.className = "error_widget_arrow " + gutterAnno.className; + var left = editor.renderer.$cursorLayer + .getPixelPosition(pos).left; + arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; + w.el.className = "error_widget_wrapper"; + el.className = "error_widget " + gutterAnno.className; + gutterAnno.displayText.forEach(function (annoTextLine, i) { + el.appendChild(dom.createTextNode(annoTextLine)); + if (i < gutterAnno.displayText.length - 1) { + el.appendChild(dom.createElement("br")); + } + }); + el.appendChild(dom.createElement("div")); + var kb = function (_, hashId, keyString) { + if (hashId === 0 && (keyString === "esc" || keyString === "return")) { + w.destroy(); + return { command: "null" }; + } + }; + w.destroy = function () { + if (editor.$mouseHandler.isMousePressed) + return; + editor.keyBinding.removeKeyboardHandler(kb); + session.widgetManager.removeLineWidget(w); + editor.off("changeSelection", w.destroy); + editor.off("changeSession", w.destroy); + editor.off("mouseup", w.destroy); + editor.off("change", w.destroy); + }; + editor.keyBinding.addKeyboardHandler(kb); + editor.on("changeSelection", w.destroy); + editor.on("changeSession", w.destroy); + editor.on("mouseup", w.destroy); + editor.on("change", w.destroy); + editor.session.widgetManager.addLineWidget(w); + w.el.onmousedown = editor.focus.bind(editor); + editor.renderer.scrollCursorIntoView(null, 0.5, { bottom: w.el.offsetHeight }); +}; +dom.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n", "error_marker.css", false); + +}); + +define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"], function(require, exports, module){/** + * The main class required to set up an Ace instance in the browser. + * + * @namespace Ace + **/ +"use strict"; +require("./loader_build")(exports) +var dom = require("./lib/dom"); +var Range = require("./range").Range; +var Editor = require("./editor").Editor; +var EditSession = require("./edit_session").EditSession; +var UndoManager = require("./undomanager").UndoManager; +var Renderer = require("./virtual_renderer").VirtualRenderer; +require("./worker/worker_client"); +require("./keyboard/hash_handler"); +require("./placeholder"); +require("./multi_select"); +require("./mode/folding/fold_mode"); +require("./theme/textmate"); +require("./ext/error_marker"); +exports.config = require("./config"); +exports.edit = function (el, options) { + if (typeof el == "string") { + var _id = el; + el = document.getElementById(_id); + if (!el) + throw new Error("ace.edit can't find div #" + _id); + } + if (el && el.env && el.env.editor instanceof Editor) + return el.env.editor; + var value = ""; + if (el && /input|textarea/i.test(el.tagName)) { + var oldNode = el; + value = oldNode.value; + el = dom.createElement("pre"); + oldNode.parentNode.replaceChild(el, oldNode); + } + else if (el) { + value = el.textContent; + el.innerHTML = ""; + } + var doc = exports.createEditSession(value); + var editor = new Editor(new Renderer(el), doc, options); + var env = { + document: doc, + editor: editor, + onResize: editor.resize.bind(editor, null) + }; + if (oldNode) + env.textarea = oldNode; + editor.on("destroy", function () { + env.editor.container.env = null; // prevent memory leak on old ie + }); + editor.container.env = editor.env = env; + return editor; +}; +exports.createEditSession = function (text, mode) { + var doc = new EditSession(text, mode); + doc.setUndoManager(new UndoManager()); + return doc; +}; +exports.Range = Range; +exports.Editor = Editor; +exports.EditSession = EditSession; +exports.UndoManager = UndoManager; +exports.VirtualRenderer = Renderer; +exports.version = exports.config.version; + +}); (function() { + window.require(["ace/ace"], function(a) { + if (a) { + a.config.init(true); + a.define = window.define; + } + var global = (function () { + return this; + })(); + if (!global && typeof window != "undefined") global = window; // can happen in strict mode + if (!global && typeof self != "undefined") global = self; // can happen in webworker + + if (!global.ace) + global.ace = a; + for (var key in a) if (a.hasOwnProperty(key)) + global.ace[key] = a[key]; + global.ace["default"] = global.ace; + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = global.ace; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-beautify.js b/ui/base1/ace/ext-beautify.js new file mode 100644 index 0000000..0b73459 --- /dev/null +++ b/ui/base1/ace/ext-beautify.js @@ -0,0 +1,330 @@ +define("ace/ext/beautify",["require","exports","module","ace/token_iterator"], function(require, exports, module){// [WIP] +"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +exports.singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "html", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]; +exports.blockTags = ["article", "aside", "blockquote", "body", "div", "dl", "fieldset", "footer", "form", "head", "header", "html", "nav", "ol", "p", "script", "section", "style", "table", "tbody", "tfoot", "thead", "ul"]; +exports.formatOptions = { + lineBreaksAfterCommasInCurlyBlock: true +}; +exports.beautify = function (session) { + var iterator = new TokenIterator(session, 0, 0); + var token = iterator.getCurrentToken(); + var tabString = session.getTabString(); + var singletonTags = exports.singletonTags; + var blockTags = exports.blockTags; + var formatOptions = exports.formatOptions || {}; + var nextToken; + var breakBefore = false; + var spaceBefore = false; + var spaceAfter = false; + var code = ""; + var value = ""; + var tagName = ""; + var depth = 0; + var lastDepth = 0; + var lastIndent = 0; + var indent = 0; + var unindent = 0; + var roundDepth = 0; + var curlyDepth = 0; + var row; + var curRow = 0; + var rowsToAdd = 0; + var rowTokens = []; + var abort = false; + var i; + var indentNextLine = false; + var inTag = false; + var inCSS = false; + var inBlock = false; + var levels = { 0: 0 }; + var parents = []; + var caseBody = false; + var trimNext = function () { + if (nextToken && nextToken.value && nextToken.type !== 'string.regexp') + nextToken.value = nextToken.value.replace(/^\s*/, ""); + }; + var trimLine = function () { + var end = code.length - 1; + while (true) { + if (end == 0) + break; + if (code[end] !== " ") + break; + end = end - 1; + } + code = code.slice(0, end + 1); + }; + var trimCode = function () { + code = code.trimRight(); + breakBefore = false; + }; + while (token !== null) { + curRow = iterator.getCurrentTokenRow(); + rowTokens = iterator.$rowTokens; + nextToken = iterator.stepForward(); + if (typeof token !== "undefined") { + value = token.value; + unindent = 0; + inCSS = (tagName === "style" || session.$modeId === "ace/mode/css"); + if (is(token, "tag-open")) { + inTag = true; + if (nextToken) + inBlock = (blockTags.indexOf(nextToken.value) !== -1); + if (value === " 0; rowsToAdd--) + code += "\n"; + breakBefore = true; + if (!is(token, "comment") && !token.type.match(/^(comment|string)$/)) + value = value.trimLeft(); + } + if (value) { + if (token.type === "keyword" && value.match(/^(if|else|elseif|for|foreach|while|switch)$/)) { + parents[depth] = value; + trimNext(); + spaceAfter = true; + if (value.match(/^(else|elseif)$/)) { + if (code.match(/\}[\s]*$/)) { + trimCode(); + spaceBefore = true; + } + } + } + else if (token.type === "paren.lparen") { + trimNext(); + if (value.substr(-1) === "{") { + spaceAfter = true; + indentNextLine = false; + if (!inTag) + rowsToAdd = 1; + } + if (value.substr(0, 1) === "{") { + spaceBefore = true; + if (code.substr(-1) !== '[' && code.trimRight().substr(-1) === '[') { + trimCode(); + spaceBefore = false; + } + else if (code.trimRight().substr(-1) === ')') { + trimCode(); + } + else { + trimLine(); + } + } + } + else if (token.type === "paren.rparen") { + unindent = 1; + if (value.substr(0, 1) === "}") { + if (parents[depth - 1] === 'case') + unindent++; + if (code.trimRight().substr(-1) === '{') { + trimCode(); + } + else { + spaceBefore = true; + if (inCSS) + rowsToAdd += 2; + } + } + if (value.substr(0, 1) === "]") { + if (code.substr(-1) !== '}' && code.trimRight().substr(-1) === '}') { + spaceBefore = false; + indent++; + trimCode(); + } + } + if (value.substr(0, 1) === ")") { + if (code.substr(-1) !== '(' && code.trimRight().substr(-1) === '(') { + spaceBefore = false; + indent++; + trimCode(); + } + } + trimLine(); + } + else if ((token.type === "keyword.operator" || token.type === "keyword") && value.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)) { + trimCode(); + trimNext(); + spaceBefore = true; + spaceAfter = true; + } + else if (token.type === "punctuation.operator" && value === ';') { + trimCode(); + trimNext(); + spaceAfter = true; + if (inCSS) + rowsToAdd++; + } + else if (token.type === "punctuation.operator" && value.match(/^(:|,)$/)) { + trimCode(); + trimNext(); + if (value.match(/^(,)$/) && curlyDepth > 0 && roundDepth === 0 && formatOptions.lineBreaksAfterCommasInCurlyBlock) { + rowsToAdd++; + } + else { + spaceAfter = true; + breakBefore = false; + } + } + else if (token.type === "support.php_tag" && value === "?>" && !breakBefore) { + trimCode(); + spaceBefore = true; + } + else if (is(token, "attribute-name") && code.substr(-1).match(/^\s$/)) { + spaceBefore = true; + } + else if (is(token, "attribute-equals")) { + trimLine(); + trimNext(); + } + else if (is(token, "tag-close")) { + trimLine(); + if (value === "/>") + spaceBefore = true; + } + else if (token.type === "keyword" && value.match(/^(case|default)$/)) { + if (caseBody) + unindent = 1; + } + if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"@]$/))) { + indent = lastIndent; + if (depth > lastDepth) { + indent++; + for (i = depth; i > lastDepth; i--) + levels[i] = indent; + } + else if (depth < lastDepth) + indent = levels[depth]; + lastDepth = depth; + lastIndent = indent; + if (unindent) + indent -= unindent; + if (indentNextLine && !roundDepth) { + indent++; + indentNextLine = false; + } + for (i = 0; i < indent; i++) + code += tabString; + } + if (token.type === "keyword" && value.match(/^(case|default)$/)) { + if (caseBody === false) { + parents[depth] = value; + depth++; + caseBody = true; + } + } + else if (token.type === "keyword" && value.match(/^(break)$/)) { + if (parents[depth - 1] && parents[depth - 1].match(/^(case|default)$/)) { + depth--; + caseBody = false; + } + } + if (token.type === "paren.lparen") { + roundDepth += (value.match(/\(/g) || []).length; + curlyDepth += (value.match(/\{/g) || []).length; + depth += value.length; + } + if (token.type === "keyword" && value.match(/^(if|else|elseif|for|while)$/)) { + indentNextLine = true; + roundDepth = 0; + } + else if (!roundDepth && value.trim() && token.type !== "comment") + indentNextLine = false; + if (token.type === "paren.rparen") { + roundDepth -= (value.match(/\)/g) || []).length; + curlyDepth -= (value.match(/\}/g) || []).length; + for (i = 0; i < value.length; i++) { + depth--; + if (value.substr(i, 1) === '}' && parents[depth] === 'case') { + depth--; + } + } + } + if (token.type == "text") + value = value.replace(/\s+$/, " "); + if (spaceBefore && !breakBefore) { + trimLine(); + if (code.substr(-1) !== "\n") + code += " "; + } + code += value; + if (spaceAfter) + code += " "; + breakBefore = false; + spaceBefore = false; + spaceAfter = false; + if ((is(token, "tag-close") && (inBlock || blockTags.indexOf(tagName) !== -1)) || (is(token, "doctype") && value === ">")) { + if (inBlock && nextToken && nextToken.value === "") { + depth--; + } + } + if (is(token, "tag-name")) { + tagName = value; + } + row = curRow; + } + } + token = nextToken; + } + code = code.trim(); + session.doc.setValue(code); +}; +exports.commands = [{ + name: "beautify", + description: "Format selection (Beautify)", + exec: function (editor) { + exports.beautify(editor.session); + }, + bindKey: "Ctrl-Shift-B" + }]; + +}); (function() { + window.require(["ace/ext/beautify"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-code_lens.js b/ui/base1/ace/ext-code_lens.js new file mode 100644 index 0000000..9501efd --- /dev/null +++ b/ui/base1/ace/ext-code_lens.js @@ -0,0 +1,202 @@ +define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var LineWidgets = require("../line_widgets").LineWidgets; +var event = require("../lib/event"); +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); +function clearLensElements(renderer) { + var textLayer = renderer.$textLayer; + var lensElements = textLayer.$lenses; + if (lensElements) + lensElements.forEach(function (el) { el.remove(); }); + textLayer.$lenses = null; +} +function renderWidgets(changes, renderer) { + var changed = changes & renderer.CHANGE_LINES + || changes & renderer.CHANGE_FULL + || changes & renderer.CHANGE_SCROLL + || changes & renderer.CHANGE_TEXT; + if (!changed) + return; + var session = renderer.session; + var lineWidgets = renderer.session.lineWidgets; + var textLayer = renderer.$textLayer; + var lensElements = textLayer.$lenses; + if (!lineWidgets) { + if (lensElements) + clearLensElements(renderer); + return; + } + var textCells = renderer.$textLayer.$lines.cells; + var config = renderer.layerConfig; + var padding = renderer.$padding; + if (!lensElements) + lensElements = textLayer.$lenses = []; + var index = 0; + for (var i = 0; i < textCells.length; i++) { + var row = textCells[i].row; + var widget = lineWidgets[row]; + var lenses = widget && widget.lenses; + if (!lenses || !lenses.length) + continue; + var lensContainer = lensElements[index]; + if (!lensContainer) { + lensContainer = lensElements[index] + = dom.buildDom(["div", { class: "ace_codeLens" }], renderer.container); + } + lensContainer.style.height = config.lineHeight + "px"; + index++; + for (var j = 0; j < lenses.length; j++) { + var el = lensContainer.childNodes[2 * j]; + if (!el) { + if (j != 0) + lensContainer.appendChild(dom.createTextNode("\xa0|\xa0")); + el = dom.buildDom(["a"], lensContainer); + } + el.textContent = lenses[j].title; + el.lensCommand = lenses[j]; + } + while (lensContainer.childNodes.length > 2 * j - 1) + lensContainer.lastChild.remove(); + var top = renderer.$cursorLayer.getPixelPosition({ + row: row, + column: 0 + }, true).top - config.lineHeight * widget.rowsAbove - config.offset; + lensContainer.style.top = top + "px"; + var left = renderer.gutterWidth; + var indent = session.getLine(row).search(/\S|$/); + if (indent == -1) + indent = 0; + left += indent * config.characterWidth; + lensContainer.style.paddingLeft = padding + left + "px"; + } + while (index < lensElements.length) + lensElements.pop().remove(); +} +function clearCodeLensWidgets(session) { + if (!session.lineWidgets) + return; + var widgetManager = session.widgetManager; + session.lineWidgets.forEach(function (widget) { + if (widget && widget.lenses) + widgetManager.removeLineWidget(widget); + }); +} +exports.setLenses = function (session, lenses) { + var firstRow = Number.MAX_VALUE; + clearCodeLensWidgets(session); + lenses && lenses.forEach(function (lens) { + var row = lens.start.row; + var column = lens.start.column; + var widget = session.lineWidgets && session.lineWidgets[row]; + if (!widget || !widget.lenses) { + widget = session.widgetManager.$registerLineWidget({ + rowCount: 1, + rowsAbove: 1, + row: row, + column: column, + lenses: [] + }); + } + widget.lenses.push(lens.command); + if (row < firstRow) + firstRow = row; + }); + session._emit("changeFold", { data: { start: { row: firstRow } } }); + return firstRow; +}; +function attachToEditor(editor) { + editor.codeLensProviders = []; + editor.renderer.on("afterRender", renderWidgets); + if (!editor.$codeLensClickHandler) { + editor.$codeLensClickHandler = function (e) { + var command = e.target.lensCommand; + if (!command) + return; + editor.execCommand(command.id, command.arguments); + editor._emit("codeLensClick", e); + }; + event.addListener(editor.container, "click", editor.$codeLensClickHandler, editor); + } + editor.$updateLenses = function () { + var session = editor.session; + if (!session) + return; + if (!session.widgetManager) { + session.widgetManager = new LineWidgets(session); + session.widgetManager.attach(editor); + } + var providersToWaitNum = editor.codeLensProviders.length; + var lenses = []; + editor.codeLensProviders.forEach(function (provider) { + provider.provideCodeLenses(session, function (err, payload) { + if (err) + return; + payload.forEach(function (lens) { + lenses.push(lens); + }); + providersToWaitNum--; + if (providersToWaitNum == 0) { + applyLenses(); + } + }); + }); + function applyLenses() { + var cursor = session.selection.cursor; + var oldRow = session.documentToScreenRow(cursor); + var scrollTop = session.getScrollTop(); + var firstRow = exports.setLenses(session, lenses); + var lastDelta = session.$undoManager && session.$undoManager.$lastDelta; + if (lastDelta && lastDelta.action == "remove" && lastDelta.lines.length > 1) + return; + var row = session.documentToScreenRow(cursor); + var lineHeight = editor.renderer.layerConfig.lineHeight; + var top = session.getScrollTop() + (row - oldRow) * lineHeight; + if (firstRow == 0 && scrollTop < lineHeight / 4 && scrollTop > -lineHeight / 4) { + top = -lineHeight; + } + session.setScrollTop(top); + } + }; + var updateLenses = lang.delayedCall(editor.$updateLenses); + editor.$updateLensesOnInput = function () { + updateLenses.delay(250); + }; + editor.on("input", editor.$updateLensesOnInput); +} +function detachFromEditor(editor) { + editor.off("input", editor.$updateLensesOnInput); + editor.renderer.off("afterRender", renderWidgets); + if (editor.$codeLensClickHandler) + editor.container.removeEventListener("click", editor.$codeLensClickHandler); +} +exports.registerCodeLensProvider = function (editor, codeLensProvider) { + editor.setOption("enableCodeLens", true); + editor.codeLensProviders.push(codeLensProvider); + editor.$updateLensesOnInput(); +}; +exports.clear = function (session) { + exports.setLenses(session, null); +}; +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + enableCodeLens: { + set: function (val) { + if (val) { + attachToEditor(this); + } + else { + detachFromEditor(this); + } + } + } +}); +dom.importCssString("\n.ace_codeLens {\n position: absolute;\n color: #aaa;\n font-size: 88%;\n background: inherit;\n width: 100%;\n display: flex;\n align-items: flex-end;\n pointer-events: none;\n}\n.ace_codeLens > a {\n cursor: pointer;\n pointer-events: auto;\n}\n.ace_codeLens > a:hover {\n color: #0000ff;\n text-decoration: underline;\n}\n.ace_dark > .ace_codeLens > a:hover {\n color: #4e94ce;\n}\n", "codelense.css", false); + +}); (function() { + window.require(["ace/ext/code_lens"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-command_bar.js b/ui/base1/ace/ext-command_bar.js new file mode 100644 index 0000000..ccfa22e --- /dev/null +++ b/ui/base1/ace/ext-command_bar.js @@ -0,0 +1,459 @@ +define("ace/ext/command_bar",["require","exports","module","ace/tooltip","ace/lib/event_emitter","ace/lib/lang","ace/lib/dom","ace/lib/oop","ace/lib/useragent"], function(require, exports, module){var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var Tooltip = require("../tooltip").Tooltip; +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var useragent = require("../lib/useragent"); +var BUTTON_CLASS_NAME = 'command_bar_tooltip_button'; +var VALUE_CLASS_NAME = 'command_bar_button_value'; +var CAPTION_CLASS_NAME = 'command_bar_button_caption'; +var KEYBINDING_CLASS_NAME = 'command_bar_keybinding'; +var TOOLTIP_CLASS_NAME = 'command_bar_tooltip'; +var MORE_OPTIONS_BUTTON_ID = 'MoreOptionsButton'; +var defaultDelay = 100; +var defaultMaxElements = 4; +var minPosition = function (posA, posB) { + if (posB.row > posA.row) { + return posA; + } + else if (posB.row === posA.row && posB.column > posA.column) { + return posA; + } + return posB; +}; +var keyDisplayMap = { + "Ctrl": { mac: "^" }, + "Option": { mac: "⌥" }, + "Command": { mac: "⌘" }, + "Cmd": { mac: "⌘" }, + "Shift": "⇧", + "Left": "←", + "Right": "→", + "Up": "↑", + "Down": "↓" +}; +var CommandBarTooltip = /** @class */ (function () { + function CommandBarTooltip(parentNode, options) { + var e_1, _a; + options = options || {}; + this.parentNode = parentNode; + this.tooltip = new Tooltip(this.parentNode); + this.moreOptions = new Tooltip(this.parentNode); + this.maxElementsOnTooltip = options.maxElementsOnTooltip || defaultMaxElements; + this.$alwaysShow = options.alwaysShow || false; + this.eventListeners = {}; + this.elements = {}; + this.commands = {}; + this.tooltipEl = dom.buildDom(['div', { class: TOOLTIP_CLASS_NAME }], this.tooltip.getElement()); + this.moreOptionsEl = dom.buildDom(['div', { class: TOOLTIP_CLASS_NAME + " tooltip_more_options" }], this.moreOptions.getElement()); + this.$showTooltipTimer = lang.delayedCall(this.$showTooltip.bind(this), options.showDelay || defaultDelay); + this.$hideTooltipTimer = lang.delayedCall(this.$hideTooltip.bind(this), options.hideDelay || defaultDelay); + this.$tooltipEnter = this.$tooltipEnter.bind(this); + this.$onMouseMove = this.$onMouseMove.bind(this); + this.$onChangeScroll = this.$onChangeScroll.bind(this); + this.$onEditorChangeSession = this.$onEditorChangeSession.bind(this); + this.$scheduleTooltipForHide = this.$scheduleTooltipForHide.bind(this); + this.$preventMouseEvent = this.$preventMouseEvent.bind(this); + try { + for (var _b = __values(["mousedown", "mouseup", "click"]), _c = _b.next(); !_c.done; _c = _b.next()) { + var event = _c.value; + this.tooltip.getElement().addEventListener(event, this.$preventMouseEvent); + this.moreOptions.getElement().addEventListener(event, this.$preventMouseEvent); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + CommandBarTooltip.prototype.registerCommand = function (id, command) { + var registerForMainTooltip = Object.keys(this.commands).length < this.maxElementsOnTooltip; + if (!registerForMainTooltip && !this.elements[MORE_OPTIONS_BUTTON_ID]) { + this.$createCommand(MORE_OPTIONS_BUTTON_ID, { + name: "···", + exec: + function () { + this.$shouldHideMoreOptions = false; + this.$setMoreOptionsVisibility(!this.isMoreOptionsShown()); + }.bind(this), + type: "checkbox", + getValue: function () { + return this.isMoreOptionsShown(); + }.bind(this), + enabled: true + }, true); + } + this.$createCommand(id, command, registerForMainTooltip); + if (this.isShown()) { + this.updatePosition(); + } + }; + CommandBarTooltip.prototype.isShown = function () { + return !!this.tooltip && this.tooltip.isOpen; + }; + CommandBarTooltip.prototype.isMoreOptionsShown = function () { + return !!this.moreOptions && this.moreOptions.isOpen; + }; + CommandBarTooltip.prototype.getAlwaysShow = function () { + return this.$alwaysShow; + }; + CommandBarTooltip.prototype.setAlwaysShow = function (alwaysShow) { + this.$alwaysShow = alwaysShow; + this.$updateOnHoverHandlers(!this.$alwaysShow); + this._signal("alwaysShow", this.$alwaysShow); + }; + CommandBarTooltip.prototype.attach = function (editor) { + if (!editor || (this.isShown() && this.editor === editor)) { + return; + } + this.detach(); + this.editor = editor; + this.editor.on("changeSession", this.$onEditorChangeSession); + if (this.editor.session) { + this.editor.session.on("changeScrollLeft", this.$onChangeScroll); + this.editor.session.on("changeScrollTop", this.$onChangeScroll); + } + if (this.getAlwaysShow()) { + this.$showTooltip(); + } + else { + this.$updateOnHoverHandlers(true); + } + }; + CommandBarTooltip.prototype.updatePosition = function () { + if (!this.editor) { + return; + } + var renderer = this.editor.renderer; + var ranges; + if (this.editor.selection.getAllRanges) { + ranges = this.editor.selection.getAllRanges(); + } + else { + ranges = [this.editor.getSelectionRange()]; + } + if (!ranges.length) { + return; + } + var minPos = minPosition(ranges[0].start, ranges[0].end); + for (var i = 0, range; range = ranges[i]; i++) { + minPos = minPosition(minPos, minPosition(range.start, range.end)); + } + var pos = renderer.$cursorLayer.getPixelPosition(minPos, true); + var tooltipEl = this.tooltip.getElement(); + var screenWidth = window.innerWidth; + var screenHeight = window.innerHeight; + var rect = this.editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left + renderer.gutterWidth - renderer.scrollLeft; + var cursorVisible = pos.top >= rect.top && pos.top <= rect.bottom && + pos.left >= rect.left + renderer.gutterWidth && pos.left <= rect.right; + if (!cursorVisible && this.isShown()) { + this.$hideTooltip(); + return; + } + else if (cursorVisible && !this.isShown() && this.getAlwaysShow()) { + this.$showTooltip(); + return; + } + var top = pos.top - tooltipEl.offsetHeight; + var left = Math.min(screenWidth - tooltipEl.offsetWidth, pos.left); + var tooltipFits = top >= 0 && top + tooltipEl.offsetHeight <= screenHeight && + left >= 0 && left + tooltipEl.offsetWidth <= screenWidth; + if (!tooltipFits) { + this.$hideTooltip(); + return; + } + this.tooltip.setPosition(left, top); + if (this.isMoreOptionsShown()) { + top = top + tooltipEl.offsetHeight; + left = this.elements[MORE_OPTIONS_BUTTON_ID].getBoundingClientRect().left; + var moreOptionsEl = this.moreOptions.getElement(); + var screenHeight = window.innerHeight; + if (top + moreOptionsEl.offsetHeight > screenHeight) { + top -= tooltipEl.offsetHeight + moreOptionsEl.offsetHeight; + } + if (left + moreOptionsEl.offsetWidth > screenWidth) { + left = screenWidth - moreOptionsEl.offsetWidth; + } + this.moreOptions.setPosition(left, top); + } + }; + CommandBarTooltip.prototype.update = function () { + Object.keys(this.elements).forEach(this.$updateElement.bind(this)); + }; + CommandBarTooltip.prototype.detach = function () { + this.tooltip.hide(); + this.moreOptions.hide(); + this.$updateOnHoverHandlers(false); + if (this.editor) { + this.editor.off("changeSession", this.$onEditorChangeSession); + if (this.editor.session) { + this.editor.session.off("changeScrollLeft", this.$onChangeScroll); + this.editor.session.off("changeScrollTop", this.$onChangeScroll); + } + } + this.$mouseInTooltip = false; + this.editor = null; + }; + CommandBarTooltip.prototype.destroy = function () { + if (this.tooltip && this.moreOptions) { + this.detach(); + this.tooltip.destroy(); + this.moreOptions.destroy(); + } + this.eventListeners = {}; + this.commands = {}; + this.elements = {}; + this.tooltip = this.moreOptions = this.parentNode = null; + }; + CommandBarTooltip.prototype.$createCommand = function (id, command, forMainTooltip) { + var parentEl = forMainTooltip ? this.tooltipEl : this.moreOptionsEl; + var keyParts = []; + var bindKey = command.bindKey; + if (bindKey) { + if (typeof bindKey === 'object') { + bindKey = useragent.isMac ? bindKey.mac : bindKey.win; + } + bindKey = bindKey.split("|")[0]; + keyParts = bindKey.split("-"); + keyParts = keyParts.map(function (key) { + if (keyDisplayMap[key]) { + if (typeof keyDisplayMap[key] === 'string') { + return keyDisplayMap[key]; + } + else if (useragent.isMac && keyDisplayMap[key].mac) { + return keyDisplayMap[key].mac; + } + } + return key; + }); + } + var buttonNode; + if (forMainTooltip && command.iconCssClass) { + buttonNode = [ + 'div', + { + class: ["ace_icon_svg", command.iconCssClass].join(" "), + "aria-label": command.name + " (" + command.bindKey + ")" + } + ]; + } + else { + buttonNode = [ + ['div', { class: VALUE_CLASS_NAME }], + ['div', { class: CAPTION_CLASS_NAME }, command.name] + ]; + if (keyParts.length) { + buttonNode.push([ + 'div', + { class: KEYBINDING_CLASS_NAME }, + keyParts.map(function (keyPart) { + return ['div', keyPart]; + }) + ]); + } + } + dom.buildDom(['div', { class: [BUTTON_CLASS_NAME, command.cssClass || ""].join(" "), ref: id }, buttonNode], parentEl, this.elements); + this.commands[id] = command; + var eventListener = + function (e) { + if (this.editor) { + this.editor.focus(); + } + this.$shouldHideMoreOptions = this.isMoreOptionsShown(); + if (!this.elements[id].disabled && command.exec) { + command.exec(this.editor); + } + if (this.$shouldHideMoreOptions) { + this.$setMoreOptionsVisibility(false); + } + this.update(); + e.preventDefault(); + }.bind(this); + this.eventListeners[id] = eventListener; + this.elements[id].addEventListener('click', eventListener.bind(this)); + this.$updateElement(id); + }; + CommandBarTooltip.prototype.$setMoreOptionsVisibility = function (visible) { + if (visible) { + this.moreOptions.setTheme(this.editor.renderer.theme); + this.moreOptions.setClassName(TOOLTIP_CLASS_NAME + "_wrapper"); + this.moreOptions.show(); + this.update(); + this.updatePosition(); + } + else { + this.moreOptions.hide(); + } + }; + CommandBarTooltip.prototype.$onEditorChangeSession = function (e) { + if (e.oldSession) { + e.oldSession.off("changeScrollTop", this.$onChangeScroll); + e.oldSession.off("changeScrollLeft", this.$onChangeScroll); + } + this.detach(); + }; + CommandBarTooltip.prototype.$onChangeScroll = function () { + if (this.editor.renderer && (this.isShown() || this.getAlwaysShow())) { + this.editor.renderer.once("afterRender", this.updatePosition.bind(this)); + } + }; + CommandBarTooltip.prototype.$onMouseMove = function (e) { + if (this.$mouseInTooltip) { + return; + } + var cursorPosition = this.editor.getCursorPosition(); + var cursorScreenPosition = this.editor.renderer.textToScreenCoordinates(cursorPosition.row, cursorPosition.column); + var lineHeight = this.editor.renderer.lineHeight; + var isInCurrentLine = e.clientY >= cursorScreenPosition.pageY && e.clientY < cursorScreenPosition.pageY + lineHeight; + if (isInCurrentLine) { + if (!this.isShown() && !this.$showTooltipTimer.isPending()) { + this.$showTooltipTimer.delay(); + } + if (this.$hideTooltipTimer.isPending()) { + this.$hideTooltipTimer.cancel(); + } + } + else { + if (this.isShown() && !this.$hideTooltipTimer.isPending()) { + this.$hideTooltipTimer.delay(); + } + if (this.$showTooltipTimer.isPending()) { + this.$showTooltipTimer.cancel(); + } + } + }; + CommandBarTooltip.prototype.$preventMouseEvent = function (e) { + if (this.editor) { + this.editor.focus(); + } + e.preventDefault(); + }; + CommandBarTooltip.prototype.$scheduleTooltipForHide = function () { + this.$mouseInTooltip = false; + this.$showTooltipTimer.cancel(); + this.$hideTooltipTimer.delay(); + }; + CommandBarTooltip.prototype.$tooltipEnter = function () { + this.$mouseInTooltip = true; + if (this.$showTooltipTimer.isPending()) { + this.$showTooltipTimer.cancel(); + } + if (this.$hideTooltipTimer.isPending()) { + this.$hideTooltipTimer.cancel(); + } + }; + CommandBarTooltip.prototype.$updateOnHoverHandlers = function (enableHover) { + var tooltipEl = this.tooltip.getElement(); + var moreOptionsEl = this.moreOptions.getElement(); + if (enableHover) { + if (this.editor) { + this.editor.on("mousemove", this.$onMouseMove); + this.editor.renderer.getMouseEventTarget().addEventListener("mouseout", this.$scheduleTooltipForHide, true); + } + tooltipEl.addEventListener('mouseenter', this.$tooltipEnter); + tooltipEl.addEventListener('mouseleave', this.$scheduleTooltipForHide); + moreOptionsEl.addEventListener('mouseenter', this.$tooltipEnter); + moreOptionsEl.addEventListener('mouseleave', this.$scheduleTooltipForHide); + } + else { + if (this.editor) { + this.editor.off("mousemove", this.$onMouseMove); + this.editor.renderer.getMouseEventTarget().removeEventListener("mouseout", this.$scheduleTooltipForHide, true); + } + tooltipEl.removeEventListener('mouseenter', this.$tooltipEnter); + tooltipEl.removeEventListener('mouseleave', this.$scheduleTooltipForHide); + moreOptionsEl.removeEventListener('mouseenter', this.$tooltipEnter); + moreOptionsEl.removeEventListener('mouseleave', this.$scheduleTooltipForHide); + } + }; + CommandBarTooltip.prototype.$showTooltip = function () { + if (this.isShown()) { + return; + } + this.tooltip.setTheme(this.editor.renderer.theme); + this.tooltip.setClassName(TOOLTIP_CLASS_NAME + "_wrapper"); + this.tooltip.show(); + this.update(); + this.updatePosition(); + this._signal("show"); + }; + CommandBarTooltip.prototype.$hideTooltip = function () { + this.$mouseInTooltip = false; + if (!this.isShown()) { + return; + } + this.moreOptions.hide(); + this.tooltip.hide(); + this._signal("hide"); + }; + CommandBarTooltip.prototype.$updateElement = function (id) { + var command = this.commands[id]; + if (!command) { + return; + } + var el = this.elements[id]; + var commandEnabled = command.enabled; + if (typeof commandEnabled === 'function') { + commandEnabled = commandEnabled(this.editor); + } + if (typeof command.getValue === 'function') { + var value = command.getValue(this.editor); + if (command.type === 'text') { + el.textContent = value; + } + else if (command.type === 'checkbox') { + var domCssFn = value ? dom.addCssClass : dom.removeCssClass; + var isOnTooltip = el.parentElement === this.tooltipEl; + el.ariaChecked = value; + if (isOnTooltip) { + domCssFn(el, "ace_selected"); + } + else { + el = el.querySelector("." + VALUE_CLASS_NAME); + domCssFn(el, "ace_checkmark"); + } + } + } + if (commandEnabled && el.disabled) { + dom.removeCssClass(el, "ace_disabled"); + el.ariaDisabled = el.disabled = false; + el.removeAttribute("disabled"); + } + else if (!commandEnabled && !el.disabled) { + dom.addCssClass(el, "ace_disabled"); + el.ariaDisabled = el.disabled = true; + el.setAttribute("disabled", ""); + } + }; + return CommandBarTooltip; +}()); +oop.implement(CommandBarTooltip.prototype, EventEmitter); +dom.importCssString("\n.ace_tooltip.".concat(TOOLTIP_CLASS_NAME, "_wrapper {\n padding: 0;\n}\n\n.ace_tooltip .").concat(TOOLTIP_CLASS_NAME, " {\n padding: 1px 5px;\n display: flex;\n pointer-events: auto;\n}\n\n.ace_tooltip .").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options {\n padding: 1px;\n flex-direction: column;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, " {\n display: inline-flex;\n cursor: pointer;\n margin: 1px;\n border-radius: 2px;\n padding: 2px 5px;\n align-items: center;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, ".ace_selected,\ndiv.").concat(BUTTON_CLASS_NAME, ":hover:not(.ace_disabled) {\n background-color: rgba(0, 0, 0, 0.1);\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, ".ace_disabled {\n color: #777;\n pointer-events: none;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, " .ace_icon_svg {\n height: 12px;\n background-color: #000;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, ".ace_disabled .ace_icon_svg {\n background-color: #777;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options .").concat(BUTTON_CLASS_NAME, " {\n display: flex;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".").concat(VALUE_CLASS_NAME, " {\n display: none;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options .").concat(VALUE_CLASS_NAME, " {\n display: inline-block;\n width: 12px;\n}\n\n.").concat(CAPTION_CLASS_NAME, " {\n display: inline-block;\n}\n\n.").concat(KEYBINDING_CLASS_NAME, " {\n margin: 0 2px;\n display: inline-block;\n font-size: 8px;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options .").concat(KEYBINDING_CLASS_NAME, " {\n margin-left: auto;\n}\n\n.").concat(KEYBINDING_CLASS_NAME, " div {\n display: inline-block;\n min-width: 8px;\n padding: 2px;\n margin: 0 1px;\n border-radius: 2px;\n background-color: #ccc;\n text-align: center;\n}\n\n.ace_dark.ace_tooltip .").concat(TOOLTIP_CLASS_NAME, " {\n background-color: #373737;\n color: #eee;\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ".ace_disabled {\n color: #979797;\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ".ace_selected,\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ":hover:not(.ace_disabled) {\n background-color: rgba(255, 255, 255, 0.1);\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, " .ace_icon_svg {\n background-color: #eee;\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ".ace_disabled .ace_icon_svg {\n background-color: #979797;\n}\n\n.ace_dark .").concat(BUTTON_CLASS_NAME, ".ace_disabled {\n color: #979797;\n}\n\n.ace_dark .").concat(KEYBINDING_CLASS_NAME, " div {\n background-color: #575757;\n}\n\n.ace_checkmark::before {\n content: '\u2713';\n}\n"), "commandbar.css", false); +exports.CommandBarTooltip = CommandBarTooltip; +exports.TOOLTIP_CLASS_NAME = TOOLTIP_CLASS_NAME; +exports.BUTTON_CLASS_NAME = BUTTON_CLASS_NAME; + +}); (function() { + window.require(["ace/ext/command_bar"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-elastic_tabstops_lite.js b/ui/base1/ace/ext-elastic_tabstops_lite.js new file mode 100644 index 0000000..428f2cb --- /dev/null +++ b/ui/base1/ace/ext-elastic_tabstops_lite.js @@ -0,0 +1,227 @@ +define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var ElasticTabstopsLite = /** @class */ (function () { + function ElasticTabstopsLite(editor) { + this.$editor = editor; + var self = this; + var changedRows = []; + var recordChanges = false; + this.onAfterExec = function () { + recordChanges = false; + self.processRows(changedRows); + changedRows = []; + }; + this.onExec = function () { + recordChanges = true; + }; + this.onChange = function (delta) { + if (recordChanges) { + if (changedRows.indexOf(delta.start.row) == -1) + changedRows.push(delta.start.row); + if (delta.end.row != delta.start.row) + changedRows.push(delta.end.row); + } + }; + } + ElasticTabstopsLite.prototype.processRows = function (rows) { + this.$inChange = true; + var checkedRows = []; + for (var r = 0, rowCount = rows.length; r < rowCount; r++) { + var row = rows[r]; + if (checkedRows.indexOf(row) > -1) + continue; + var cellWidthObj = this.$findCellWidthsForBlock(row); + var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths); + var rowIndex = cellWidthObj.firstRow; + for (var w = 0, l = cellWidths.length; w < l; w++) { + var widths = cellWidths[w]; + checkedRows.push(rowIndex); + this.$adjustRow(rowIndex, widths); + rowIndex++; + } + } + this.$inChange = false; + }; + ElasticTabstopsLite.prototype.$findCellWidthsForBlock = function (row) { + var cellWidths = [], widths; + var rowIter = row; + while (rowIter >= 0) { + widths = this.$cellWidthsForRow(rowIter); + if (widths.length == 0) + break; + cellWidths.unshift(widths); + rowIter--; + } + var firstRow = rowIter + 1; + rowIter = row; + var numRows = this.$editor.session.getLength(); + while (rowIter < numRows - 1) { + rowIter++; + widths = this.$cellWidthsForRow(rowIter); + if (widths.length == 0) + break; + cellWidths.push(widths); + } + return { cellWidths: cellWidths, firstRow: firstRow }; + }; + ElasticTabstopsLite.prototype.$cellWidthsForRow = function (row) { + var selectionColumns = this.$selectionColumnsForRow(row); + var tabs = [-1].concat(this.$tabsForRow(row)); + var widths = tabs.map(function (el) { return 0; }).slice(1); + var line = this.$editor.session.getLine(row); + for (var i = 0, len = tabs.length - 1; i < len; i++) { + var leftEdge = tabs[i] + 1; + var rightEdge = tabs[i + 1]; + var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge); + var cell = line.substring(leftEdge, rightEdge); + widths[i] = Math.max(cell.replace(/\s+$/g, '').length, rightmostSelection - leftEdge); + } + return widths; + }; + ElasticTabstopsLite.prototype.$selectionColumnsForRow = function (row) { + var selections = [], cursor = this.$editor.getCursorPosition(); + if (this.$editor.session.getSelection().isEmpty()) { + if (row == cursor.row) + selections.push(cursor.column); + } + return selections; + }; + ElasticTabstopsLite.prototype.$setBlockCellWidthsToMax = function (cellWidths) { + var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth; + var columnInfo = this.$izip_longest(cellWidths); + for (var c = 0, l = columnInfo.length; c < l; c++) { + var column = columnInfo[c]; + if (!column.push) { + console.error(column); + continue; + } + column.push(NaN); + for (var r = 0, s = column.length; r < s; r++) { + var width = column[r]; + if (startingNewBlock) { + blockStartRow = r; + maxWidth = 0; + startingNewBlock = false; + } + if (isNaN(width)) { + blockEndRow = r; + for (var j = blockStartRow; j < blockEndRow; j++) { + cellWidths[j][c] = maxWidth; + } + startingNewBlock = true; + } + maxWidth = Math.max(maxWidth, width); + } + } + return cellWidths; + }; + ElasticTabstopsLite.prototype.$rightmostSelectionInCell = function (selectionColumns, cellRightEdge) { + var rightmost = 0; + if (selectionColumns.length) { + var lengths = []; + for (var s = 0, length = selectionColumns.length; s < length; s++) { + if (selectionColumns[s] <= cellRightEdge) + lengths.push(s); + else + lengths.push(0); + } + rightmost = Math.max.apply(Math, lengths); + } + return rightmost; + }; + ElasticTabstopsLite.prototype.$tabsForRow = function (row) { + var rowTabs = [], line = this.$editor.session.getLine(row), re = /\t/g, match; + while ((match = re.exec(line)) != null) { + rowTabs.push(match.index); + } + return rowTabs; + }; + ElasticTabstopsLite.prototype.$adjustRow = function (row, widths) { + var rowTabs = this.$tabsForRow(row); + if (rowTabs.length == 0) + return; + var bias = 0, location = -1; + var expandedSet = this.$izip(widths, rowTabs); + for (var i = 0, l = expandedSet.length; i < l; i++) { + var w = expandedSet[i][0], it = expandedSet[i][1]; + location += 1 + w; + it += bias; + var difference = location - it; + if (difference == 0) + continue; + var partialLine = this.$editor.session.getLine(row).substr(0, it); + var strippedPartialLine = partialLine.replace(/\s*$/g, ""); + var ispaces = partialLine.length - strippedPartialLine.length; + if (difference > 0) { + this.$editor.session.getDocument().insertInLine({ row: row, column: it + 1 }, Array(difference + 1).join(" ") + "\t"); + this.$editor.session.getDocument().removeInLine(row, it, it + 1); + bias += difference; + } + if (difference < 0 && ispaces >= -difference) { + this.$editor.session.getDocument().removeInLine(row, it + difference, it); + bias += difference; + } + } + }; + ElasticTabstopsLite.prototype.$izip_longest = function (iterables) { + if (!iterables[0]) + return []; + var longest = iterables[0].length; + var iterablesLength = iterables.length; + for (var i = 1; i < iterablesLength; i++) { + var iLength = iterables[i].length; + if (iLength > longest) + longest = iLength; + } + var expandedSet = []; + for (var l = 0; l < longest; l++) { + var set = []; + for (var i = 0; i < iterablesLength; i++) { + if (iterables[i][l] === "") + set.push(NaN); + else + set.push(iterables[i][l]); + } + expandedSet.push(set); + } + return expandedSet; + }; + ElasticTabstopsLite.prototype.$izip = function (widths, tabs) { + var size = widths.length >= tabs.length ? tabs.length : widths.length; + var expandedSet = []; + for (var i = 0; i < size; i++) { + var set = [widths[i], tabs[i]]; + expandedSet.push(set); + } + return expandedSet; + }; + return ElasticTabstopsLite; +}()); +exports.ElasticTabstopsLite = ElasticTabstopsLite; +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + useElasticTabstops: { + set: function (val) { + if (val) { + if (!this.elasticTabstops) + this.elasticTabstops = new ElasticTabstopsLite(this); + this.commands.on("afterExec", this.elasticTabstops.onAfterExec); + this.commands.on("exec", this.elasticTabstops.onExec); + this.on("change", this.elasticTabstops.onChange); + } + else if (this.elasticTabstops) { + this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec); + this.commands.removeListener("exec", this.elasticTabstops.onExec); + this.removeListener("change", this.elasticTabstops.onChange); + } + } + } +}); + +}); (function() { + window.require(["ace/ext/elastic_tabstops_lite"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-emmet.js b/ui/base1/ace/ext-emmet.js new file mode 100644 index 0000000..375b9c5 --- /dev/null +++ b/ui/base1/ace/ext-emmet.js @@ -0,0 +1,1293 @@ +define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module){"use strict"; +var dom = require("./lib/dom"); +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var RangeList = require("./range_list").RangeList; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var Tokenizer = require("./tokenizer").Tokenizer; +var clipboard = require("./clipboard"); +var VARIABLES = { + CURRENT_WORD: function (editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function (editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function (editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function (editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function (editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function (editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function (editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function (editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function (editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function () { return "Unknown"; }, + FULLNAME: function () { return "Unknown"; }, + BLOCK_COMMENT_START: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function (editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, { year: "numeric" }), + CURRENT_YEAR_SHORT: date.bind(null, { year: "2-digit" }), + CURRENT_MONTH: date.bind(null, { month: "numeric" }), + CURRENT_MONTH_NAME: date.bind(null, { month: "long" }), + CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: "short" }), + CURRENT_DATE: date.bind(null, { day: "2-digit" }), + CURRENT_DAY_NAME: date.bind(null, { weekday: "long" }), + CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: "short" }), + CURRENT_HOUR: date.bind(null, { hour: "2-digit", hour12: false }), + CURRENT_MINUTE: date.bind(null, { minute: "2-digit" }), + CURRENT_SECOND: date.bind(null, { second: "2-digit" }) +}; +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} +var SnippetManager = /** @class */ (function () { + function SnippetManager() { + this.snippetMap = {}; + this.snippetNameMap = {}; + this.variables = VARIABLES; + } + SnippetManager.prototype.getTokenizer = function () { + return SnippetManager["$tokenizer"] || this.createTokenizer(); + }; + SnippetManager.prototype.createTokenizer = function () { + function TabstopToken(str) { + str = str.substr(1); + if (/^\d+$/.test(str)) + return [{ tabstopId: parseInt(str, 10) }]; + return [{ text: str }]; + } + function escape(ch) { + return "(?:[^\\\\" + ch + "]|\\\\.)"; + } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + SnippetManager["$tokenizer"] = new Tokenizer({ + start: [ + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) { + val = ch; + } + else if ("`$\\".indexOf(ch) != -1) { + val = ch; + } + return [val]; + } }, + { regex: /}/, onMatch: function (val, state, stack) { + return [stack.length ? stack.shift() : val]; + } }, + { regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken }, + { regex: /\$\{[\dA-Z_a-z]+/, onMatch: function (str, state, stack) { + var t = TabstopToken(str.substr(1)); + stack.unshift(t[0]); + return t; + }, next: "snippetVar" }, + { regex: /\n/, token: "newline", merge: false } + ], + snippetVar: [ + { regex: "\\|" + escape("\\|") + "*\\|", onMatch: function (val, state, stack) { + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function (operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00").map(function (value) { + return { value: value }; + }); + stack[0].choices = choices; + return [choices[0]]; + }, next: "start" }, + formatMatcher, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start" } + ], + formatString: [ + { regex: /:/, onMatch: function (val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = { elseEnd: stack[0] }; + return [stack[0].ifEnd]; + } + return ":"; + } }, + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = { changeCase: ch, local: ch > "a" }; + return [val]; + } }, + { regex: "/\\w*}", onMatch: function (val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" }, + { regex: /\$(?:\d+|\w+)/, onMatch: function (val, state, stack) { + return [{ text: val.slice(1) }]; + } }, + { regex: /\${\w+/, onMatch: function (val, state, stack) { + var token = { text: val.slice(2) }; + stack.unshift(token); + return [token]; + }, next: "formatStringVar" }, + { regex: /\n/, token: "newline", merge: false }, + { regex: /}/, onMatch: function (val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" } + ], + formatStringVar: [ + { regex: /:\/\w+}/, onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString" }, + formatMatcher, + { regex: /:[\?\-+]?/, onMatch: function (val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString" }, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString" } + ] + }); + return SnippetManager["$tokenizer"]; + }; + SnippetManager.prototype.tokenizeTmSnippet = function (str, startState) { + return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) { + return x.value || x; + }); + }; + SnippetManager.prototype.getVariableValue = function (editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + name = name.replace(/^TM_/, ""); + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; + }; + SnippetManager.prototype.tmStrFormat = function (str, ch, editor) { + if (!ch.fmt) + return str; + var flag = ch.flag || ""; + var re = ch.guard; + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; + var _self = this; + var formatted = str.replace(re, function () { + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); + var fmtParts = _self.resolveVariables(fmtTokens, editor); + var gChangeCase = "E"; + for (var i = 0; i < fmtParts.length; i++) { + var ch = fmtParts[i]; + if (typeof ch == "object") { + fmtParts[i] = ""; + if (ch.changeCase && ch.local) { + var next = fmtParts[i + 1]; + if (next && typeof next == "string") { + if (ch.changeCase == "u") + fmtParts[i] = next[0].toUpperCase(); + else + fmtParts[i] = next[0].toLowerCase(); + fmtParts[i + 1] = next.substr(1); + } + } + else if (ch.changeCase) { + gChangeCase = ch.changeCase; + } + } + else if (gChangeCase == "U") { + fmtParts[i] = ch.toUpperCase(); + } + else if (gChangeCase == "L") { + fmtParts[i] = ch.toLowerCase(); + } + } + _self.variables.__ = oldArgs; + return fmtParts.join(""); + }); + return formatted; + }; + SnippetManager.prototype.tmFormatFunction = function (str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; + SnippetManager.prototype.resolveVariables = function (snippet, editor) { + var result = []; + var indentation = ""; + var afterNewLine = true; + for (var i = 0; i < snippet.length; i++) { + var ch = snippet[i]; + if (typeof ch == "string") { + result.push(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; + } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) + continue; + afterNewLine = false; + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) + j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } + else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } + else if (ch.elseEnd) { + gotoNext(ch.elseEnd); + } + else if (ch.tabstopId != null) { + result.push(ch); + } + else if (ch.changeCase != null) { + result.push(ch); + } + } + function gotoNext(ch) { + var i1 = snippet.indexOf(ch, i + 1); + if (i1 != -1) + i = i1; + } + return result; + }; + SnippetManager.prototype.getDisplayTextForSnippet = function (editor, snippetText) { + var processedSnippet = processSnippetText.call(this, editor, snippetText); + return processedSnippet.text; + }; + SnippetManager.prototype.insertSnippetForSelection = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var processedSnippet = processSnippetText.call(this, editor, snippetText, options); + var range = editor.getSelectionRange(); + var end = editor.session.replace(range, processedSnippet.text); + var tabstopManager = new TabstopManager(editor); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(processedSnippet.tabstops, range.start, end, selectionId); + }; + SnippetManager.prototype.insertSnippet = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText, options); + editor.forEachSelection(function () { + self.insertSnippetForSelection(editor, snippetText, options); + }, null, { keepOrder: true }); + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); + }; + SnippetManager.prototype.$getScope = function (editor) { + var scope = editor.session.$mode.$id || ""; + scope = scope.split("/").pop(); + if (scope === "html" || scope === "php") { + if (scope === "php" && !editor.session.$mode.inlinePhp) + scope = "html"; + var c = editor.getCursorPosition(); + var state = editor.session.getState(c.row); + if (typeof state === "object") { + state = state[0]; + } + if (state.substring) { + if (state.substring(0, 3) == "js-") + scope = "javascript"; + else if (state.substring(0, 4) == "css-") + scope = "css"; + else if (state.substring(0, 4) == "php-") + scope = "php"; + } + } + return scope; + }; + SnippetManager.prototype.getActiveScopes = function (editor) { + var scope = this.$getScope(editor); + var scopes = [scope]; + var snippetMap = this.snippetMap; + if (snippetMap[scope] && snippetMap[scope].includeScopes) { + scopes.push.apply(scopes, snippetMap[scope].includeScopes); + } + scopes.push("_"); + return scopes; + }; + SnippetManager.prototype.expandWithTab = function (editor, options) { + var self = this; + var result = editor.forEachSelection(function () { + return self.expandSnippetForSelection(editor, options); + }, null, { keepOrder: true }); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + SnippetManager.prototype.expandSnippetForSelection = function (editor, options) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var before = line.substring(0, cursor.column); + var after = line.substr(cursor.column); + var snippetMap = this.snippetMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = this.findMatchingSnippet(snippets, before, after); + return !!snippet; + }, this); + if (!snippet) + return false; + if (options && options.dryRun) + return true; + editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length); + this.variables.M__ = snippet.matchBefore; + this.variables.T__ = snippet.matchAfter; + this.insertSnippetForSelection(editor, snippet.content); + this.variables.M__ = this.variables.T__ = null; + return true; + }; + SnippetManager.prototype.findMatchingSnippet = function (snippetList, before, after) { + for (var i = snippetList.length; i--;) { + var s = snippetList[i]; + if (s.startRe && !s.startRe.test(before)) + continue; + if (s.endRe && !s.endRe.test(after)) + continue; + if (!s.startRe && !s.endRe) + continue; + s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; + s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; + s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; + s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; + return s; + } + }; + SnippetManager.prototype.register = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + var self = this; + if (!snippets) + snippets = []; + function wrapRegexp(src) { + if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) + src = "(?:" + src + ")"; + return src || ""; + } + function guardedRegexp(re, guard, opening) { + re = wrapRegexp(re); + guard = wrapRegexp(guard); + if (opening) { + re = guard + re; + if (re && re[re.length - 1] != "$") + re = re + "$"; + } + else { + re = re + guard; + if (re && re[0] != "^") + re = "^" + re; + } + return new RegExp(re); + } + function addSnippet(s) { + if (!s.scope) + s.scope = scope || "_"; + scope = s.scope; + if (!snippetMap[scope]) { + snippetMap[scope] = []; + snippetNameMap[scope] = {}; + } + var map = snippetNameMap[scope]; + if (s.name) { + var old = map[s.name]; + if (old) + self.unregister(old); + map[s.name] = s; + } + snippetMap[scope].push(s); + if (s.prefix) + s.tabTrigger = s.prefix; + if (!s.content && s.body) + s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body; + if (s.tabTrigger && !s.trigger) { + if (!s.guard && /^\w/.test(s.tabTrigger)) + s.guard = "\\b"; + s.trigger = lang.escapeRegExp(s.tabTrigger); + } + if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) + return; + s.startRe = guardedRegexp(s.trigger, s.guard, true); + s.triggerRe = new RegExp(s.trigger); + s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); + s.endTriggerRe = new RegExp(s.endTrigger); + } + if (Array.isArray(snippets)) { + snippets.forEach(addSnippet); + } + else { + Object.keys(snippets).forEach(function (key) { + addSnippet(snippets[key]); + }); + } + this._signal("registerSnippets", { scope: scope }); + }; + SnippetManager.prototype.unregister = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + function removeSnippet(s) { + var nameMap = snippetNameMap[s.scope || scope]; + if (nameMap && nameMap[s.name]) { + delete nameMap[s.name]; + var map = snippetMap[s.scope || scope]; + var i = map && map.indexOf(s); + if (i >= 0) + map.splice(i, 1); + } + } + if (snippets.content) + removeSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(removeSnippet); + }; + SnippetManager.prototype.parseSnippetFile = function (str) { + str = str.replace(/\r/g, ""); + var list = [], /**@type{Snippet}*/ snippet = {}; + var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; + var m; + while (m = re.exec(str)) { + if (m[1]) { + try { + snippet = JSON.parse(m[1]); + list.push(snippet); + } + catch (e) { } + } + if (m[4]) { + snippet.content = m[4].replace(/^\t/gm, ""); + list.push(snippet); + snippet = {}; + } + else { + var key = m[2], val = m[3]; + if (key == "regex") { + var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; + snippet.guard = guardRe.exec(val)[1]; + snippet.trigger = guardRe.exec(val)[1]; + snippet.endTrigger = guardRe.exec(val)[1]; + snippet.endGuard = guardRe.exec(val)[1]; + } + else if (key == "snippet") { + snippet.tabTrigger = val.match(/^\S*/)[0]; + if (!snippet.name) + snippet.name = val; + } + else if (key) { + snippet[key] = val; + } + } + } + return list; + }; + SnippetManager.prototype.getSnippetByName = function (name, editor) { + var snippetMap = this.snippetNameMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = snippets[name]; + return !!snippet; + }, this); + return snippet; + }; + return SnippetManager; +}()); +oop.implement(SnippetManager.prototype, EventEmitter); +var processSnippetText = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); + snippetText = snippetText.replace(/\r/g, ""); + var tokens = this.tokenizeTmSnippet(snippetText); + tokens = this.resolveVariables(tokens, editor); + tokens = tokens.map(function (x) { + if (x == "\n" && !options.excludeExtraIndent) + return x + indentString; + if (typeof x == "string") + return x.replace(/\t/g, tabString); + return x; + }); + var tabstops = []; + tokens.forEach(function (p, i) { + if (typeof p != "object") + return; + var id = p.tabstopId; + var ts = tabstops[id]; + if (!ts) { + ts = tabstops[id] = []; + ts.index = id; + ts.value = ""; + ts.parents = {}; + } + if (ts.indexOf(p) !== -1) + return; + if (p.choices && !ts.choices) + ts.choices = p.choices; + ts.push(p); + var i1 = tokens.indexOf(p, i + 1); + if (i1 === -1) + return; + var value = tokens.slice(i + 1, i1); + var isNested = value.some(function (t) { return typeof t === "object"; }); + if (isNested && !ts.value) { + ts.value = value; + } + else if (value.length && (!ts.value || typeof ts.value !== "string")) { + ts.value = value.join(""); + } + }); + tabstops.forEach(function (ts) { ts.length = 0; }); + var expanding = {}; + function copyValue(val) { + var copy = []; + for (var i = 0; i < val.length; i++) { + var p = val[i]; + if (typeof p == "object") { + if (expanding[p.tabstopId]) + continue; + var j = val.lastIndexOf(p, i - 1); + p = copy[j] || { tabstopId: p.tabstopId }; + } + copy[i] = p; + } + return copy; + } + for (var i = 0; i < tokens.length; i++) { + var p = tokens[i]; + if (typeof p != "object") + continue; + var id = p.tabstopId; + var ts = tabstops[id]; + var i1 = tokens.indexOf(p, i + 1); + if (expanding[id]) { + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function (parentId) { + ts.parents[parentId] = true; + }); + } + continue; + } + expanding[id] = p; + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); + if (ts.indexOf(p) === -1) + ts.push(p); + } + var row = 0, column = 0; + var text = ""; + tokens.forEach(function (t) { + if (typeof t === "string") { + var lines = t.split("\n"); + if (lines.length > 1) { + column = lines[lines.length - 1].length; + row += lines.length - 1; + } + else + column += t.length; + text += t; + } + else if (t) { + if (!t.start) + t.start = { row: row, column: column }; + else + t.end = { row: row, column: column }; + } + }); + return { + text: text, + tabstops: tabstops, + tokens: tokens + }; +}; +var TabstopManager = /** @class */ (function () { + function TabstopManager(editor) { + this.index = 0; + this.ranges = []; + this.tabstops = []; + if (editor.tabstopManager) + return editor.tabstopManager; + editor.tabstopManager = this; + this.$onChange = this.onChange.bind(this); + this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; + this.$onChangeSession = this.onChangeSession.bind(this); + this.$onAfterExec = this.onAfterExec.bind(this); + this.attach(editor); + } + TabstopManager.prototype.attach = function (editor) { + this.$openTabstops = null; + this.selectedTabstop = null; + this.editor = editor; + this.session = editor.session; + this.editor.on("change", this.$onChange); + this.editor.on("changeSelection", this.$onChangeSelection); + this.editor.on("changeSession", this.$onChangeSession); + this.editor.commands.on("afterExec", this.$onAfterExec); + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + TabstopManager.prototype.detach = function () { + this.tabstops.forEach(this.removeTabstopMarkers, this); + this.ranges.length = 0; + this.tabstops.length = 0; + this.selectedTabstop = null; + this.editor.off("change", this.$onChange); + this.editor.off("changeSelection", this.$onChangeSelection); + this.editor.off("changeSession", this.$onChangeSession); + this.editor.commands.off("afterExec", this.$onAfterExec); + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.tabstopManager = null; + this.session = null; + this.editor = null; + }; + TabstopManager.prototype.onChange = function (delta) { + var isRemove = delta.action[0] == "r"; + var selectedTabstop = this.selectedTabstop || {}; + var parents = selectedTabstop.parents || {}; + var tabstops = this.tabstops.slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + if (delta.action == "remove" && ts !== selectedTabstop) { + var parentActive = ts.parents && ts.parents[selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); + } + ts.rangeList.$onChange(delta); + } + var session = this.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) + this.detach(); + }; + TabstopManager.prototype.updateLinkedFields = function () { + var ts = this.selectedTabstop; + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) + return; + this.$inChange = true; + var session = this.session; + var text = session.getTextRange(ts.firstNonLinked); + for (var i = 0; i < ts.length; i++) { + var range = ts[i]; + if (!range.linked) + continue; + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); + session.replace(range, fmt); + } + this.$inChange = false; + }; + TabstopManager.prototype.onAfterExec = function (e) { + if (e.command && !e.command.readOnly) + this.updateLinkedFields(); + }; + TabstopManager.prototype.onChangeSelection = function () { + if (!this.editor) + return; + var lead = this.editor.selection.lead; + var anchor = this.editor.selection.anchor; + var isEmpty = this.editor.selection.isEmpty(); + for (var i = 0; i < this.ranges.length; i++) { + if (this.ranges[i].linked) + continue; + var containsLead = this.ranges[i].contains(lead.row, lead.column); + var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); + if (containsLead && containsAnchor) + return; + } + this.detach(); + }; + TabstopManager.prototype.onChangeSession = function () { + this.detach(); + }; + TabstopManager.prototype.tabNext = function (dir) { + var max = this.tabstops.length; + var index = this.index + (dir || 1); + index = Math.min(Math.max(index, 1), max); + if (index == max) + index = 0; + this.selectTabstop(index); + this.updateTabstopMarkers(); + if (index === 0) { + this.detach(); + } + }; + TabstopManager.prototype.selectTabstop = function (index) { + this.$openTabstops = null; + var ts = this.tabstops[this.index]; + if (ts) + this.addTabstopMarkers(ts); + this.index = index; + ts = this.tabstops[this.index]; + if (!ts || !ts.length) + return; + this.selectedTabstop = ts; + var range = ts.firstNonLinked || ts; + if (ts.choices) + range.cursor = range.start; + if (!this.editor.inVirtualSelectionMode) { + var sel = this.editor.multiSelect; + sel.toSingleRange(range); + for (var i = 0; i < ts.length; i++) { + if (ts.hasLinkedRanges && ts[i].linked) + continue; + sel.addRange(ts[i].clone(), true); + } + } + else { + this.editor.selection.fromOrientedRange(range); + } + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", { matches: this.selectedTabstop.choices }); + }; + TabstopManager.prototype.addTabstops = function (tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + if (!this.$openTabstops) + this.$openTabstops = []; + if (!tabstops[0]) { + var p = Range.fromPoints(end, end); + moveRelative(p.start, start); + moveRelative(p.end, start); + tabstops[0] = [p]; + tabstops[0].index = 0; + } + var i = this.index; + var arg = [i + 1, 0]; + var ranges = this.ranges; + var snippetId = this.snippetId = (this.snippetId || 0) + 1; + tabstops.forEach(function (ts, index) { + var dest = this.$openTabstops[index] || ts; + dest.snippetId = snippetId; + for (var i = 0; i < ts.length; i++) { + var p = ts[i]; + var range = Range.fromPoints(p.start, p.end || p.start); + movePoint(range.start, start); + movePoint(range.end, start); + range.original = p; + range.tabstop = dest; + ranges.push(range); + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; + if (p.fmtString || (dest.firstNonLinked && useLink)) { + range.linked = true; + dest.hasLinkedRanges = true; + } + else if (!dest.firstNonLinked) + dest.firstNonLinked = range; + } + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); + dest.rangeList = dest.rangeList || new RangeList(); + dest.rangeList.$bias = 0; + dest.rangeList.addList(dest); + }, this); + if (arg.length > 2) { + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } + }; + TabstopManager.prototype.addTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + if (!range.markerId) + range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); + }); + }; + TabstopManager.prototype.removeTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + session.removeMarker(range.markerId); + range.markerId = null; + }); + }; + TabstopManager.prototype.updateTabstopMarkers = function () { + if (!this.selectedTabstop) + return; + var currentSnippetId = this.selectedTabstop.snippetId; + if (this.selectedTabstop.index === 0) { + currentSnippetId--; + } + this.tabstops.forEach(function (ts) { + if (ts.snippetId === currentSnippetId) + this.addTabstopMarkers(ts); + else + this.removeTabstopMarkers(ts); + }, this); + }; + TabstopManager.prototype.removeRange = function (range) { + var i = range.tabstop.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + i = this.ranges.indexOf(range); + if (i != -1) + this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + this.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } + }; + return TabstopManager; +}()); +TabstopManager.prototype.keyboardHandler = new HashHandler(); +TabstopManager.prototype.keyboardHandler.bindKeys({ + "Tab": function (editor) { + if (exports.snippetManager && exports.snippetManager.expandWithTab(editor)) + return; + editor.tabstopManager.tabNext(1); + editor.renderer.scrollCursorIntoView(); + }, + "Shift-Tab": function (editor) { + editor.tabstopManager.tabNext(-1); + editor.renderer.scrollCursorIntoView(); + }, + "Esc": function (editor) { + editor.tabstopManager.detach(); + } +}); +var movePoint = function (point, diff) { + if (point.row == 0) + point.column += diff.column; + point.row += diff.row; +}; +var moveRelative = function (point, start) { + if (point.row == start.row) + point.column -= start.column; + point.row -= start.row; +}; +dom.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}", "snippets.css", false); +exports.snippetManager = new SnippetManager(); +var Editor = require("./editor").Editor; +(function () { + this.insertSnippet = function (content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function (options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + +}); + +define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"], function(require, exports, module){"use strict"; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var Editor = require("../editor").Editor; +var snippetManager = require("../snippets").snippetManager; +var Range = require("../range").Range; +var config = require("../config"); +var emmet, emmetPath; +var AceEmmetEditor = /** @class */ (function () { + function AceEmmetEditor() { + } + AceEmmetEditor.prototype.setupContext = function (editor) { + this.ace = editor; + this.indentation = editor.session.getTabString(); + if (!emmet) + emmet = window["emmet"]; + var resources = emmet.resources || emmet.require("resources"); + resources.setVariable("indentation", this.indentation); + this.$syntax = null; + this.$syntax = this.getSyntax(); + }; + AceEmmetEditor.prototype.getSelectionRange = function () { + var range = this.ace.getSelectionRange(); + var doc = this.ace.session.doc; + return { + start: doc.positionToIndex(range.start), + end: doc.positionToIndex(range.end) + }; + }; + AceEmmetEditor.prototype.createSelection = function (start, end) { + var doc = this.ace.session.doc; + this.ace.selection.setRange({ + start: doc.indexToPosition(start), + end: doc.indexToPosition(end) + }); + }; + AceEmmetEditor.prototype.getCurrentLineRange = function () { + var ace = this.ace; + var row = ace.getCursorPosition().row; + var lineLength = ace.session.getLine(row).length; + var index = ace.session.doc.positionToIndex({ row: row, column: 0 }); + return { + start: index, + end: index + lineLength + }; + }; + AceEmmetEditor.prototype.getCaretPos = function () { + var pos = this.ace.getCursorPosition(); + return this.ace.session.doc.positionToIndex(pos); + }; + AceEmmetEditor.prototype.setCaretPos = function (index) { + var pos = this.ace.session.doc.indexToPosition(index); + this.ace.selection.moveToPosition(pos); + }; + AceEmmetEditor.prototype.getCurrentLine = function () { + var row = this.ace.getCursorPosition().row; + return this.ace.session.getLine(row); + }; + AceEmmetEditor.prototype.replaceContent = function (value, start, end, noIndent) { + if (end == null) + end = start == null ? this.getContent().length : start; + if (start == null) + start = 0; + var editor = this.ace; + var doc = editor.session.doc; + var range = Range.fromPoints(doc.indexToPosition(start), doc.indexToPosition(end)); + editor.session.remove(range); + range.end = range.start; + value = this.$updateTabstops(value); + snippetManager.insertSnippet(editor, value); + }; + AceEmmetEditor.prototype.getContent = function () { + return this.ace.getValue(); + }; + AceEmmetEditor.prototype.getSyntax = function () { + if (this.$syntax) + return this.$syntax; + var syntax = this.ace.session.$modeId.split("/").pop(); + if (syntax == "html" || syntax == "php") { + var cursor = this.ace.getCursorPosition(); + var state = this.ace.session.getState(cursor.row); + if (typeof state != "string") + state = state[0]; + if (state) { + state = state.split("-"); + if (state.length > 1) + syntax = state[0]; + else if (syntax == "php") + syntax = "html"; + } + } + return syntax; + }; + AceEmmetEditor.prototype.getProfileName = function () { + var resources = emmet.resources || emmet.require("resources"); + switch (this.getSyntax()) { + case "css": return "css"; + case "xml": + case "xsl": + return "xml"; + case "html": + var profile = resources.getVariable("profile"); + if (!profile) + profile = this.ace.session.getLines(0, 2).join("").search(/]+XHTML/i) != -1 ? "xhtml" : "html"; + return profile; + default: + var mode = this.ace.session.$mode; + return mode.emmetConfig && mode.emmetConfig.profile || "xhtml"; + } + }; + AceEmmetEditor.prototype.prompt = function (title) { + return prompt(title); // eslint-disable-line no-alert + }; + AceEmmetEditor.prototype.getSelection = function () { + return this.ace.session.getTextRange(); + }; + AceEmmetEditor.prototype.getFilePath = function () { + return ""; + }; + AceEmmetEditor.prototype.$updateTabstops = function (value) { + var base = 1000; + var zeroBase = 0; + var lastZero = null; + var ts = emmet.tabStops || emmet.require('tabStops'); + var resources = emmet.resources || emmet.require("resources"); + var settings = resources.getVocabulary("user"); + var tabstopOptions = { + tabstop: function (data) { + var group = parseInt(data.group, 10); + var isZero = group === 0; + if (isZero) + group = ++zeroBase; + else + group += base; + var placeholder = data.placeholder; + if (placeholder) { + placeholder = ts.processText(placeholder, tabstopOptions); + } + var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}'; + if (isZero) { + lastZero = [data.start, result]; + } + return result; + }, + escape: function (ch) { + if (ch == '$') + return '\\$'; + if (ch == '\\') + return '\\\\'; + return ch; + } + }; + value = ts.processText(value, tabstopOptions); + if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) { + value += '${0}'; + } + else if (lastZero) { + var common = emmet.utils ? emmet.utils.common : emmet.require('utils'); + value = common.replaceSubstring(value, '${0}', lastZero[0], lastZero[1]); + } + return value; + }; + return AceEmmetEditor; +}()); +var keymap = { + expand_abbreviation: { "mac": "ctrl+alt+e", "win": "alt+e" }, + match_pair_outward: { "mac": "ctrl+d", "win": "ctrl+," }, + match_pair_inward: { "mac": "ctrl+j", "win": "ctrl+shift+0" }, + matching_pair: { "mac": "ctrl+alt+j", "win": "alt+j" }, + next_edit_point: "alt+right", + prev_edit_point: "alt+left", + toggle_comment: { "mac": "command+/", "win": "ctrl+/" }, + split_join_tag: { "mac": "shift+command+'", "win": "shift+ctrl+`" }, + remove_tag: { "mac": "command+'", "win": "shift+ctrl+;" }, + evaluate_math_expression: { "mac": "shift+command+y", "win": "shift+ctrl+y" }, + increment_number_by_1: "ctrl+up", + decrement_number_by_1: "ctrl+down", + increment_number_by_01: "alt+up", + decrement_number_by_01: "alt+down", + increment_number_by_10: { "mac": "alt+command+up", "win": "shift+alt+up" }, + decrement_number_by_10: { "mac": "alt+command+down", "win": "shift+alt+down" }, + select_next_item: { "mac": "shift+command+.", "win": "shift+ctrl+." }, + select_previous_item: { "mac": "shift+command+,", "win": "shift+ctrl+," }, + reflect_css_value: { "mac": "shift+command+r", "win": "shift+ctrl+r" }, + encode_decode_data_url: { "mac": "shift+ctrl+d", "win": "ctrl+'" }, + expand_abbreviation_with_tab: "Tab", + wrap_with_abbreviation: { "mac": "shift+ctrl+a", "win": "shift+ctrl+a" } +}; +var editorProxy = new AceEmmetEditor(); +exports.commands = new HashHandler(); +exports.runEmmetCommand = function runEmmetCommand(editor) { + if (this.action == "expand_abbreviation_with_tab") { + if (!editor.selection.isEmpty()) + return false; + var pos = editor.selection.lead; + var token = editor.session.getTokenAt(pos.row, pos.column); + if (token && /\btag\b/.test(token.type)) + return false; + } + try { + editorProxy.setupContext(editor); + var actions = emmet.actions || emmet.require("actions"); + if (this.action == "wrap_with_abbreviation") { + return setTimeout(function () { + actions.run("wrap_with_abbreviation", editorProxy); + }, 0); + } + var result = actions.run(this.action, editorProxy); + } + catch (e) { + if (!emmet) { + var loading = exports.load(runEmmetCommand.bind(this, editor)); + if (this.action == "expand_abbreviation_with_tab") + return false; + return loading; + } + editor._signal("changeStatus", typeof e == "string" ? e : e.message); + config.warn(e); + result = false; + } + return result; +}; +for (var command in keymap) { + exports.commands.addCommand({ + name: "emmet:" + command, + action: command, + bindKey: keymap[command], + exec: exports.runEmmetCommand, + multiSelectAction: "forEach" + }); +} +exports.updateCommands = function (editor, enabled) { + if (enabled) { + editor.keyBinding.addKeyboardHandler(exports.commands); + } + else { + editor.keyBinding.removeKeyboardHandler(exports.commands); + } +}; +exports.isSupportedMode = function (mode) { + if (!mode) + return false; + if (mode.emmetConfig) + return true; + var id = mode.$id || mode; + return /css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(id); +}; +exports.isAvailable = function (editor, command) { + if (/(evaluate_math_expression|expand_abbreviation)$/.test(command)) + return true; + var mode = editor.session.$mode; + var isSupported = exports.isSupportedMode(mode); + if (isSupported && mode.$modes) { + try { + editorProxy.setupContext(editor); + if (/js|php/.test(editorProxy.getSyntax())) + isSupported = false; + } + catch (e) { } + } + return isSupported; +}; +var onChangeMode = function (e, target) { + var editor = target; + if (!editor) + return; + var enabled = exports.isSupportedMode(editor.session.$mode); + if (e.enableEmmet === false) + enabled = false; + if (enabled) + exports.load(); + exports.updateCommands(editor, enabled); +}; +exports.load = function (cb) { + if (typeof emmetPath !== "string") { + config.warn("script for emmet-core is not loaded"); + return false; + } + config.loadModule(emmetPath, function () { + emmetPath = null; + cb && cb(); + }); + return true; +}; +exports.AceEmmetEditor = AceEmmetEditor; +config.defineOptions(Editor.prototype, "editor", { + enableEmmet: { + set: function (val) { + this[val ? "on" : "removeListener"]("changeMode", onChangeMode); + onChangeMode({ enableEmmet: !!val }, this); + }, + value: true + } +}); +exports.setCore = function (e) { + if (typeof e == "string") + emmetPath = e; + else + emmet = e; +}; + +}); (function() { + window.require(["ace/ext/emmet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-error_marker.js b/ui/base1/ace/ext-error_marker.js new file mode 100644 index 0000000..683423d --- /dev/null +++ b/ui/base1/ace/ext-error_marker.js @@ -0,0 +1,9 @@ + +; (function() { + window.require(["ace/ext/error_marker"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-hardwrap.js b/ui/base1/ace/ext-hardwrap.js new file mode 100644 index 0000000..82133b7 --- /dev/null +++ b/ui/base1/ace/ext-hardwrap.js @@ -0,0 +1,116 @@ +define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +function hardWrap(editor, options) { + var max = options.column || editor.getOption("printMarginColumn"); + var allowMerge = options.allowMerge != false; + var row = Math.min(options.startRow, options.endRow); + var endRow = Math.max(options.startRow, options.endRow); + var session = editor.session; + while (row <= endRow) { + var line = session.getLine(row); + if (line.length > max) { + var space = findSpace(line, max, 5); + if (space) { + var indentation = /^\s*/.exec(line)[0]; + session.replace(new Range(row, space.start, row, space.end), "\n" + indentation); + } + endRow++; + } + else if (allowMerge && /\S/.test(line) && row != endRow) { + var nextLine = session.getLine(row + 1); + if (nextLine && /\S/.test(nextLine)) { + var trimmedLine = line.replace(/\s+$/, ""); + var trimmedNextLine = nextLine.replace(/^\s+/, ""); + var mergedLine = trimmedLine + " " + trimmedNextLine; + var space = findSpace(mergedLine, max, 5); + if (space && space.start > trimmedLine.length || mergedLine.length < max) { + var replaceRange = new Range(row, trimmedLine.length, row + 1, nextLine.length - trimmedNextLine.length); + session.replace(replaceRange, " "); + row--; + endRow--; + } + else if (trimmedLine.length < line.length) { + session.remove(new Range(row, trimmedLine.length, row, line.length)); + } + } + } + row++; + } + function findSpace(line, max, min) { + if (line.length < max) + return; + var before = line.slice(0, max); + var after = line.slice(max); + var spaceAfter = /^(?:(\s+)|(\S+)(\s+))/.exec(after); + var spaceBefore = /(?:(\s+)|(\s+)(\S+))$/.exec(before); + var start = 0; + var end = 0; + if (spaceBefore && !spaceBefore[2]) { + start = max - spaceBefore[1].length; + end = max; + } + if (spaceAfter && !spaceAfter[2]) { + if (!start) + start = max; + end = max + spaceAfter[1].length; + } + if (start) { + return { + start: start, + end: end + }; + } + if (spaceBefore && spaceBefore[2] && spaceBefore.index > min) { + return { + start: spaceBefore.index, + end: spaceBefore.index + spaceBefore[2].length + }; + } + if (spaceAfter && spaceAfter[2]) { + start = max + spaceAfter[2].length; + return { + start: start, + end: start + spaceAfter[3].length + }; + } + } +} +function wrapAfterInput(e) { + if (e.command.name == "insertstring" && /\S/.test(e.args)) { + var editor = e.editor; + var cursor = editor.selection.cursor; + if (cursor.column <= editor.renderer.$printMarginColumn) + return; + var lastDelta = editor.session.$undoManager.$lastDelta; + hardWrap(editor, { + startRow: cursor.row, endRow: cursor.row, + allowMerge: false + }); + if (lastDelta != editor.session.$undoManager.$lastDelta) + editor.session.markUndoGroup(); + } +} +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + hardWrap: { + set: function (val) { + if (val) { + this.commands.on("afterExec", wrapAfterInput); + } + else { + this.commands.off("afterExec", wrapAfterInput); + } + }, + value: false + } +}); +exports.hardWrap = hardWrap; + +}); (function() { + window.require(["ace/ext/hardwrap"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-inline_autocomplete.js b/ui/base1/ace/ext-inline_autocomplete.js new file mode 100644 index 0000000..3c30bde --- /dev/null +++ b/ui/base1/ace/ext-inline_autocomplete.js @@ -0,0 +1,3380 @@ +define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module){"use strict"; +var dom = require("./lib/dom"); +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var RangeList = require("./range_list").RangeList; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var Tokenizer = require("./tokenizer").Tokenizer; +var clipboard = require("./clipboard"); +var VARIABLES = { + CURRENT_WORD: function (editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function (editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function (editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function (editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function (editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function (editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function (editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function (editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function (editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function () { return "Unknown"; }, + FULLNAME: function () { return "Unknown"; }, + BLOCK_COMMENT_START: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function (editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, { year: "numeric" }), + CURRENT_YEAR_SHORT: date.bind(null, { year: "2-digit" }), + CURRENT_MONTH: date.bind(null, { month: "numeric" }), + CURRENT_MONTH_NAME: date.bind(null, { month: "long" }), + CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: "short" }), + CURRENT_DATE: date.bind(null, { day: "2-digit" }), + CURRENT_DAY_NAME: date.bind(null, { weekday: "long" }), + CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: "short" }), + CURRENT_HOUR: date.bind(null, { hour: "2-digit", hour12: false }), + CURRENT_MINUTE: date.bind(null, { minute: "2-digit" }), + CURRENT_SECOND: date.bind(null, { second: "2-digit" }) +}; +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} +var SnippetManager = /** @class */ (function () { + function SnippetManager() { + this.snippetMap = {}; + this.snippetNameMap = {}; + this.variables = VARIABLES; + } + SnippetManager.prototype.getTokenizer = function () { + return SnippetManager["$tokenizer"] || this.createTokenizer(); + }; + SnippetManager.prototype.createTokenizer = function () { + function TabstopToken(str) { + str = str.substr(1); + if (/^\d+$/.test(str)) + return [{ tabstopId: parseInt(str, 10) }]; + return [{ text: str }]; + } + function escape(ch) { + return "(?:[^\\\\" + ch + "]|\\\\.)"; + } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + SnippetManager["$tokenizer"] = new Tokenizer({ + start: [ + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) { + val = ch; + } + else if ("`$\\".indexOf(ch) != -1) { + val = ch; + } + return [val]; + } }, + { regex: /}/, onMatch: function (val, state, stack) { + return [stack.length ? stack.shift() : val]; + } }, + { regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken }, + { regex: /\$\{[\dA-Z_a-z]+/, onMatch: function (str, state, stack) { + var t = TabstopToken(str.substr(1)); + stack.unshift(t[0]); + return t; + }, next: "snippetVar" }, + { regex: /\n/, token: "newline", merge: false } + ], + snippetVar: [ + { regex: "\\|" + escape("\\|") + "*\\|", onMatch: function (val, state, stack) { + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function (operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00").map(function (value) { + return { value: value }; + }); + stack[0].choices = choices; + return [choices[0]]; + }, next: "start" }, + formatMatcher, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start" } + ], + formatString: [ + { regex: /:/, onMatch: function (val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = { elseEnd: stack[0] }; + return [stack[0].ifEnd]; + } + return ":"; + } }, + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = { changeCase: ch, local: ch > "a" }; + return [val]; + } }, + { regex: "/\\w*}", onMatch: function (val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" }, + { regex: /\$(?:\d+|\w+)/, onMatch: function (val, state, stack) { + return [{ text: val.slice(1) }]; + } }, + { regex: /\${\w+/, onMatch: function (val, state, stack) { + var token = { text: val.slice(2) }; + stack.unshift(token); + return [token]; + }, next: "formatStringVar" }, + { regex: /\n/, token: "newline", merge: false }, + { regex: /}/, onMatch: function (val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" } + ], + formatStringVar: [ + { regex: /:\/\w+}/, onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString" }, + formatMatcher, + { regex: /:[\?\-+]?/, onMatch: function (val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString" }, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString" } + ] + }); + return SnippetManager["$tokenizer"]; + }; + SnippetManager.prototype.tokenizeTmSnippet = function (str, startState) { + return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) { + return x.value || x; + }); + }; + SnippetManager.prototype.getVariableValue = function (editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + name = name.replace(/^TM_/, ""); + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; + }; + SnippetManager.prototype.tmStrFormat = function (str, ch, editor) { + if (!ch.fmt) + return str; + var flag = ch.flag || ""; + var re = ch.guard; + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; + var _self = this; + var formatted = str.replace(re, function () { + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); + var fmtParts = _self.resolveVariables(fmtTokens, editor); + var gChangeCase = "E"; + for (var i = 0; i < fmtParts.length; i++) { + var ch = fmtParts[i]; + if (typeof ch == "object") { + fmtParts[i] = ""; + if (ch.changeCase && ch.local) { + var next = fmtParts[i + 1]; + if (next && typeof next == "string") { + if (ch.changeCase == "u") + fmtParts[i] = next[0].toUpperCase(); + else + fmtParts[i] = next[0].toLowerCase(); + fmtParts[i + 1] = next.substr(1); + } + } + else if (ch.changeCase) { + gChangeCase = ch.changeCase; + } + } + else if (gChangeCase == "U") { + fmtParts[i] = ch.toUpperCase(); + } + else if (gChangeCase == "L") { + fmtParts[i] = ch.toLowerCase(); + } + } + _self.variables.__ = oldArgs; + return fmtParts.join(""); + }); + return formatted; + }; + SnippetManager.prototype.tmFormatFunction = function (str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; + SnippetManager.prototype.resolveVariables = function (snippet, editor) { + var result = []; + var indentation = ""; + var afterNewLine = true; + for (var i = 0; i < snippet.length; i++) { + var ch = snippet[i]; + if (typeof ch == "string") { + result.push(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; + } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) + continue; + afterNewLine = false; + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) + j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } + else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } + else if (ch.elseEnd) { + gotoNext(ch.elseEnd); + } + else if (ch.tabstopId != null) { + result.push(ch); + } + else if (ch.changeCase != null) { + result.push(ch); + } + } + function gotoNext(ch) { + var i1 = snippet.indexOf(ch, i + 1); + if (i1 != -1) + i = i1; + } + return result; + }; + SnippetManager.prototype.getDisplayTextForSnippet = function (editor, snippetText) { + var processedSnippet = processSnippetText.call(this, editor, snippetText); + return processedSnippet.text; + }; + SnippetManager.prototype.insertSnippetForSelection = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var processedSnippet = processSnippetText.call(this, editor, snippetText, options); + var range = editor.getSelectionRange(); + var end = editor.session.replace(range, processedSnippet.text); + var tabstopManager = new TabstopManager(editor); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(processedSnippet.tabstops, range.start, end, selectionId); + }; + SnippetManager.prototype.insertSnippet = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText, options); + editor.forEachSelection(function () { + self.insertSnippetForSelection(editor, snippetText, options); + }, null, { keepOrder: true }); + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); + }; + SnippetManager.prototype.$getScope = function (editor) { + var scope = editor.session.$mode.$id || ""; + scope = scope.split("/").pop(); + if (scope === "html" || scope === "php") { + if (scope === "php" && !editor.session.$mode.inlinePhp) + scope = "html"; + var c = editor.getCursorPosition(); + var state = editor.session.getState(c.row); + if (typeof state === "object") { + state = state[0]; + } + if (state.substring) { + if (state.substring(0, 3) == "js-") + scope = "javascript"; + else if (state.substring(0, 4) == "css-") + scope = "css"; + else if (state.substring(0, 4) == "php-") + scope = "php"; + } + } + return scope; + }; + SnippetManager.prototype.getActiveScopes = function (editor) { + var scope = this.$getScope(editor); + var scopes = [scope]; + var snippetMap = this.snippetMap; + if (snippetMap[scope] && snippetMap[scope].includeScopes) { + scopes.push.apply(scopes, snippetMap[scope].includeScopes); + } + scopes.push("_"); + return scopes; + }; + SnippetManager.prototype.expandWithTab = function (editor, options) { + var self = this; + var result = editor.forEachSelection(function () { + return self.expandSnippetForSelection(editor, options); + }, null, { keepOrder: true }); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + SnippetManager.prototype.expandSnippetForSelection = function (editor, options) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var before = line.substring(0, cursor.column); + var after = line.substr(cursor.column); + var snippetMap = this.snippetMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = this.findMatchingSnippet(snippets, before, after); + return !!snippet; + }, this); + if (!snippet) + return false; + if (options && options.dryRun) + return true; + editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length); + this.variables.M__ = snippet.matchBefore; + this.variables.T__ = snippet.matchAfter; + this.insertSnippetForSelection(editor, snippet.content); + this.variables.M__ = this.variables.T__ = null; + return true; + }; + SnippetManager.prototype.findMatchingSnippet = function (snippetList, before, after) { + for (var i = snippetList.length; i--;) { + var s = snippetList[i]; + if (s.startRe && !s.startRe.test(before)) + continue; + if (s.endRe && !s.endRe.test(after)) + continue; + if (!s.startRe && !s.endRe) + continue; + s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; + s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; + s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; + s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; + return s; + } + }; + SnippetManager.prototype.register = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + var self = this; + if (!snippets) + snippets = []; + function wrapRegexp(src) { + if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) + src = "(?:" + src + ")"; + return src || ""; + } + function guardedRegexp(re, guard, opening) { + re = wrapRegexp(re); + guard = wrapRegexp(guard); + if (opening) { + re = guard + re; + if (re && re[re.length - 1] != "$") + re = re + "$"; + } + else { + re = re + guard; + if (re && re[0] != "^") + re = "^" + re; + } + return new RegExp(re); + } + function addSnippet(s) { + if (!s.scope) + s.scope = scope || "_"; + scope = s.scope; + if (!snippetMap[scope]) { + snippetMap[scope] = []; + snippetNameMap[scope] = {}; + } + var map = snippetNameMap[scope]; + if (s.name) { + var old = map[s.name]; + if (old) + self.unregister(old); + map[s.name] = s; + } + snippetMap[scope].push(s); + if (s.prefix) + s.tabTrigger = s.prefix; + if (!s.content && s.body) + s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body; + if (s.tabTrigger && !s.trigger) { + if (!s.guard && /^\w/.test(s.tabTrigger)) + s.guard = "\\b"; + s.trigger = lang.escapeRegExp(s.tabTrigger); + } + if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) + return; + s.startRe = guardedRegexp(s.trigger, s.guard, true); + s.triggerRe = new RegExp(s.trigger); + s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); + s.endTriggerRe = new RegExp(s.endTrigger); + } + if (Array.isArray(snippets)) { + snippets.forEach(addSnippet); + } + else { + Object.keys(snippets).forEach(function (key) { + addSnippet(snippets[key]); + }); + } + this._signal("registerSnippets", { scope: scope }); + }; + SnippetManager.prototype.unregister = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + function removeSnippet(s) { + var nameMap = snippetNameMap[s.scope || scope]; + if (nameMap && nameMap[s.name]) { + delete nameMap[s.name]; + var map = snippetMap[s.scope || scope]; + var i = map && map.indexOf(s); + if (i >= 0) + map.splice(i, 1); + } + } + if (snippets.content) + removeSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(removeSnippet); + }; + SnippetManager.prototype.parseSnippetFile = function (str) { + str = str.replace(/\r/g, ""); + var list = [], /**@type{Snippet}*/ snippet = {}; + var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; + var m; + while (m = re.exec(str)) { + if (m[1]) { + try { + snippet = JSON.parse(m[1]); + list.push(snippet); + } + catch (e) { } + } + if (m[4]) { + snippet.content = m[4].replace(/^\t/gm, ""); + list.push(snippet); + snippet = {}; + } + else { + var key = m[2], val = m[3]; + if (key == "regex") { + var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; + snippet.guard = guardRe.exec(val)[1]; + snippet.trigger = guardRe.exec(val)[1]; + snippet.endTrigger = guardRe.exec(val)[1]; + snippet.endGuard = guardRe.exec(val)[1]; + } + else if (key == "snippet") { + snippet.tabTrigger = val.match(/^\S*/)[0]; + if (!snippet.name) + snippet.name = val; + } + else if (key) { + snippet[key] = val; + } + } + } + return list; + }; + SnippetManager.prototype.getSnippetByName = function (name, editor) { + var snippetMap = this.snippetNameMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = snippets[name]; + return !!snippet; + }, this); + return snippet; + }; + return SnippetManager; +}()); +oop.implement(SnippetManager.prototype, EventEmitter); +var processSnippetText = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); + snippetText = snippetText.replace(/\r/g, ""); + var tokens = this.tokenizeTmSnippet(snippetText); + tokens = this.resolveVariables(tokens, editor); + tokens = tokens.map(function (x) { + if (x == "\n" && !options.excludeExtraIndent) + return x + indentString; + if (typeof x == "string") + return x.replace(/\t/g, tabString); + return x; + }); + var tabstops = []; + tokens.forEach(function (p, i) { + if (typeof p != "object") + return; + var id = p.tabstopId; + var ts = tabstops[id]; + if (!ts) { + ts = tabstops[id] = []; + ts.index = id; + ts.value = ""; + ts.parents = {}; + } + if (ts.indexOf(p) !== -1) + return; + if (p.choices && !ts.choices) + ts.choices = p.choices; + ts.push(p); + var i1 = tokens.indexOf(p, i + 1); + if (i1 === -1) + return; + var value = tokens.slice(i + 1, i1); + var isNested = value.some(function (t) { return typeof t === "object"; }); + if (isNested && !ts.value) { + ts.value = value; + } + else if (value.length && (!ts.value || typeof ts.value !== "string")) { + ts.value = value.join(""); + } + }); + tabstops.forEach(function (ts) { ts.length = 0; }); + var expanding = {}; + function copyValue(val) { + var copy = []; + for (var i = 0; i < val.length; i++) { + var p = val[i]; + if (typeof p == "object") { + if (expanding[p.tabstopId]) + continue; + var j = val.lastIndexOf(p, i - 1); + p = copy[j] || { tabstopId: p.tabstopId }; + } + copy[i] = p; + } + return copy; + } + for (var i = 0; i < tokens.length; i++) { + var p = tokens[i]; + if (typeof p != "object") + continue; + var id = p.tabstopId; + var ts = tabstops[id]; + var i1 = tokens.indexOf(p, i + 1); + if (expanding[id]) { + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function (parentId) { + ts.parents[parentId] = true; + }); + } + continue; + } + expanding[id] = p; + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); + if (ts.indexOf(p) === -1) + ts.push(p); + } + var row = 0, column = 0; + var text = ""; + tokens.forEach(function (t) { + if (typeof t === "string") { + var lines = t.split("\n"); + if (lines.length > 1) { + column = lines[lines.length - 1].length; + row += lines.length - 1; + } + else + column += t.length; + text += t; + } + else if (t) { + if (!t.start) + t.start = { row: row, column: column }; + else + t.end = { row: row, column: column }; + } + }); + return { + text: text, + tabstops: tabstops, + tokens: tokens + }; +}; +var TabstopManager = /** @class */ (function () { + function TabstopManager(editor) { + this.index = 0; + this.ranges = []; + this.tabstops = []; + if (editor.tabstopManager) + return editor.tabstopManager; + editor.tabstopManager = this; + this.$onChange = this.onChange.bind(this); + this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; + this.$onChangeSession = this.onChangeSession.bind(this); + this.$onAfterExec = this.onAfterExec.bind(this); + this.attach(editor); + } + TabstopManager.prototype.attach = function (editor) { + this.$openTabstops = null; + this.selectedTabstop = null; + this.editor = editor; + this.session = editor.session; + this.editor.on("change", this.$onChange); + this.editor.on("changeSelection", this.$onChangeSelection); + this.editor.on("changeSession", this.$onChangeSession); + this.editor.commands.on("afterExec", this.$onAfterExec); + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + TabstopManager.prototype.detach = function () { + this.tabstops.forEach(this.removeTabstopMarkers, this); + this.ranges.length = 0; + this.tabstops.length = 0; + this.selectedTabstop = null; + this.editor.off("change", this.$onChange); + this.editor.off("changeSelection", this.$onChangeSelection); + this.editor.off("changeSession", this.$onChangeSession); + this.editor.commands.off("afterExec", this.$onAfterExec); + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.tabstopManager = null; + this.session = null; + this.editor = null; + }; + TabstopManager.prototype.onChange = function (delta) { + var isRemove = delta.action[0] == "r"; + var selectedTabstop = this.selectedTabstop || {}; + var parents = selectedTabstop.parents || {}; + var tabstops = this.tabstops.slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + if (delta.action == "remove" && ts !== selectedTabstop) { + var parentActive = ts.parents && ts.parents[selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); + } + ts.rangeList.$onChange(delta); + } + var session = this.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) + this.detach(); + }; + TabstopManager.prototype.updateLinkedFields = function () { + var ts = this.selectedTabstop; + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) + return; + this.$inChange = true; + var session = this.session; + var text = session.getTextRange(ts.firstNonLinked); + for (var i = 0; i < ts.length; i++) { + var range = ts[i]; + if (!range.linked) + continue; + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); + session.replace(range, fmt); + } + this.$inChange = false; + }; + TabstopManager.prototype.onAfterExec = function (e) { + if (e.command && !e.command.readOnly) + this.updateLinkedFields(); + }; + TabstopManager.prototype.onChangeSelection = function () { + if (!this.editor) + return; + var lead = this.editor.selection.lead; + var anchor = this.editor.selection.anchor; + var isEmpty = this.editor.selection.isEmpty(); + for (var i = 0; i < this.ranges.length; i++) { + if (this.ranges[i].linked) + continue; + var containsLead = this.ranges[i].contains(lead.row, lead.column); + var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); + if (containsLead && containsAnchor) + return; + } + this.detach(); + }; + TabstopManager.prototype.onChangeSession = function () { + this.detach(); + }; + TabstopManager.prototype.tabNext = function (dir) { + var max = this.tabstops.length; + var index = this.index + (dir || 1); + index = Math.min(Math.max(index, 1), max); + if (index == max) + index = 0; + this.selectTabstop(index); + this.updateTabstopMarkers(); + if (index === 0) { + this.detach(); + } + }; + TabstopManager.prototype.selectTabstop = function (index) { + this.$openTabstops = null; + var ts = this.tabstops[this.index]; + if (ts) + this.addTabstopMarkers(ts); + this.index = index; + ts = this.tabstops[this.index]; + if (!ts || !ts.length) + return; + this.selectedTabstop = ts; + var range = ts.firstNonLinked || ts; + if (ts.choices) + range.cursor = range.start; + if (!this.editor.inVirtualSelectionMode) { + var sel = this.editor.multiSelect; + sel.toSingleRange(range); + for (var i = 0; i < ts.length; i++) { + if (ts.hasLinkedRanges && ts[i].linked) + continue; + sel.addRange(ts[i].clone(), true); + } + } + else { + this.editor.selection.fromOrientedRange(range); + } + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", { matches: this.selectedTabstop.choices }); + }; + TabstopManager.prototype.addTabstops = function (tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + if (!this.$openTabstops) + this.$openTabstops = []; + if (!tabstops[0]) { + var p = Range.fromPoints(end, end); + moveRelative(p.start, start); + moveRelative(p.end, start); + tabstops[0] = [p]; + tabstops[0].index = 0; + } + var i = this.index; + var arg = [i + 1, 0]; + var ranges = this.ranges; + var snippetId = this.snippetId = (this.snippetId || 0) + 1; + tabstops.forEach(function (ts, index) { + var dest = this.$openTabstops[index] || ts; + dest.snippetId = snippetId; + for (var i = 0; i < ts.length; i++) { + var p = ts[i]; + var range = Range.fromPoints(p.start, p.end || p.start); + movePoint(range.start, start); + movePoint(range.end, start); + range.original = p; + range.tabstop = dest; + ranges.push(range); + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; + if (p.fmtString || (dest.firstNonLinked && useLink)) { + range.linked = true; + dest.hasLinkedRanges = true; + } + else if (!dest.firstNonLinked) + dest.firstNonLinked = range; + } + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); + dest.rangeList = dest.rangeList || new RangeList(); + dest.rangeList.$bias = 0; + dest.rangeList.addList(dest); + }, this); + if (arg.length > 2) { + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } + }; + TabstopManager.prototype.addTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + if (!range.markerId) + range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); + }); + }; + TabstopManager.prototype.removeTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + session.removeMarker(range.markerId); + range.markerId = null; + }); + }; + TabstopManager.prototype.updateTabstopMarkers = function () { + if (!this.selectedTabstop) + return; + var currentSnippetId = this.selectedTabstop.snippetId; + if (this.selectedTabstop.index === 0) { + currentSnippetId--; + } + this.tabstops.forEach(function (ts) { + if (ts.snippetId === currentSnippetId) + this.addTabstopMarkers(ts); + else + this.removeTabstopMarkers(ts); + }, this); + }; + TabstopManager.prototype.removeRange = function (range) { + var i = range.tabstop.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + i = this.ranges.indexOf(range); + if (i != -1) + this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + this.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } + }; + return TabstopManager; +}()); +TabstopManager.prototype.keyboardHandler = new HashHandler(); +TabstopManager.prototype.keyboardHandler.bindKeys({ + "Tab": function (editor) { + if (exports.snippetManager && exports.snippetManager.expandWithTab(editor)) + return; + editor.tabstopManager.tabNext(1); + editor.renderer.scrollCursorIntoView(); + }, + "Shift-Tab": function (editor) { + editor.tabstopManager.tabNext(-1); + editor.renderer.scrollCursorIntoView(); + }, + "Esc": function (editor) { + editor.tabstopManager.detach(); + } +}); +var movePoint = function (point, diff) { + if (point.row == 0) + point.column += diff.column; + point.row += diff.row; +}; +var moveRelative = function (point, start) { + if (point.row == start.row) + point.column -= start.column; + point.row -= start.row; +}; +dom.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}", "snippets.css", false); +exports.snippetManager = new SnippetManager(); +var Editor = require("./editor").Editor; +(function () { + this.insertSnippet = function (content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function (options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + +}); + +define("ace/autocomplete/inline_screenreader",["require","exports","module"], function(require, exports, module){"use strict"; +var AceInlineScreenReader = /** @class */ (function () { + function AceInlineScreenReader(editor) { + this.editor = editor; + this.screenReaderDiv = document.createElement("div"); + this.screenReaderDiv.classList.add("ace_screenreader-only"); + this.editor.container.appendChild(this.screenReaderDiv); + } + AceInlineScreenReader.prototype.setScreenReaderContent = function (content) { + if (!this.popup && this.editor.completer && /**@type{import("../autocomplete").Autocomplete}*/ (this.editor.completer).popup) { + this.popup = /**@type{import("../autocomplete").Autocomplete}*/ (this.editor.completer).popup; + this.popup.renderer.on("afterRender", function () { + var row = this.popup.getRow(); + var t = this.popup.renderer.$textLayer; + var selected = t.element.childNodes[row - t.config.firstRow]; + if (selected) { + var idString = "doc-tooltip "; + for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) { + idString += "ace-inline-screenreader-line-".concat(lineIndex, " "); + } + selected.setAttribute("aria-describedby", idString); + } + }.bind(this)); + } + while (this.screenReaderDiv.firstChild) { + this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild); + } + this._lines = content.split(/\r\n|\r|\n/); + var codeElement = this.createCodeBlock(); + this.screenReaderDiv.appendChild(codeElement); + }; + AceInlineScreenReader.prototype.destroy = function () { + this.screenReaderDiv.remove(); + }; + AceInlineScreenReader.prototype.createCodeBlock = function () { + var container = document.createElement("pre"); + container.setAttribute("id", "ace-inline-screenreader"); + for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) { + var codeElement = document.createElement("code"); + codeElement.setAttribute("id", "ace-inline-screenreader-line-".concat(lineIndex)); + var line = document.createTextNode(this._lines[lineIndex]); + codeElement.appendChild(line); + container.appendChild(codeElement); + } + return container; + }; + return AceInlineScreenReader; +}()); +exports.AceInlineScreenReader = AceInlineScreenReader; + +}); + +define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"], function(require, exports, module){"use strict"; +var snippetManager = require("../snippets").snippetManager; +var AceInlineScreenReader = require("./inline_screenreader").AceInlineScreenReader; +var AceInline = /** @class */ (function () { + function AceInline() { + this.editor = null; + } + AceInline.prototype.show = function (editor, completion, prefix) { + prefix = prefix || ""; + if (editor && this.editor && this.editor !== editor) { + this.hide(); + this.editor = null; + this.inlineScreenReader = null; + } + if (!editor || !completion) { + return false; + } + if (!this.inlineScreenReader) { + this.inlineScreenReader = new AceInlineScreenReader(editor); + } + var displayText = completion.snippet ? snippetManager.getDisplayTextForSnippet(editor, completion.snippet) : completion.value; + if (completion.hideInlinePreview || !displayText || !displayText.startsWith(prefix)) { + return false; + } + this.editor = editor; + this.inlineScreenReader.setScreenReaderContent(displayText); + displayText = displayText.slice(prefix.length); + if (displayText === "") { + editor.removeGhostText(); + } + else { + editor.setGhostText(displayText); + } + return true; + }; + AceInline.prototype.isOpen = function () { + if (!this.editor) { + return false; + } + return !!this.editor.renderer.$ghostText; + }; + AceInline.prototype.hide = function () { + if (!this.editor) { + return false; + } + this.editor.removeGhostText(); + return true; + }; + AceInline.prototype.destroy = function () { + this.hide(); + this.editor = null; + if (this.inlineScreenReader) { + this.inlineScreenReader.destroy(); + this.inlineScreenReader = null; + } + }; + return AceInline; +}()); +exports.AceInline = AceInline; + +}); + +define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"], function(require, exports, module){"use strict"; +var Renderer = require("../virtual_renderer").VirtualRenderer; +var Editor = require("../editor").Editor; +var Range = require("../range").Range; +var event = require("../lib/event"); +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); +var nls = require("../config").nls; +var userAgent = require("./../lib/useragent"); +var getAriaId = function (index) { + return "suggest-aria-id:".concat(index); +}; +var popupAriaRole = userAgent.isSafari ? "menu" : "listbox"; +var optionAriaRole = userAgent.isSafari ? "menuitem" : "option"; +var ariaActiveState = userAgent.isSafari ? "aria-current" : "aria-selected"; +var $singleLineEditor = function (el) { + var renderer = new Renderer(el); + renderer.$maxLines = 4; + var editor = new Editor(renderer); + editor.setHighlightActiveLine(false); + editor.setShowPrintMargin(false); + editor.renderer.setShowGutter(false); + editor.renderer.setHighlightGutterLine(false); + editor.$mouseHandler.$focusTimeout = 0; + editor.$highlightTagPending = true; + return editor; +}; +var AcePopup = /** @class */ (function () { + function AcePopup(parentNode) { + var el = dom.createElement("div"); + var popup = $singleLineEditor(el); + if (parentNode) { + parentNode.appendChild(el); + } + el.style.display = "none"; + popup.renderer.content.style.cursor = "default"; + popup.renderer.setStyle("ace_autocomplete"); + popup.renderer.$textLayer.element.setAttribute("role", popupAriaRole); + popup.renderer.$textLayer.element.setAttribute("aria-roledescription", nls("autocomplete.popup.aria-roledescription", "Autocomplete suggestions")); + popup.renderer.$textLayer.element.setAttribute("aria-label", nls("autocomplete.popup.aria-label", "Autocomplete suggestions")); + popup.renderer.textarea.setAttribute("aria-hidden", "true"); + popup.setOption("displayIndentGuides", false); + popup.setOption("dragDelay", 150); + var noop = function () { }; + popup.focus = noop; + popup.$isFocused = true; + popup.renderer.$cursorLayer.restartTimer = noop; + popup.renderer.$cursorLayer.element.style.opacity = "0"; + popup.renderer.$maxLines = 8; + popup.renderer.$keepTextAreaAtCursor = false; + popup.setHighlightActiveLine(false); + popup.session.highlight(""); + popup.session.$searchHighlight.clazz = "ace_highlight-marker"; + popup.on("mousedown", function (e) { + var pos = e.getDocumentPosition(); + popup.selection.moveToPosition(pos); + selectionMarker.start.row = selectionMarker.end.row = pos.row; + e.stop(); + }); + var lastMouseEvent; + var hoverMarker = new Range(-1, 0, -1, Infinity); + var selectionMarker = new Range(-1, 0, -1, Infinity); + selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); + popup.setSelectOnHover = function (val) { + if (!val) { + hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); + } + else if (hoverMarker.id) { + popup.session.removeMarker(hoverMarker.id); + hoverMarker.id = null; + } + }; + popup.setSelectOnHover(false); + popup.on("mousemove", function (e) { + if (!lastMouseEvent) { + lastMouseEvent = e; + return; + } + if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { + return; + } + lastMouseEvent = e; + lastMouseEvent.scrollTop = popup.renderer.scrollTop; + popup.isMouseOver = true; + var row = lastMouseEvent.getDocumentPosition().row; + if (hoverMarker.start.row != row) { + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row); + } + }); + popup.renderer.on("beforeRender", function () { + if (lastMouseEvent && hoverMarker.start.row != -1) { + lastMouseEvent.$pos = null; + var row = lastMouseEvent.getDocumentPosition().row; + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row, true); + } + }); + popup.renderer.on("afterRender", function () { + var row = popup.getRow(); + var t = popup.renderer.$textLayer; + var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]); + var el = document.activeElement; // Active element is textarea of main editor + if (selected !== popup.selectedNode && popup.selectedNode) { + dom.removeCssClass(popup.selectedNode, "ace_selected"); + el.removeAttribute("aria-activedescendant"); + popup.selectedNode.removeAttribute(ariaActiveState); + popup.selectedNode.removeAttribute("id"); + } + popup.selectedNode = selected; + if (selected) { + dom.addCssClass(selected, "ace_selected"); + var ariaId = getAriaId(row); + selected.id = ariaId; + t.element.setAttribute("aria-activedescendant", ariaId); + el.setAttribute("aria-activedescendant", ariaId); + selected.setAttribute("role", optionAriaRole); + selected.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item")); + selected.setAttribute("aria-label", popup.getData(row).caption || popup.getData(row).value); + selected.setAttribute("aria-setsize", popup.data.length); + selected.setAttribute("aria-posinset", row + 1); + selected.setAttribute("aria-describedby", "doc-tooltip"); + selected.setAttribute(ariaActiveState, "true"); + } + }); + var hideHoverMarker = function () { setHoverMarker(-1); }; + var setHoverMarker = function (row, suppressRedraw) { + if (row !== hoverMarker.start.row) { + hoverMarker.start.row = hoverMarker.end.row = row; + if (!suppressRedraw) + popup.session._emit("changeBackMarker"); + popup._emit("changeHoverMarker"); + } + }; + popup.getHoveredRow = function () { + return hoverMarker.start.row; + }; + event.addListener(popup.container, "mouseout", function () { + popup.isMouseOver = false; + hideHoverMarker(); + }); + popup.on("hide", hideHoverMarker); + popup.on("changeSelection", hideHoverMarker); + popup.session.doc.getLength = function () { + return popup.data.length; + }; + popup.session.doc.getLine = function (i) { + var data = popup.data[i]; + if (typeof data == "string") + return data; + return (data && data.value) || ""; + }; + var bgTokenizer = popup.session.bgTokenizer; + bgTokenizer.$tokenizeRow = function (row) { + var data = popup.data[row]; + var tokens = []; + if (!data) + return tokens; + if (typeof data == "string") + data = { value: data }; + var caption = data.caption || data.value || data.name; + function addToken(value, className) { + value && tokens.push({ + type: (data.className || "") + (className || ""), + value: value + }); + } + var lower = caption.toLowerCase(); + var filterText = (popup.filterText || "").toLowerCase(); + var lastIndex = 0; + var lastI = 0; + for (var i = 0; i <= filterText.length; i++) { + if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) { + var sub = filterText.slice(lastI, i); + lastI = i; + var index = lower.indexOf(sub, lastIndex); + if (index == -1) + continue; + addToken(caption.slice(lastIndex, index), ""); + lastIndex = index + sub.length; + addToken(caption.slice(index, lastIndex), "completion-highlight"); + } + } + addToken(caption.slice(lastIndex, caption.length), ""); + tokens.push({ type: "completion-spacer", value: " " }); + if (data.meta) + tokens.push({ type: "completion-meta", value: data.meta }); + if (data.message) + tokens.push({ type: "completion-message", value: data.message }); + return tokens; + }; + bgTokenizer.$updateOnChange = noop; + bgTokenizer.start = noop; + popup.session.$computeWidth = function () { + return this.screenWidth = 0; + }; + popup.isOpen = false; + popup.isTopdown = false; + popup.autoSelect = true; + popup.filterText = ""; + popup.isMouseOver = false; + popup.data = []; + popup.setData = function (list, filterText) { + popup.filterText = filterText || ""; + popup.setValue(lang.stringRepeat("\n", list.length), -1); + popup.data = list || []; + popup.setRow(0); + }; + popup.getData = function (row) { + return popup.data[row]; + }; + popup.getRow = function () { + return selectionMarker.start.row; + }; + popup.setRow = function (line) { + line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length - 1, line)); + if (selectionMarker.start.row != line) { + popup.selection.clearSelection(); + selectionMarker.start.row = selectionMarker.end.row = line || 0; + popup.session._emit("changeBackMarker"); + popup.moveCursorTo(line || 0, 0); + if (popup.isOpen) + popup._signal("select"); + } + }; + popup.on("changeSelection", function () { + if (popup.isOpen) + popup.setRow(popup.selection.lead.row); + popup.renderer.scrollCursorIntoView(); + }); + popup.hide = function () { + this.container.style.display = "none"; + popup.anchorPos = null; + popup.anchor = null; + if (popup.isOpen) { + popup.isOpen = false; + this._signal("hide"); + } + }; + popup.tryShow = function (pos, lineHeight, anchor, forceShow) { + if (!forceShow && popup.isOpen && popup.anchorPos && popup.anchor && + popup.anchorPos.top === pos.top && popup.anchorPos.left === pos.left && + popup.anchor === anchor) { + return true; + } + var el = this.container; + var screenHeight = window.innerHeight; + var screenWidth = window.innerWidth; + var renderer = this.renderer; + var maxH = renderer.$maxLines * lineHeight * 1.4; + var dims = { top: 0, bottom: 0, left: 0 }; + var spaceBelow = screenHeight - pos.top - 3 * this.$borderSize - lineHeight; + var spaceAbove = pos.top - 3 * this.$borderSize; + if (!anchor) { + if (spaceAbove <= spaceBelow || spaceBelow >= maxH) { + anchor = "bottom"; + } + else { + anchor = "top"; + } + } + if (anchor === "top") { + dims.bottom = pos.top - this.$borderSize; + dims.top = dims.bottom - maxH; + } + else if (anchor === "bottom") { + dims.top = pos.top + lineHeight + this.$borderSize; + dims.bottom = dims.top + maxH; + } + var fitsX = dims.top >= 0 && dims.bottom <= screenHeight; + if (!forceShow && !fitsX) { + return false; + } + if (!fitsX) { + if (anchor === "top") { + renderer.$maxPixelHeight = spaceAbove; + } + else { + renderer.$maxPixelHeight = spaceBelow; + } + } + else { + renderer.$maxPixelHeight = null; + } + if (anchor === "top") { + el.style.top = ""; + el.style.bottom = (screenHeight - dims.bottom) + "px"; + popup.isTopdown = false; + } + else { + el.style.top = dims.top + "px"; + el.style.bottom = ""; + popup.isTopdown = true; + } + el.style.display = ""; + var left = pos.left; + if (left + el.offsetWidth > screenWidth) + left = screenWidth - el.offsetWidth; + el.style.left = left + "px"; + el.style.right = ""; + if (!popup.isOpen) { + popup.isOpen = true; + this._signal("show"); + lastMouseEvent = null; + } + popup.anchorPos = pos; + popup.anchor = anchor; + return true; + }; + popup.show = function (pos, lineHeight, topdownOnly) { + this.tryShow(pos, lineHeight, topdownOnly ? "bottom" : undefined, true); + }; + popup.goTo = function (where) { + var row = this.getRow(); + var max = this.session.getLength() - 1; + switch (where) { + case "up": + row = row <= 0 ? max : row - 1; + break; + case "down": + row = row >= max ? -1 : row + 1; + break; + case "start": + row = 0; + break; + case "end": + row = max; + break; + } + this.setRow(row); + }; + popup.getTextLeftOffset = function () { + return this.$borderSize + this.renderer.$padding + this.$imageSize; + }; + popup.$imageSize = 0; + popup.$borderSize = 1; + return popup; + } + return AcePopup; +}()); +dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: \"\";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n", "autocompletion.css", false); +exports.AcePopup = AcePopup; +exports.$singleLineEditor = $singleLineEditor; +exports.getAriaId = getAriaId; + +}); + +define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module){"use strict"; +exports.parForEach = function (array, fn, callback) { + var completed = 0; + var arLength = array.length; + if (arLength === 0) + callback(); + for (var i = 0; i < arLength; i++) { + fn(array[i], function (result, err) { + completed++; + if (completed === arLength) + callback(result, err); + }); + } +}; +var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/; +exports.retrievePrecedingIdentifier = function (text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos - 1; i >= 0; i--) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf.reverse().join(""); +}; +exports.retrieveFollowingIdentifier = function (text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos; i < text.length; i++) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf; +}; +exports.getCompletionPrefix = function (editor) { + var pos = editor.getCursorPosition(); + var line = editor.session.getLine(pos.row); + var prefix; + editor.completers.forEach(function (completer) { + if (completer.identifierRegexps) { + completer.identifierRegexps.forEach(function (identifierRegex) { + if (!prefix && identifierRegex) + prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + }.bind(this)); + } + }.bind(this)); + return prefix || this.retrievePrecedingIdentifier(line, pos.column); +}; +exports.triggerAutocomplete = function (editor, previousChar) { + var previousChar = previousChar == null + ? editor.session.getPrecedingCharacter() + : previousChar; + return editor.completers.some(function (completer) { + if (completer.triggerCharacters && Array.isArray(completer.triggerCharacters)) { + return completer.triggerCharacters.includes(previousChar); + } + }); +}; + +}); + +define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"], function(require, exports, module){"use strict"; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var AcePopup = require("./autocomplete/popup").AcePopup; +var AceInline = require("./autocomplete/inline").AceInline; +var getAriaId = require("./autocomplete/popup").getAriaId; +var util = require("./autocomplete/util"); +var lang = require("./lib/lang"); +var dom = require("./lib/dom"); +var snippetManager = require("./snippets").snippetManager; +var config = require("./config"); +var event = require("./lib/event"); +var preventParentScroll = require("./lib/scroll").preventParentScroll; +var destroyCompleter = function (e, editor) { + editor.completer && editor.completer.destroy(); +}; +var Autocomplete = /** @class */ (function () { + function Autocomplete() { + this.autoInsert = false; + this.autoSelect = true; + this.autoShown = false; + this.exactMatch = false; + this.inlineEnabled = false; + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys(this.commands); + this.parentNode = null; + this.setSelectOnHover = false; + this.hasSeen = new Set(); + this.showLoadingState = false; + this.stickySelectionDelay = 500; + this.blurListener = this.blurListener.bind(this); + this.changeListener = this.changeListener.bind(this); + this.mousedownListener = this.mousedownListener.bind(this); + this.mousewheelListener = this.mousewheelListener.bind(this); + this.onLayoutChange = this.onLayoutChange.bind(this); + this.changeTimer = lang.delayedCall(function () { + this.updateCompletions(true); + }.bind(this)); + this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); + this.popupTimer = lang.delayedCall(this.$updatePopupPosition.bind(this), 50); + this.stickySelectionTimer = lang.delayedCall(function () { + this.stickySelection = true; + }.bind(this), this.stickySelectionDelay); + this.$firstOpenTimer = lang.delayedCall(/**@this{Autocomplete}*/ function () { + var initialPosition = this.completionProvider && this.completionProvider.initialPosition; + if (this.autoShown || (this.popup && this.popup.isOpen) || !initialPosition || this.editor.completers.length === 0) + return; + this.completions = new FilteredList(Autocomplete.completionsForLoading); + this.openPopup(this.editor, initialPosition.prefix, false); + this.popup.renderer.setStyle("ace_loading", true); + }.bind(this), this.stickySelectionDelay); + } + Object.defineProperty(Autocomplete, "completionsForLoading", { + get: function () { + return [{ + caption: config.nls("autocomplete.loading", "Loading..."), + value: "" + }]; + }, + enumerable: false, + configurable: true + }); + Autocomplete.prototype.$init = function () { + this.popup = new AcePopup(this.parentNode || document.body || document.documentElement); + this.popup.on("click", function (e) { + this.insertMatch(); + e.stop(); + }.bind(this)); + this.popup.focus = this.editor.focus.bind(this.editor); + this.popup.on("show", this.$onPopupShow.bind(this)); + this.popup.on("hide", this.$onHidePopup.bind(this)); + this.popup.on("select", this.$onPopupChange.bind(this)); + event.addListener(this.popup.container, "mouseout", this.mouseOutListener.bind(this)); + this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); + this.popup.renderer.on("afterRender", this.$onPopupRender.bind(this)); + return this.popup; + }; + Autocomplete.prototype.$initInline = function () { + if (!this.inlineEnabled || this.inlineRenderer) + return; + this.inlineRenderer = new AceInline(); + return this.inlineRenderer; + }; + Autocomplete.prototype.getPopup = function () { + return this.popup || this.$init(); + }; + Autocomplete.prototype.$onHidePopup = function () { + if (this.inlineRenderer) { + this.inlineRenderer.hide(); + } + this.hideDocTooltip(); + this.stickySelectionTimer.cancel(); + this.popupTimer.cancel(); + this.stickySelection = false; + }; + Autocomplete.prototype.$seen = function (completion) { + if (!this.hasSeen.has(completion) && completion && completion.completer && completion.completer.onSeen && typeof completion.completer.onSeen === "function") { + completion.completer.onSeen(this.editor, completion); + this.hasSeen.add(completion); + } + }; + Autocomplete.prototype.$onPopupChange = function (hide) { + if (this.inlineRenderer && this.inlineEnabled) { + var completion = hide ? null : this.popup.getData(this.popup.getRow()); + this.$updateGhostText(completion); + if (this.popup.isMouseOver && this.setSelectOnHover) { + this.tooltipTimer.call(null, null); + return; + } + this.popupTimer.schedule(); + this.tooltipTimer.schedule(); + } + else { + this.popupTimer.call(null, null); + this.tooltipTimer.call(null, null); + } + }; + Autocomplete.prototype.$updateGhostText = function (completion) { + var row = this.base.row; + var column = this.base.column; + var cursorColumn = this.editor.getCursorPosition().column; + var prefix = this.editor.session.getLine(row).slice(column, cursorColumn); + if (!this.inlineRenderer.show(this.editor, completion, prefix)) { + this.inlineRenderer.hide(); + } + else { + this.$seen(completion); + } + }; + Autocomplete.prototype.$onPopupRender = function () { + var inlineEnabled = this.inlineRenderer && this.inlineEnabled; + if (this.completions && this.completions.filtered && this.completions.filtered.length > 0) { + for (var i = this.popup.getFirstVisibleRow(); i <= this.popup.getLastVisibleRow(); i++) { + var completion = this.popup.getData(i); + if (completion && (!inlineEnabled || completion.hideInlinePreview)) { + this.$seen(completion); + } + } + } + }; + Autocomplete.prototype.$onPopupShow = function (hide) { + this.$onPopupChange(hide); + this.stickySelection = false; + if (this.stickySelectionDelay >= 0) + this.stickySelectionTimer.schedule(this.stickySelectionDelay); + }; + Autocomplete.prototype.observeLayoutChanges = function () { + if (this.$elements || !this.editor) + return; + window.addEventListener("resize", this.onLayoutChange, { passive: true }); + window.addEventListener("wheel", this.mousewheelListener); + var el = this.editor.container.parentNode; + var elements = []; + while (el) { + elements.push(el); + el.addEventListener("scroll", this.onLayoutChange, { passive: true }); + el = el.parentNode; + } + this.$elements = elements; + }; + Autocomplete.prototype.unObserveLayoutChanges = function () { + var _this = this; + window.removeEventListener("resize", this.onLayoutChange, { passive: true }); + window.removeEventListener("wheel", this.mousewheelListener); + this.$elements && this.$elements.forEach(function (el) { + el.removeEventListener("scroll", _this.onLayoutChange, { passive: true }); + }); + this.$elements = null; + }; + Autocomplete.prototype.onLayoutChange = function () { + if (!this.popup.isOpen) + return this.unObserveLayoutChanges(); + this.$updatePopupPosition(); + this.updateDocTooltip(); + }; + Autocomplete.prototype.$updatePopupPosition = function () { + var editor = this.editor; + var renderer = editor.renderer; + var lineHeight = renderer.layerConfig.lineHeight; + var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); + pos.left -= this.popup.getTextLeftOffset(); + var rect = editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left - editor.renderer.scrollLeft; + pos.left += renderer.gutterWidth; + var posGhostText = { + top: pos.top, + left: pos.left + }; + if (renderer.$ghostText && renderer.$ghostTextWidget) { + if (this.base.row === renderer.$ghostText.position.row) { + posGhostText.top += renderer.$ghostTextWidget.el.offsetHeight; + } + } + var editorContainerBottom = editor.container.getBoundingClientRect().bottom - lineHeight; + var lowestPosition = editorContainerBottom < posGhostText.top ? + { top: editorContainerBottom, left: posGhostText.left } : + posGhostText; + if (this.popup.tryShow(lowestPosition, lineHeight, "bottom")) { + return; + } + if (this.popup.tryShow(pos, lineHeight, "top")) { + return; + } + this.popup.show(pos, lineHeight); + }; + Autocomplete.prototype.openPopup = function (editor, prefix, keepPopupPosition) { + this.$firstOpenTimer.cancel(); + if (!this.popup) + this.$init(); + if (this.inlineEnabled && !this.inlineRenderer) + this.$initInline(); + this.popup.autoSelect = this.autoSelect; + this.popup.setSelectOnHover(this.setSelectOnHover); + var oldRow = this.popup.getRow(); + var previousSelectedItem = this.popup.data[oldRow]; + this.popup.setData(this.completions.filtered, this.completions.filterText); + if (this.editor.textInput.setAriaOptions) { + this.editor.textInput.setAriaOptions({ + activeDescendant: getAriaId(this.popup.getRow()), + inline: this.inlineEnabled + }); + } + editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + var newRow; + if (this.stickySelection) + newRow = this.popup.data.indexOf(previousSelectedItem); + if (!newRow || newRow === -1) + newRow = 0; + this.popup.setRow(this.autoSelect ? newRow : -1); + if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow]) + this.$onPopupChange(); + var inlineEnabled = this.inlineRenderer && this.inlineEnabled; + if (newRow === oldRow && inlineEnabled) { + var completion = this.popup.getData(this.popup.getRow()); + this.$updateGhostText(completion); + } + if (!keepPopupPosition) { + this.popup.setTheme(editor.getTheme()); + this.popup.setFontSize(editor.getFontSize()); + this.$updatePopupPosition(); + if (this.tooltipNode) { + this.updateDocTooltip(); + } + } + this.changeTimer.cancel(); + this.observeLayoutChanges(); + }; + Autocomplete.prototype.detach = function () { + if (this.editor) { + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.off("changeSelection", this.changeListener); + this.editor.off("blur", this.blurListener); + this.editor.off("mousedown", this.mousedownListener); + this.editor.off("mousewheel", this.mousewheelListener); + } + this.$firstOpenTimer.cancel(); + this.changeTimer.cancel(); + this.hideDocTooltip(); + if (this.completionProvider) { + this.completionProvider.detach(); + } + if (this.popup && this.popup.isOpen) + this.popup.hide(); + if (this.popup && this.popup.renderer) { + this.popup.renderer.off("afterRender", this.$onPopupRender); + } + if (this.base) + this.base.detach(); + this.activated = false; + this.completionProvider = this.completions = this.base = null; + this.unObserveLayoutChanges(); + }; + Autocomplete.prototype.changeListener = function (e) { + var cursor = this.editor.selection.lead; + if (cursor.row != this.base.row || cursor.column < this.base.column) { + this.detach(); + } + if (this.activated) + this.changeTimer.schedule(); + else + this.detach(); + }; + Autocomplete.prototype.blurListener = function (e) { + var el = document.activeElement; + var text = this.editor.textInput.getElement(); + var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget); + var container = this.popup && this.popup.container; + if (el != text && el.parentNode != container && !fromTooltip + && el != this.tooltipNode && e.relatedTarget != text) { + this.detach(); + } + }; + Autocomplete.prototype.mousedownListener = function (e) { + this.detach(); + }; + Autocomplete.prototype.mousewheelListener = function (e) { + if (this.popup && !this.popup.isMouseOver) + this.detach(); + }; + Autocomplete.prototype.mouseOutListener = function (e) { + if (this.popup.isOpen) + this.$updatePopupPosition(); + }; + Autocomplete.prototype.goTo = function (where) { + this.popup.goTo(where); + }; + Autocomplete.prototype.insertMatch = function (data, options) { + if (!data) + data = this.popup.getData(this.popup.getRow()); + if (!data) + return false; + if (data.value === "") // Explicitly given nothing to insert, e.g. "No suggestion state" + return this.detach(); + var completions = this.completions; + var result = this.getCompletionProvider().insertMatch(this.editor, data, completions.filterText, options); + if (this.completions == completions) + this.detach(); + return result; + }; + Autocomplete.prototype.showPopup = function (editor, options) { + if (this.editor) + this.detach(); + this.activated = true; + this.editor = editor; + if (editor.completer != this) { + if (editor.completer) + editor.completer.detach(); + editor.completer = this; + } + editor.on("changeSelection", this.changeListener); + editor.on("blur", this.blurListener); + editor.on("mousedown", this.mousedownListener); + editor.on("mousewheel", this.mousewheelListener); + this.updateCompletions(false, options); + }; + Autocomplete.prototype.getCompletionProvider = function (initialPosition) { + if (!this.completionProvider) + this.completionProvider = new CompletionProvider(initialPosition); + return this.completionProvider; + }; + Autocomplete.prototype.gatherCompletions = function (editor, callback) { + return this.getCompletionProvider().gatherCompletions(editor, callback); + }; + Autocomplete.prototype.updateCompletions = function (keepPopupPosition, options) { + if (keepPopupPosition && this.base && this.completions) { + var pos = this.editor.getCursorPosition(); + var prefix = this.editor.session.getTextRange({ start: this.base, end: pos }); + if (prefix == this.completions.filterText) + return; + this.completions.setFilter(prefix); + if (!this.completions.filtered.length) + return this.detach(); + if (this.completions.filtered.length == 1 + && this.completions.filtered[0].value == prefix + && !this.completions.filtered[0].snippet) + return this.detach(); + this.openPopup(this.editor, prefix, keepPopupPosition); + return; + } + if (options && options.matches) { + var pos = this.editor.getSelectionRange().start; + this.base = this.editor.session.doc.createAnchor(pos.row, pos.column); + this.base.$insertRight = true; + this.completions = new FilteredList(options.matches); + this.getCompletionProvider().completions = this.completions; + return this.openPopup(this.editor, "", keepPopupPosition); + } + var session = this.editor.getSession(); + var pos = this.editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(this.editor); + this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); + this.base.$insertRight = true; + var completionOptions = { + exactMatch: this.exactMatch, + ignoreCaption: this.ignoreCaption + }; + this.getCompletionProvider({ + prefix: prefix, + pos: pos + }).provideCompletions(this.editor, completionOptions, + function (err, completions, finished) { + var filtered = completions.filtered; + var prefix = util.getCompletionPrefix(this.editor); + this.$firstOpenTimer.cancel(); + if (finished) { + if (!filtered.length) { + var emptyMessage = !this.autoShown && this.emptyMessage; + if (typeof emptyMessage == "function") + emptyMessage = this.emptyMessage(prefix); + if (emptyMessage) { + var completionsForEmpty = [{ + caption: emptyMessage, + value: "" + } + ]; + this.completions = new FilteredList(completionsForEmpty); + this.openPopup(this.editor, prefix, keepPopupPosition); + this.popup.renderer.setStyle("ace_loading", false); + this.popup.renderer.setStyle("ace_empty-message", true); + return; + } + return this.detach(); + } + if (filtered.length == 1 && filtered[0].value == prefix + && !filtered[0].snippet) + return this.detach(); + if (this.autoInsert && !this.autoShown && filtered.length == 1) + return this.insertMatch(filtered[0]); + } + this.completions = !finished && this.showLoadingState ? + new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) : + completions; + this.openPopup(this.editor, prefix, keepPopupPosition); + this.popup.renderer.setStyle("ace_empty-message", false); + this.popup.renderer.setStyle("ace_loading", !finished); + }.bind(this)); + if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) { + this.$firstOpenTimer.delay(this.stickySelectionDelay / 2); + } + }; + Autocomplete.prototype.cancelContextMenu = function () { + this.editor.$mouseHandler.cancelContextMenu(); + }; + Autocomplete.prototype.updateDocTooltip = function () { + var popup = this.popup; + var all = this.completions.filtered; + var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); + var doc = null; + if (!selected || !this.editor || !this.popup.isOpen) + return this.hideDocTooltip(); + var completersLength = this.editor.completers.length; + for (var i = 0; i < completersLength; i++) { + var completer = this.editor.completers[i]; + if (completer.getDocTooltip && selected.completerId === completer.id) { + doc = completer.getDocTooltip(selected); + break; + } + } + if (!doc && typeof selected != "string") + doc = selected; + if (typeof doc == "string") + doc = { docText: doc }; + if (!doc || !(doc.docHTML || doc.docText)) + return this.hideDocTooltip(); + this.showDocTooltip(doc); + }; + Autocomplete.prototype.showDocTooltip = function (item) { + if (!this.tooltipNode) { + this.tooltipNode = dom.createElement("div"); + this.tooltipNode.style.margin = "0"; + this.tooltipNode.style.pointerEvents = "auto"; + this.tooltipNode.style.overscrollBehavior = "contain"; + this.tooltipNode.tabIndex = -1; + this.tooltipNode.onblur = this.blurListener.bind(this); + this.tooltipNode.onclick = this.onTooltipClick.bind(this); + this.tooltipNode.id = "doc-tooltip"; + this.tooltipNode.setAttribute("role", "tooltip"); + this.tooltipNode.addEventListener("wheel", preventParentScroll); + } + var theme = this.editor.renderer.theme; + this.tooltipNode.className = "ace_tooltip ace_doc-tooltip " + + (theme.isDark ? "ace_dark " : "") + (theme.cssClass || ""); + var tooltipNode = this.tooltipNode; + if (item.docHTML) { + tooltipNode.innerHTML = item.docHTML; + } + else if (item.docText) { + tooltipNode.textContent = item.docText; + } + if (!tooltipNode.parentNode) + this.popup.container.appendChild(this.tooltipNode); + var popup = this.popup; + var rect = popup.container.getBoundingClientRect(); + tooltipNode.style.top = popup.container.style.top; + tooltipNode.style.bottom = popup.container.style.bottom; + tooltipNode.style.display = "block"; + if (window.innerWidth - rect.right < 320) { + if (rect.left < 320) { + if (popup.isTopdown) { + tooltipNode.style.top = rect.bottom + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + else { + tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + } + else { + tooltipNode.style.right = window.innerWidth - rect.left + "px"; + tooltipNode.style.left = ""; + } + } + else { + tooltipNode.style.left = (rect.right + 1) + "px"; + tooltipNode.style.right = ""; + } + }; + Autocomplete.prototype.hideDocTooltip = function () { + this.tooltipTimer.cancel(); + if (!this.tooltipNode) + return; + var el = this.tooltipNode; + if (!this.editor.isFocused() && document.activeElement == el) + this.editor.focus(); + this.tooltipNode = null; + if (el.parentNode) + el.parentNode.removeChild(el); + }; + Autocomplete.prototype.onTooltipClick = function (e) { + var a = e.target; + while (a && a != this.tooltipNode) { + if (a.nodeName == "A" && a.href) { + a.rel = "noreferrer"; + a.target = "_blank"; + break; + } + a = a.parentNode; + } + }; + Autocomplete.prototype.destroy = function () { + this.detach(); + if (this.popup) { + this.popup.destroy(); + var el = this.popup.container; + if (el && el.parentNode) + el.parentNode.removeChild(el); + } + if (this.editor && this.editor.completer == this) { + this.editor.off("destroy", destroyCompleter); + this.editor.completer = null; + } + this.inlineRenderer = this.popup = this.editor = null; + }; + return Autocomplete; +}()); +Autocomplete.prototype.commands = { + "Up": function (editor) { editor.completer.goTo("up"); }, + "Down": function (editor) { editor.completer.goTo("down"); }, + "Ctrl-Up|Ctrl-Home": function (editor) { editor.completer.goTo("start"); }, + "Ctrl-Down|Ctrl-End": function (editor) { editor.completer.goTo("end"); }, + "Esc": function (editor) { editor.completer.detach(); }, + "Return": function (editor) { return editor.completer.insertMatch(); }, + "Shift-Return": function (editor) { editor.completer.insertMatch(null, { deleteSuffix: true }); }, + "Tab": function (editor) { + var result = editor.completer.insertMatch(); + if (!result && !editor.tabstopManager) + editor.completer.goTo("down"); + else + return result; + }, + "Backspace": function (editor) { + editor.execCommand("backspace"); + var prefix = util.getCompletionPrefix(editor); + if (!prefix && editor.completer) + editor.completer.detach(); + }, + "PageUp": function (editor) { editor.completer.popup.gotoPageUp(); }, + "PageDown": function (editor) { editor.completer.popup.gotoPageDown(); } +}; +Autocomplete.for = function (editor) { + if (editor.completer instanceof Autocomplete) { + return editor.completer; + } + if (editor.completer) { + editor.completer.destroy(); + editor.completer = null; + } + if (config.get("sharedPopups")) { + if (!Autocomplete["$sharedInstance"]) + Autocomplete["$sharedInstance"] = new Autocomplete(); + editor.completer = Autocomplete["$sharedInstance"]; + } + else { + editor.completer = new Autocomplete(); + editor.once("destroy", destroyCompleter); + } + return editor.completer; +}; +Autocomplete.startCommand = { + name: "startAutocomplete", + exec: function (editor, options) { + var completer = Autocomplete.for(editor); + completer.autoInsert = false; + completer.autoSelect = true; + completer.autoShown = false; + completer.showPopup(editor, options); + completer.cancelContextMenu(); + }, + bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" +}; +var CompletionProvider = /** @class */ (function () { + function CompletionProvider(initialPosition) { + this.initialPosition = initialPosition; + this.active = true; + } + CompletionProvider.prototype.insertByIndex = function (editor, index, options) { + if (!this.completions || !this.completions.filtered) { + return false; + } + return this.insertMatch(editor, this.completions.filtered[index], options); + }; + CompletionProvider.prototype.insertMatch = function (editor, data, options) { + if (!data) + return false; + editor.startOperation({ command: { name: "insertMatch" } }); + if (data.completer && data.completer.insertMatch) { + data.completer.insertMatch(editor, data); + } + else { + if (!this.completions) + return false; + var replaceBefore = this.completions.filterText.length; + var replaceAfter = 0; + if (data.range && data.range.start.row === data.range.end.row) { + replaceBefore -= this.initialPosition.prefix.length; + replaceBefore += this.initialPosition.pos.column - data.range.start.column; + replaceAfter += data.range.end.column - this.initialPosition.pos.column; + } + if (replaceBefore || replaceAfter) { + var ranges; + if (editor.selection.getAllRanges) { + ranges = editor.selection.getAllRanges(); + } + else { + ranges = [editor.getSelectionRange()]; + } + for (var i = 0, range; range = ranges[i]; i++) { + range.start.column -= replaceBefore; + range.end.column += replaceAfter; + editor.session.remove(range); + } + } + if (data.snippet) { + snippetManager.insertSnippet(editor, data.snippet); + } + else { + this.$insertString(editor, data); + } + if (data.completer && data.completer.onInsert && typeof data.completer.onInsert == "function") { + data.completer.onInsert(editor, data); + } + if (data.command && data.command === "startAutocomplete") { + editor.execCommand(data.command); + } + } + editor.endOperation(); + return true; + }; + CompletionProvider.prototype.$insertString = function (editor, data) { + var text = data.value || data; + editor.execCommand("insertstring", text); + }; + CompletionProvider.prototype.gatherCompletions = function (editor, callback) { + var session = editor.getSession(); + var pos = editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(editor); + var matches = []; + this.completers = editor.completers; + var total = editor.completers.length; + editor.completers.forEach(function (completer, i) { + completer.getCompletions(editor, session, pos, prefix, function (err, results) { + if (completer.hideInlinePreview) + results = results.map(function (result) { + return Object.assign(result, { hideInlinePreview: completer.hideInlinePreview }); + }); + if (!err && results) + matches = matches.concat(results); + callback(null, { + prefix: util.getCompletionPrefix(editor), + matches: matches, + finished: (--total === 0) + }); + }); + }); + return true; + }; + CompletionProvider.prototype.provideCompletions = function (editor, options, callback) { + var processResults = function (results) { + var prefix = results.prefix; + var matches = results.matches; + this.completions = new FilteredList(matches); + if (options.exactMatch) + this.completions.exactMatch = true; + if (options.ignoreCaption) + this.completions.ignoreCaption = true; + this.completions.setFilter(prefix); + if (results.finished || this.completions.filtered.length) + callback(null, this.completions, results.finished); + }.bind(this); + var isImmediate = true; + var immediateResults = null; + this.gatherCompletions(editor, function (err, results) { + if (!this.active) { + return; + } + if (err) { + callback(err, [], true); + this.detach(); + } + var prefix = results.prefix; + if (prefix.indexOf(results.prefix) !== 0) + return; + if (isImmediate) { + immediateResults = results; + return; + } + processResults(results); + }.bind(this)); + isImmediate = false; + if (immediateResults) { + var results = immediateResults; + immediateResults = null; + processResults(results); + } + }; + CompletionProvider.prototype.detach = function () { + this.active = false; + this.completers && this.completers.forEach(function (completer) { + if (typeof completer.cancel === "function") { + completer.cancel(); + } + }); + }; + return CompletionProvider; +}()); +var FilteredList = /** @class */ (function () { + function FilteredList(array, filterText) { + this.all = array; + this.filtered = array; + this.filterText = filterText || ""; + this.exactMatch = false; + this.ignoreCaption = false; + } + FilteredList.prototype.setFilter = function (str) { + if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) + var matches = this.filtered; + else + var matches = this.all; + this.filterText = str; + matches = this.filterCompletions(matches, this.filterText); + matches = matches.sort(function (a, b) { + return b.exactMatch - a.exactMatch || b.$score - a.$score + || (a.caption || a.value).localeCompare(b.caption || b.value); + }); + var prev = null; + matches = matches.filter(function (item) { + var caption = item.snippet || item.caption || item.value; + if (caption === prev) + return false; + prev = caption; + return true; + }); + this.filtered = matches; + }; + FilteredList.prototype.filterCompletions = function (items, needle) { + var results = []; + var upper = needle.toUpperCase(); + var lower = needle.toLowerCase(); + loop: for (var i = 0, item; item = items[i]; i++) { + var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet; + if (!caption) + continue; + var lastIndex = -1; + var matchMask = 0; + var penalty = 0; + var index, distance; + if (this.exactMatch) { + if (needle !== caption.substr(0, needle.length)) + continue loop; + } + else { + var fullMatchIndex = caption.toLowerCase().indexOf(lower); + if (fullMatchIndex > -1) { + penalty = fullMatchIndex; + } + else { + for (var j = 0; j < needle.length; j++) { + var i1 = caption.indexOf(lower[j], lastIndex + 1); + var i2 = caption.indexOf(upper[j], lastIndex + 1); + index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; + if (index < 0) + continue loop; + distance = index - lastIndex - 1; + if (distance > 0) { + if (lastIndex === -1) + penalty += 10; + penalty += distance; + matchMask = matchMask | (1 << j); + } + lastIndex = index; + } + } + } + item.matchMask = matchMask; + item.exactMatch = penalty ? 0 : 1; + item.$score = (item.score || 0) - penalty; + results.push(item); + } + return results; + }; + return FilteredList; +}()); +exports.Autocomplete = Autocomplete; +exports.CompletionProvider = CompletionProvider; +exports.FilteredList = FilteredList; + +}); + +define("ace/ext/command_bar",["require","exports","module","ace/tooltip","ace/lib/event_emitter","ace/lib/lang","ace/lib/dom","ace/lib/oop","ace/lib/useragent"], function(require, exports, module){var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var Tooltip = require("../tooltip").Tooltip; +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var useragent = require("../lib/useragent"); +var BUTTON_CLASS_NAME = 'command_bar_tooltip_button'; +var VALUE_CLASS_NAME = 'command_bar_button_value'; +var CAPTION_CLASS_NAME = 'command_bar_button_caption'; +var KEYBINDING_CLASS_NAME = 'command_bar_keybinding'; +var TOOLTIP_CLASS_NAME = 'command_bar_tooltip'; +var MORE_OPTIONS_BUTTON_ID = 'MoreOptionsButton'; +var defaultDelay = 100; +var defaultMaxElements = 4; +var minPosition = function (posA, posB) { + if (posB.row > posA.row) { + return posA; + } + else if (posB.row === posA.row && posB.column > posA.column) { + return posA; + } + return posB; +}; +var keyDisplayMap = { + "Ctrl": { mac: "^" }, + "Option": { mac: "⌥" }, + "Command": { mac: "⌘" }, + "Cmd": { mac: "⌘" }, + "Shift": "⇧", + "Left": "←", + "Right": "→", + "Up": "↑", + "Down": "↓" +}; +var CommandBarTooltip = /** @class */ (function () { + function CommandBarTooltip(parentNode, options) { + var e_1, _a; + options = options || {}; + this.parentNode = parentNode; + this.tooltip = new Tooltip(this.parentNode); + this.moreOptions = new Tooltip(this.parentNode); + this.maxElementsOnTooltip = options.maxElementsOnTooltip || defaultMaxElements; + this.$alwaysShow = options.alwaysShow || false; + this.eventListeners = {}; + this.elements = {}; + this.commands = {}; + this.tooltipEl = dom.buildDom(['div', { class: TOOLTIP_CLASS_NAME }], this.tooltip.getElement()); + this.moreOptionsEl = dom.buildDom(['div', { class: TOOLTIP_CLASS_NAME + " tooltip_more_options" }], this.moreOptions.getElement()); + this.$showTooltipTimer = lang.delayedCall(this.$showTooltip.bind(this), options.showDelay || defaultDelay); + this.$hideTooltipTimer = lang.delayedCall(this.$hideTooltip.bind(this), options.hideDelay || defaultDelay); + this.$tooltipEnter = this.$tooltipEnter.bind(this); + this.$onMouseMove = this.$onMouseMove.bind(this); + this.$onChangeScroll = this.$onChangeScroll.bind(this); + this.$onEditorChangeSession = this.$onEditorChangeSession.bind(this); + this.$scheduleTooltipForHide = this.$scheduleTooltipForHide.bind(this); + this.$preventMouseEvent = this.$preventMouseEvent.bind(this); + try { + for (var _b = __values(["mousedown", "mouseup", "click"]), _c = _b.next(); !_c.done; _c = _b.next()) { + var event = _c.value; + this.tooltip.getElement().addEventListener(event, this.$preventMouseEvent); + this.moreOptions.getElement().addEventListener(event, this.$preventMouseEvent); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + CommandBarTooltip.prototype.registerCommand = function (id, command) { + var registerForMainTooltip = Object.keys(this.commands).length < this.maxElementsOnTooltip; + if (!registerForMainTooltip && !this.elements[MORE_OPTIONS_BUTTON_ID]) { + this.$createCommand(MORE_OPTIONS_BUTTON_ID, { + name: "···", + exec: + function () { + this.$shouldHideMoreOptions = false; + this.$setMoreOptionsVisibility(!this.isMoreOptionsShown()); + }.bind(this), + type: "checkbox", + getValue: function () { + return this.isMoreOptionsShown(); + }.bind(this), + enabled: true + }, true); + } + this.$createCommand(id, command, registerForMainTooltip); + if (this.isShown()) { + this.updatePosition(); + } + }; + CommandBarTooltip.prototype.isShown = function () { + return !!this.tooltip && this.tooltip.isOpen; + }; + CommandBarTooltip.prototype.isMoreOptionsShown = function () { + return !!this.moreOptions && this.moreOptions.isOpen; + }; + CommandBarTooltip.prototype.getAlwaysShow = function () { + return this.$alwaysShow; + }; + CommandBarTooltip.prototype.setAlwaysShow = function (alwaysShow) { + this.$alwaysShow = alwaysShow; + this.$updateOnHoverHandlers(!this.$alwaysShow); + this._signal("alwaysShow", this.$alwaysShow); + }; + CommandBarTooltip.prototype.attach = function (editor) { + if (!editor || (this.isShown() && this.editor === editor)) { + return; + } + this.detach(); + this.editor = editor; + this.editor.on("changeSession", this.$onEditorChangeSession); + if (this.editor.session) { + this.editor.session.on("changeScrollLeft", this.$onChangeScroll); + this.editor.session.on("changeScrollTop", this.$onChangeScroll); + } + if (this.getAlwaysShow()) { + this.$showTooltip(); + } + else { + this.$updateOnHoverHandlers(true); + } + }; + CommandBarTooltip.prototype.updatePosition = function () { + if (!this.editor) { + return; + } + var renderer = this.editor.renderer; + var ranges; + if (this.editor.selection.getAllRanges) { + ranges = this.editor.selection.getAllRanges(); + } + else { + ranges = [this.editor.getSelectionRange()]; + } + if (!ranges.length) { + return; + } + var minPos = minPosition(ranges[0].start, ranges[0].end); + for (var i = 0, range; range = ranges[i]; i++) { + minPos = minPosition(minPos, minPosition(range.start, range.end)); + } + var pos = renderer.$cursorLayer.getPixelPosition(minPos, true); + var tooltipEl = this.tooltip.getElement(); + var screenWidth = window.innerWidth; + var screenHeight = window.innerHeight; + var rect = this.editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left + renderer.gutterWidth - renderer.scrollLeft; + var cursorVisible = pos.top >= rect.top && pos.top <= rect.bottom && + pos.left >= rect.left + renderer.gutterWidth && pos.left <= rect.right; + if (!cursorVisible && this.isShown()) { + this.$hideTooltip(); + return; + } + else if (cursorVisible && !this.isShown() && this.getAlwaysShow()) { + this.$showTooltip(); + return; + } + var top = pos.top - tooltipEl.offsetHeight; + var left = Math.min(screenWidth - tooltipEl.offsetWidth, pos.left); + var tooltipFits = top >= 0 && top + tooltipEl.offsetHeight <= screenHeight && + left >= 0 && left + tooltipEl.offsetWidth <= screenWidth; + if (!tooltipFits) { + this.$hideTooltip(); + return; + } + this.tooltip.setPosition(left, top); + if (this.isMoreOptionsShown()) { + top = top + tooltipEl.offsetHeight; + left = this.elements[MORE_OPTIONS_BUTTON_ID].getBoundingClientRect().left; + var moreOptionsEl = this.moreOptions.getElement(); + var screenHeight = window.innerHeight; + if (top + moreOptionsEl.offsetHeight > screenHeight) { + top -= tooltipEl.offsetHeight + moreOptionsEl.offsetHeight; + } + if (left + moreOptionsEl.offsetWidth > screenWidth) { + left = screenWidth - moreOptionsEl.offsetWidth; + } + this.moreOptions.setPosition(left, top); + } + }; + CommandBarTooltip.prototype.update = function () { + Object.keys(this.elements).forEach(this.$updateElement.bind(this)); + }; + CommandBarTooltip.prototype.detach = function () { + this.tooltip.hide(); + this.moreOptions.hide(); + this.$updateOnHoverHandlers(false); + if (this.editor) { + this.editor.off("changeSession", this.$onEditorChangeSession); + if (this.editor.session) { + this.editor.session.off("changeScrollLeft", this.$onChangeScroll); + this.editor.session.off("changeScrollTop", this.$onChangeScroll); + } + } + this.$mouseInTooltip = false; + this.editor = null; + }; + CommandBarTooltip.prototype.destroy = function () { + if (this.tooltip && this.moreOptions) { + this.detach(); + this.tooltip.destroy(); + this.moreOptions.destroy(); + } + this.eventListeners = {}; + this.commands = {}; + this.elements = {}; + this.tooltip = this.moreOptions = this.parentNode = null; + }; + CommandBarTooltip.prototype.$createCommand = function (id, command, forMainTooltip) { + var parentEl = forMainTooltip ? this.tooltipEl : this.moreOptionsEl; + var keyParts = []; + var bindKey = command.bindKey; + if (bindKey) { + if (typeof bindKey === 'object') { + bindKey = useragent.isMac ? bindKey.mac : bindKey.win; + } + bindKey = bindKey.split("|")[0]; + keyParts = bindKey.split("-"); + keyParts = keyParts.map(function (key) { + if (keyDisplayMap[key]) { + if (typeof keyDisplayMap[key] === 'string') { + return keyDisplayMap[key]; + } + else if (useragent.isMac && keyDisplayMap[key].mac) { + return keyDisplayMap[key].mac; + } + } + return key; + }); + } + var buttonNode; + if (forMainTooltip && command.iconCssClass) { + buttonNode = [ + 'div', + { + class: ["ace_icon_svg", command.iconCssClass].join(" "), + "aria-label": command.name + " (" + command.bindKey + ")" + } + ]; + } + else { + buttonNode = [ + ['div', { class: VALUE_CLASS_NAME }], + ['div', { class: CAPTION_CLASS_NAME }, command.name] + ]; + if (keyParts.length) { + buttonNode.push([ + 'div', + { class: KEYBINDING_CLASS_NAME }, + keyParts.map(function (keyPart) { + return ['div', keyPart]; + }) + ]); + } + } + dom.buildDom(['div', { class: [BUTTON_CLASS_NAME, command.cssClass || ""].join(" "), ref: id }, buttonNode], parentEl, this.elements); + this.commands[id] = command; + var eventListener = + function (e) { + if (this.editor) { + this.editor.focus(); + } + this.$shouldHideMoreOptions = this.isMoreOptionsShown(); + if (!this.elements[id].disabled && command.exec) { + command.exec(this.editor); + } + if (this.$shouldHideMoreOptions) { + this.$setMoreOptionsVisibility(false); + } + this.update(); + e.preventDefault(); + }.bind(this); + this.eventListeners[id] = eventListener; + this.elements[id].addEventListener('click', eventListener.bind(this)); + this.$updateElement(id); + }; + CommandBarTooltip.prototype.$setMoreOptionsVisibility = function (visible) { + if (visible) { + this.moreOptions.setTheme(this.editor.renderer.theme); + this.moreOptions.setClassName(TOOLTIP_CLASS_NAME + "_wrapper"); + this.moreOptions.show(); + this.update(); + this.updatePosition(); + } + else { + this.moreOptions.hide(); + } + }; + CommandBarTooltip.prototype.$onEditorChangeSession = function (e) { + if (e.oldSession) { + e.oldSession.off("changeScrollTop", this.$onChangeScroll); + e.oldSession.off("changeScrollLeft", this.$onChangeScroll); + } + this.detach(); + }; + CommandBarTooltip.prototype.$onChangeScroll = function () { + if (this.editor.renderer && (this.isShown() || this.getAlwaysShow())) { + this.editor.renderer.once("afterRender", this.updatePosition.bind(this)); + } + }; + CommandBarTooltip.prototype.$onMouseMove = function (e) { + if (this.$mouseInTooltip) { + return; + } + var cursorPosition = this.editor.getCursorPosition(); + var cursorScreenPosition = this.editor.renderer.textToScreenCoordinates(cursorPosition.row, cursorPosition.column); + var lineHeight = this.editor.renderer.lineHeight; + var isInCurrentLine = e.clientY >= cursorScreenPosition.pageY && e.clientY < cursorScreenPosition.pageY + lineHeight; + if (isInCurrentLine) { + if (!this.isShown() && !this.$showTooltipTimer.isPending()) { + this.$showTooltipTimer.delay(); + } + if (this.$hideTooltipTimer.isPending()) { + this.$hideTooltipTimer.cancel(); + } + } + else { + if (this.isShown() && !this.$hideTooltipTimer.isPending()) { + this.$hideTooltipTimer.delay(); + } + if (this.$showTooltipTimer.isPending()) { + this.$showTooltipTimer.cancel(); + } + } + }; + CommandBarTooltip.prototype.$preventMouseEvent = function (e) { + if (this.editor) { + this.editor.focus(); + } + e.preventDefault(); + }; + CommandBarTooltip.prototype.$scheduleTooltipForHide = function () { + this.$mouseInTooltip = false; + this.$showTooltipTimer.cancel(); + this.$hideTooltipTimer.delay(); + }; + CommandBarTooltip.prototype.$tooltipEnter = function () { + this.$mouseInTooltip = true; + if (this.$showTooltipTimer.isPending()) { + this.$showTooltipTimer.cancel(); + } + if (this.$hideTooltipTimer.isPending()) { + this.$hideTooltipTimer.cancel(); + } + }; + CommandBarTooltip.prototype.$updateOnHoverHandlers = function (enableHover) { + var tooltipEl = this.tooltip.getElement(); + var moreOptionsEl = this.moreOptions.getElement(); + if (enableHover) { + if (this.editor) { + this.editor.on("mousemove", this.$onMouseMove); + this.editor.renderer.getMouseEventTarget().addEventListener("mouseout", this.$scheduleTooltipForHide, true); + } + tooltipEl.addEventListener('mouseenter', this.$tooltipEnter); + tooltipEl.addEventListener('mouseleave', this.$scheduleTooltipForHide); + moreOptionsEl.addEventListener('mouseenter', this.$tooltipEnter); + moreOptionsEl.addEventListener('mouseleave', this.$scheduleTooltipForHide); + } + else { + if (this.editor) { + this.editor.off("mousemove", this.$onMouseMove); + this.editor.renderer.getMouseEventTarget().removeEventListener("mouseout", this.$scheduleTooltipForHide, true); + } + tooltipEl.removeEventListener('mouseenter', this.$tooltipEnter); + tooltipEl.removeEventListener('mouseleave', this.$scheduleTooltipForHide); + moreOptionsEl.removeEventListener('mouseenter', this.$tooltipEnter); + moreOptionsEl.removeEventListener('mouseleave', this.$scheduleTooltipForHide); + } + }; + CommandBarTooltip.prototype.$showTooltip = function () { + if (this.isShown()) { + return; + } + this.tooltip.setTheme(this.editor.renderer.theme); + this.tooltip.setClassName(TOOLTIP_CLASS_NAME + "_wrapper"); + this.tooltip.show(); + this.update(); + this.updatePosition(); + this._signal("show"); + }; + CommandBarTooltip.prototype.$hideTooltip = function () { + this.$mouseInTooltip = false; + if (!this.isShown()) { + return; + } + this.moreOptions.hide(); + this.tooltip.hide(); + this._signal("hide"); + }; + CommandBarTooltip.prototype.$updateElement = function (id) { + var command = this.commands[id]; + if (!command) { + return; + } + var el = this.elements[id]; + var commandEnabled = command.enabled; + if (typeof commandEnabled === 'function') { + commandEnabled = commandEnabled(this.editor); + } + if (typeof command.getValue === 'function') { + var value = command.getValue(this.editor); + if (command.type === 'text') { + el.textContent = value; + } + else if (command.type === 'checkbox') { + var domCssFn = value ? dom.addCssClass : dom.removeCssClass; + var isOnTooltip = el.parentElement === this.tooltipEl; + el.ariaChecked = value; + if (isOnTooltip) { + domCssFn(el, "ace_selected"); + } + else { + el = el.querySelector("." + VALUE_CLASS_NAME); + domCssFn(el, "ace_checkmark"); + } + } + } + if (commandEnabled && el.disabled) { + dom.removeCssClass(el, "ace_disabled"); + el.ariaDisabled = el.disabled = false; + el.removeAttribute("disabled"); + } + else if (!commandEnabled && !el.disabled) { + dom.addCssClass(el, "ace_disabled"); + el.ariaDisabled = el.disabled = true; + el.setAttribute("disabled", ""); + } + }; + return CommandBarTooltip; +}()); +oop.implement(CommandBarTooltip.prototype, EventEmitter); +dom.importCssString("\n.ace_tooltip.".concat(TOOLTIP_CLASS_NAME, "_wrapper {\n padding: 0;\n}\n\n.ace_tooltip .").concat(TOOLTIP_CLASS_NAME, " {\n padding: 1px 5px;\n display: flex;\n pointer-events: auto;\n}\n\n.ace_tooltip .").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options {\n padding: 1px;\n flex-direction: column;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, " {\n display: inline-flex;\n cursor: pointer;\n margin: 1px;\n border-radius: 2px;\n padding: 2px 5px;\n align-items: center;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, ".ace_selected,\ndiv.").concat(BUTTON_CLASS_NAME, ":hover:not(.ace_disabled) {\n background-color: rgba(0, 0, 0, 0.1);\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, ".ace_disabled {\n color: #777;\n pointer-events: none;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, " .ace_icon_svg {\n height: 12px;\n background-color: #000;\n}\n\ndiv.").concat(BUTTON_CLASS_NAME, ".ace_disabled .ace_icon_svg {\n background-color: #777;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options .").concat(BUTTON_CLASS_NAME, " {\n display: flex;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".").concat(VALUE_CLASS_NAME, " {\n display: none;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options .").concat(VALUE_CLASS_NAME, " {\n display: inline-block;\n width: 12px;\n}\n\n.").concat(CAPTION_CLASS_NAME, " {\n display: inline-block;\n}\n\n.").concat(KEYBINDING_CLASS_NAME, " {\n margin: 0 2px;\n display: inline-block;\n font-size: 8px;\n}\n\n.").concat(TOOLTIP_CLASS_NAME, ".tooltip_more_options .").concat(KEYBINDING_CLASS_NAME, " {\n margin-left: auto;\n}\n\n.").concat(KEYBINDING_CLASS_NAME, " div {\n display: inline-block;\n min-width: 8px;\n padding: 2px;\n margin: 0 1px;\n border-radius: 2px;\n background-color: #ccc;\n text-align: center;\n}\n\n.ace_dark.ace_tooltip .").concat(TOOLTIP_CLASS_NAME, " {\n background-color: #373737;\n color: #eee;\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ".ace_disabled {\n color: #979797;\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ".ace_selected,\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ":hover:not(.ace_disabled) {\n background-color: rgba(255, 255, 255, 0.1);\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, " .ace_icon_svg {\n background-color: #eee;\n}\n\n.ace_dark div.").concat(BUTTON_CLASS_NAME, ".ace_disabled .ace_icon_svg {\n background-color: #979797;\n}\n\n.ace_dark .").concat(BUTTON_CLASS_NAME, ".ace_disabled {\n color: #979797;\n}\n\n.ace_dark .").concat(KEYBINDING_CLASS_NAME, " div {\n background-color: #575757;\n}\n\n.ace_checkmark::before {\n content: '\u2713';\n}\n"), "commandbar.css", false); +exports.CommandBarTooltip = CommandBarTooltip; +exports.TOOLTIP_CLASS_NAME = TOOLTIP_CLASS_NAME; +exports.BUTTON_CLASS_NAME = BUTTON_CLASS_NAME; + +}); + +define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module){var Range = require("../range").Range; +var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; +function getWordIndex(doc, pos) { + var textBefore = doc.getTextRange(Range.fromPoints({ + row: 0, + column: 0 + }, pos)); + return textBefore.split(splitRegex).length - 1; +} +function wordDistance(doc, pos) { + var prefixPos = getWordIndex(doc, pos); + var words = doc.getValue().split(splitRegex); + var wordScores = Object.create(null); + var currentWord = words[prefixPos]; + words.forEach(function (word, idx) { + if (!word || word === currentWord) + return; + var distance = Math.abs(prefixPos - idx); + var score = words.length - distance; + if (wordScores[word]) { + wordScores[word] = Math.max(score, wordScores[word]); + } + else { + wordScores[word] = score; + } + }); + return wordScores; +} +exports.getCompletions = function (editor, session, pos, prefix, callback) { + var wordScore = wordDistance(session, pos); + var wordList = Object.keys(wordScore); + callback(null, wordList.map(function (word) { + return { + caption: word, + value: word, + score: wordScore[word], + meta: "local" + }; + })); +}; + +}); + +define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var snippetManager = require("../snippets").snippetManager; +var Autocomplete = require("../autocomplete").Autocomplete; +var config = require("../config"); +var lang = require("../lib/lang"); +var util = require("../autocomplete/util"); +var textCompleter = require("../autocomplete/text_completer"); +var keyWordCompleter = { + getCompletions: function (editor, session, pos, prefix, callback) { + if (session.$mode.completer) { + return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback); + } + var state = editor.session.getState(pos.row); + var completions = session.$mode.getCompletions(state, session, pos, prefix); + completions = completions.map(function (el) { + el.completerId = keyWordCompleter.id; + return el; + }); + callback(null, completions); + }, + id: "keywordCompleter" +}; +var transformSnippetTooltip = function (str) { + var record = {}; + return str.replace(/\${(\d+)(:(.*?))?}/g, function (_, p1, p2, p3) { + return (record[p1] = p3 || ''); + }).replace(/\$(\d+?)/g, function (_, p1) { + return record[p1]; + }); +}; +var snippetCompleter = { + getCompletions: function (editor, session, pos, prefix, callback) { + var scopes = []; + var token = session.getTokenAt(pos.row, pos.column); + if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)) + scopes.push('html-tag'); + else + scopes = snippetManager.getActiveScopes(editor); + var snippetMap = snippetManager.snippetMap; + var completions = []; + scopes.forEach(function (scope) { + var snippets = snippetMap[scope] || []; + for (var i = snippets.length; i--;) { + var s = snippets[i]; + var caption = s.name || s.tabTrigger; + if (!caption) + continue; + completions.push({ + caption: caption, + snippet: s.content, + meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet", + completerId: snippetCompleter.id + }); + } + }, this); + callback(null, completions); + }, + getDocTooltip: function (item) { + if (item.snippet && !item.docHTML) { + item.docHTML = [ + "", lang.escapeHTML(item.caption), "", "
", + lang.escapeHTML(transformSnippetTooltip(item.snippet)) + ].join(""); + } + }, + id: "snippetCompleter" +}; +var completers = [snippetCompleter, textCompleter, keyWordCompleter]; +exports.setCompleters = function (val) { + completers.length = 0; + if (val) + completers.push.apply(completers, val); +}; +exports.addCompleter = function (completer) { + completers.push(completer); +}; +exports.textCompleter = textCompleter; +exports.keyWordCompleter = keyWordCompleter; +exports.snippetCompleter = snippetCompleter; +var expandSnippet = { + name: "expandSnippet", + exec: function (editor) { + return snippetManager.expandWithTab(editor); + }, + bindKey: "Tab" +}; +var onChangeMode = function (e, editor) { + loadSnippetsForMode(editor.session.$mode); +}; +var loadSnippetsForMode = function (mode) { + if (typeof mode == "string") + mode = config.$modes[mode]; + if (!mode) + return; + if (!snippetManager.files) + snippetManager.files = {}; + loadSnippetFile(mode.$id, mode.snippetFileId); + if (mode.modes) + mode.modes.forEach(loadSnippetsForMode); +}; +var loadSnippetFile = function (id, snippetFilePath) { + if (!snippetFilePath || !id || snippetManager.files[id]) + return; + snippetManager.files[id] = {}; + config.loadModule(snippetFilePath, function (m) { + if (!m) + return; + snippetManager.files[id] = m; + if (!m.snippets && m.snippetText) + m.snippets = snippetManager.parseSnippetFile(m.snippetText); + snippetManager.register(m.snippets || [], m.scope); + if (m.includeScopes) { + snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes; + m.includeScopes.forEach(function (x) { + loadSnippetsForMode("ace/mode/" + x); + }); + } + }); +}; +var doLiveAutocomplete = function (e) { + var editor = e.editor; + var hasCompleter = editor.completer && editor.completer.activated; + if (e.command.name === "backspace") { + if (hasCompleter && !util.getCompletionPrefix(editor)) + editor.completer.detach(); + } + else if (e.command.name === "insertstring" && !hasCompleter) { + lastExecEvent = e; + var delay = e.editor.$liveAutocompletionDelay; + if (delay) { + liveAutocompleteTimer.delay(delay); + } + else { + showLiveAutocomplete(e); + } + } +}; +var lastExecEvent; +var liveAutocompleteTimer = lang.delayedCall(function () { + showLiveAutocomplete(lastExecEvent); +}, 0); +var showLiveAutocomplete = function (e) { + var editor = e.editor; + var prefix = util.getCompletionPrefix(editor); + var previousChar = e.args; + var triggerAutocomplete = util.triggerAutocomplete(editor, previousChar); + if (prefix && prefix.length >= editor.$liveAutocompletionThreshold || triggerAutocomplete) { + var completer = Autocomplete.for(editor); + completer.autoShown = true; + completer.showPopup(editor); + } +}; +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + enableBasicAutocompletion: { + set: function (val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val) ? val : completers; + this.commands.addCommand(Autocomplete.startCommand); + } + else { + this.commands.removeCommand(Autocomplete.startCommand); + } + }, + value: false + }, + enableLiveAutocompletion: { + set: function (val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val) ? val : completers; + this.commands.on('afterExec', doLiveAutocomplete); + } + else { + this.commands.off('afterExec', doLiveAutocomplete); + } + }, + value: false + }, + liveAutocompletionDelay: { + initialValue: 0 + }, + liveAutocompletionThreshold: { + initialValue: 0 + }, + enableSnippets: { + set: function (val) { + if (val) { + this.commands.addCommand(expandSnippet); + this.on("changeMode", onChangeMode); + onChangeMode(null, this); + } + else { + this.commands.removeCommand(expandSnippet); + this.off("changeMode", onChangeMode); + } + }, + value: false + } +}); + +}); + +define("ace/ext/inline_autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/inline","ace/autocomplete","ace/autocomplete","ace/editor","ace/autocomplete/util","ace/lib/dom","ace/lib/lang","ace/ext/command_bar","ace/ext/command_bar","ace/ext/language_tools","ace/ext/language_tools","ace/ext/language_tools","ace/config"], function(require, exports, module){"use strict"; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var AceInline = require("../autocomplete/inline").AceInline; +var FilteredList = require("../autocomplete").FilteredList; +var CompletionProvider = require("../autocomplete").CompletionProvider; +var Editor = require("../editor").Editor; +var util = require("../autocomplete/util"); +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var CommandBarTooltip = require("./command_bar").CommandBarTooltip; +var BUTTON_CLASS_NAME = require("./command_bar").BUTTON_CLASS_NAME; +var snippetCompleter = require("./language_tools").snippetCompleter; +var textCompleter = require("./language_tools").textCompleter; +var keyWordCompleter = require("./language_tools").keyWordCompleter; +var destroyCompleter = function (e, editor) { + editor.completer && editor.completer.destroy(); +}; +var InlineAutocomplete = /** @class */ (function () { + function InlineAutocomplete(editor) { + this.editor = editor; + this.keyboardHandler = new HashHandler(this.commands); + this.$index = -1; + this.blurListener = this.blurListener.bind(this); + this.changeListener = this.changeListener.bind(this); + this.changeTimer = lang.delayedCall(function () { + this.updateCompletions(); + }.bind(this)); + } + InlineAutocomplete.prototype.getInlineRenderer = function () { + if (!this.inlineRenderer) + this.inlineRenderer = new AceInline(); + return this.inlineRenderer; + }; + InlineAutocomplete.prototype.getInlineTooltip = function () { + if (!this.inlineTooltip) { + this.inlineTooltip = InlineAutocomplete.createInlineTooltip(document.body || document.documentElement); + } + return this.inlineTooltip; + }; + InlineAutocomplete.prototype.show = function (options) { + this.activated = true; + if (this.editor.completer !== this) { + if (this.editor.completer) + this.editor.completer.detach(); + this.editor.completer = this; + } + this.editor.on("changeSelection", this.changeListener); + this.editor.on("blur", this.blurListener); + this.updateCompletions(options); + }; + InlineAutocomplete.prototype.$open = function () { + if (this.editor.textInput.setAriaOptions) { + this.editor.textInput.setAriaOptions({}); + } + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + this.getInlineTooltip().attach(this.editor); + if (this.$index === -1) { + this.setIndex(0); + } + else { + this.$showCompletion(); + } + this.changeTimer.cancel(); + }; + InlineAutocomplete.prototype.insertMatch = function () { + var result = this.getCompletionProvider().insertByIndex(this.editor, this.$index); + this.detach(); + return result; + }; + InlineAutocomplete.prototype.changeListener = function (e) { + var cursor = this.editor.selection.lead; + if (cursor.row != this.base.row || cursor.column < this.base.column) { + this.detach(); + } + if (this.activated) + this.changeTimer.schedule(); + else + this.detach(); + }; + InlineAutocomplete.prototype.blurListener = function (e) { + this.detach(); + }; + InlineAutocomplete.prototype.goTo = function (where) { + if (!this.completions || !this.completions.filtered) { + return; + } + var completionLength = this.completions.filtered.length; + switch (where.toLowerCase()) { + case "prev": + this.setIndex((this.$index - 1 + completionLength) % completionLength); + break; + case "next": + this.setIndex((this.$index + 1 + completionLength) % completionLength); + break; + case "first": + this.setIndex(0); + break; + case "last": + this.setIndex(this.completions.filtered.length - 1); + break; + } + }; + InlineAutocomplete.prototype.getLength = function () { + if (!this.completions || !this.completions.filtered) { + return 0; + } + return this.completions.filtered.length; + }; + InlineAutocomplete.prototype.getData = function (index) { + if (index == undefined || index === null) { + return this.completions.filtered[this.$index]; + } + else { + return this.completions.filtered[index]; + } + }; + InlineAutocomplete.prototype.getIndex = function () { + return this.$index; + }; + InlineAutocomplete.prototype.isOpen = function () { + return this.$index >= 0; + }; + InlineAutocomplete.prototype.setIndex = function (value) { + if (!this.completions || !this.completions.filtered) { + return; + } + var newIndex = Math.max(-1, Math.min(this.completions.filtered.length - 1, value)); + if (newIndex !== this.$index) { + this.$index = newIndex; + this.$showCompletion(); + } + }; + InlineAutocomplete.prototype.getCompletionProvider = function (initialPosition) { + if (!this.completionProvider) + this.completionProvider = new CompletionProvider(initialPosition); + return this.completionProvider; + }; + InlineAutocomplete.prototype.$showCompletion = function () { + if (!this.getInlineRenderer().show(this.editor, this.completions.filtered[this.$index], this.completions.filterText)) { + this.getInlineRenderer().hide(); + } + if (this.inlineTooltip && this.inlineTooltip.isShown()) { + this.inlineTooltip.update(); + } + }; + InlineAutocomplete.prototype.$updatePrefix = function () { + var pos = this.editor.getCursorPosition(); + var prefix = this.editor.session.getTextRange({ start: this.base, end: pos }); + this.completions.setFilter(prefix); + if (!this.completions.filtered.length) + return this.detach(); + if (this.completions.filtered.length == 1 + && this.completions.filtered[0].value == prefix + && !this.completions.filtered[0].snippet) + return this.detach(); + this.$open(this.editor, prefix); + return prefix; + }; + InlineAutocomplete.prototype.updateCompletions = function (options) { + var prefix = ""; + if (options && options.matches) { + var pos = this.editor.getSelectionRange().start; + this.base = this.editor.session.doc.createAnchor(pos.row, pos.column); + this.base.$insertRight = true; + this.completions = new FilteredList(options.matches); + return this.$open(this.editor, ""); + } + if (this.base && this.completions) { + prefix = this.$updatePrefix(); + } + var session = this.editor.getSession(); + var pos = this.editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(this.editor); + this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); + this.base.$insertRight = true; + var options = { + exactMatch: true, + ignoreCaption: true + }; + this.getCompletionProvider({ + prefix: prefix, + base: this.base, + pos: pos + }).provideCompletions(this.editor, options, + function (err, completions, finished) { + var filtered = completions.filtered; + var prefix = util.getCompletionPrefix(this.editor); + if (finished) { + if (!filtered.length) + return this.detach(); + if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet) + return this.detach(); + } + this.completions = completions; + this.$open(this.editor, prefix); + }.bind(this)); + }; + InlineAutocomplete.prototype.detach = function () { + if (this.editor) { + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.off("changeSelection", this.changeListener); + this.editor.off("blur", this.blurListener); + } + this.changeTimer.cancel(); + if (this.inlineTooltip) { + this.inlineTooltip.detach(); + } + this.setIndex(-1); + if (this.completionProvider) { + this.completionProvider.detach(); + } + if (this.inlineRenderer && this.inlineRenderer.isOpen()) { + this.inlineRenderer.hide(); + } + if (this.base) + this.base.detach(); + this.activated = false; + this.completionProvider = this.completions = this.base = null; + }; + InlineAutocomplete.prototype.destroy = function () { + this.detach(); + if (this.inlineRenderer) + this.inlineRenderer.destroy(); + if (this.inlineTooltip) + this.inlineTooltip.destroy(); + if (this.editor && this.editor.completer == this) { + this.editor.off("destroy", destroyCompleter); + this.editor.completer = null; + } + this.inlineTooltip = this.editor = this.inlineRenderer = null; + }; + InlineAutocomplete.prototype.updateDocTooltip = function () { + }; + return InlineAutocomplete; +}()); +InlineAutocomplete.prototype.commands = { + "Previous": { + bindKey: "Alt-[", + name: "Previous", + exec: function (editor) { + editor.completer.goTo("prev"); + } + }, + "Next": { + bindKey: "Alt-]", + name: "Next", + exec: function (editor) { + editor.completer.goTo("next"); + } + }, + "Accept": { + bindKey: { win: "Tab|Ctrl-Right", mac: "Tab|Cmd-Right" }, + name: "Accept", + exec: function (editor) { + return /**@type{InlineAutocomplete}*/ (editor.completer).insertMatch(); + } + }, + "Close": { + bindKey: "Esc", + name: "Close", + exec: function (editor) { + editor.completer.detach(); + } + } +}; +InlineAutocomplete.for = function (editor) { + if (editor.completer instanceof InlineAutocomplete) { + return editor.completer; + } + if (editor.completer) { + editor.completer.destroy(); + editor.completer = null; + } + editor.completer = new InlineAutocomplete(editor); + editor.once("destroy", destroyCompleter); + return editor.completer; +}; +InlineAutocomplete.startCommand = { + name: "startInlineAutocomplete", + exec: function (editor, options) { + var completer = InlineAutocomplete.for(editor); + completer.show(options); + }, + bindKey: { win: "Alt-C", mac: "Option-C" } +}; +var completers = [snippetCompleter, textCompleter, keyWordCompleter]; +require("../config").defineOptions(Editor.prototype, "editor", { + enableInlineAutocompletion: { + set: function (val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val) ? val : completers; + this.commands.addCommand(InlineAutocomplete.startCommand); + } + else { + this.commands.removeCommand(InlineAutocomplete.startCommand); + } + }, + value: false + } +}); +InlineAutocomplete.createInlineTooltip = function (parentEl) { + var inlineTooltip = new CommandBarTooltip(parentEl); + inlineTooltip.registerCommand("Previous", + Object.assign({}, InlineAutocomplete.prototype.commands["Previous"], { + enabled: true, + type: "button", + iconCssClass: "ace_arrow_rotated" + })); + inlineTooltip.registerCommand("Position", { + enabled: false, + getValue: function (editor) { + return editor ? [ + (editor.completer).getIndex() + 1, /**@type{InlineAutocomplete}*/ (editor.completer).getLength() + ].join("/") : ""; + }, + type: "text", + cssClass: "completion_position" + }); + inlineTooltip.registerCommand("Next", + Object.assign({}, InlineAutocomplete.prototype.commands["Next"], { + enabled: true, + type: "button", + iconCssClass: "ace_arrow" + })); + inlineTooltip.registerCommand("Accept", + Object.assign({}, InlineAutocomplete.prototype.commands["Accept"], { + enabled: function (editor) { + return !!editor && editor.completer.getIndex() >= 0; + }, + type: "button" + })); + inlineTooltip.registerCommand("ShowTooltip", { + name: "Always Show Tooltip", + exec: function () { + inlineTooltip.setAlwaysShow(!inlineTooltip.getAlwaysShow()); + }, + enabled: true, + getValue: function () { + return inlineTooltip.getAlwaysShow(); + }, + type: "checkbox" + }); + return inlineTooltip; +}; +dom.importCssString("\n\n.ace_icon_svg.ace_arrow,\n.ace_icon_svg.ace_arrow_rotated {\n -webkit-mask-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODM3MDEgMTVMNC41ODc1MSAxMy43MTU1TDEwLjE0NjggOEw0LjU4NzUxIDIuMjg0NDZMNS44MzcwMSAxTDEyLjY0NjUgOEw1LjgzNzAxIDE1WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=\");\n}\n\n.ace_icon_svg.ace_arrow_rotated {\n transform: rotate(180deg);\n}\n\ndiv.".concat(BUTTON_CLASS_NAME, ".completion_position {\n padding: 0;\n}\n"), "inlineautocomplete.css", false); +exports.InlineAutocomplete = InlineAutocomplete; + +}); (function() { + window.require(["ace/ext/inline_autocomplete"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-keybinding_menu.js b/ui/base1/ace/ext-keybinding_menu.js new file mode 100644 index 0000000..0394155 --- /dev/null +++ b/ui/base1/ace/ext-keybinding_menu.js @@ -0,0 +1,136 @@ +define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"], function(require, exports, module){module.exports = "#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"; + +}); + +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +'use strict'; +var dom = require("../../lib/dom"); +var cssText = require("./settings_menu.css"); +dom.importCssString(cssText, "settings_menu.css", false); +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + var ignoreFocusOut = false; + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + function close() { + if (!closer) + return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + if (editor) { + editor.focus(); + } + closer = null; + callback && callback(); + } + function setIgnoreFocusOut(ignore) { + ignoreFocusOut = ignore; + if (ignore) { + closer.style.pointerEvents = "none"; + contentElement.style.pointerEvents = "auto"; + } + } + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + (editor ? 'background-color: rgba(0, 0, 0, 0.3);' : ''); + closer.addEventListener('click', function (e) { + if (!ignoreFocusOut) { + close(); + } + }); + document.addEventListener('keydown', documentEscListener); + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + closer.appendChild(contentElement); + document.body.appendChild(closer); + if (editor) { + editor.blur(); + } + return { + close: close, + setIgnoreFocusOut: setIgnoreFocusOut + }; +}; + +}); + +define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +"use strict"; var keys = require("../../lib/keys"); +module.exports.getEditorKeybordShortcuts = function (editor) { + var KEY_MODS = keys.KEY_MODS; + var keybindings = []; + var commandMap = {}; + editor.keyBinding.$handlers.forEach(function (handler) { + var ckb = handler["commandKeyBinding"]; + for (var i in ckb) { + var key = i.replace(/(^|-)\w/g, function (x) { return x.toUpperCase(); }); + var commands = ckb[i]; + if (!Array.isArray(commands)) + commands = [commands]; + commands.forEach(function (command) { + if (typeof command != "string") + command = command.name; + if (commandMap[command]) { + commandMap[command].key += "|" + key; + } + else { + commandMap[command] = { key: key, command: command }; + keybindings.push(commandMap[command]); + } + }); + } + }); + return keybindings; +}; + +}); + +define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +"use strict"; +var Editor = require("../editor").Editor; +function showKeyboardShortcuts(editor) { + if (!document.getElementById('kbshortcutmenu')) { + var overlayPage = require('./menu_tools/overlay_page').overlayPage; + var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts; + var kb = getEditorKeybordShortcuts(editor); + var el = document.createElement('div'); + var commands = kb.reduce(function (previous, current) { + return previous + '
' + + current.command + ' : ' + + '' + current.key + '
'; + }, ''); + el.id = 'kbshortcutmenu'; + el.innerHTML = '

Keyboard Shortcuts

' + commands + '
'; + overlayPage(editor, el); + } +} +module.exports.init = function (editor) { + Editor.prototype.showKeyboardShortcuts = function () { + showKeyboardShortcuts(this); + }; + editor.commands.addCommands([{ + name: "showKeyboardShortcuts", + bindKey: { + win: "Ctrl-Alt-h", + mac: "Command-Alt-h" + }, + exec: + function (editor, line) { + editor.showKeyboardShortcuts(); + } + }]); +}; + +}); (function() { + window.require(["ace/ext/keybinding_menu"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-language_tools.js b/ui/base1/ace/ext-language_tools.js new file mode 100644 index 0000000..83f8f9d --- /dev/null +++ b/ui/base1/ace/ext-language_tools.js @@ -0,0 +1,2577 @@ +define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module){"use strict"; +var dom = require("./lib/dom"); +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var RangeList = require("./range_list").RangeList; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var Tokenizer = require("./tokenizer").Tokenizer; +var clipboard = require("./clipboard"); +var VARIABLES = { + CURRENT_WORD: function (editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function (editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function (editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function (editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function (editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function (editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function (editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function (editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function (editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function () { return "Unknown"; }, + FULLNAME: function () { return "Unknown"; }, + BLOCK_COMMENT_START: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function (editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, { year: "numeric" }), + CURRENT_YEAR_SHORT: date.bind(null, { year: "2-digit" }), + CURRENT_MONTH: date.bind(null, { month: "numeric" }), + CURRENT_MONTH_NAME: date.bind(null, { month: "long" }), + CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: "short" }), + CURRENT_DATE: date.bind(null, { day: "2-digit" }), + CURRENT_DAY_NAME: date.bind(null, { weekday: "long" }), + CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: "short" }), + CURRENT_HOUR: date.bind(null, { hour: "2-digit", hour12: false }), + CURRENT_MINUTE: date.bind(null, { minute: "2-digit" }), + CURRENT_SECOND: date.bind(null, { second: "2-digit" }) +}; +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} +var SnippetManager = /** @class */ (function () { + function SnippetManager() { + this.snippetMap = {}; + this.snippetNameMap = {}; + this.variables = VARIABLES; + } + SnippetManager.prototype.getTokenizer = function () { + return SnippetManager["$tokenizer"] || this.createTokenizer(); + }; + SnippetManager.prototype.createTokenizer = function () { + function TabstopToken(str) { + str = str.substr(1); + if (/^\d+$/.test(str)) + return [{ tabstopId: parseInt(str, 10) }]; + return [{ text: str }]; + } + function escape(ch) { + return "(?:[^\\\\" + ch + "]|\\\\.)"; + } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + SnippetManager["$tokenizer"] = new Tokenizer({ + start: [ + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) { + val = ch; + } + else if ("`$\\".indexOf(ch) != -1) { + val = ch; + } + return [val]; + } }, + { regex: /}/, onMatch: function (val, state, stack) { + return [stack.length ? stack.shift() : val]; + } }, + { regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken }, + { regex: /\$\{[\dA-Z_a-z]+/, onMatch: function (str, state, stack) { + var t = TabstopToken(str.substr(1)); + stack.unshift(t[0]); + return t; + }, next: "snippetVar" }, + { regex: /\n/, token: "newline", merge: false } + ], + snippetVar: [ + { regex: "\\|" + escape("\\|") + "*\\|", onMatch: function (val, state, stack) { + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function (operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00").map(function (value) { + return { value: value }; + }); + stack[0].choices = choices; + return [choices[0]]; + }, next: "start" }, + formatMatcher, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start" } + ], + formatString: [ + { regex: /:/, onMatch: function (val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = { elseEnd: stack[0] }; + return [stack[0].ifEnd]; + } + return ":"; + } }, + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = { changeCase: ch, local: ch > "a" }; + return [val]; + } }, + { regex: "/\\w*}", onMatch: function (val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" }, + { regex: /\$(?:\d+|\w+)/, onMatch: function (val, state, stack) { + return [{ text: val.slice(1) }]; + } }, + { regex: /\${\w+/, onMatch: function (val, state, stack) { + var token = { text: val.slice(2) }; + stack.unshift(token); + return [token]; + }, next: "formatStringVar" }, + { regex: /\n/, token: "newline", merge: false }, + { regex: /}/, onMatch: function (val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" } + ], + formatStringVar: [ + { regex: /:\/\w+}/, onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString" }, + formatMatcher, + { regex: /:[\?\-+]?/, onMatch: function (val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString" }, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString" } + ] + }); + return SnippetManager["$tokenizer"]; + }; + SnippetManager.prototype.tokenizeTmSnippet = function (str, startState) { + return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) { + return x.value || x; + }); + }; + SnippetManager.prototype.getVariableValue = function (editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + name = name.replace(/^TM_/, ""); + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; + }; + SnippetManager.prototype.tmStrFormat = function (str, ch, editor) { + if (!ch.fmt) + return str; + var flag = ch.flag || ""; + var re = ch.guard; + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; + var _self = this; + var formatted = str.replace(re, function () { + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); + var fmtParts = _self.resolveVariables(fmtTokens, editor); + var gChangeCase = "E"; + for (var i = 0; i < fmtParts.length; i++) { + var ch = fmtParts[i]; + if (typeof ch == "object") { + fmtParts[i] = ""; + if (ch.changeCase && ch.local) { + var next = fmtParts[i + 1]; + if (next && typeof next == "string") { + if (ch.changeCase == "u") + fmtParts[i] = next[0].toUpperCase(); + else + fmtParts[i] = next[0].toLowerCase(); + fmtParts[i + 1] = next.substr(1); + } + } + else if (ch.changeCase) { + gChangeCase = ch.changeCase; + } + } + else if (gChangeCase == "U") { + fmtParts[i] = ch.toUpperCase(); + } + else if (gChangeCase == "L") { + fmtParts[i] = ch.toLowerCase(); + } + } + _self.variables.__ = oldArgs; + return fmtParts.join(""); + }); + return formatted; + }; + SnippetManager.prototype.tmFormatFunction = function (str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; + SnippetManager.prototype.resolveVariables = function (snippet, editor) { + var result = []; + var indentation = ""; + var afterNewLine = true; + for (var i = 0; i < snippet.length; i++) { + var ch = snippet[i]; + if (typeof ch == "string") { + result.push(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; + } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) + continue; + afterNewLine = false; + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) + j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } + else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } + else if (ch.elseEnd) { + gotoNext(ch.elseEnd); + } + else if (ch.tabstopId != null) { + result.push(ch); + } + else if (ch.changeCase != null) { + result.push(ch); + } + } + function gotoNext(ch) { + var i1 = snippet.indexOf(ch, i + 1); + if (i1 != -1) + i = i1; + } + return result; + }; + SnippetManager.prototype.getDisplayTextForSnippet = function (editor, snippetText) { + var processedSnippet = processSnippetText.call(this, editor, snippetText); + return processedSnippet.text; + }; + SnippetManager.prototype.insertSnippetForSelection = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var processedSnippet = processSnippetText.call(this, editor, snippetText, options); + var range = editor.getSelectionRange(); + var end = editor.session.replace(range, processedSnippet.text); + var tabstopManager = new TabstopManager(editor); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(processedSnippet.tabstops, range.start, end, selectionId); + }; + SnippetManager.prototype.insertSnippet = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText, options); + editor.forEachSelection(function () { + self.insertSnippetForSelection(editor, snippetText, options); + }, null, { keepOrder: true }); + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); + }; + SnippetManager.prototype.$getScope = function (editor) { + var scope = editor.session.$mode.$id || ""; + scope = scope.split("/").pop(); + if (scope === "html" || scope === "php") { + if (scope === "php" && !editor.session.$mode.inlinePhp) + scope = "html"; + var c = editor.getCursorPosition(); + var state = editor.session.getState(c.row); + if (typeof state === "object") { + state = state[0]; + } + if (state.substring) { + if (state.substring(0, 3) == "js-") + scope = "javascript"; + else if (state.substring(0, 4) == "css-") + scope = "css"; + else if (state.substring(0, 4) == "php-") + scope = "php"; + } + } + return scope; + }; + SnippetManager.prototype.getActiveScopes = function (editor) { + var scope = this.$getScope(editor); + var scopes = [scope]; + var snippetMap = this.snippetMap; + if (snippetMap[scope] && snippetMap[scope].includeScopes) { + scopes.push.apply(scopes, snippetMap[scope].includeScopes); + } + scopes.push("_"); + return scopes; + }; + SnippetManager.prototype.expandWithTab = function (editor, options) { + var self = this; + var result = editor.forEachSelection(function () { + return self.expandSnippetForSelection(editor, options); + }, null, { keepOrder: true }); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + SnippetManager.prototype.expandSnippetForSelection = function (editor, options) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var before = line.substring(0, cursor.column); + var after = line.substr(cursor.column); + var snippetMap = this.snippetMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = this.findMatchingSnippet(snippets, before, after); + return !!snippet; + }, this); + if (!snippet) + return false; + if (options && options.dryRun) + return true; + editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length); + this.variables.M__ = snippet.matchBefore; + this.variables.T__ = snippet.matchAfter; + this.insertSnippetForSelection(editor, snippet.content); + this.variables.M__ = this.variables.T__ = null; + return true; + }; + SnippetManager.prototype.findMatchingSnippet = function (snippetList, before, after) { + for (var i = snippetList.length; i--;) { + var s = snippetList[i]; + if (s.startRe && !s.startRe.test(before)) + continue; + if (s.endRe && !s.endRe.test(after)) + continue; + if (!s.startRe && !s.endRe) + continue; + s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; + s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; + s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; + s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; + return s; + } + }; + SnippetManager.prototype.register = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + var self = this; + if (!snippets) + snippets = []; + function wrapRegexp(src) { + if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) + src = "(?:" + src + ")"; + return src || ""; + } + function guardedRegexp(re, guard, opening) { + re = wrapRegexp(re); + guard = wrapRegexp(guard); + if (opening) { + re = guard + re; + if (re && re[re.length - 1] != "$") + re = re + "$"; + } + else { + re = re + guard; + if (re && re[0] != "^") + re = "^" + re; + } + return new RegExp(re); + } + function addSnippet(s) { + if (!s.scope) + s.scope = scope || "_"; + scope = s.scope; + if (!snippetMap[scope]) { + snippetMap[scope] = []; + snippetNameMap[scope] = {}; + } + var map = snippetNameMap[scope]; + if (s.name) { + var old = map[s.name]; + if (old) + self.unregister(old); + map[s.name] = s; + } + snippetMap[scope].push(s); + if (s.prefix) + s.tabTrigger = s.prefix; + if (!s.content && s.body) + s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body; + if (s.tabTrigger && !s.trigger) { + if (!s.guard && /^\w/.test(s.tabTrigger)) + s.guard = "\\b"; + s.trigger = lang.escapeRegExp(s.tabTrigger); + } + if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) + return; + s.startRe = guardedRegexp(s.trigger, s.guard, true); + s.triggerRe = new RegExp(s.trigger); + s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); + s.endTriggerRe = new RegExp(s.endTrigger); + } + if (Array.isArray(snippets)) { + snippets.forEach(addSnippet); + } + else { + Object.keys(snippets).forEach(function (key) { + addSnippet(snippets[key]); + }); + } + this._signal("registerSnippets", { scope: scope }); + }; + SnippetManager.prototype.unregister = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + function removeSnippet(s) { + var nameMap = snippetNameMap[s.scope || scope]; + if (nameMap && nameMap[s.name]) { + delete nameMap[s.name]; + var map = snippetMap[s.scope || scope]; + var i = map && map.indexOf(s); + if (i >= 0) + map.splice(i, 1); + } + } + if (snippets.content) + removeSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(removeSnippet); + }; + SnippetManager.prototype.parseSnippetFile = function (str) { + str = str.replace(/\r/g, ""); + var list = [], /**@type{Snippet}*/ snippet = {}; + var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; + var m; + while (m = re.exec(str)) { + if (m[1]) { + try { + snippet = JSON.parse(m[1]); + list.push(snippet); + } + catch (e) { } + } + if (m[4]) { + snippet.content = m[4].replace(/^\t/gm, ""); + list.push(snippet); + snippet = {}; + } + else { + var key = m[2], val = m[3]; + if (key == "regex") { + var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; + snippet.guard = guardRe.exec(val)[1]; + snippet.trigger = guardRe.exec(val)[1]; + snippet.endTrigger = guardRe.exec(val)[1]; + snippet.endGuard = guardRe.exec(val)[1]; + } + else if (key == "snippet") { + snippet.tabTrigger = val.match(/^\S*/)[0]; + if (!snippet.name) + snippet.name = val; + } + else if (key) { + snippet[key] = val; + } + } + } + return list; + }; + SnippetManager.prototype.getSnippetByName = function (name, editor) { + var snippetMap = this.snippetNameMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = snippets[name]; + return !!snippet; + }, this); + return snippet; + }; + return SnippetManager; +}()); +oop.implement(SnippetManager.prototype, EventEmitter); +var processSnippetText = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); + snippetText = snippetText.replace(/\r/g, ""); + var tokens = this.tokenizeTmSnippet(snippetText); + tokens = this.resolveVariables(tokens, editor); + tokens = tokens.map(function (x) { + if (x == "\n" && !options.excludeExtraIndent) + return x + indentString; + if (typeof x == "string") + return x.replace(/\t/g, tabString); + return x; + }); + var tabstops = []; + tokens.forEach(function (p, i) { + if (typeof p != "object") + return; + var id = p.tabstopId; + var ts = tabstops[id]; + if (!ts) { + ts = tabstops[id] = []; + ts.index = id; + ts.value = ""; + ts.parents = {}; + } + if (ts.indexOf(p) !== -1) + return; + if (p.choices && !ts.choices) + ts.choices = p.choices; + ts.push(p); + var i1 = tokens.indexOf(p, i + 1); + if (i1 === -1) + return; + var value = tokens.slice(i + 1, i1); + var isNested = value.some(function (t) { return typeof t === "object"; }); + if (isNested && !ts.value) { + ts.value = value; + } + else if (value.length && (!ts.value || typeof ts.value !== "string")) { + ts.value = value.join(""); + } + }); + tabstops.forEach(function (ts) { ts.length = 0; }); + var expanding = {}; + function copyValue(val) { + var copy = []; + for (var i = 0; i < val.length; i++) { + var p = val[i]; + if (typeof p == "object") { + if (expanding[p.tabstopId]) + continue; + var j = val.lastIndexOf(p, i - 1); + p = copy[j] || { tabstopId: p.tabstopId }; + } + copy[i] = p; + } + return copy; + } + for (var i = 0; i < tokens.length; i++) { + var p = tokens[i]; + if (typeof p != "object") + continue; + var id = p.tabstopId; + var ts = tabstops[id]; + var i1 = tokens.indexOf(p, i + 1); + if (expanding[id]) { + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function (parentId) { + ts.parents[parentId] = true; + }); + } + continue; + } + expanding[id] = p; + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); + if (ts.indexOf(p) === -1) + ts.push(p); + } + var row = 0, column = 0; + var text = ""; + tokens.forEach(function (t) { + if (typeof t === "string") { + var lines = t.split("\n"); + if (lines.length > 1) { + column = lines[lines.length - 1].length; + row += lines.length - 1; + } + else + column += t.length; + text += t; + } + else if (t) { + if (!t.start) + t.start = { row: row, column: column }; + else + t.end = { row: row, column: column }; + } + }); + return { + text: text, + tabstops: tabstops, + tokens: tokens + }; +}; +var TabstopManager = /** @class */ (function () { + function TabstopManager(editor) { + this.index = 0; + this.ranges = []; + this.tabstops = []; + if (editor.tabstopManager) + return editor.tabstopManager; + editor.tabstopManager = this; + this.$onChange = this.onChange.bind(this); + this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; + this.$onChangeSession = this.onChangeSession.bind(this); + this.$onAfterExec = this.onAfterExec.bind(this); + this.attach(editor); + } + TabstopManager.prototype.attach = function (editor) { + this.$openTabstops = null; + this.selectedTabstop = null; + this.editor = editor; + this.session = editor.session; + this.editor.on("change", this.$onChange); + this.editor.on("changeSelection", this.$onChangeSelection); + this.editor.on("changeSession", this.$onChangeSession); + this.editor.commands.on("afterExec", this.$onAfterExec); + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + TabstopManager.prototype.detach = function () { + this.tabstops.forEach(this.removeTabstopMarkers, this); + this.ranges.length = 0; + this.tabstops.length = 0; + this.selectedTabstop = null; + this.editor.off("change", this.$onChange); + this.editor.off("changeSelection", this.$onChangeSelection); + this.editor.off("changeSession", this.$onChangeSession); + this.editor.commands.off("afterExec", this.$onAfterExec); + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.tabstopManager = null; + this.session = null; + this.editor = null; + }; + TabstopManager.prototype.onChange = function (delta) { + var isRemove = delta.action[0] == "r"; + var selectedTabstop = this.selectedTabstop || {}; + var parents = selectedTabstop.parents || {}; + var tabstops = this.tabstops.slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + if (delta.action == "remove" && ts !== selectedTabstop) { + var parentActive = ts.parents && ts.parents[selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); + } + ts.rangeList.$onChange(delta); + } + var session = this.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) + this.detach(); + }; + TabstopManager.prototype.updateLinkedFields = function () { + var ts = this.selectedTabstop; + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) + return; + this.$inChange = true; + var session = this.session; + var text = session.getTextRange(ts.firstNonLinked); + for (var i = 0; i < ts.length; i++) { + var range = ts[i]; + if (!range.linked) + continue; + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); + session.replace(range, fmt); + } + this.$inChange = false; + }; + TabstopManager.prototype.onAfterExec = function (e) { + if (e.command && !e.command.readOnly) + this.updateLinkedFields(); + }; + TabstopManager.prototype.onChangeSelection = function () { + if (!this.editor) + return; + var lead = this.editor.selection.lead; + var anchor = this.editor.selection.anchor; + var isEmpty = this.editor.selection.isEmpty(); + for (var i = 0; i < this.ranges.length; i++) { + if (this.ranges[i].linked) + continue; + var containsLead = this.ranges[i].contains(lead.row, lead.column); + var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); + if (containsLead && containsAnchor) + return; + } + this.detach(); + }; + TabstopManager.prototype.onChangeSession = function () { + this.detach(); + }; + TabstopManager.prototype.tabNext = function (dir) { + var max = this.tabstops.length; + var index = this.index + (dir || 1); + index = Math.min(Math.max(index, 1), max); + if (index == max) + index = 0; + this.selectTabstop(index); + this.updateTabstopMarkers(); + if (index === 0) { + this.detach(); + } + }; + TabstopManager.prototype.selectTabstop = function (index) { + this.$openTabstops = null; + var ts = this.tabstops[this.index]; + if (ts) + this.addTabstopMarkers(ts); + this.index = index; + ts = this.tabstops[this.index]; + if (!ts || !ts.length) + return; + this.selectedTabstop = ts; + var range = ts.firstNonLinked || ts; + if (ts.choices) + range.cursor = range.start; + if (!this.editor.inVirtualSelectionMode) { + var sel = this.editor.multiSelect; + sel.toSingleRange(range); + for (var i = 0; i < ts.length; i++) { + if (ts.hasLinkedRanges && ts[i].linked) + continue; + sel.addRange(ts[i].clone(), true); + } + } + else { + this.editor.selection.fromOrientedRange(range); + } + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", { matches: this.selectedTabstop.choices }); + }; + TabstopManager.prototype.addTabstops = function (tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + if (!this.$openTabstops) + this.$openTabstops = []; + if (!tabstops[0]) { + var p = Range.fromPoints(end, end); + moveRelative(p.start, start); + moveRelative(p.end, start); + tabstops[0] = [p]; + tabstops[0].index = 0; + } + var i = this.index; + var arg = [i + 1, 0]; + var ranges = this.ranges; + var snippetId = this.snippetId = (this.snippetId || 0) + 1; + tabstops.forEach(function (ts, index) { + var dest = this.$openTabstops[index] || ts; + dest.snippetId = snippetId; + for (var i = 0; i < ts.length; i++) { + var p = ts[i]; + var range = Range.fromPoints(p.start, p.end || p.start); + movePoint(range.start, start); + movePoint(range.end, start); + range.original = p; + range.tabstop = dest; + ranges.push(range); + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; + if (p.fmtString || (dest.firstNonLinked && useLink)) { + range.linked = true; + dest.hasLinkedRanges = true; + } + else if (!dest.firstNonLinked) + dest.firstNonLinked = range; + } + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); + dest.rangeList = dest.rangeList || new RangeList(); + dest.rangeList.$bias = 0; + dest.rangeList.addList(dest); + }, this); + if (arg.length > 2) { + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } + }; + TabstopManager.prototype.addTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + if (!range.markerId) + range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); + }); + }; + TabstopManager.prototype.removeTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + session.removeMarker(range.markerId); + range.markerId = null; + }); + }; + TabstopManager.prototype.updateTabstopMarkers = function () { + if (!this.selectedTabstop) + return; + var currentSnippetId = this.selectedTabstop.snippetId; + if (this.selectedTabstop.index === 0) { + currentSnippetId--; + } + this.tabstops.forEach(function (ts) { + if (ts.snippetId === currentSnippetId) + this.addTabstopMarkers(ts); + else + this.removeTabstopMarkers(ts); + }, this); + }; + TabstopManager.prototype.removeRange = function (range) { + var i = range.tabstop.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + i = this.ranges.indexOf(range); + if (i != -1) + this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + this.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } + }; + return TabstopManager; +}()); +TabstopManager.prototype.keyboardHandler = new HashHandler(); +TabstopManager.prototype.keyboardHandler.bindKeys({ + "Tab": function (editor) { + if (exports.snippetManager && exports.snippetManager.expandWithTab(editor)) + return; + editor.tabstopManager.tabNext(1); + editor.renderer.scrollCursorIntoView(); + }, + "Shift-Tab": function (editor) { + editor.tabstopManager.tabNext(-1); + editor.renderer.scrollCursorIntoView(); + }, + "Esc": function (editor) { + editor.tabstopManager.detach(); + } +}); +var movePoint = function (point, diff) { + if (point.row == 0) + point.column += diff.column; + point.row += diff.row; +}; +var moveRelative = function (point, start) { + if (point.row == start.row) + point.column -= start.column; + point.row -= start.row; +}; +dom.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}", "snippets.css", false); +exports.snippetManager = new SnippetManager(); +var Editor = require("./editor").Editor; +(function () { + this.insertSnippet = function (content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function (options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + +}); + +define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"], function(require, exports, module){"use strict"; +var Renderer = require("../virtual_renderer").VirtualRenderer; +var Editor = require("../editor").Editor; +var Range = require("../range").Range; +var event = require("../lib/event"); +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); +var nls = require("../config").nls; +var userAgent = require("./../lib/useragent"); +var getAriaId = function (index) { + return "suggest-aria-id:".concat(index); +}; +var popupAriaRole = userAgent.isSafari ? "menu" : "listbox"; +var optionAriaRole = userAgent.isSafari ? "menuitem" : "option"; +var ariaActiveState = userAgent.isSafari ? "aria-current" : "aria-selected"; +var $singleLineEditor = function (el) { + var renderer = new Renderer(el); + renderer.$maxLines = 4; + var editor = new Editor(renderer); + editor.setHighlightActiveLine(false); + editor.setShowPrintMargin(false); + editor.renderer.setShowGutter(false); + editor.renderer.setHighlightGutterLine(false); + editor.$mouseHandler.$focusTimeout = 0; + editor.$highlightTagPending = true; + return editor; +}; +var AcePopup = /** @class */ (function () { + function AcePopup(parentNode) { + var el = dom.createElement("div"); + var popup = $singleLineEditor(el); + if (parentNode) { + parentNode.appendChild(el); + } + el.style.display = "none"; + popup.renderer.content.style.cursor = "default"; + popup.renderer.setStyle("ace_autocomplete"); + popup.renderer.$textLayer.element.setAttribute("role", popupAriaRole); + popup.renderer.$textLayer.element.setAttribute("aria-roledescription", nls("autocomplete.popup.aria-roledescription", "Autocomplete suggestions")); + popup.renderer.$textLayer.element.setAttribute("aria-label", nls("autocomplete.popup.aria-label", "Autocomplete suggestions")); + popup.renderer.textarea.setAttribute("aria-hidden", "true"); + popup.setOption("displayIndentGuides", false); + popup.setOption("dragDelay", 150); + var noop = function () { }; + popup.focus = noop; + popup.$isFocused = true; + popup.renderer.$cursorLayer.restartTimer = noop; + popup.renderer.$cursorLayer.element.style.opacity = "0"; + popup.renderer.$maxLines = 8; + popup.renderer.$keepTextAreaAtCursor = false; + popup.setHighlightActiveLine(false); + popup.session.highlight(""); + popup.session.$searchHighlight.clazz = "ace_highlight-marker"; + popup.on("mousedown", function (e) { + var pos = e.getDocumentPosition(); + popup.selection.moveToPosition(pos); + selectionMarker.start.row = selectionMarker.end.row = pos.row; + e.stop(); + }); + var lastMouseEvent; + var hoverMarker = new Range(-1, 0, -1, Infinity); + var selectionMarker = new Range(-1, 0, -1, Infinity); + selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); + popup.setSelectOnHover = function (val) { + if (!val) { + hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); + } + else if (hoverMarker.id) { + popup.session.removeMarker(hoverMarker.id); + hoverMarker.id = null; + } + }; + popup.setSelectOnHover(false); + popup.on("mousemove", function (e) { + if (!lastMouseEvent) { + lastMouseEvent = e; + return; + } + if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { + return; + } + lastMouseEvent = e; + lastMouseEvent.scrollTop = popup.renderer.scrollTop; + popup.isMouseOver = true; + var row = lastMouseEvent.getDocumentPosition().row; + if (hoverMarker.start.row != row) { + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row); + } + }); + popup.renderer.on("beforeRender", function () { + if (lastMouseEvent && hoverMarker.start.row != -1) { + lastMouseEvent.$pos = null; + var row = lastMouseEvent.getDocumentPosition().row; + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row, true); + } + }); + popup.renderer.on("afterRender", function () { + var row = popup.getRow(); + var t = popup.renderer.$textLayer; + var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]); + var el = document.activeElement; // Active element is textarea of main editor + if (selected !== popup.selectedNode && popup.selectedNode) { + dom.removeCssClass(popup.selectedNode, "ace_selected"); + el.removeAttribute("aria-activedescendant"); + popup.selectedNode.removeAttribute(ariaActiveState); + popup.selectedNode.removeAttribute("id"); + } + popup.selectedNode = selected; + if (selected) { + dom.addCssClass(selected, "ace_selected"); + var ariaId = getAriaId(row); + selected.id = ariaId; + t.element.setAttribute("aria-activedescendant", ariaId); + el.setAttribute("aria-activedescendant", ariaId); + selected.setAttribute("role", optionAriaRole); + selected.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item")); + selected.setAttribute("aria-label", popup.getData(row).caption || popup.getData(row).value); + selected.setAttribute("aria-setsize", popup.data.length); + selected.setAttribute("aria-posinset", row + 1); + selected.setAttribute("aria-describedby", "doc-tooltip"); + selected.setAttribute(ariaActiveState, "true"); + } + }); + var hideHoverMarker = function () { setHoverMarker(-1); }; + var setHoverMarker = function (row, suppressRedraw) { + if (row !== hoverMarker.start.row) { + hoverMarker.start.row = hoverMarker.end.row = row; + if (!suppressRedraw) + popup.session._emit("changeBackMarker"); + popup._emit("changeHoverMarker"); + } + }; + popup.getHoveredRow = function () { + return hoverMarker.start.row; + }; + event.addListener(popup.container, "mouseout", function () { + popup.isMouseOver = false; + hideHoverMarker(); + }); + popup.on("hide", hideHoverMarker); + popup.on("changeSelection", hideHoverMarker); + popup.session.doc.getLength = function () { + return popup.data.length; + }; + popup.session.doc.getLine = function (i) { + var data = popup.data[i]; + if (typeof data == "string") + return data; + return (data && data.value) || ""; + }; + var bgTokenizer = popup.session.bgTokenizer; + bgTokenizer.$tokenizeRow = function (row) { + var data = popup.data[row]; + var tokens = []; + if (!data) + return tokens; + if (typeof data == "string") + data = { value: data }; + var caption = data.caption || data.value || data.name; + function addToken(value, className) { + value && tokens.push({ + type: (data.className || "") + (className || ""), + value: value + }); + } + var lower = caption.toLowerCase(); + var filterText = (popup.filterText || "").toLowerCase(); + var lastIndex = 0; + var lastI = 0; + for (var i = 0; i <= filterText.length; i++) { + if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) { + var sub = filterText.slice(lastI, i); + lastI = i; + var index = lower.indexOf(sub, lastIndex); + if (index == -1) + continue; + addToken(caption.slice(lastIndex, index), ""); + lastIndex = index + sub.length; + addToken(caption.slice(index, lastIndex), "completion-highlight"); + } + } + addToken(caption.slice(lastIndex, caption.length), ""); + tokens.push({ type: "completion-spacer", value: " " }); + if (data.meta) + tokens.push({ type: "completion-meta", value: data.meta }); + if (data.message) + tokens.push({ type: "completion-message", value: data.message }); + return tokens; + }; + bgTokenizer.$updateOnChange = noop; + bgTokenizer.start = noop; + popup.session.$computeWidth = function () { + return this.screenWidth = 0; + }; + popup.isOpen = false; + popup.isTopdown = false; + popup.autoSelect = true; + popup.filterText = ""; + popup.isMouseOver = false; + popup.data = []; + popup.setData = function (list, filterText) { + popup.filterText = filterText || ""; + popup.setValue(lang.stringRepeat("\n", list.length), -1); + popup.data = list || []; + popup.setRow(0); + }; + popup.getData = function (row) { + return popup.data[row]; + }; + popup.getRow = function () { + return selectionMarker.start.row; + }; + popup.setRow = function (line) { + line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length - 1, line)); + if (selectionMarker.start.row != line) { + popup.selection.clearSelection(); + selectionMarker.start.row = selectionMarker.end.row = line || 0; + popup.session._emit("changeBackMarker"); + popup.moveCursorTo(line || 0, 0); + if (popup.isOpen) + popup._signal("select"); + } + }; + popup.on("changeSelection", function () { + if (popup.isOpen) + popup.setRow(popup.selection.lead.row); + popup.renderer.scrollCursorIntoView(); + }); + popup.hide = function () { + this.container.style.display = "none"; + popup.anchorPos = null; + popup.anchor = null; + if (popup.isOpen) { + popup.isOpen = false; + this._signal("hide"); + } + }; + popup.tryShow = function (pos, lineHeight, anchor, forceShow) { + if (!forceShow && popup.isOpen && popup.anchorPos && popup.anchor && + popup.anchorPos.top === pos.top && popup.anchorPos.left === pos.left && + popup.anchor === anchor) { + return true; + } + var el = this.container; + var screenHeight = window.innerHeight; + var screenWidth = window.innerWidth; + var renderer = this.renderer; + var maxH = renderer.$maxLines * lineHeight * 1.4; + var dims = { top: 0, bottom: 0, left: 0 }; + var spaceBelow = screenHeight - pos.top - 3 * this.$borderSize - lineHeight; + var spaceAbove = pos.top - 3 * this.$borderSize; + if (!anchor) { + if (spaceAbove <= spaceBelow || spaceBelow >= maxH) { + anchor = "bottom"; + } + else { + anchor = "top"; + } + } + if (anchor === "top") { + dims.bottom = pos.top - this.$borderSize; + dims.top = dims.bottom - maxH; + } + else if (anchor === "bottom") { + dims.top = pos.top + lineHeight + this.$borderSize; + dims.bottom = dims.top + maxH; + } + var fitsX = dims.top >= 0 && dims.bottom <= screenHeight; + if (!forceShow && !fitsX) { + return false; + } + if (!fitsX) { + if (anchor === "top") { + renderer.$maxPixelHeight = spaceAbove; + } + else { + renderer.$maxPixelHeight = spaceBelow; + } + } + else { + renderer.$maxPixelHeight = null; + } + if (anchor === "top") { + el.style.top = ""; + el.style.bottom = (screenHeight - dims.bottom) + "px"; + popup.isTopdown = false; + } + else { + el.style.top = dims.top + "px"; + el.style.bottom = ""; + popup.isTopdown = true; + } + el.style.display = ""; + var left = pos.left; + if (left + el.offsetWidth > screenWidth) + left = screenWidth - el.offsetWidth; + el.style.left = left + "px"; + el.style.right = ""; + if (!popup.isOpen) { + popup.isOpen = true; + this._signal("show"); + lastMouseEvent = null; + } + popup.anchorPos = pos; + popup.anchor = anchor; + return true; + }; + popup.show = function (pos, lineHeight, topdownOnly) { + this.tryShow(pos, lineHeight, topdownOnly ? "bottom" : undefined, true); + }; + popup.goTo = function (where) { + var row = this.getRow(); + var max = this.session.getLength() - 1; + switch (where) { + case "up": + row = row <= 0 ? max : row - 1; + break; + case "down": + row = row >= max ? -1 : row + 1; + break; + case "start": + row = 0; + break; + case "end": + row = max; + break; + } + this.setRow(row); + }; + popup.getTextLeftOffset = function () { + return this.$borderSize + this.renderer.$padding + this.$imageSize; + }; + popup.$imageSize = 0; + popup.$borderSize = 1; + return popup; + } + return AcePopup; +}()); +dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: \"\";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n", "autocompletion.css", false); +exports.AcePopup = AcePopup; +exports.$singleLineEditor = $singleLineEditor; +exports.getAriaId = getAriaId; + +}); + +define("ace/autocomplete/inline_screenreader",["require","exports","module"], function(require, exports, module){"use strict"; +var AceInlineScreenReader = /** @class */ (function () { + function AceInlineScreenReader(editor) { + this.editor = editor; + this.screenReaderDiv = document.createElement("div"); + this.screenReaderDiv.classList.add("ace_screenreader-only"); + this.editor.container.appendChild(this.screenReaderDiv); + } + AceInlineScreenReader.prototype.setScreenReaderContent = function (content) { + if (!this.popup && this.editor.completer && /**@type{import("../autocomplete").Autocomplete}*/ (this.editor.completer).popup) { + this.popup = /**@type{import("../autocomplete").Autocomplete}*/ (this.editor.completer).popup; + this.popup.renderer.on("afterRender", function () { + var row = this.popup.getRow(); + var t = this.popup.renderer.$textLayer; + var selected = t.element.childNodes[row - t.config.firstRow]; + if (selected) { + var idString = "doc-tooltip "; + for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) { + idString += "ace-inline-screenreader-line-".concat(lineIndex, " "); + } + selected.setAttribute("aria-describedby", idString); + } + }.bind(this)); + } + while (this.screenReaderDiv.firstChild) { + this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild); + } + this._lines = content.split(/\r\n|\r|\n/); + var codeElement = this.createCodeBlock(); + this.screenReaderDiv.appendChild(codeElement); + }; + AceInlineScreenReader.prototype.destroy = function () { + this.screenReaderDiv.remove(); + }; + AceInlineScreenReader.prototype.createCodeBlock = function () { + var container = document.createElement("pre"); + container.setAttribute("id", "ace-inline-screenreader"); + for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) { + var codeElement = document.createElement("code"); + codeElement.setAttribute("id", "ace-inline-screenreader-line-".concat(lineIndex)); + var line = document.createTextNode(this._lines[lineIndex]); + codeElement.appendChild(line); + container.appendChild(codeElement); + } + return container; + }; + return AceInlineScreenReader; +}()); +exports.AceInlineScreenReader = AceInlineScreenReader; + +}); + +define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"], function(require, exports, module){"use strict"; +var snippetManager = require("../snippets").snippetManager; +var AceInlineScreenReader = require("./inline_screenreader").AceInlineScreenReader; +var AceInline = /** @class */ (function () { + function AceInline() { + this.editor = null; + } + AceInline.prototype.show = function (editor, completion, prefix) { + prefix = prefix || ""; + if (editor && this.editor && this.editor !== editor) { + this.hide(); + this.editor = null; + this.inlineScreenReader = null; + } + if (!editor || !completion) { + return false; + } + if (!this.inlineScreenReader) { + this.inlineScreenReader = new AceInlineScreenReader(editor); + } + var displayText = completion.snippet ? snippetManager.getDisplayTextForSnippet(editor, completion.snippet) : completion.value; + if (completion.hideInlinePreview || !displayText || !displayText.startsWith(prefix)) { + return false; + } + this.editor = editor; + this.inlineScreenReader.setScreenReaderContent(displayText); + displayText = displayText.slice(prefix.length); + if (displayText === "") { + editor.removeGhostText(); + } + else { + editor.setGhostText(displayText); + } + return true; + }; + AceInline.prototype.isOpen = function () { + if (!this.editor) { + return false; + } + return !!this.editor.renderer.$ghostText; + }; + AceInline.prototype.hide = function () { + if (!this.editor) { + return false; + } + this.editor.removeGhostText(); + return true; + }; + AceInline.prototype.destroy = function () { + this.hide(); + this.editor = null; + if (this.inlineScreenReader) { + this.inlineScreenReader.destroy(); + this.inlineScreenReader = null; + } + }; + return AceInline; +}()); +exports.AceInline = AceInline; + +}); + +define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module){"use strict"; +exports.parForEach = function (array, fn, callback) { + var completed = 0; + var arLength = array.length; + if (arLength === 0) + callback(); + for (var i = 0; i < arLength; i++) { + fn(array[i], function (result, err) { + completed++; + if (completed === arLength) + callback(result, err); + }); + } +}; +var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/; +exports.retrievePrecedingIdentifier = function (text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos - 1; i >= 0; i--) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf.reverse().join(""); +}; +exports.retrieveFollowingIdentifier = function (text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos; i < text.length; i++) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf; +}; +exports.getCompletionPrefix = function (editor) { + var pos = editor.getCursorPosition(); + var line = editor.session.getLine(pos.row); + var prefix; + editor.completers.forEach(function (completer) { + if (completer.identifierRegexps) { + completer.identifierRegexps.forEach(function (identifierRegex) { + if (!prefix && identifierRegex) + prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + }.bind(this)); + } + }.bind(this)); + return prefix || this.retrievePrecedingIdentifier(line, pos.column); +}; +exports.triggerAutocomplete = function (editor, previousChar) { + var previousChar = previousChar == null + ? editor.session.getPrecedingCharacter() + : previousChar; + return editor.completers.some(function (completer) { + if (completer.triggerCharacters && Array.isArray(completer.triggerCharacters)) { + return completer.triggerCharacters.includes(previousChar); + } + }); +}; + +}); + +define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"], function(require, exports, module){"use strict"; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var AcePopup = require("./autocomplete/popup").AcePopup; +var AceInline = require("./autocomplete/inline").AceInline; +var getAriaId = require("./autocomplete/popup").getAriaId; +var util = require("./autocomplete/util"); +var lang = require("./lib/lang"); +var dom = require("./lib/dom"); +var snippetManager = require("./snippets").snippetManager; +var config = require("./config"); +var event = require("./lib/event"); +var preventParentScroll = require("./lib/scroll").preventParentScroll; +var destroyCompleter = function (e, editor) { + editor.completer && editor.completer.destroy(); +}; +var Autocomplete = /** @class */ (function () { + function Autocomplete() { + this.autoInsert = false; + this.autoSelect = true; + this.autoShown = false; + this.exactMatch = false; + this.inlineEnabled = false; + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys(this.commands); + this.parentNode = null; + this.setSelectOnHover = false; + this.hasSeen = new Set(); + this.showLoadingState = false; + this.stickySelectionDelay = 500; + this.blurListener = this.blurListener.bind(this); + this.changeListener = this.changeListener.bind(this); + this.mousedownListener = this.mousedownListener.bind(this); + this.mousewheelListener = this.mousewheelListener.bind(this); + this.onLayoutChange = this.onLayoutChange.bind(this); + this.changeTimer = lang.delayedCall(function () { + this.updateCompletions(true); + }.bind(this)); + this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); + this.popupTimer = lang.delayedCall(this.$updatePopupPosition.bind(this), 50); + this.stickySelectionTimer = lang.delayedCall(function () { + this.stickySelection = true; + }.bind(this), this.stickySelectionDelay); + this.$firstOpenTimer = lang.delayedCall(/**@this{Autocomplete}*/ function () { + var initialPosition = this.completionProvider && this.completionProvider.initialPosition; + if (this.autoShown || (this.popup && this.popup.isOpen) || !initialPosition || this.editor.completers.length === 0) + return; + this.completions = new FilteredList(Autocomplete.completionsForLoading); + this.openPopup(this.editor, initialPosition.prefix, false); + this.popup.renderer.setStyle("ace_loading", true); + }.bind(this), this.stickySelectionDelay); + } + Object.defineProperty(Autocomplete, "completionsForLoading", { + get: function () { + return [{ + caption: config.nls("autocomplete.loading", "Loading..."), + value: "" + }]; + }, + enumerable: false, + configurable: true + }); + Autocomplete.prototype.$init = function () { + this.popup = new AcePopup(this.parentNode || document.body || document.documentElement); + this.popup.on("click", function (e) { + this.insertMatch(); + e.stop(); + }.bind(this)); + this.popup.focus = this.editor.focus.bind(this.editor); + this.popup.on("show", this.$onPopupShow.bind(this)); + this.popup.on("hide", this.$onHidePopup.bind(this)); + this.popup.on("select", this.$onPopupChange.bind(this)); + event.addListener(this.popup.container, "mouseout", this.mouseOutListener.bind(this)); + this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); + this.popup.renderer.on("afterRender", this.$onPopupRender.bind(this)); + return this.popup; + }; + Autocomplete.prototype.$initInline = function () { + if (!this.inlineEnabled || this.inlineRenderer) + return; + this.inlineRenderer = new AceInline(); + return this.inlineRenderer; + }; + Autocomplete.prototype.getPopup = function () { + return this.popup || this.$init(); + }; + Autocomplete.prototype.$onHidePopup = function () { + if (this.inlineRenderer) { + this.inlineRenderer.hide(); + } + this.hideDocTooltip(); + this.stickySelectionTimer.cancel(); + this.popupTimer.cancel(); + this.stickySelection = false; + }; + Autocomplete.prototype.$seen = function (completion) { + if (!this.hasSeen.has(completion) && completion && completion.completer && completion.completer.onSeen && typeof completion.completer.onSeen === "function") { + completion.completer.onSeen(this.editor, completion); + this.hasSeen.add(completion); + } + }; + Autocomplete.prototype.$onPopupChange = function (hide) { + if (this.inlineRenderer && this.inlineEnabled) { + var completion = hide ? null : this.popup.getData(this.popup.getRow()); + this.$updateGhostText(completion); + if (this.popup.isMouseOver && this.setSelectOnHover) { + this.tooltipTimer.call(null, null); + return; + } + this.popupTimer.schedule(); + this.tooltipTimer.schedule(); + } + else { + this.popupTimer.call(null, null); + this.tooltipTimer.call(null, null); + } + }; + Autocomplete.prototype.$updateGhostText = function (completion) { + var row = this.base.row; + var column = this.base.column; + var cursorColumn = this.editor.getCursorPosition().column; + var prefix = this.editor.session.getLine(row).slice(column, cursorColumn); + if (!this.inlineRenderer.show(this.editor, completion, prefix)) { + this.inlineRenderer.hide(); + } + else { + this.$seen(completion); + } + }; + Autocomplete.prototype.$onPopupRender = function () { + var inlineEnabled = this.inlineRenderer && this.inlineEnabled; + if (this.completions && this.completions.filtered && this.completions.filtered.length > 0) { + for (var i = this.popup.getFirstVisibleRow(); i <= this.popup.getLastVisibleRow(); i++) { + var completion = this.popup.getData(i); + if (completion && (!inlineEnabled || completion.hideInlinePreview)) { + this.$seen(completion); + } + } + } + }; + Autocomplete.prototype.$onPopupShow = function (hide) { + this.$onPopupChange(hide); + this.stickySelection = false; + if (this.stickySelectionDelay >= 0) + this.stickySelectionTimer.schedule(this.stickySelectionDelay); + }; + Autocomplete.prototype.observeLayoutChanges = function () { + if (this.$elements || !this.editor) + return; + window.addEventListener("resize", this.onLayoutChange, { passive: true }); + window.addEventListener("wheel", this.mousewheelListener); + var el = this.editor.container.parentNode; + var elements = []; + while (el) { + elements.push(el); + el.addEventListener("scroll", this.onLayoutChange, { passive: true }); + el = el.parentNode; + } + this.$elements = elements; + }; + Autocomplete.prototype.unObserveLayoutChanges = function () { + var _this = this; + window.removeEventListener("resize", this.onLayoutChange, { passive: true }); + window.removeEventListener("wheel", this.mousewheelListener); + this.$elements && this.$elements.forEach(function (el) { + el.removeEventListener("scroll", _this.onLayoutChange, { passive: true }); + }); + this.$elements = null; + }; + Autocomplete.prototype.onLayoutChange = function () { + if (!this.popup.isOpen) + return this.unObserveLayoutChanges(); + this.$updatePopupPosition(); + this.updateDocTooltip(); + }; + Autocomplete.prototype.$updatePopupPosition = function () { + var editor = this.editor; + var renderer = editor.renderer; + var lineHeight = renderer.layerConfig.lineHeight; + var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); + pos.left -= this.popup.getTextLeftOffset(); + var rect = editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left - editor.renderer.scrollLeft; + pos.left += renderer.gutterWidth; + var posGhostText = { + top: pos.top, + left: pos.left + }; + if (renderer.$ghostText && renderer.$ghostTextWidget) { + if (this.base.row === renderer.$ghostText.position.row) { + posGhostText.top += renderer.$ghostTextWidget.el.offsetHeight; + } + } + var editorContainerBottom = editor.container.getBoundingClientRect().bottom - lineHeight; + var lowestPosition = editorContainerBottom < posGhostText.top ? + { top: editorContainerBottom, left: posGhostText.left } : + posGhostText; + if (this.popup.tryShow(lowestPosition, lineHeight, "bottom")) { + return; + } + if (this.popup.tryShow(pos, lineHeight, "top")) { + return; + } + this.popup.show(pos, lineHeight); + }; + Autocomplete.prototype.openPopup = function (editor, prefix, keepPopupPosition) { + this.$firstOpenTimer.cancel(); + if (!this.popup) + this.$init(); + if (this.inlineEnabled && !this.inlineRenderer) + this.$initInline(); + this.popup.autoSelect = this.autoSelect; + this.popup.setSelectOnHover(this.setSelectOnHover); + var oldRow = this.popup.getRow(); + var previousSelectedItem = this.popup.data[oldRow]; + this.popup.setData(this.completions.filtered, this.completions.filterText); + if (this.editor.textInput.setAriaOptions) { + this.editor.textInput.setAriaOptions({ + activeDescendant: getAriaId(this.popup.getRow()), + inline: this.inlineEnabled + }); + } + editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + var newRow; + if (this.stickySelection) + newRow = this.popup.data.indexOf(previousSelectedItem); + if (!newRow || newRow === -1) + newRow = 0; + this.popup.setRow(this.autoSelect ? newRow : -1); + if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow]) + this.$onPopupChange(); + var inlineEnabled = this.inlineRenderer && this.inlineEnabled; + if (newRow === oldRow && inlineEnabled) { + var completion = this.popup.getData(this.popup.getRow()); + this.$updateGhostText(completion); + } + if (!keepPopupPosition) { + this.popup.setTheme(editor.getTheme()); + this.popup.setFontSize(editor.getFontSize()); + this.$updatePopupPosition(); + if (this.tooltipNode) { + this.updateDocTooltip(); + } + } + this.changeTimer.cancel(); + this.observeLayoutChanges(); + }; + Autocomplete.prototype.detach = function () { + if (this.editor) { + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.off("changeSelection", this.changeListener); + this.editor.off("blur", this.blurListener); + this.editor.off("mousedown", this.mousedownListener); + this.editor.off("mousewheel", this.mousewheelListener); + } + this.$firstOpenTimer.cancel(); + this.changeTimer.cancel(); + this.hideDocTooltip(); + if (this.completionProvider) { + this.completionProvider.detach(); + } + if (this.popup && this.popup.isOpen) + this.popup.hide(); + if (this.popup && this.popup.renderer) { + this.popup.renderer.off("afterRender", this.$onPopupRender); + } + if (this.base) + this.base.detach(); + this.activated = false; + this.completionProvider = this.completions = this.base = null; + this.unObserveLayoutChanges(); + }; + Autocomplete.prototype.changeListener = function (e) { + var cursor = this.editor.selection.lead; + if (cursor.row != this.base.row || cursor.column < this.base.column) { + this.detach(); + } + if (this.activated) + this.changeTimer.schedule(); + else + this.detach(); + }; + Autocomplete.prototype.blurListener = function (e) { + var el = document.activeElement; + var text = this.editor.textInput.getElement(); + var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget); + var container = this.popup && this.popup.container; + if (el != text && el.parentNode != container && !fromTooltip + && el != this.tooltipNode && e.relatedTarget != text) { + this.detach(); + } + }; + Autocomplete.prototype.mousedownListener = function (e) { + this.detach(); + }; + Autocomplete.prototype.mousewheelListener = function (e) { + if (this.popup && !this.popup.isMouseOver) + this.detach(); + }; + Autocomplete.prototype.mouseOutListener = function (e) { + if (this.popup.isOpen) + this.$updatePopupPosition(); + }; + Autocomplete.prototype.goTo = function (where) { + this.popup.goTo(where); + }; + Autocomplete.prototype.insertMatch = function (data, options) { + if (!data) + data = this.popup.getData(this.popup.getRow()); + if (!data) + return false; + if (data.value === "") // Explicitly given nothing to insert, e.g. "No suggestion state" + return this.detach(); + var completions = this.completions; + var result = this.getCompletionProvider().insertMatch(this.editor, data, completions.filterText, options); + if (this.completions == completions) + this.detach(); + return result; + }; + Autocomplete.prototype.showPopup = function (editor, options) { + if (this.editor) + this.detach(); + this.activated = true; + this.editor = editor; + if (editor.completer != this) { + if (editor.completer) + editor.completer.detach(); + editor.completer = this; + } + editor.on("changeSelection", this.changeListener); + editor.on("blur", this.blurListener); + editor.on("mousedown", this.mousedownListener); + editor.on("mousewheel", this.mousewheelListener); + this.updateCompletions(false, options); + }; + Autocomplete.prototype.getCompletionProvider = function (initialPosition) { + if (!this.completionProvider) + this.completionProvider = new CompletionProvider(initialPosition); + return this.completionProvider; + }; + Autocomplete.prototype.gatherCompletions = function (editor, callback) { + return this.getCompletionProvider().gatherCompletions(editor, callback); + }; + Autocomplete.prototype.updateCompletions = function (keepPopupPosition, options) { + if (keepPopupPosition && this.base && this.completions) { + var pos = this.editor.getCursorPosition(); + var prefix = this.editor.session.getTextRange({ start: this.base, end: pos }); + if (prefix == this.completions.filterText) + return; + this.completions.setFilter(prefix); + if (!this.completions.filtered.length) + return this.detach(); + if (this.completions.filtered.length == 1 + && this.completions.filtered[0].value == prefix + && !this.completions.filtered[0].snippet) + return this.detach(); + this.openPopup(this.editor, prefix, keepPopupPosition); + return; + } + if (options && options.matches) { + var pos = this.editor.getSelectionRange().start; + this.base = this.editor.session.doc.createAnchor(pos.row, pos.column); + this.base.$insertRight = true; + this.completions = new FilteredList(options.matches); + this.getCompletionProvider().completions = this.completions; + return this.openPopup(this.editor, "", keepPopupPosition); + } + var session = this.editor.getSession(); + var pos = this.editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(this.editor); + this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); + this.base.$insertRight = true; + var completionOptions = { + exactMatch: this.exactMatch, + ignoreCaption: this.ignoreCaption + }; + this.getCompletionProvider({ + prefix: prefix, + pos: pos + }).provideCompletions(this.editor, completionOptions, + function (err, completions, finished) { + var filtered = completions.filtered; + var prefix = util.getCompletionPrefix(this.editor); + this.$firstOpenTimer.cancel(); + if (finished) { + if (!filtered.length) { + var emptyMessage = !this.autoShown && this.emptyMessage; + if (typeof emptyMessage == "function") + emptyMessage = this.emptyMessage(prefix); + if (emptyMessage) { + var completionsForEmpty = [{ + caption: emptyMessage, + value: "" + } + ]; + this.completions = new FilteredList(completionsForEmpty); + this.openPopup(this.editor, prefix, keepPopupPosition); + this.popup.renderer.setStyle("ace_loading", false); + this.popup.renderer.setStyle("ace_empty-message", true); + return; + } + return this.detach(); + } + if (filtered.length == 1 && filtered[0].value == prefix + && !filtered[0].snippet) + return this.detach(); + if (this.autoInsert && !this.autoShown && filtered.length == 1) + return this.insertMatch(filtered[0]); + } + this.completions = !finished && this.showLoadingState ? + new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) : + completions; + this.openPopup(this.editor, prefix, keepPopupPosition); + this.popup.renderer.setStyle("ace_empty-message", false); + this.popup.renderer.setStyle("ace_loading", !finished); + }.bind(this)); + if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) { + this.$firstOpenTimer.delay(this.stickySelectionDelay / 2); + } + }; + Autocomplete.prototype.cancelContextMenu = function () { + this.editor.$mouseHandler.cancelContextMenu(); + }; + Autocomplete.prototype.updateDocTooltip = function () { + var popup = this.popup; + var all = this.completions.filtered; + var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); + var doc = null; + if (!selected || !this.editor || !this.popup.isOpen) + return this.hideDocTooltip(); + var completersLength = this.editor.completers.length; + for (var i = 0; i < completersLength; i++) { + var completer = this.editor.completers[i]; + if (completer.getDocTooltip && selected.completerId === completer.id) { + doc = completer.getDocTooltip(selected); + break; + } + } + if (!doc && typeof selected != "string") + doc = selected; + if (typeof doc == "string") + doc = { docText: doc }; + if (!doc || !(doc.docHTML || doc.docText)) + return this.hideDocTooltip(); + this.showDocTooltip(doc); + }; + Autocomplete.prototype.showDocTooltip = function (item) { + if (!this.tooltipNode) { + this.tooltipNode = dom.createElement("div"); + this.tooltipNode.style.margin = "0"; + this.tooltipNode.style.pointerEvents = "auto"; + this.tooltipNode.style.overscrollBehavior = "contain"; + this.tooltipNode.tabIndex = -1; + this.tooltipNode.onblur = this.blurListener.bind(this); + this.tooltipNode.onclick = this.onTooltipClick.bind(this); + this.tooltipNode.id = "doc-tooltip"; + this.tooltipNode.setAttribute("role", "tooltip"); + this.tooltipNode.addEventListener("wheel", preventParentScroll); + } + var theme = this.editor.renderer.theme; + this.tooltipNode.className = "ace_tooltip ace_doc-tooltip " + + (theme.isDark ? "ace_dark " : "") + (theme.cssClass || ""); + var tooltipNode = this.tooltipNode; + if (item.docHTML) { + tooltipNode.innerHTML = item.docHTML; + } + else if (item.docText) { + tooltipNode.textContent = item.docText; + } + if (!tooltipNode.parentNode) + this.popup.container.appendChild(this.tooltipNode); + var popup = this.popup; + var rect = popup.container.getBoundingClientRect(); + tooltipNode.style.top = popup.container.style.top; + tooltipNode.style.bottom = popup.container.style.bottom; + tooltipNode.style.display = "block"; + if (window.innerWidth - rect.right < 320) { + if (rect.left < 320) { + if (popup.isTopdown) { + tooltipNode.style.top = rect.bottom + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + else { + tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + } + else { + tooltipNode.style.right = window.innerWidth - rect.left + "px"; + tooltipNode.style.left = ""; + } + } + else { + tooltipNode.style.left = (rect.right + 1) + "px"; + tooltipNode.style.right = ""; + } + }; + Autocomplete.prototype.hideDocTooltip = function () { + this.tooltipTimer.cancel(); + if (!this.tooltipNode) + return; + var el = this.tooltipNode; + if (!this.editor.isFocused() && document.activeElement == el) + this.editor.focus(); + this.tooltipNode = null; + if (el.parentNode) + el.parentNode.removeChild(el); + }; + Autocomplete.prototype.onTooltipClick = function (e) { + var a = e.target; + while (a && a != this.tooltipNode) { + if (a.nodeName == "A" && a.href) { + a.rel = "noreferrer"; + a.target = "_blank"; + break; + } + a = a.parentNode; + } + }; + Autocomplete.prototype.destroy = function () { + this.detach(); + if (this.popup) { + this.popup.destroy(); + var el = this.popup.container; + if (el && el.parentNode) + el.parentNode.removeChild(el); + } + if (this.editor && this.editor.completer == this) { + this.editor.off("destroy", destroyCompleter); + this.editor.completer = null; + } + this.inlineRenderer = this.popup = this.editor = null; + }; + return Autocomplete; +}()); +Autocomplete.prototype.commands = { + "Up": function (editor) { editor.completer.goTo("up"); }, + "Down": function (editor) { editor.completer.goTo("down"); }, + "Ctrl-Up|Ctrl-Home": function (editor) { editor.completer.goTo("start"); }, + "Ctrl-Down|Ctrl-End": function (editor) { editor.completer.goTo("end"); }, + "Esc": function (editor) { editor.completer.detach(); }, + "Return": function (editor) { return editor.completer.insertMatch(); }, + "Shift-Return": function (editor) { editor.completer.insertMatch(null, { deleteSuffix: true }); }, + "Tab": function (editor) { + var result = editor.completer.insertMatch(); + if (!result && !editor.tabstopManager) + editor.completer.goTo("down"); + else + return result; + }, + "Backspace": function (editor) { + editor.execCommand("backspace"); + var prefix = util.getCompletionPrefix(editor); + if (!prefix && editor.completer) + editor.completer.detach(); + }, + "PageUp": function (editor) { editor.completer.popup.gotoPageUp(); }, + "PageDown": function (editor) { editor.completer.popup.gotoPageDown(); } +}; +Autocomplete.for = function (editor) { + if (editor.completer instanceof Autocomplete) { + return editor.completer; + } + if (editor.completer) { + editor.completer.destroy(); + editor.completer = null; + } + if (config.get("sharedPopups")) { + if (!Autocomplete["$sharedInstance"]) + Autocomplete["$sharedInstance"] = new Autocomplete(); + editor.completer = Autocomplete["$sharedInstance"]; + } + else { + editor.completer = new Autocomplete(); + editor.once("destroy", destroyCompleter); + } + return editor.completer; +}; +Autocomplete.startCommand = { + name: "startAutocomplete", + exec: function (editor, options) { + var completer = Autocomplete.for(editor); + completer.autoInsert = false; + completer.autoSelect = true; + completer.autoShown = false; + completer.showPopup(editor, options); + completer.cancelContextMenu(); + }, + bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" +}; +var CompletionProvider = /** @class */ (function () { + function CompletionProvider(initialPosition) { + this.initialPosition = initialPosition; + this.active = true; + } + CompletionProvider.prototype.insertByIndex = function (editor, index, options) { + if (!this.completions || !this.completions.filtered) { + return false; + } + return this.insertMatch(editor, this.completions.filtered[index], options); + }; + CompletionProvider.prototype.insertMatch = function (editor, data, options) { + if (!data) + return false; + editor.startOperation({ command: { name: "insertMatch" } }); + if (data.completer && data.completer.insertMatch) { + data.completer.insertMatch(editor, data); + } + else { + if (!this.completions) + return false; + var replaceBefore = this.completions.filterText.length; + var replaceAfter = 0; + if (data.range && data.range.start.row === data.range.end.row) { + replaceBefore -= this.initialPosition.prefix.length; + replaceBefore += this.initialPosition.pos.column - data.range.start.column; + replaceAfter += data.range.end.column - this.initialPosition.pos.column; + } + if (replaceBefore || replaceAfter) { + var ranges; + if (editor.selection.getAllRanges) { + ranges = editor.selection.getAllRanges(); + } + else { + ranges = [editor.getSelectionRange()]; + } + for (var i = 0, range; range = ranges[i]; i++) { + range.start.column -= replaceBefore; + range.end.column += replaceAfter; + editor.session.remove(range); + } + } + if (data.snippet) { + snippetManager.insertSnippet(editor, data.snippet); + } + else { + this.$insertString(editor, data); + } + if (data.completer && data.completer.onInsert && typeof data.completer.onInsert == "function") { + data.completer.onInsert(editor, data); + } + if (data.command && data.command === "startAutocomplete") { + editor.execCommand(data.command); + } + } + editor.endOperation(); + return true; + }; + CompletionProvider.prototype.$insertString = function (editor, data) { + var text = data.value || data; + editor.execCommand("insertstring", text); + }; + CompletionProvider.prototype.gatherCompletions = function (editor, callback) { + var session = editor.getSession(); + var pos = editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(editor); + var matches = []; + this.completers = editor.completers; + var total = editor.completers.length; + editor.completers.forEach(function (completer, i) { + completer.getCompletions(editor, session, pos, prefix, function (err, results) { + if (completer.hideInlinePreview) + results = results.map(function (result) { + return Object.assign(result, { hideInlinePreview: completer.hideInlinePreview }); + }); + if (!err && results) + matches = matches.concat(results); + callback(null, { + prefix: util.getCompletionPrefix(editor), + matches: matches, + finished: (--total === 0) + }); + }); + }); + return true; + }; + CompletionProvider.prototype.provideCompletions = function (editor, options, callback) { + var processResults = function (results) { + var prefix = results.prefix; + var matches = results.matches; + this.completions = new FilteredList(matches); + if (options.exactMatch) + this.completions.exactMatch = true; + if (options.ignoreCaption) + this.completions.ignoreCaption = true; + this.completions.setFilter(prefix); + if (results.finished || this.completions.filtered.length) + callback(null, this.completions, results.finished); + }.bind(this); + var isImmediate = true; + var immediateResults = null; + this.gatherCompletions(editor, function (err, results) { + if (!this.active) { + return; + } + if (err) { + callback(err, [], true); + this.detach(); + } + var prefix = results.prefix; + if (prefix.indexOf(results.prefix) !== 0) + return; + if (isImmediate) { + immediateResults = results; + return; + } + processResults(results); + }.bind(this)); + isImmediate = false; + if (immediateResults) { + var results = immediateResults; + immediateResults = null; + processResults(results); + } + }; + CompletionProvider.prototype.detach = function () { + this.active = false; + this.completers && this.completers.forEach(function (completer) { + if (typeof completer.cancel === "function") { + completer.cancel(); + } + }); + }; + return CompletionProvider; +}()); +var FilteredList = /** @class */ (function () { + function FilteredList(array, filterText) { + this.all = array; + this.filtered = array; + this.filterText = filterText || ""; + this.exactMatch = false; + this.ignoreCaption = false; + } + FilteredList.prototype.setFilter = function (str) { + if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) + var matches = this.filtered; + else + var matches = this.all; + this.filterText = str; + matches = this.filterCompletions(matches, this.filterText); + matches = matches.sort(function (a, b) { + return b.exactMatch - a.exactMatch || b.$score - a.$score + || (a.caption || a.value).localeCompare(b.caption || b.value); + }); + var prev = null; + matches = matches.filter(function (item) { + var caption = item.snippet || item.caption || item.value; + if (caption === prev) + return false; + prev = caption; + return true; + }); + this.filtered = matches; + }; + FilteredList.prototype.filterCompletions = function (items, needle) { + var results = []; + var upper = needle.toUpperCase(); + var lower = needle.toLowerCase(); + loop: for (var i = 0, item; item = items[i]; i++) { + var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet; + if (!caption) + continue; + var lastIndex = -1; + var matchMask = 0; + var penalty = 0; + var index, distance; + if (this.exactMatch) { + if (needle !== caption.substr(0, needle.length)) + continue loop; + } + else { + var fullMatchIndex = caption.toLowerCase().indexOf(lower); + if (fullMatchIndex > -1) { + penalty = fullMatchIndex; + } + else { + for (var j = 0; j < needle.length; j++) { + var i1 = caption.indexOf(lower[j], lastIndex + 1); + var i2 = caption.indexOf(upper[j], lastIndex + 1); + index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; + if (index < 0) + continue loop; + distance = index - lastIndex - 1; + if (distance > 0) { + if (lastIndex === -1) + penalty += 10; + penalty += distance; + matchMask = matchMask | (1 << j); + } + lastIndex = index; + } + } + } + item.matchMask = matchMask; + item.exactMatch = penalty ? 0 : 1; + item.$score = (item.score || 0) - penalty; + results.push(item); + } + return results; + }; + return FilteredList; +}()); +exports.Autocomplete = Autocomplete; +exports.CompletionProvider = CompletionProvider; +exports.FilteredList = FilteredList; + +}); + +define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module){var Range = require("../range").Range; +var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; +function getWordIndex(doc, pos) { + var textBefore = doc.getTextRange(Range.fromPoints({ + row: 0, + column: 0 + }, pos)); + return textBefore.split(splitRegex).length - 1; +} +function wordDistance(doc, pos) { + var prefixPos = getWordIndex(doc, pos); + var words = doc.getValue().split(splitRegex); + var wordScores = Object.create(null); + var currentWord = words[prefixPos]; + words.forEach(function (word, idx) { + if (!word || word === currentWord) + return; + var distance = Math.abs(prefixPos - idx); + var score = words.length - distance; + if (wordScores[word]) { + wordScores[word] = Math.max(score, wordScores[word]); + } + else { + wordScores[word] = score; + } + }); + return wordScores; +} +exports.getCompletions = function (editor, session, pos, prefix, callback) { + var wordScore = wordDistance(session, pos); + var wordList = Object.keys(wordScore); + callback(null, wordList.map(function (word) { + return { + caption: word, + value: word, + score: wordScore[word], + meta: "local" + }; + })); +}; + +}); + +define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var snippetManager = require("../snippets").snippetManager; +var Autocomplete = require("../autocomplete").Autocomplete; +var config = require("../config"); +var lang = require("../lib/lang"); +var util = require("../autocomplete/util"); +var textCompleter = require("../autocomplete/text_completer"); +var keyWordCompleter = { + getCompletions: function (editor, session, pos, prefix, callback) { + if (session.$mode.completer) { + return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback); + } + var state = editor.session.getState(pos.row); + var completions = session.$mode.getCompletions(state, session, pos, prefix); + completions = completions.map(function (el) { + el.completerId = keyWordCompleter.id; + return el; + }); + callback(null, completions); + }, + id: "keywordCompleter" +}; +var transformSnippetTooltip = function (str) { + var record = {}; + return str.replace(/\${(\d+)(:(.*?))?}/g, function (_, p1, p2, p3) { + return (record[p1] = p3 || ''); + }).replace(/\$(\d+?)/g, function (_, p1) { + return record[p1]; + }); +}; +var snippetCompleter = { + getCompletions: function (editor, session, pos, prefix, callback) { + var scopes = []; + var token = session.getTokenAt(pos.row, pos.column); + if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)) + scopes.push('html-tag'); + else + scopes = snippetManager.getActiveScopes(editor); + var snippetMap = snippetManager.snippetMap; + var completions = []; + scopes.forEach(function (scope) { + var snippets = snippetMap[scope] || []; + for (var i = snippets.length; i--;) { + var s = snippets[i]; + var caption = s.name || s.tabTrigger; + if (!caption) + continue; + completions.push({ + caption: caption, + snippet: s.content, + meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet", + completerId: snippetCompleter.id + }); + } + }, this); + callback(null, completions); + }, + getDocTooltip: function (item) { + if (item.snippet && !item.docHTML) { + item.docHTML = [ + "", lang.escapeHTML(item.caption), "", "
", + lang.escapeHTML(transformSnippetTooltip(item.snippet)) + ].join(""); + } + }, + id: "snippetCompleter" +}; +var completers = [snippetCompleter, textCompleter, keyWordCompleter]; +exports.setCompleters = function (val) { + completers.length = 0; + if (val) + completers.push.apply(completers, val); +}; +exports.addCompleter = function (completer) { + completers.push(completer); +}; +exports.textCompleter = textCompleter; +exports.keyWordCompleter = keyWordCompleter; +exports.snippetCompleter = snippetCompleter; +var expandSnippet = { + name: "expandSnippet", + exec: function (editor) { + return snippetManager.expandWithTab(editor); + }, + bindKey: "Tab" +}; +var onChangeMode = function (e, editor) { + loadSnippetsForMode(editor.session.$mode); +}; +var loadSnippetsForMode = function (mode) { + if (typeof mode == "string") + mode = config.$modes[mode]; + if (!mode) + return; + if (!snippetManager.files) + snippetManager.files = {}; + loadSnippetFile(mode.$id, mode.snippetFileId); + if (mode.modes) + mode.modes.forEach(loadSnippetsForMode); +}; +var loadSnippetFile = function (id, snippetFilePath) { + if (!snippetFilePath || !id || snippetManager.files[id]) + return; + snippetManager.files[id] = {}; + config.loadModule(snippetFilePath, function (m) { + if (!m) + return; + snippetManager.files[id] = m; + if (!m.snippets && m.snippetText) + m.snippets = snippetManager.parseSnippetFile(m.snippetText); + snippetManager.register(m.snippets || [], m.scope); + if (m.includeScopes) { + snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes; + m.includeScopes.forEach(function (x) { + loadSnippetsForMode("ace/mode/" + x); + }); + } + }); +}; +var doLiveAutocomplete = function (e) { + var editor = e.editor; + var hasCompleter = editor.completer && editor.completer.activated; + if (e.command.name === "backspace") { + if (hasCompleter && !util.getCompletionPrefix(editor)) + editor.completer.detach(); + } + else if (e.command.name === "insertstring" && !hasCompleter) { + lastExecEvent = e; + var delay = e.editor.$liveAutocompletionDelay; + if (delay) { + liveAutocompleteTimer.delay(delay); + } + else { + showLiveAutocomplete(e); + } + } +}; +var lastExecEvent; +var liveAutocompleteTimer = lang.delayedCall(function () { + showLiveAutocomplete(lastExecEvent); +}, 0); +var showLiveAutocomplete = function (e) { + var editor = e.editor; + var prefix = util.getCompletionPrefix(editor); + var previousChar = e.args; + var triggerAutocomplete = util.triggerAutocomplete(editor, previousChar); + if (prefix && prefix.length >= editor.$liveAutocompletionThreshold || triggerAutocomplete) { + var completer = Autocomplete.for(editor); + completer.autoShown = true; + completer.showPopup(editor); + } +}; +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + enableBasicAutocompletion: { + set: function (val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val) ? val : completers; + this.commands.addCommand(Autocomplete.startCommand); + } + else { + this.commands.removeCommand(Autocomplete.startCommand); + } + }, + value: false + }, + enableLiveAutocompletion: { + set: function (val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val) ? val : completers; + this.commands.on('afterExec', doLiveAutocomplete); + } + else { + this.commands.off('afterExec', doLiveAutocomplete); + } + }, + value: false + }, + liveAutocompletionDelay: { + initialValue: 0 + }, + liveAutocompletionThreshold: { + initialValue: 0 + }, + enableSnippets: { + set: function (val) { + if (val) { + this.commands.addCommand(expandSnippet); + this.on("changeMode", onChangeMode); + onChangeMode(null, this); + } + else { + this.commands.removeCommand(expandSnippet); + this.off("changeMode", onChangeMode); + } + }, + value: false + } +}); + +}); (function() { + window.require(["ace/ext/language_tools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-linking.js b/ui/base1/ace/ext-linking.js new file mode 100644 index 0000000..ae14346 --- /dev/null +++ b/ui/base1/ace/ext-linking.js @@ -0,0 +1,56 @@ +define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module){var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + enableLinking: { + set: function (val) { + if (val) { + this.on("click", onClick); + this.on("mousemove", onMouseMove); + } + else { + this.off("click", onClick); + this.off("mousemove", onMouseMove); + } + }, + value: false + } +}); +exports.previousLinkingHover = false; +function onMouseMove(e) { + var editor = e.editor; + var ctrl = e.getAccelKey(); + if (ctrl) { + var editor = e.editor; + var docPos = e.getDocumentPosition(); + var session = editor.session; + var token = session.getTokenAt(docPos.row, docPos.column); + if (exports.previousLinkingHover && exports.previousLinkingHover != token) { + editor._emit("linkHoverOut"); + } + editor._emit("linkHover", { position: docPos, token: token }); + exports.previousLinkingHover = token; + } + else if (exports.previousLinkingHover) { + editor._emit("linkHoverOut"); + exports.previousLinkingHover = false; + } +} +function onClick(e) { + var ctrl = e.getAccelKey(); + var button = e.getButton(); + if (button == 0 && ctrl) { + var editor = e.editor; + var docPos = e.getDocumentPosition(); + var session = editor.session; + var token = session.getTokenAt(docPos.row, docPos.column); + editor._emit("linkClick", { position: docPos, token: token }); + } +} + +}); (function() { + window.require(["ace/ext/linking"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-modelist.js b/ui/base1/ace/ext-modelist.js new file mode 100644 index 0000000..a64bc75 --- /dev/null +++ b/ui/base1/ace/ext-modelist.js @@ -0,0 +1,264 @@ +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module){"use strict"; +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} +var Mode = /** @class */ (function () { + function Mode(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function (a, b) { + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } + else { + re = "^.*\\.(" + extensions + ")$"; + } + this.extRe = new RegExp(re, "gi"); + } + Mode.prototype.supportsFile = function (filename) { + return filename.match(this.extRe); + }; + return Mode; +}()); +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript: ["as"], + ADA: ["ada|adb"], + Alda: ["alda"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl|asl.json"], + Assembly_ARM32: ["s"], + Assembly_x86: ["asm|a"], + Astro: ["astro"], + AutoHotKey: ["ahk"], + BatchFile: ["bat|cmd"], + BibTeX: ["bib"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm|cfc"], + Crystal: ["cr"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + Cuttlefish: ["conf"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Django: ["djt|html.djt|dj.html|djhtml"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Flix: ["flix"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Ion: ["ion"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|cjs|mjs"], + JEXL: ["jexl"], + JSON: ["json"], + JSON5: ["json5"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + Latte: ["latte"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + Log: ["log"], + LogiQL: ["logic|lql"], + Logtalk: ["lgt"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MediaWiki: ["wiki|mediawiki"], + MEL: ["mel"], + MIPS: ["s|asm"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nasal: ["nas"], + Nginx: ["nginx|conf"], + Nim: ["nim"], + Nix: ["nix"], + NSIS: ["nsi|nsh"], + Nunjucks: ["nunjucks|nunjs|nj|njk"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Odin: ["odin"], + PartiQL: ["partiql|pql"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + pgSQL: ["pgsql"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + PHP_Laravel_blade: ["blade.php"], + Pig: ["pig"], + PLSQL: ["plsql"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prisma: ["prisma"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + PRQL: ["prql"], + Puppet: ["epp|pp"], + Python: ["py"], + QML: ["qml"], + R: ["r"], + Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + Robot: ["robot|resource"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SaC: ["sac"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + Scrypt: ["scrypt"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + Smithy: ["smithy"], + snippets: ["snippets"], + Soy_Template: ["soy"], + Space: ["space"], + SPARQL: ["rq"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Turtle: ["ttl"], + Twig: ["twig|swig"], + Typescript: ["ts|mts|cts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Vue: ["vue"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Zig: ["zig"] +}; +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); (function() { + window.require(["ace/ext/modelist"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-options.js b/ui/base1/ace/ext-options.js new file mode 100644 index 0000000..b188d3b --- /dev/null +++ b/ui/base1/ace/ext-options.js @@ -0,0 +1,767 @@ +define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"], function(require, exports, module){module.exports = "#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"; + +}); + +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +'use strict'; +var dom = require("../../lib/dom"); +var cssText = require("./settings_menu.css"); +dom.importCssString(cssText, "settings_menu.css", false); +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + var ignoreFocusOut = false; + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + function close() { + if (!closer) + return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + if (editor) { + editor.focus(); + } + closer = null; + callback && callback(); + } + function setIgnoreFocusOut(ignore) { + ignoreFocusOut = ignore; + if (ignore) { + closer.style.pointerEvents = "none"; + contentElement.style.pointerEvents = "auto"; + } + } + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + (editor ? 'background-color: rgba(0, 0, 0, 0.3);' : ''); + closer.addEventListener('click', function (e) { + if (!ignoreFocusOut) { + close(); + } + }); + document.addEventListener('keydown', documentEscListener); + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + closer.appendChild(contentElement); + document.body.appendChild(closer); + if (editor) { + editor.blur(); + } + return { + close: close, + setIgnoreFocusOut: setIgnoreFocusOut + }; +}; + +}); + +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module){"use strict"; +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} +var Mode = /** @class */ (function () { + function Mode(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function (a, b) { + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } + else { + re = "^.*\\.(" + extensions + ")$"; + } + this.extRe = new RegExp(re, "gi"); + } + Mode.prototype.supportsFile = function (filename) { + return filename.match(this.extRe); + }; + return Mode; +}()); +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript: ["as"], + ADA: ["ada|adb"], + Alda: ["alda"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl|asl.json"], + Assembly_ARM32: ["s"], + Assembly_x86: ["asm|a"], + Astro: ["astro"], + AutoHotKey: ["ahk"], + BatchFile: ["bat|cmd"], + BibTeX: ["bib"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm|cfc"], + Crystal: ["cr"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + Cuttlefish: ["conf"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Django: ["djt|html.djt|dj.html|djhtml"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Flix: ["flix"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Ion: ["ion"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|cjs|mjs"], + JEXL: ["jexl"], + JSON: ["json"], + JSON5: ["json5"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + Latte: ["latte"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + Log: ["log"], + LogiQL: ["logic|lql"], + Logtalk: ["lgt"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MediaWiki: ["wiki|mediawiki"], + MEL: ["mel"], + MIPS: ["s|asm"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nasal: ["nas"], + Nginx: ["nginx|conf"], + Nim: ["nim"], + Nix: ["nix"], + NSIS: ["nsi|nsh"], + Nunjucks: ["nunjucks|nunjs|nj|njk"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Odin: ["odin"], + PartiQL: ["partiql|pql"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + pgSQL: ["pgsql"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + PHP_Laravel_blade: ["blade.php"], + Pig: ["pig"], + PLSQL: ["plsql"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prisma: ["prisma"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + PRQL: ["prql"], + Puppet: ["epp|pp"], + Python: ["py"], + QML: ["qml"], + R: ["r"], + Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + Robot: ["robot|resource"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SaC: ["sac"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + Scrypt: ["scrypt"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + Smithy: ["smithy"], + snippets: ["snippets"], + Soy_Template: ["soy"], + Space: ["space"], + SPARQL: ["rq"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Turtle: ["ttl"], + Twig: ["twig|swig"], + Typescript: ["ts|mts|cts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Vue: ["vue"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Zig: ["zig"] +}; +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); + +define("ace/ext/themelist",["require","exports","module"], function(require, exports, module){/** + * Generates a list of themes available when ace was built. + * @fileOverview Generates a list of themes available when ace was built. + * @author + * Matthew Christopher Kastor-Inare III
+ * ☭ Hial Atropa!! ☭ + */ +"use strict"; +var themeData = [ + ["Chrome"], + ["Clouds"], + ["Crimson Editor"], + ["Dawn"], + ["Dreamweaver"], + ["Eclipse"], + ["GitHub Light Default"], + ["GitHub (Legacy)", "github", "light"], + ["IPlastic"], + ["Solarized Light"], + ["TextMate"], + ["Tomorrow"], + ["XCode"], + ["Kuroir"], + ["KatzenMilch"], + ["SQL Server", "sqlserver", "light"], + ["CloudEditor", "cloud_editor", "light"], + ["Ambiance", "ambiance", "dark"], + ["Chaos", "chaos", "dark"], + ["Clouds Midnight", "clouds_midnight", "dark"], + ["Dracula", "", "dark"], + ["Cobalt", "cobalt", "dark"], + ["Gruvbox", "gruvbox", "dark"], + ["Green on Black", "gob", "dark"], + ["idle Fingers", "idle_fingers", "dark"], + ["krTheme", "kr_theme", "dark"], + ["Merbivore", "merbivore", "dark"], + ["Merbivore Soft", "merbivore_soft", "dark"], + ["Mono Industrial", "mono_industrial", "dark"], + ["Monokai", "monokai", "dark"], + ["Nord Dark", "nord_dark", "dark"], + ["One Dark", "one_dark", "dark"], + ["Pastel on dark", "pastel_on_dark", "dark"], + ["Solarized Dark", "solarized_dark", "dark"], + ["Terminal", "terminal", "dark"], + ["Tomorrow Night", "tomorrow_night", "dark"], + ["Tomorrow Night Blue", "tomorrow_night_blue", "dark"], + ["Tomorrow Night Bright", "tomorrow_night_bright", "dark"], + ["Tomorrow Night 80s", "tomorrow_night_eighties", "dark"], + ["Twilight", "twilight", "dark"], + ["Vibrant Ink", "vibrant_ink", "dark"], + ["GitHub Dark", "github_dark", "dark"], + ["CloudEditor Dark", "cloud_editor_dark", "dark"] +]; +exports.themesByName = {}; +exports.themes = themeData.map(function (data) { + var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); + var theme = { + caption: data[0], + theme: "ace/theme/" + name, + isDark: data[2] == "dark", + name: name + }; + exports.themesByName[name] = theme; + return theme; +}); + +}); + +define("ace/ext/options",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/lib/oop","ace/config","ace/lib/event_emitter","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module){"use strict"; +require("./menu_tools/overlay_page"); +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var config = require("../config"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var buildDom = dom.buildDom; +var modelist = require("./modelist"); +var themelist = require("./themelist"); +var themes = { Bright: [], Dark: [] }; +themelist.themes.forEach(function (x) { + themes[x.isDark ? "Dark" : "Bright"].push({ caption: x.caption, value: x.theme }); +}); +var modes = modelist.modes.map(function (x) { + return { caption: x.caption, value: x.mode }; +}); +var optionGroups = { + Main: { + Mode: { + path: "mode", + type: "select", + items: modes + }, + Theme: { + path: "theme", + type: "select", + items: themes + }, + "Keybinding": { + type: "buttonBar", + path: "keyboardHandler", + items: [ + { caption: "Ace", value: null }, + { caption: "Vim", value: "ace/keyboard/vim" }, + { caption: "Emacs", value: "ace/keyboard/emacs" }, + { caption: "Sublime", value: "ace/keyboard/sublime" }, + { caption: "VSCode", value: "ace/keyboard/vscode" } + ] + }, + "Font Size": { + path: "fontSize", + type: "number", + defaultValue: 12, + defaults: [ + { caption: "12px", value: 12 }, + { caption: "24px", value: 24 } + ] + }, + "Soft Wrap": { + type: "buttonBar", + path: "wrap", + items: [ + { caption: "Off", value: "off" }, + { caption: "View", value: "free" }, + { caption: "margin", value: "printMargin" }, + { caption: "40", value: "40" } + ] + }, + "Cursor Style": { + path: "cursorStyle", + items: [ + { caption: "Ace", value: "ace" }, + { caption: "Slim", value: "slim" }, + { caption: "Smooth", value: "smooth" }, + { caption: "Smooth And Slim", value: "smooth slim" }, + { caption: "Wide", value: "wide" } + ] + }, + "Folding": { + path: "foldStyle", + items: [ + { caption: "Manual", value: "manual" }, + { caption: "Mark begin", value: "markbegin" }, + { caption: "Mark begin and end", value: "markbeginend" } + ] + }, + "Soft Tabs": [{ + path: "useSoftTabs" + }, { + ariaLabel: "Tab Size", + path: "tabSize", + type: "number", + values: [2, 3, 4, 8, 16] + }], + "Overscroll": { + type: "buttonBar", + path: "scrollPastEnd", + items: [ + { caption: "None", value: 0 }, + { caption: "Half", value: 0.5 }, + { caption: "Full", value: 1 } + ] + } + }, + More: { + "Atomic soft tabs": { + path: "navigateWithinSoftTabs" + }, + "Enable Behaviours": { + path: "behavioursEnabled" + }, + "Wrap with quotes": { + path: "wrapBehavioursEnabled" + }, + "Enable Auto Indent": { + path: "enableAutoIndent" + }, + "Full Line Selection": { + type: "checkbox", + values: "text|line", + path: "selectionStyle" + }, + "Highlight Active Line": { + path: "highlightActiveLine" + }, + "Show Invisibles": { + path: "showInvisibles" + }, + "Show Indent Guides": { + path: "displayIndentGuides" + }, + "Highlight Indent Guides": { + path: "highlightIndentGuides" + }, + "Persistent HScrollbar": { + path: "hScrollBarAlwaysVisible" + }, + "Persistent VScrollbar": { + path: "vScrollBarAlwaysVisible" + }, + "Animate scrolling": { + path: "animatedScroll" + }, + "Show Gutter": { + path: "showGutter" + }, + "Show Line Numbers": { + path: "showLineNumbers" + }, + "Relative Line Numbers": { + path: "relativeLineNumbers" + }, + "Fixed Gutter Width": { + path: "fixedWidthGutter" + }, + "Show Print Margin": [{ + path: "showPrintMargin" + }, { + ariaLabel: "Print Margin", + type: "number", + path: "printMarginColumn" + }], + "Indented Soft Wrap": { + path: "indentedSoftWrap" + }, + "Highlight selected word": { + path: "highlightSelectedWord" + }, + "Fade Fold Widgets": { + path: "fadeFoldWidgets" + }, + "Use textarea for IME": { + path: "useTextareaForIME" + }, + "Merge Undo Deltas": { + path: "mergeUndoDeltas", + items: [ + { caption: "Always", value: "always" }, + { caption: "Never", value: "false" }, + { caption: "Timed", value: "true" } + ] + }, + "Elastic Tabstops": { + path: "useElasticTabstops" + }, + "Incremental Search": { + path: "useIncrementalSearch" + }, + "Read-only": { + path: "readOnly" + }, + "Copy without selection": { + path: "copyWithEmptySelection" + }, + "Live Autocompletion": { + path: "enableLiveAutocompletion" + }, + "Custom scrollbar": { + path: "customScrollbar" + }, + "Use SVG gutter icons": { + path: "useSvgGutterIcons" + }, + "Annotations for folded lines": { + path: "showFoldedAnnotations" + }, + "Keyboard Accessibility Mode": { + path: "enableKeyboardAccessibility" + }, + "Gutter tooltip follows mouse": { + path: "tooltipFollowsMouse", + defaultValue: true + } + } +}; +var OptionPanel = /** @class */ (function () { + function OptionPanel(editor, element) { + this.editor = editor; + this.container = element || document.createElement("div"); + this.groups = []; + this.options = {}; + } + OptionPanel.prototype.add = function (config) { + if (config.Main) + oop.mixin(optionGroups.Main, config.Main); + if (config.More) + oop.mixin(optionGroups.More, config.More); + }; + OptionPanel.prototype.render = function () { + this.container.innerHTML = ""; + buildDom(["table", { role: "presentation", id: "controls" }, + this.renderOptionGroup(optionGroups.Main), + ["tr", null, ["td", { colspan: 2 }, + ["table", { role: "presentation", id: "more-controls" }, + this.renderOptionGroup(optionGroups.More) + ] + ]], + ["tr", null, ["td", { colspan: 2 }, "version " + config.version]] + ], this.container); + }; + OptionPanel.prototype.renderOptionGroup = function (group) { + return Object.keys(group).map(function (key, i) { + var item = group[key]; + if (!item.position) + item.position = i / 10000; + if (!item.label) + item.label = key; + return item; + }).sort(function (a, b) { + return a.position - b.position; + }).map(function (item) { + return this.renderOption(item.label, item); + }, this); + }; + OptionPanel.prototype.renderOptionControl = function (key, option) { + var self = this; + if (Array.isArray(option)) { + return option.map(function (x) { + return self.renderOptionControl(key, x); + }); + } + var control; + var value = self.getOption(option); + if (option.values && option.type != "checkbox") { + if (typeof option.values == "string") + option.values = option.values.split("|"); + option.items = option.values.map(function (v) { + return { value: v, name: v }; + }); + } + if (option.type == "buttonBar") { + control = ["div", { role: "group", "aria-labelledby": option.path + "-label" }, option.items.map(function (item) { + return ["button", { + value: item.value, + ace_selected_button: value == item.value, + 'aria-pressed': value == item.value, + onclick: function () { + self.setOption(option, item.value); + var nodes = this.parentNode.querySelectorAll("[ace_selected_button]"); + for (var i = 0; i < nodes.length; i++) { + nodes[i].removeAttribute("ace_selected_button"); + nodes[i].setAttribute("aria-pressed", false); + } + this.setAttribute("ace_selected_button", true); + this.setAttribute("aria-pressed", true); + } + }, item.desc || item.caption || item.name]; + })]; + } + else if (option.type == "number") { + control = ["input", { type: "number", value: value || option.defaultValue, style: "width:3em", oninput: function () { + self.setOption(option, parseInt(this.value)); + } }]; + if (option.ariaLabel) { + control[1]["aria-label"] = option.ariaLabel; + } + else { + control[1].id = key; + } + if (option.defaults) { + control = [control, option.defaults.map(function (item) { + return ["button", { onclick: function () { + var input = this.parentNode.firstChild; + input.value = item.value; + input.oninput(); + } }, item.caption]; + })]; + } + } + else if (option.items) { + var buildItems = function (items) { + return items.map(function (item) { + return ["option", { value: item.value || item.name }, item.desc || item.caption || item.name]; + }); + }; + var items = Array.isArray(option.items) + ? buildItems(option.items) + : Object.keys(option.items).map(function (key) { + return ["optgroup", { "label": key }, buildItems(option.items[key])]; + }); + control = ["select", { id: key, value: value, onchange: function () { + self.setOption(option, this.value); + } }, items]; + } + else { + if (typeof option.values == "string") + option.values = option.values.split("|"); + if (option.values) + value = value == option.values[1]; + control = ["input", { type: "checkbox", id: key, checked: value || null, onchange: function () { + var value = this.checked; + if (option.values) + value = option.values[value ? 1 : 0]; + self.setOption(option, value); + } }]; + if (option.type == "checkedNumber") { + control = [control, []]; + } + } + return control; + }; + OptionPanel.prototype.renderOption = function (key, option) { + if (option.path && !option.onchange && !this.editor.$options[option.path]) + return; + var path = Array.isArray(option) ? option[0].path : option.path; + this.options[path] = option; + var safeKey = "-" + path; + var safeId = path + "-label"; + var control = this.renderOptionControl(safeKey, option); + return ["tr", { class: "ace_optionsMenuEntry" }, ["td", + ["label", { for: safeKey, id: safeId }, key] + ], ["td", control]]; + }; + OptionPanel.prototype.setOption = function (option, value) { + if (typeof option == "string") + option = this.options[option]; + if (value == "false") + value = false; + if (value == "true") + value = true; + if (value == "null") + value = null; + if (value == "undefined") + value = undefined; + if (typeof value == "string" && parseFloat(value).toString() == value) + value = parseFloat(value); + if (option.onchange) + option.onchange(value); + else if (option.path) + this.editor.setOption(option.path, value); + this._signal("setOption", { name: option.path, value: value }); + }; + OptionPanel.prototype.getOption = function (option) { + if (option.getValue) + return option.getValue(); + return this.editor.getOption(option.path); + }; + return OptionPanel; +}()); +oop.implement(OptionPanel.prototype, EventEmitter); +exports.OptionPanel = OptionPanel; + +}); (function() { + window.require(["ace/ext/options"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-prompt.js b/ui/base1/ace/ext-prompt.js new file mode 100644 index 0000000..e99f5e6 --- /dev/null +++ b/ui/base1/ace/ext-prompt.js @@ -0,0 +1,3065 @@ +define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"], function(require, exports, module){"use strict"; +var Renderer = require("../virtual_renderer").VirtualRenderer; +var Editor = require("../editor").Editor; +var Range = require("../range").Range; +var event = require("../lib/event"); +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); +var nls = require("../config").nls; +var userAgent = require("./../lib/useragent"); +var getAriaId = function (index) { + return "suggest-aria-id:".concat(index); +}; +var popupAriaRole = userAgent.isSafari ? "menu" : "listbox"; +var optionAriaRole = userAgent.isSafari ? "menuitem" : "option"; +var ariaActiveState = userAgent.isSafari ? "aria-current" : "aria-selected"; +var $singleLineEditor = function (el) { + var renderer = new Renderer(el); + renderer.$maxLines = 4; + var editor = new Editor(renderer); + editor.setHighlightActiveLine(false); + editor.setShowPrintMargin(false); + editor.renderer.setShowGutter(false); + editor.renderer.setHighlightGutterLine(false); + editor.$mouseHandler.$focusTimeout = 0; + editor.$highlightTagPending = true; + return editor; +}; +var AcePopup = /** @class */ (function () { + function AcePopup(parentNode) { + var el = dom.createElement("div"); + var popup = $singleLineEditor(el); + if (parentNode) { + parentNode.appendChild(el); + } + el.style.display = "none"; + popup.renderer.content.style.cursor = "default"; + popup.renderer.setStyle("ace_autocomplete"); + popup.renderer.$textLayer.element.setAttribute("role", popupAriaRole); + popup.renderer.$textLayer.element.setAttribute("aria-roledescription", nls("autocomplete.popup.aria-roledescription", "Autocomplete suggestions")); + popup.renderer.$textLayer.element.setAttribute("aria-label", nls("autocomplete.popup.aria-label", "Autocomplete suggestions")); + popup.renderer.textarea.setAttribute("aria-hidden", "true"); + popup.setOption("displayIndentGuides", false); + popup.setOption("dragDelay", 150); + var noop = function () { }; + popup.focus = noop; + popup.$isFocused = true; + popup.renderer.$cursorLayer.restartTimer = noop; + popup.renderer.$cursorLayer.element.style.opacity = "0"; + popup.renderer.$maxLines = 8; + popup.renderer.$keepTextAreaAtCursor = false; + popup.setHighlightActiveLine(false); + popup.session.highlight(""); + popup.session.$searchHighlight.clazz = "ace_highlight-marker"; + popup.on("mousedown", function (e) { + var pos = e.getDocumentPosition(); + popup.selection.moveToPosition(pos); + selectionMarker.start.row = selectionMarker.end.row = pos.row; + e.stop(); + }); + var lastMouseEvent; + var hoverMarker = new Range(-1, 0, -1, Infinity); + var selectionMarker = new Range(-1, 0, -1, Infinity); + selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); + popup.setSelectOnHover = function (val) { + if (!val) { + hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); + } + else if (hoverMarker.id) { + popup.session.removeMarker(hoverMarker.id); + hoverMarker.id = null; + } + }; + popup.setSelectOnHover(false); + popup.on("mousemove", function (e) { + if (!lastMouseEvent) { + lastMouseEvent = e; + return; + } + if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { + return; + } + lastMouseEvent = e; + lastMouseEvent.scrollTop = popup.renderer.scrollTop; + popup.isMouseOver = true; + var row = lastMouseEvent.getDocumentPosition().row; + if (hoverMarker.start.row != row) { + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row); + } + }); + popup.renderer.on("beforeRender", function () { + if (lastMouseEvent && hoverMarker.start.row != -1) { + lastMouseEvent.$pos = null; + var row = lastMouseEvent.getDocumentPosition().row; + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row, true); + } + }); + popup.renderer.on("afterRender", function () { + var row = popup.getRow(); + var t = popup.renderer.$textLayer; + var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]); + var el = document.activeElement; // Active element is textarea of main editor + if (selected !== popup.selectedNode && popup.selectedNode) { + dom.removeCssClass(popup.selectedNode, "ace_selected"); + el.removeAttribute("aria-activedescendant"); + popup.selectedNode.removeAttribute(ariaActiveState); + popup.selectedNode.removeAttribute("id"); + } + popup.selectedNode = selected; + if (selected) { + dom.addCssClass(selected, "ace_selected"); + var ariaId = getAriaId(row); + selected.id = ariaId; + t.element.setAttribute("aria-activedescendant", ariaId); + el.setAttribute("aria-activedescendant", ariaId); + selected.setAttribute("role", optionAriaRole); + selected.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item")); + selected.setAttribute("aria-label", popup.getData(row).caption || popup.getData(row).value); + selected.setAttribute("aria-setsize", popup.data.length); + selected.setAttribute("aria-posinset", row + 1); + selected.setAttribute("aria-describedby", "doc-tooltip"); + selected.setAttribute(ariaActiveState, "true"); + } + }); + var hideHoverMarker = function () { setHoverMarker(-1); }; + var setHoverMarker = function (row, suppressRedraw) { + if (row !== hoverMarker.start.row) { + hoverMarker.start.row = hoverMarker.end.row = row; + if (!suppressRedraw) + popup.session._emit("changeBackMarker"); + popup._emit("changeHoverMarker"); + } + }; + popup.getHoveredRow = function () { + return hoverMarker.start.row; + }; + event.addListener(popup.container, "mouseout", function () { + popup.isMouseOver = false; + hideHoverMarker(); + }); + popup.on("hide", hideHoverMarker); + popup.on("changeSelection", hideHoverMarker); + popup.session.doc.getLength = function () { + return popup.data.length; + }; + popup.session.doc.getLine = function (i) { + var data = popup.data[i]; + if (typeof data == "string") + return data; + return (data && data.value) || ""; + }; + var bgTokenizer = popup.session.bgTokenizer; + bgTokenizer.$tokenizeRow = function (row) { + var data = popup.data[row]; + var tokens = []; + if (!data) + return tokens; + if (typeof data == "string") + data = { value: data }; + var caption = data.caption || data.value || data.name; + function addToken(value, className) { + value && tokens.push({ + type: (data.className || "") + (className || ""), + value: value + }); + } + var lower = caption.toLowerCase(); + var filterText = (popup.filterText || "").toLowerCase(); + var lastIndex = 0; + var lastI = 0; + for (var i = 0; i <= filterText.length; i++) { + if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) { + var sub = filterText.slice(lastI, i); + lastI = i; + var index = lower.indexOf(sub, lastIndex); + if (index == -1) + continue; + addToken(caption.slice(lastIndex, index), ""); + lastIndex = index + sub.length; + addToken(caption.slice(index, lastIndex), "completion-highlight"); + } + } + addToken(caption.slice(lastIndex, caption.length), ""); + tokens.push({ type: "completion-spacer", value: " " }); + if (data.meta) + tokens.push({ type: "completion-meta", value: data.meta }); + if (data.message) + tokens.push({ type: "completion-message", value: data.message }); + return tokens; + }; + bgTokenizer.$updateOnChange = noop; + bgTokenizer.start = noop; + popup.session.$computeWidth = function () { + return this.screenWidth = 0; + }; + popup.isOpen = false; + popup.isTopdown = false; + popup.autoSelect = true; + popup.filterText = ""; + popup.isMouseOver = false; + popup.data = []; + popup.setData = function (list, filterText) { + popup.filterText = filterText || ""; + popup.setValue(lang.stringRepeat("\n", list.length), -1); + popup.data = list || []; + popup.setRow(0); + }; + popup.getData = function (row) { + return popup.data[row]; + }; + popup.getRow = function () { + return selectionMarker.start.row; + }; + popup.setRow = function (line) { + line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length - 1, line)); + if (selectionMarker.start.row != line) { + popup.selection.clearSelection(); + selectionMarker.start.row = selectionMarker.end.row = line || 0; + popup.session._emit("changeBackMarker"); + popup.moveCursorTo(line || 0, 0); + if (popup.isOpen) + popup._signal("select"); + } + }; + popup.on("changeSelection", function () { + if (popup.isOpen) + popup.setRow(popup.selection.lead.row); + popup.renderer.scrollCursorIntoView(); + }); + popup.hide = function () { + this.container.style.display = "none"; + popup.anchorPos = null; + popup.anchor = null; + if (popup.isOpen) { + popup.isOpen = false; + this._signal("hide"); + } + }; + popup.tryShow = function (pos, lineHeight, anchor, forceShow) { + if (!forceShow && popup.isOpen && popup.anchorPos && popup.anchor && + popup.anchorPos.top === pos.top && popup.anchorPos.left === pos.left && + popup.anchor === anchor) { + return true; + } + var el = this.container; + var screenHeight = window.innerHeight; + var screenWidth = window.innerWidth; + var renderer = this.renderer; + var maxH = renderer.$maxLines * lineHeight * 1.4; + var dims = { top: 0, bottom: 0, left: 0 }; + var spaceBelow = screenHeight - pos.top - 3 * this.$borderSize - lineHeight; + var spaceAbove = pos.top - 3 * this.$borderSize; + if (!anchor) { + if (spaceAbove <= spaceBelow || spaceBelow >= maxH) { + anchor = "bottom"; + } + else { + anchor = "top"; + } + } + if (anchor === "top") { + dims.bottom = pos.top - this.$borderSize; + dims.top = dims.bottom - maxH; + } + else if (anchor === "bottom") { + dims.top = pos.top + lineHeight + this.$borderSize; + dims.bottom = dims.top + maxH; + } + var fitsX = dims.top >= 0 && dims.bottom <= screenHeight; + if (!forceShow && !fitsX) { + return false; + } + if (!fitsX) { + if (anchor === "top") { + renderer.$maxPixelHeight = spaceAbove; + } + else { + renderer.$maxPixelHeight = spaceBelow; + } + } + else { + renderer.$maxPixelHeight = null; + } + if (anchor === "top") { + el.style.top = ""; + el.style.bottom = (screenHeight - dims.bottom) + "px"; + popup.isTopdown = false; + } + else { + el.style.top = dims.top + "px"; + el.style.bottom = ""; + popup.isTopdown = true; + } + el.style.display = ""; + var left = pos.left; + if (left + el.offsetWidth > screenWidth) + left = screenWidth - el.offsetWidth; + el.style.left = left + "px"; + el.style.right = ""; + if (!popup.isOpen) { + popup.isOpen = true; + this._signal("show"); + lastMouseEvent = null; + } + popup.anchorPos = pos; + popup.anchor = anchor; + return true; + }; + popup.show = function (pos, lineHeight, topdownOnly) { + this.tryShow(pos, lineHeight, topdownOnly ? "bottom" : undefined, true); + }; + popup.goTo = function (where) { + var row = this.getRow(); + var max = this.session.getLength() - 1; + switch (where) { + case "up": + row = row <= 0 ? max : row - 1; + break; + case "down": + row = row >= max ? -1 : row + 1; + break; + case "start": + row = 0; + break; + case "end": + row = max; + break; + } + this.setRow(row); + }; + popup.getTextLeftOffset = function () { + return this.$borderSize + this.renderer.$padding + this.$imageSize; + }; + popup.$imageSize = 0; + popup.$borderSize = 1; + return popup; + } + return AcePopup; +}()); +dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: \"\";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n", "autocompletion.css", false); +exports.AcePopup = AcePopup; +exports.$singleLineEditor = $singleLineEditor; +exports.getAriaId = getAriaId; + +}); + +define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module){"use strict"; +var dom = require("./lib/dom"); +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var RangeList = require("./range_list").RangeList; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var Tokenizer = require("./tokenizer").Tokenizer; +var clipboard = require("./clipboard"); +var VARIABLES = { + CURRENT_WORD: function (editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function (editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function (editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function (editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function (editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function (editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function (editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function (editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function (editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function (editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function (editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function () { return "Unknown"; }, + FULLNAME: function () { return "Unknown"; }, + BLOCK_COMMENT_START: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function (editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function (editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, { year: "numeric" }), + CURRENT_YEAR_SHORT: date.bind(null, { year: "2-digit" }), + CURRENT_MONTH: date.bind(null, { month: "numeric" }), + CURRENT_MONTH_NAME: date.bind(null, { month: "long" }), + CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: "short" }), + CURRENT_DATE: date.bind(null, { day: "2-digit" }), + CURRENT_DAY_NAME: date.bind(null, { weekday: "long" }), + CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: "short" }), + CURRENT_HOUR: date.bind(null, { hour: "2-digit", hour12: false }), + CURRENT_MINUTE: date.bind(null, { minute: "2-digit" }), + CURRENT_SECOND: date.bind(null, { second: "2-digit" }) +}; +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} +var SnippetManager = /** @class */ (function () { + function SnippetManager() { + this.snippetMap = {}; + this.snippetNameMap = {}; + this.variables = VARIABLES; + } + SnippetManager.prototype.getTokenizer = function () { + return SnippetManager["$tokenizer"] || this.createTokenizer(); + }; + SnippetManager.prototype.createTokenizer = function () { + function TabstopToken(str) { + str = str.substr(1); + if (/^\d+$/.test(str)) + return [{ tabstopId: parseInt(str, 10) }]; + return [{ text: str }]; + } + function escape(ch) { + return "(?:[^\\\\" + ch + "]|\\\\.)"; + } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + SnippetManager["$tokenizer"] = new Tokenizer({ + start: [ + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) { + val = ch; + } + else if ("`$\\".indexOf(ch) != -1) { + val = ch; + } + return [val]; + } }, + { regex: /}/, onMatch: function (val, state, stack) { + return [stack.length ? stack.shift() : val]; + } }, + { regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken }, + { regex: /\$\{[\dA-Z_a-z]+/, onMatch: function (str, state, stack) { + var t = TabstopToken(str.substr(1)); + stack.unshift(t[0]); + return t; + }, next: "snippetVar" }, + { regex: /\n/, token: "newline", merge: false } + ], + snippetVar: [ + { regex: "\\|" + escape("\\|") + "*\\|", onMatch: function (val, state, stack) { + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function (operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00").map(function (value) { + return { value: value }; + }); + stack[0].choices = choices; + return [choices[0]]; + }, next: "start" }, + formatMatcher, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start" } + ], + formatString: [ + { regex: /:/, onMatch: function (val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = { elseEnd: stack[0] }; + return [stack[0].ifEnd]; + } + return ":"; + } }, + { regex: /\\./, onMatch: function (val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = { changeCase: ch, local: ch > "a" }; + return [val]; + } }, + { regex: "/\\w*}", onMatch: function (val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" }, + { regex: /\$(?:\d+|\w+)/, onMatch: function (val, state, stack) { + return [{ text: val.slice(1) }]; + } }, + { regex: /\${\w+/, onMatch: function (val, state, stack) { + var token = { text: val.slice(2) }; + stack.unshift(token); + return [token]; + }, next: "formatStringVar" }, + { regex: /\n/, token: "newline", merge: false }, + { regex: /}/, onMatch: function (val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start" } + ], + formatStringVar: [ + { regex: /:\/\w+}/, onMatch: function (val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString" }, + formatMatcher, + { regex: /:[\?\-+]?/, onMatch: function (val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString" }, + { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString" } + ] + }); + return SnippetManager["$tokenizer"]; + }; + SnippetManager.prototype.tokenizeTmSnippet = function (str, startState) { + return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) { + return x.value || x; + }); + }; + SnippetManager.prototype.getVariableValue = function (editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + name = name.replace(/^TM_/, ""); + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; + }; + SnippetManager.prototype.tmStrFormat = function (str, ch, editor) { + if (!ch.fmt) + return str; + var flag = ch.flag || ""; + var re = ch.guard; + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; + var _self = this; + var formatted = str.replace(re, function () { + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); + var fmtParts = _self.resolveVariables(fmtTokens, editor); + var gChangeCase = "E"; + for (var i = 0; i < fmtParts.length; i++) { + var ch = fmtParts[i]; + if (typeof ch == "object") { + fmtParts[i] = ""; + if (ch.changeCase && ch.local) { + var next = fmtParts[i + 1]; + if (next && typeof next == "string") { + if (ch.changeCase == "u") + fmtParts[i] = next[0].toUpperCase(); + else + fmtParts[i] = next[0].toLowerCase(); + fmtParts[i + 1] = next.substr(1); + } + } + else if (ch.changeCase) { + gChangeCase = ch.changeCase; + } + } + else if (gChangeCase == "U") { + fmtParts[i] = ch.toUpperCase(); + } + else if (gChangeCase == "L") { + fmtParts[i] = ch.toLowerCase(); + } + } + _self.variables.__ = oldArgs; + return fmtParts.join(""); + }); + return formatted; + }; + SnippetManager.prototype.tmFormatFunction = function (str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; + SnippetManager.prototype.resolveVariables = function (snippet, editor) { + var result = []; + var indentation = ""; + var afterNewLine = true; + for (var i = 0; i < snippet.length; i++) { + var ch = snippet[i]; + if (typeof ch == "string") { + result.push(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; + } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) + continue; + afterNewLine = false; + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) + j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } + else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } + else if (ch.elseEnd) { + gotoNext(ch.elseEnd); + } + else if (ch.tabstopId != null) { + result.push(ch); + } + else if (ch.changeCase != null) { + result.push(ch); + } + } + function gotoNext(ch) { + var i1 = snippet.indexOf(ch, i + 1); + if (i1 != -1) + i = i1; + } + return result; + }; + SnippetManager.prototype.getDisplayTextForSnippet = function (editor, snippetText) { + var processedSnippet = processSnippetText.call(this, editor, snippetText); + return processedSnippet.text; + }; + SnippetManager.prototype.insertSnippetForSelection = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var processedSnippet = processSnippetText.call(this, editor, snippetText, options); + var range = editor.getSelectionRange(); + var end = editor.session.replace(range, processedSnippet.text); + var tabstopManager = new TabstopManager(editor); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(processedSnippet.tabstops, range.start, end, selectionId); + }; + SnippetManager.prototype.insertSnippet = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText, options); + editor.forEachSelection(function () { + self.insertSnippetForSelection(editor, snippetText, options); + }, null, { keepOrder: true }); + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); + }; + SnippetManager.prototype.$getScope = function (editor) { + var scope = editor.session.$mode.$id || ""; + scope = scope.split("/").pop(); + if (scope === "html" || scope === "php") { + if (scope === "php" && !editor.session.$mode.inlinePhp) + scope = "html"; + var c = editor.getCursorPosition(); + var state = editor.session.getState(c.row); + if (typeof state === "object") { + state = state[0]; + } + if (state.substring) { + if (state.substring(0, 3) == "js-") + scope = "javascript"; + else if (state.substring(0, 4) == "css-") + scope = "css"; + else if (state.substring(0, 4) == "php-") + scope = "php"; + } + } + return scope; + }; + SnippetManager.prototype.getActiveScopes = function (editor) { + var scope = this.$getScope(editor); + var scopes = [scope]; + var snippetMap = this.snippetMap; + if (snippetMap[scope] && snippetMap[scope].includeScopes) { + scopes.push.apply(scopes, snippetMap[scope].includeScopes); + } + scopes.push("_"); + return scopes; + }; + SnippetManager.prototype.expandWithTab = function (editor, options) { + var self = this; + var result = editor.forEachSelection(function () { + return self.expandSnippetForSelection(editor, options); + }, null, { keepOrder: true }); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + SnippetManager.prototype.expandSnippetForSelection = function (editor, options) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var before = line.substring(0, cursor.column); + var after = line.substr(cursor.column); + var snippetMap = this.snippetMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = this.findMatchingSnippet(snippets, before, after); + return !!snippet; + }, this); + if (!snippet) + return false; + if (options && options.dryRun) + return true; + editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length); + this.variables.M__ = snippet.matchBefore; + this.variables.T__ = snippet.matchAfter; + this.insertSnippetForSelection(editor, snippet.content); + this.variables.M__ = this.variables.T__ = null; + return true; + }; + SnippetManager.prototype.findMatchingSnippet = function (snippetList, before, after) { + for (var i = snippetList.length; i--;) { + var s = snippetList[i]; + if (s.startRe && !s.startRe.test(before)) + continue; + if (s.endRe && !s.endRe.test(after)) + continue; + if (!s.startRe && !s.endRe) + continue; + s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; + s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; + s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; + s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; + return s; + } + }; + SnippetManager.prototype.register = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + var self = this; + if (!snippets) + snippets = []; + function wrapRegexp(src) { + if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) + src = "(?:" + src + ")"; + return src || ""; + } + function guardedRegexp(re, guard, opening) { + re = wrapRegexp(re); + guard = wrapRegexp(guard); + if (opening) { + re = guard + re; + if (re && re[re.length - 1] != "$") + re = re + "$"; + } + else { + re = re + guard; + if (re && re[0] != "^") + re = "^" + re; + } + return new RegExp(re); + } + function addSnippet(s) { + if (!s.scope) + s.scope = scope || "_"; + scope = s.scope; + if (!snippetMap[scope]) { + snippetMap[scope] = []; + snippetNameMap[scope] = {}; + } + var map = snippetNameMap[scope]; + if (s.name) { + var old = map[s.name]; + if (old) + self.unregister(old); + map[s.name] = s; + } + snippetMap[scope].push(s); + if (s.prefix) + s.tabTrigger = s.prefix; + if (!s.content && s.body) + s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body; + if (s.tabTrigger && !s.trigger) { + if (!s.guard && /^\w/.test(s.tabTrigger)) + s.guard = "\\b"; + s.trigger = lang.escapeRegExp(s.tabTrigger); + } + if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) + return; + s.startRe = guardedRegexp(s.trigger, s.guard, true); + s.triggerRe = new RegExp(s.trigger); + s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); + s.endTriggerRe = new RegExp(s.endTrigger); + } + if (Array.isArray(snippets)) { + snippets.forEach(addSnippet); + } + else { + Object.keys(snippets).forEach(function (key) { + addSnippet(snippets[key]); + }); + } + this._signal("registerSnippets", { scope: scope }); + }; + SnippetManager.prototype.unregister = function (snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + function removeSnippet(s) { + var nameMap = snippetNameMap[s.scope || scope]; + if (nameMap && nameMap[s.name]) { + delete nameMap[s.name]; + var map = snippetMap[s.scope || scope]; + var i = map && map.indexOf(s); + if (i >= 0) + map.splice(i, 1); + } + } + if (snippets.content) + removeSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(removeSnippet); + }; + SnippetManager.prototype.parseSnippetFile = function (str) { + str = str.replace(/\r/g, ""); + var list = [], /**@type{Snippet}*/ snippet = {}; + var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; + var m; + while (m = re.exec(str)) { + if (m[1]) { + try { + snippet = JSON.parse(m[1]); + list.push(snippet); + } + catch (e) { } + } + if (m[4]) { + snippet.content = m[4].replace(/^\t/gm, ""); + list.push(snippet); + snippet = {}; + } + else { + var key = m[2], val = m[3]; + if (key == "regex") { + var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; + snippet.guard = guardRe.exec(val)[1]; + snippet.trigger = guardRe.exec(val)[1]; + snippet.endTrigger = guardRe.exec(val)[1]; + snippet.endGuard = guardRe.exec(val)[1]; + } + else if (key == "snippet") { + snippet.tabTrigger = val.match(/^\S*/)[0]; + if (!snippet.name) + snippet.name = val; + } + else if (key) { + snippet[key] = val; + } + } + } + return list; + }; + SnippetManager.prototype.getSnippetByName = function (name, editor) { + var snippetMap = this.snippetNameMap; + var snippet; + this.getActiveScopes(editor).some(function (scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = snippets[name]; + return !!snippet; + }, this); + return snippet; + }; + return SnippetManager; +}()); +oop.implement(SnippetManager.prototype, EventEmitter); +var processSnippetText = function (editor, snippetText, options) { + if (options === void 0) { options = {}; } + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); + snippetText = snippetText.replace(/\r/g, ""); + var tokens = this.tokenizeTmSnippet(snippetText); + tokens = this.resolveVariables(tokens, editor); + tokens = tokens.map(function (x) { + if (x == "\n" && !options.excludeExtraIndent) + return x + indentString; + if (typeof x == "string") + return x.replace(/\t/g, tabString); + return x; + }); + var tabstops = []; + tokens.forEach(function (p, i) { + if (typeof p != "object") + return; + var id = p.tabstopId; + var ts = tabstops[id]; + if (!ts) { + ts = tabstops[id] = []; + ts.index = id; + ts.value = ""; + ts.parents = {}; + } + if (ts.indexOf(p) !== -1) + return; + if (p.choices && !ts.choices) + ts.choices = p.choices; + ts.push(p); + var i1 = tokens.indexOf(p, i + 1); + if (i1 === -1) + return; + var value = tokens.slice(i + 1, i1); + var isNested = value.some(function (t) { return typeof t === "object"; }); + if (isNested && !ts.value) { + ts.value = value; + } + else if (value.length && (!ts.value || typeof ts.value !== "string")) { + ts.value = value.join(""); + } + }); + tabstops.forEach(function (ts) { ts.length = 0; }); + var expanding = {}; + function copyValue(val) { + var copy = []; + for (var i = 0; i < val.length; i++) { + var p = val[i]; + if (typeof p == "object") { + if (expanding[p.tabstopId]) + continue; + var j = val.lastIndexOf(p, i - 1); + p = copy[j] || { tabstopId: p.tabstopId }; + } + copy[i] = p; + } + return copy; + } + for (var i = 0; i < tokens.length; i++) { + var p = tokens[i]; + if (typeof p != "object") + continue; + var id = p.tabstopId; + var ts = tabstops[id]; + var i1 = tokens.indexOf(p, i + 1); + if (expanding[id]) { + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function (parentId) { + ts.parents[parentId] = true; + }); + } + continue; + } + expanding[id] = p; + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); + if (ts.indexOf(p) === -1) + ts.push(p); + } + var row = 0, column = 0; + var text = ""; + tokens.forEach(function (t) { + if (typeof t === "string") { + var lines = t.split("\n"); + if (lines.length > 1) { + column = lines[lines.length - 1].length; + row += lines.length - 1; + } + else + column += t.length; + text += t; + } + else if (t) { + if (!t.start) + t.start = { row: row, column: column }; + else + t.end = { row: row, column: column }; + } + }); + return { + text: text, + tabstops: tabstops, + tokens: tokens + }; +}; +var TabstopManager = /** @class */ (function () { + function TabstopManager(editor) { + this.index = 0; + this.ranges = []; + this.tabstops = []; + if (editor.tabstopManager) + return editor.tabstopManager; + editor.tabstopManager = this; + this.$onChange = this.onChange.bind(this); + this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; + this.$onChangeSession = this.onChangeSession.bind(this); + this.$onAfterExec = this.onAfterExec.bind(this); + this.attach(editor); + } + TabstopManager.prototype.attach = function (editor) { + this.$openTabstops = null; + this.selectedTabstop = null; + this.editor = editor; + this.session = editor.session; + this.editor.on("change", this.$onChange); + this.editor.on("changeSelection", this.$onChangeSelection); + this.editor.on("changeSession", this.$onChangeSession); + this.editor.commands.on("afterExec", this.$onAfterExec); + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + TabstopManager.prototype.detach = function () { + this.tabstops.forEach(this.removeTabstopMarkers, this); + this.ranges.length = 0; + this.tabstops.length = 0; + this.selectedTabstop = null; + this.editor.off("change", this.$onChange); + this.editor.off("changeSelection", this.$onChangeSelection); + this.editor.off("changeSession", this.$onChangeSession); + this.editor.commands.off("afterExec", this.$onAfterExec); + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.tabstopManager = null; + this.session = null; + this.editor = null; + }; + TabstopManager.prototype.onChange = function (delta) { + var isRemove = delta.action[0] == "r"; + var selectedTabstop = this.selectedTabstop || {}; + var parents = selectedTabstop.parents || {}; + var tabstops = this.tabstops.slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + if (delta.action == "remove" && ts !== selectedTabstop) { + var parentActive = ts.parents && ts.parents[selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); + } + ts.rangeList.$onChange(delta); + } + var session = this.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) + this.detach(); + }; + TabstopManager.prototype.updateLinkedFields = function () { + var ts = this.selectedTabstop; + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) + return; + this.$inChange = true; + var session = this.session; + var text = session.getTextRange(ts.firstNonLinked); + for (var i = 0; i < ts.length; i++) { + var range = ts[i]; + if (!range.linked) + continue; + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); + session.replace(range, fmt); + } + this.$inChange = false; + }; + TabstopManager.prototype.onAfterExec = function (e) { + if (e.command && !e.command.readOnly) + this.updateLinkedFields(); + }; + TabstopManager.prototype.onChangeSelection = function () { + if (!this.editor) + return; + var lead = this.editor.selection.lead; + var anchor = this.editor.selection.anchor; + var isEmpty = this.editor.selection.isEmpty(); + for (var i = 0; i < this.ranges.length; i++) { + if (this.ranges[i].linked) + continue; + var containsLead = this.ranges[i].contains(lead.row, lead.column); + var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); + if (containsLead && containsAnchor) + return; + } + this.detach(); + }; + TabstopManager.prototype.onChangeSession = function () { + this.detach(); + }; + TabstopManager.prototype.tabNext = function (dir) { + var max = this.tabstops.length; + var index = this.index + (dir || 1); + index = Math.min(Math.max(index, 1), max); + if (index == max) + index = 0; + this.selectTabstop(index); + this.updateTabstopMarkers(); + if (index === 0) { + this.detach(); + } + }; + TabstopManager.prototype.selectTabstop = function (index) { + this.$openTabstops = null; + var ts = this.tabstops[this.index]; + if (ts) + this.addTabstopMarkers(ts); + this.index = index; + ts = this.tabstops[this.index]; + if (!ts || !ts.length) + return; + this.selectedTabstop = ts; + var range = ts.firstNonLinked || ts; + if (ts.choices) + range.cursor = range.start; + if (!this.editor.inVirtualSelectionMode) { + var sel = this.editor.multiSelect; + sel.toSingleRange(range); + for (var i = 0; i < ts.length; i++) { + if (ts.hasLinkedRanges && ts[i].linked) + continue; + sel.addRange(ts[i].clone(), true); + } + } + else { + this.editor.selection.fromOrientedRange(range); + } + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", { matches: this.selectedTabstop.choices }); + }; + TabstopManager.prototype.addTabstops = function (tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + if (!this.$openTabstops) + this.$openTabstops = []; + if (!tabstops[0]) { + var p = Range.fromPoints(end, end); + moveRelative(p.start, start); + moveRelative(p.end, start); + tabstops[0] = [p]; + tabstops[0].index = 0; + } + var i = this.index; + var arg = [i + 1, 0]; + var ranges = this.ranges; + var snippetId = this.snippetId = (this.snippetId || 0) + 1; + tabstops.forEach(function (ts, index) { + var dest = this.$openTabstops[index] || ts; + dest.snippetId = snippetId; + for (var i = 0; i < ts.length; i++) { + var p = ts[i]; + var range = Range.fromPoints(p.start, p.end || p.start); + movePoint(range.start, start); + movePoint(range.end, start); + range.original = p; + range.tabstop = dest; + ranges.push(range); + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; + if (p.fmtString || (dest.firstNonLinked && useLink)) { + range.linked = true; + dest.hasLinkedRanges = true; + } + else if (!dest.firstNonLinked) + dest.firstNonLinked = range; + } + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); + dest.rangeList = dest.rangeList || new RangeList(); + dest.rangeList.$bias = 0; + dest.rangeList.addList(dest); + }, this); + if (arg.length > 2) { + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } + }; + TabstopManager.prototype.addTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + if (!range.markerId) + range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); + }); + }; + TabstopManager.prototype.removeTabstopMarkers = function (ts) { + var session = this.session; + ts.forEach(function (range) { + session.removeMarker(range.markerId); + range.markerId = null; + }); + }; + TabstopManager.prototype.updateTabstopMarkers = function () { + if (!this.selectedTabstop) + return; + var currentSnippetId = this.selectedTabstop.snippetId; + if (this.selectedTabstop.index === 0) { + currentSnippetId--; + } + this.tabstops.forEach(function (ts) { + if (ts.snippetId === currentSnippetId) + this.addTabstopMarkers(ts); + else + this.removeTabstopMarkers(ts); + }, this); + }; + TabstopManager.prototype.removeRange = function (range) { + var i = range.tabstop.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + i = this.ranges.indexOf(range); + if (i != -1) + this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) + range.tabstop.splice(i, 1); + this.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } + }; + return TabstopManager; +}()); +TabstopManager.prototype.keyboardHandler = new HashHandler(); +TabstopManager.prototype.keyboardHandler.bindKeys({ + "Tab": function (editor) { + if (exports.snippetManager && exports.snippetManager.expandWithTab(editor)) + return; + editor.tabstopManager.tabNext(1); + editor.renderer.scrollCursorIntoView(); + }, + "Shift-Tab": function (editor) { + editor.tabstopManager.tabNext(-1); + editor.renderer.scrollCursorIntoView(); + }, + "Esc": function (editor) { + editor.tabstopManager.detach(); + } +}); +var movePoint = function (point, diff) { + if (point.row == 0) + point.column += diff.column; + point.row += diff.row; +}; +var moveRelative = function (point, start) { + if (point.row == start.row) + point.column -= start.column; + point.row -= start.row; +}; +dom.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}", "snippets.css", false); +exports.snippetManager = new SnippetManager(); +var Editor = require("./editor").Editor; +(function () { + this.insertSnippet = function (content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function (options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + +}); + +define("ace/autocomplete/inline_screenreader",["require","exports","module"], function(require, exports, module){"use strict"; +var AceInlineScreenReader = /** @class */ (function () { + function AceInlineScreenReader(editor) { + this.editor = editor; + this.screenReaderDiv = document.createElement("div"); + this.screenReaderDiv.classList.add("ace_screenreader-only"); + this.editor.container.appendChild(this.screenReaderDiv); + } + AceInlineScreenReader.prototype.setScreenReaderContent = function (content) { + if (!this.popup && this.editor.completer && /**@type{import("../autocomplete").Autocomplete}*/ (this.editor.completer).popup) { + this.popup = /**@type{import("../autocomplete").Autocomplete}*/ (this.editor.completer).popup; + this.popup.renderer.on("afterRender", function () { + var row = this.popup.getRow(); + var t = this.popup.renderer.$textLayer; + var selected = t.element.childNodes[row - t.config.firstRow]; + if (selected) { + var idString = "doc-tooltip "; + for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) { + idString += "ace-inline-screenreader-line-".concat(lineIndex, " "); + } + selected.setAttribute("aria-describedby", idString); + } + }.bind(this)); + } + while (this.screenReaderDiv.firstChild) { + this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild); + } + this._lines = content.split(/\r\n|\r|\n/); + var codeElement = this.createCodeBlock(); + this.screenReaderDiv.appendChild(codeElement); + }; + AceInlineScreenReader.prototype.destroy = function () { + this.screenReaderDiv.remove(); + }; + AceInlineScreenReader.prototype.createCodeBlock = function () { + var container = document.createElement("pre"); + container.setAttribute("id", "ace-inline-screenreader"); + for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) { + var codeElement = document.createElement("code"); + codeElement.setAttribute("id", "ace-inline-screenreader-line-".concat(lineIndex)); + var line = document.createTextNode(this._lines[lineIndex]); + codeElement.appendChild(line); + container.appendChild(codeElement); + } + return container; + }; + return AceInlineScreenReader; +}()); +exports.AceInlineScreenReader = AceInlineScreenReader; + +}); + +define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"], function(require, exports, module){"use strict"; +var snippetManager = require("../snippets").snippetManager; +var AceInlineScreenReader = require("./inline_screenreader").AceInlineScreenReader; +var AceInline = /** @class */ (function () { + function AceInline() { + this.editor = null; + } + AceInline.prototype.show = function (editor, completion, prefix) { + prefix = prefix || ""; + if (editor && this.editor && this.editor !== editor) { + this.hide(); + this.editor = null; + this.inlineScreenReader = null; + } + if (!editor || !completion) { + return false; + } + if (!this.inlineScreenReader) { + this.inlineScreenReader = new AceInlineScreenReader(editor); + } + var displayText = completion.snippet ? snippetManager.getDisplayTextForSnippet(editor, completion.snippet) : completion.value; + if (completion.hideInlinePreview || !displayText || !displayText.startsWith(prefix)) { + return false; + } + this.editor = editor; + this.inlineScreenReader.setScreenReaderContent(displayText); + displayText = displayText.slice(prefix.length); + if (displayText === "") { + editor.removeGhostText(); + } + else { + editor.setGhostText(displayText); + } + return true; + }; + AceInline.prototype.isOpen = function () { + if (!this.editor) { + return false; + } + return !!this.editor.renderer.$ghostText; + }; + AceInline.prototype.hide = function () { + if (!this.editor) { + return false; + } + this.editor.removeGhostText(); + return true; + }; + AceInline.prototype.destroy = function () { + this.hide(); + this.editor = null; + if (this.inlineScreenReader) { + this.inlineScreenReader.destroy(); + this.inlineScreenReader = null; + } + }; + return AceInline; +}()); +exports.AceInline = AceInline; + +}); + +define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module){"use strict"; +exports.parForEach = function (array, fn, callback) { + var completed = 0; + var arLength = array.length; + if (arLength === 0) + callback(); + for (var i = 0; i < arLength; i++) { + fn(array[i], function (result, err) { + completed++; + if (completed === arLength) + callback(result, err); + }); + } +}; +var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/; +exports.retrievePrecedingIdentifier = function (text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos - 1; i >= 0; i--) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf.reverse().join(""); +}; +exports.retrieveFollowingIdentifier = function (text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos; i < text.length; i++) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf; +}; +exports.getCompletionPrefix = function (editor) { + var pos = editor.getCursorPosition(); + var line = editor.session.getLine(pos.row); + var prefix; + editor.completers.forEach(function (completer) { + if (completer.identifierRegexps) { + completer.identifierRegexps.forEach(function (identifierRegex) { + if (!prefix && identifierRegex) + prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + }.bind(this)); + } + }.bind(this)); + return prefix || this.retrievePrecedingIdentifier(line, pos.column); +}; +exports.triggerAutocomplete = function (editor, previousChar) { + var previousChar = previousChar == null + ? editor.session.getPrecedingCharacter() + : previousChar; + return editor.completers.some(function (completer) { + if (completer.triggerCharacters && Array.isArray(completer.triggerCharacters)) { + return completer.triggerCharacters.includes(previousChar); + } + }); +}; + +}); + +define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"], function(require, exports, module){"use strict"; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var AcePopup = require("./autocomplete/popup").AcePopup; +var AceInline = require("./autocomplete/inline").AceInline; +var getAriaId = require("./autocomplete/popup").getAriaId; +var util = require("./autocomplete/util"); +var lang = require("./lib/lang"); +var dom = require("./lib/dom"); +var snippetManager = require("./snippets").snippetManager; +var config = require("./config"); +var event = require("./lib/event"); +var preventParentScroll = require("./lib/scroll").preventParentScroll; +var destroyCompleter = function (e, editor) { + editor.completer && editor.completer.destroy(); +}; +var Autocomplete = /** @class */ (function () { + function Autocomplete() { + this.autoInsert = false; + this.autoSelect = true; + this.autoShown = false; + this.exactMatch = false; + this.inlineEnabled = false; + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys(this.commands); + this.parentNode = null; + this.setSelectOnHover = false; + this.hasSeen = new Set(); + this.showLoadingState = false; + this.stickySelectionDelay = 500; + this.blurListener = this.blurListener.bind(this); + this.changeListener = this.changeListener.bind(this); + this.mousedownListener = this.mousedownListener.bind(this); + this.mousewheelListener = this.mousewheelListener.bind(this); + this.onLayoutChange = this.onLayoutChange.bind(this); + this.changeTimer = lang.delayedCall(function () { + this.updateCompletions(true); + }.bind(this)); + this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); + this.popupTimer = lang.delayedCall(this.$updatePopupPosition.bind(this), 50); + this.stickySelectionTimer = lang.delayedCall(function () { + this.stickySelection = true; + }.bind(this), this.stickySelectionDelay); + this.$firstOpenTimer = lang.delayedCall(/**@this{Autocomplete}*/ function () { + var initialPosition = this.completionProvider && this.completionProvider.initialPosition; + if (this.autoShown || (this.popup && this.popup.isOpen) || !initialPosition || this.editor.completers.length === 0) + return; + this.completions = new FilteredList(Autocomplete.completionsForLoading); + this.openPopup(this.editor, initialPosition.prefix, false); + this.popup.renderer.setStyle("ace_loading", true); + }.bind(this), this.stickySelectionDelay); + } + Object.defineProperty(Autocomplete, "completionsForLoading", { + get: function () { + return [{ + caption: config.nls("autocomplete.loading", "Loading..."), + value: "" + }]; + }, + enumerable: false, + configurable: true + }); + Autocomplete.prototype.$init = function () { + this.popup = new AcePopup(this.parentNode || document.body || document.documentElement); + this.popup.on("click", function (e) { + this.insertMatch(); + e.stop(); + }.bind(this)); + this.popup.focus = this.editor.focus.bind(this.editor); + this.popup.on("show", this.$onPopupShow.bind(this)); + this.popup.on("hide", this.$onHidePopup.bind(this)); + this.popup.on("select", this.$onPopupChange.bind(this)); + event.addListener(this.popup.container, "mouseout", this.mouseOutListener.bind(this)); + this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); + this.popup.renderer.on("afterRender", this.$onPopupRender.bind(this)); + return this.popup; + }; + Autocomplete.prototype.$initInline = function () { + if (!this.inlineEnabled || this.inlineRenderer) + return; + this.inlineRenderer = new AceInline(); + return this.inlineRenderer; + }; + Autocomplete.prototype.getPopup = function () { + return this.popup || this.$init(); + }; + Autocomplete.prototype.$onHidePopup = function () { + if (this.inlineRenderer) { + this.inlineRenderer.hide(); + } + this.hideDocTooltip(); + this.stickySelectionTimer.cancel(); + this.popupTimer.cancel(); + this.stickySelection = false; + }; + Autocomplete.prototype.$seen = function (completion) { + if (!this.hasSeen.has(completion) && completion && completion.completer && completion.completer.onSeen && typeof completion.completer.onSeen === "function") { + completion.completer.onSeen(this.editor, completion); + this.hasSeen.add(completion); + } + }; + Autocomplete.prototype.$onPopupChange = function (hide) { + if (this.inlineRenderer && this.inlineEnabled) { + var completion = hide ? null : this.popup.getData(this.popup.getRow()); + this.$updateGhostText(completion); + if (this.popup.isMouseOver && this.setSelectOnHover) { + this.tooltipTimer.call(null, null); + return; + } + this.popupTimer.schedule(); + this.tooltipTimer.schedule(); + } + else { + this.popupTimer.call(null, null); + this.tooltipTimer.call(null, null); + } + }; + Autocomplete.prototype.$updateGhostText = function (completion) { + var row = this.base.row; + var column = this.base.column; + var cursorColumn = this.editor.getCursorPosition().column; + var prefix = this.editor.session.getLine(row).slice(column, cursorColumn); + if (!this.inlineRenderer.show(this.editor, completion, prefix)) { + this.inlineRenderer.hide(); + } + else { + this.$seen(completion); + } + }; + Autocomplete.prototype.$onPopupRender = function () { + var inlineEnabled = this.inlineRenderer && this.inlineEnabled; + if (this.completions && this.completions.filtered && this.completions.filtered.length > 0) { + for (var i = this.popup.getFirstVisibleRow(); i <= this.popup.getLastVisibleRow(); i++) { + var completion = this.popup.getData(i); + if (completion && (!inlineEnabled || completion.hideInlinePreview)) { + this.$seen(completion); + } + } + } + }; + Autocomplete.prototype.$onPopupShow = function (hide) { + this.$onPopupChange(hide); + this.stickySelection = false; + if (this.stickySelectionDelay >= 0) + this.stickySelectionTimer.schedule(this.stickySelectionDelay); + }; + Autocomplete.prototype.observeLayoutChanges = function () { + if (this.$elements || !this.editor) + return; + window.addEventListener("resize", this.onLayoutChange, { passive: true }); + window.addEventListener("wheel", this.mousewheelListener); + var el = this.editor.container.parentNode; + var elements = []; + while (el) { + elements.push(el); + el.addEventListener("scroll", this.onLayoutChange, { passive: true }); + el = el.parentNode; + } + this.$elements = elements; + }; + Autocomplete.prototype.unObserveLayoutChanges = function () { + var _this = this; + window.removeEventListener("resize", this.onLayoutChange, { passive: true }); + window.removeEventListener("wheel", this.mousewheelListener); + this.$elements && this.$elements.forEach(function (el) { + el.removeEventListener("scroll", _this.onLayoutChange, { passive: true }); + }); + this.$elements = null; + }; + Autocomplete.prototype.onLayoutChange = function () { + if (!this.popup.isOpen) + return this.unObserveLayoutChanges(); + this.$updatePopupPosition(); + this.updateDocTooltip(); + }; + Autocomplete.prototype.$updatePopupPosition = function () { + var editor = this.editor; + var renderer = editor.renderer; + var lineHeight = renderer.layerConfig.lineHeight; + var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); + pos.left -= this.popup.getTextLeftOffset(); + var rect = editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left - editor.renderer.scrollLeft; + pos.left += renderer.gutterWidth; + var posGhostText = { + top: pos.top, + left: pos.left + }; + if (renderer.$ghostText && renderer.$ghostTextWidget) { + if (this.base.row === renderer.$ghostText.position.row) { + posGhostText.top += renderer.$ghostTextWidget.el.offsetHeight; + } + } + var editorContainerBottom = editor.container.getBoundingClientRect().bottom - lineHeight; + var lowestPosition = editorContainerBottom < posGhostText.top ? + { top: editorContainerBottom, left: posGhostText.left } : + posGhostText; + if (this.popup.tryShow(lowestPosition, lineHeight, "bottom")) { + return; + } + if (this.popup.tryShow(pos, lineHeight, "top")) { + return; + } + this.popup.show(pos, lineHeight); + }; + Autocomplete.prototype.openPopup = function (editor, prefix, keepPopupPosition) { + this.$firstOpenTimer.cancel(); + if (!this.popup) + this.$init(); + if (this.inlineEnabled && !this.inlineRenderer) + this.$initInline(); + this.popup.autoSelect = this.autoSelect; + this.popup.setSelectOnHover(this.setSelectOnHover); + var oldRow = this.popup.getRow(); + var previousSelectedItem = this.popup.data[oldRow]; + this.popup.setData(this.completions.filtered, this.completions.filterText); + if (this.editor.textInput.setAriaOptions) { + this.editor.textInput.setAriaOptions({ + activeDescendant: getAriaId(this.popup.getRow()), + inline: this.inlineEnabled + }); + } + editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + var newRow; + if (this.stickySelection) + newRow = this.popup.data.indexOf(previousSelectedItem); + if (!newRow || newRow === -1) + newRow = 0; + this.popup.setRow(this.autoSelect ? newRow : -1); + if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow]) + this.$onPopupChange(); + var inlineEnabled = this.inlineRenderer && this.inlineEnabled; + if (newRow === oldRow && inlineEnabled) { + var completion = this.popup.getData(this.popup.getRow()); + this.$updateGhostText(completion); + } + if (!keepPopupPosition) { + this.popup.setTheme(editor.getTheme()); + this.popup.setFontSize(editor.getFontSize()); + this.$updatePopupPosition(); + if (this.tooltipNode) { + this.updateDocTooltip(); + } + } + this.changeTimer.cancel(); + this.observeLayoutChanges(); + }; + Autocomplete.prototype.detach = function () { + if (this.editor) { + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.off("changeSelection", this.changeListener); + this.editor.off("blur", this.blurListener); + this.editor.off("mousedown", this.mousedownListener); + this.editor.off("mousewheel", this.mousewheelListener); + } + this.$firstOpenTimer.cancel(); + this.changeTimer.cancel(); + this.hideDocTooltip(); + if (this.completionProvider) { + this.completionProvider.detach(); + } + if (this.popup && this.popup.isOpen) + this.popup.hide(); + if (this.popup && this.popup.renderer) { + this.popup.renderer.off("afterRender", this.$onPopupRender); + } + if (this.base) + this.base.detach(); + this.activated = false; + this.completionProvider = this.completions = this.base = null; + this.unObserveLayoutChanges(); + }; + Autocomplete.prototype.changeListener = function (e) { + var cursor = this.editor.selection.lead; + if (cursor.row != this.base.row || cursor.column < this.base.column) { + this.detach(); + } + if (this.activated) + this.changeTimer.schedule(); + else + this.detach(); + }; + Autocomplete.prototype.blurListener = function (e) { + var el = document.activeElement; + var text = this.editor.textInput.getElement(); + var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget); + var container = this.popup && this.popup.container; + if (el != text && el.parentNode != container && !fromTooltip + && el != this.tooltipNode && e.relatedTarget != text) { + this.detach(); + } + }; + Autocomplete.prototype.mousedownListener = function (e) { + this.detach(); + }; + Autocomplete.prototype.mousewheelListener = function (e) { + if (this.popup && !this.popup.isMouseOver) + this.detach(); + }; + Autocomplete.prototype.mouseOutListener = function (e) { + if (this.popup.isOpen) + this.$updatePopupPosition(); + }; + Autocomplete.prototype.goTo = function (where) { + this.popup.goTo(where); + }; + Autocomplete.prototype.insertMatch = function (data, options) { + if (!data) + data = this.popup.getData(this.popup.getRow()); + if (!data) + return false; + if (data.value === "") // Explicitly given nothing to insert, e.g. "No suggestion state" + return this.detach(); + var completions = this.completions; + var result = this.getCompletionProvider().insertMatch(this.editor, data, completions.filterText, options); + if (this.completions == completions) + this.detach(); + return result; + }; + Autocomplete.prototype.showPopup = function (editor, options) { + if (this.editor) + this.detach(); + this.activated = true; + this.editor = editor; + if (editor.completer != this) { + if (editor.completer) + editor.completer.detach(); + editor.completer = this; + } + editor.on("changeSelection", this.changeListener); + editor.on("blur", this.blurListener); + editor.on("mousedown", this.mousedownListener); + editor.on("mousewheel", this.mousewheelListener); + this.updateCompletions(false, options); + }; + Autocomplete.prototype.getCompletionProvider = function (initialPosition) { + if (!this.completionProvider) + this.completionProvider = new CompletionProvider(initialPosition); + return this.completionProvider; + }; + Autocomplete.prototype.gatherCompletions = function (editor, callback) { + return this.getCompletionProvider().gatherCompletions(editor, callback); + }; + Autocomplete.prototype.updateCompletions = function (keepPopupPosition, options) { + if (keepPopupPosition && this.base && this.completions) { + var pos = this.editor.getCursorPosition(); + var prefix = this.editor.session.getTextRange({ start: this.base, end: pos }); + if (prefix == this.completions.filterText) + return; + this.completions.setFilter(prefix); + if (!this.completions.filtered.length) + return this.detach(); + if (this.completions.filtered.length == 1 + && this.completions.filtered[0].value == prefix + && !this.completions.filtered[0].snippet) + return this.detach(); + this.openPopup(this.editor, prefix, keepPopupPosition); + return; + } + if (options && options.matches) { + var pos = this.editor.getSelectionRange().start; + this.base = this.editor.session.doc.createAnchor(pos.row, pos.column); + this.base.$insertRight = true; + this.completions = new FilteredList(options.matches); + this.getCompletionProvider().completions = this.completions; + return this.openPopup(this.editor, "", keepPopupPosition); + } + var session = this.editor.getSession(); + var pos = this.editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(this.editor); + this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); + this.base.$insertRight = true; + var completionOptions = { + exactMatch: this.exactMatch, + ignoreCaption: this.ignoreCaption + }; + this.getCompletionProvider({ + prefix: prefix, + pos: pos + }).provideCompletions(this.editor, completionOptions, + function (err, completions, finished) { + var filtered = completions.filtered; + var prefix = util.getCompletionPrefix(this.editor); + this.$firstOpenTimer.cancel(); + if (finished) { + if (!filtered.length) { + var emptyMessage = !this.autoShown && this.emptyMessage; + if (typeof emptyMessage == "function") + emptyMessage = this.emptyMessage(prefix); + if (emptyMessage) { + var completionsForEmpty = [{ + caption: emptyMessage, + value: "" + } + ]; + this.completions = new FilteredList(completionsForEmpty); + this.openPopup(this.editor, prefix, keepPopupPosition); + this.popup.renderer.setStyle("ace_loading", false); + this.popup.renderer.setStyle("ace_empty-message", true); + return; + } + return this.detach(); + } + if (filtered.length == 1 && filtered[0].value == prefix + && !filtered[0].snippet) + return this.detach(); + if (this.autoInsert && !this.autoShown && filtered.length == 1) + return this.insertMatch(filtered[0]); + } + this.completions = !finished && this.showLoadingState ? + new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) : + completions; + this.openPopup(this.editor, prefix, keepPopupPosition); + this.popup.renderer.setStyle("ace_empty-message", false); + this.popup.renderer.setStyle("ace_loading", !finished); + }.bind(this)); + if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) { + this.$firstOpenTimer.delay(this.stickySelectionDelay / 2); + } + }; + Autocomplete.prototype.cancelContextMenu = function () { + this.editor.$mouseHandler.cancelContextMenu(); + }; + Autocomplete.prototype.updateDocTooltip = function () { + var popup = this.popup; + var all = this.completions.filtered; + var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); + var doc = null; + if (!selected || !this.editor || !this.popup.isOpen) + return this.hideDocTooltip(); + var completersLength = this.editor.completers.length; + for (var i = 0; i < completersLength; i++) { + var completer = this.editor.completers[i]; + if (completer.getDocTooltip && selected.completerId === completer.id) { + doc = completer.getDocTooltip(selected); + break; + } + } + if (!doc && typeof selected != "string") + doc = selected; + if (typeof doc == "string") + doc = { docText: doc }; + if (!doc || !(doc.docHTML || doc.docText)) + return this.hideDocTooltip(); + this.showDocTooltip(doc); + }; + Autocomplete.prototype.showDocTooltip = function (item) { + if (!this.tooltipNode) { + this.tooltipNode = dom.createElement("div"); + this.tooltipNode.style.margin = "0"; + this.tooltipNode.style.pointerEvents = "auto"; + this.tooltipNode.style.overscrollBehavior = "contain"; + this.tooltipNode.tabIndex = -1; + this.tooltipNode.onblur = this.blurListener.bind(this); + this.tooltipNode.onclick = this.onTooltipClick.bind(this); + this.tooltipNode.id = "doc-tooltip"; + this.tooltipNode.setAttribute("role", "tooltip"); + this.tooltipNode.addEventListener("wheel", preventParentScroll); + } + var theme = this.editor.renderer.theme; + this.tooltipNode.className = "ace_tooltip ace_doc-tooltip " + + (theme.isDark ? "ace_dark " : "") + (theme.cssClass || ""); + var tooltipNode = this.tooltipNode; + if (item.docHTML) { + tooltipNode.innerHTML = item.docHTML; + } + else if (item.docText) { + tooltipNode.textContent = item.docText; + } + if (!tooltipNode.parentNode) + this.popup.container.appendChild(this.tooltipNode); + var popup = this.popup; + var rect = popup.container.getBoundingClientRect(); + tooltipNode.style.top = popup.container.style.top; + tooltipNode.style.bottom = popup.container.style.bottom; + tooltipNode.style.display = "block"; + if (window.innerWidth - rect.right < 320) { + if (rect.left < 320) { + if (popup.isTopdown) { + tooltipNode.style.top = rect.bottom + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + else { + tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + } + else { + tooltipNode.style.right = window.innerWidth - rect.left + "px"; + tooltipNode.style.left = ""; + } + } + else { + tooltipNode.style.left = (rect.right + 1) + "px"; + tooltipNode.style.right = ""; + } + }; + Autocomplete.prototype.hideDocTooltip = function () { + this.tooltipTimer.cancel(); + if (!this.tooltipNode) + return; + var el = this.tooltipNode; + if (!this.editor.isFocused() && document.activeElement == el) + this.editor.focus(); + this.tooltipNode = null; + if (el.parentNode) + el.parentNode.removeChild(el); + }; + Autocomplete.prototype.onTooltipClick = function (e) { + var a = e.target; + while (a && a != this.tooltipNode) { + if (a.nodeName == "A" && a.href) { + a.rel = "noreferrer"; + a.target = "_blank"; + break; + } + a = a.parentNode; + } + }; + Autocomplete.prototype.destroy = function () { + this.detach(); + if (this.popup) { + this.popup.destroy(); + var el = this.popup.container; + if (el && el.parentNode) + el.parentNode.removeChild(el); + } + if (this.editor && this.editor.completer == this) { + this.editor.off("destroy", destroyCompleter); + this.editor.completer = null; + } + this.inlineRenderer = this.popup = this.editor = null; + }; + return Autocomplete; +}()); +Autocomplete.prototype.commands = { + "Up": function (editor) { editor.completer.goTo("up"); }, + "Down": function (editor) { editor.completer.goTo("down"); }, + "Ctrl-Up|Ctrl-Home": function (editor) { editor.completer.goTo("start"); }, + "Ctrl-Down|Ctrl-End": function (editor) { editor.completer.goTo("end"); }, + "Esc": function (editor) { editor.completer.detach(); }, + "Return": function (editor) { return editor.completer.insertMatch(); }, + "Shift-Return": function (editor) { editor.completer.insertMatch(null, { deleteSuffix: true }); }, + "Tab": function (editor) { + var result = editor.completer.insertMatch(); + if (!result && !editor.tabstopManager) + editor.completer.goTo("down"); + else + return result; + }, + "Backspace": function (editor) { + editor.execCommand("backspace"); + var prefix = util.getCompletionPrefix(editor); + if (!prefix && editor.completer) + editor.completer.detach(); + }, + "PageUp": function (editor) { editor.completer.popup.gotoPageUp(); }, + "PageDown": function (editor) { editor.completer.popup.gotoPageDown(); } +}; +Autocomplete.for = function (editor) { + if (editor.completer instanceof Autocomplete) { + return editor.completer; + } + if (editor.completer) { + editor.completer.destroy(); + editor.completer = null; + } + if (config.get("sharedPopups")) { + if (!Autocomplete["$sharedInstance"]) + Autocomplete["$sharedInstance"] = new Autocomplete(); + editor.completer = Autocomplete["$sharedInstance"]; + } + else { + editor.completer = new Autocomplete(); + editor.once("destroy", destroyCompleter); + } + return editor.completer; +}; +Autocomplete.startCommand = { + name: "startAutocomplete", + exec: function (editor, options) { + var completer = Autocomplete.for(editor); + completer.autoInsert = false; + completer.autoSelect = true; + completer.autoShown = false; + completer.showPopup(editor, options); + completer.cancelContextMenu(); + }, + bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" +}; +var CompletionProvider = /** @class */ (function () { + function CompletionProvider(initialPosition) { + this.initialPosition = initialPosition; + this.active = true; + } + CompletionProvider.prototype.insertByIndex = function (editor, index, options) { + if (!this.completions || !this.completions.filtered) { + return false; + } + return this.insertMatch(editor, this.completions.filtered[index], options); + }; + CompletionProvider.prototype.insertMatch = function (editor, data, options) { + if (!data) + return false; + editor.startOperation({ command: { name: "insertMatch" } }); + if (data.completer && data.completer.insertMatch) { + data.completer.insertMatch(editor, data); + } + else { + if (!this.completions) + return false; + var replaceBefore = this.completions.filterText.length; + var replaceAfter = 0; + if (data.range && data.range.start.row === data.range.end.row) { + replaceBefore -= this.initialPosition.prefix.length; + replaceBefore += this.initialPosition.pos.column - data.range.start.column; + replaceAfter += data.range.end.column - this.initialPosition.pos.column; + } + if (replaceBefore || replaceAfter) { + var ranges; + if (editor.selection.getAllRanges) { + ranges = editor.selection.getAllRanges(); + } + else { + ranges = [editor.getSelectionRange()]; + } + for (var i = 0, range; range = ranges[i]; i++) { + range.start.column -= replaceBefore; + range.end.column += replaceAfter; + editor.session.remove(range); + } + } + if (data.snippet) { + snippetManager.insertSnippet(editor, data.snippet); + } + else { + this.$insertString(editor, data); + } + if (data.completer && data.completer.onInsert && typeof data.completer.onInsert == "function") { + data.completer.onInsert(editor, data); + } + if (data.command && data.command === "startAutocomplete") { + editor.execCommand(data.command); + } + } + editor.endOperation(); + return true; + }; + CompletionProvider.prototype.$insertString = function (editor, data) { + var text = data.value || data; + editor.execCommand("insertstring", text); + }; + CompletionProvider.prototype.gatherCompletions = function (editor, callback) { + var session = editor.getSession(); + var pos = editor.getCursorPosition(); + var prefix = util.getCompletionPrefix(editor); + var matches = []; + this.completers = editor.completers; + var total = editor.completers.length; + editor.completers.forEach(function (completer, i) { + completer.getCompletions(editor, session, pos, prefix, function (err, results) { + if (completer.hideInlinePreview) + results = results.map(function (result) { + return Object.assign(result, { hideInlinePreview: completer.hideInlinePreview }); + }); + if (!err && results) + matches = matches.concat(results); + callback(null, { + prefix: util.getCompletionPrefix(editor), + matches: matches, + finished: (--total === 0) + }); + }); + }); + return true; + }; + CompletionProvider.prototype.provideCompletions = function (editor, options, callback) { + var processResults = function (results) { + var prefix = results.prefix; + var matches = results.matches; + this.completions = new FilteredList(matches); + if (options.exactMatch) + this.completions.exactMatch = true; + if (options.ignoreCaption) + this.completions.ignoreCaption = true; + this.completions.setFilter(prefix); + if (results.finished || this.completions.filtered.length) + callback(null, this.completions, results.finished); + }.bind(this); + var isImmediate = true; + var immediateResults = null; + this.gatherCompletions(editor, function (err, results) { + if (!this.active) { + return; + } + if (err) { + callback(err, [], true); + this.detach(); + } + var prefix = results.prefix; + if (prefix.indexOf(results.prefix) !== 0) + return; + if (isImmediate) { + immediateResults = results; + return; + } + processResults(results); + }.bind(this)); + isImmediate = false; + if (immediateResults) { + var results = immediateResults; + immediateResults = null; + processResults(results); + } + }; + CompletionProvider.prototype.detach = function () { + this.active = false; + this.completers && this.completers.forEach(function (completer) { + if (typeof completer.cancel === "function") { + completer.cancel(); + } + }); + }; + return CompletionProvider; +}()); +var FilteredList = /** @class */ (function () { + function FilteredList(array, filterText) { + this.all = array; + this.filtered = array; + this.filterText = filterText || ""; + this.exactMatch = false; + this.ignoreCaption = false; + } + FilteredList.prototype.setFilter = function (str) { + if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) + var matches = this.filtered; + else + var matches = this.all; + this.filterText = str; + matches = this.filterCompletions(matches, this.filterText); + matches = matches.sort(function (a, b) { + return b.exactMatch - a.exactMatch || b.$score - a.$score + || (a.caption || a.value).localeCompare(b.caption || b.value); + }); + var prev = null; + matches = matches.filter(function (item) { + var caption = item.snippet || item.caption || item.value; + if (caption === prev) + return false; + prev = caption; + return true; + }); + this.filtered = matches; + }; + FilteredList.prototype.filterCompletions = function (items, needle) { + var results = []; + var upper = needle.toUpperCase(); + var lower = needle.toLowerCase(); + loop: for (var i = 0, item; item = items[i]; i++) { + var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet; + if (!caption) + continue; + var lastIndex = -1; + var matchMask = 0; + var penalty = 0; + var index, distance; + if (this.exactMatch) { + if (needle !== caption.substr(0, needle.length)) + continue loop; + } + else { + var fullMatchIndex = caption.toLowerCase().indexOf(lower); + if (fullMatchIndex > -1) { + penalty = fullMatchIndex; + } + else { + for (var j = 0; j < needle.length; j++) { + var i1 = caption.indexOf(lower[j], lastIndex + 1); + var i2 = caption.indexOf(upper[j], lastIndex + 1); + index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; + if (index < 0) + continue loop; + distance = index - lastIndex - 1; + if (distance > 0) { + if (lastIndex === -1) + penalty += 10; + penalty += distance; + matchMask = matchMask | (1 << j); + } + lastIndex = index; + } + } + } + item.matchMask = matchMask; + item.exactMatch = penalty ? 0 : 1; + item.$score = (item.score || 0) - penalty; + results.push(item); + } + return results; + }; + return FilteredList; +}()); +exports.Autocomplete = Autocomplete; +exports.CompletionProvider = CompletionProvider; +exports.FilteredList = FilteredList; + +}); + +define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"], function(require, exports, module){module.exports = "#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"; + +}); + +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +'use strict'; +var dom = require("../../lib/dom"); +var cssText = require("./settings_menu.css"); +dom.importCssString(cssText, "settings_menu.css", false); +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + var ignoreFocusOut = false; + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + function close() { + if (!closer) + return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + if (editor) { + editor.focus(); + } + closer = null; + callback && callback(); + } + function setIgnoreFocusOut(ignore) { + ignoreFocusOut = ignore; + if (ignore) { + closer.style.pointerEvents = "none"; + contentElement.style.pointerEvents = "auto"; + } + } + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + (editor ? 'background-color: rgba(0, 0, 0, 0.3);' : ''); + closer.addEventListener('click', function (e) { + if (!ignoreFocusOut) { + close(); + } + }); + document.addEventListener('keydown', documentEscListener); + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + closer.appendChild(contentElement); + document.body.appendChild(closer); + if (editor) { + editor.blur(); + } + return { + close: close, + setIgnoreFocusOut: setIgnoreFocusOut + }; +}; + +}); + +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module){"use strict"; +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} +var Mode = /** @class */ (function () { + function Mode(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function (a, b) { + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } + else { + re = "^.*\\.(" + extensions + ")$"; + } + this.extRe = new RegExp(re, "gi"); + } + Mode.prototype.supportsFile = function (filename) { + return filename.match(this.extRe); + }; + return Mode; +}()); +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript: ["as"], + ADA: ["ada|adb"], + Alda: ["alda"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl|asl.json"], + Assembly_ARM32: ["s"], + Assembly_x86: ["asm|a"], + Astro: ["astro"], + AutoHotKey: ["ahk"], + BatchFile: ["bat|cmd"], + BibTeX: ["bib"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm|cfc"], + Crystal: ["cr"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + Cuttlefish: ["conf"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Django: ["djt|html.djt|dj.html|djhtml"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Flix: ["flix"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Ion: ["ion"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|cjs|mjs"], + JEXL: ["jexl"], + JSON: ["json"], + JSON5: ["json5"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + Latte: ["latte"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + Log: ["log"], + LogiQL: ["logic|lql"], + Logtalk: ["lgt"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MediaWiki: ["wiki|mediawiki"], + MEL: ["mel"], + MIPS: ["s|asm"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nasal: ["nas"], + Nginx: ["nginx|conf"], + Nim: ["nim"], + Nix: ["nix"], + NSIS: ["nsi|nsh"], + Nunjucks: ["nunjucks|nunjs|nj|njk"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Odin: ["odin"], + PartiQL: ["partiql|pql"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + pgSQL: ["pgsql"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + PHP_Laravel_blade: ["blade.php"], + Pig: ["pig"], + PLSQL: ["plsql"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prisma: ["prisma"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + PRQL: ["prql"], + Puppet: ["epp|pp"], + Python: ["py"], + QML: ["qml"], + R: ["r"], + Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + Robot: ["robot|resource"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SaC: ["sac"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + Scrypt: ["scrypt"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + Smithy: ["smithy"], + snippets: ["snippets"], + Soy_Template: ["soy"], + Space: ["space"], + SPARQL: ["rq"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Turtle: ["ttl"], + Twig: ["twig|swig"], + Typescript: ["ts|mts|cts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Vue: ["vue"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Zig: ["zig"] +}; +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); + +define("ace/ext/prompt",["require","exports","module","ace/config","ace/range","ace/lib/dom","ace/autocomplete","ace/autocomplete/popup","ace/autocomplete/popup","ace/undomanager","ace/tokenizer","ace/ext/menu_tools/overlay_page","ace/ext/modelist"], function(require, exports, module){/** + * @typedef {import("../editor").Editor} Editor + */ +"use strict"; +var nls = require("../config").nls; +var Range = require("../range").Range; +var dom = require("../lib/dom"); +var FilteredList = require("../autocomplete").FilteredList; +var AcePopup = require('../autocomplete/popup').AcePopup; +var $singleLineEditor = require('../autocomplete/popup').$singleLineEditor; +var UndoManager = require("../undomanager").UndoManager; +var Tokenizer = require("../tokenizer").Tokenizer; +var overlayPage = require("./menu_tools/overlay_page").overlayPage; +var modelist = require("./modelist"); +var openPrompt; +function prompt(editor, message, options, callback) { + if (typeof message == "object") { + return prompt(editor, "", message, options); + } + if (openPrompt) { + var lastPrompt = openPrompt; + editor = lastPrompt.editor; + lastPrompt.close(); + if (lastPrompt.name && lastPrompt.name == options.name) + return; + } + if (options.$type) + return prompt[options.$type](editor, callback); + var cmdLine = $singleLineEditor(); + cmdLine.session.setUndoManager(new UndoManager()); + var el = dom.buildDom(["div", { class: "ace_prompt_container" + (options.hasDescription ? " input-box-with-description" : "") }]); + var overlay = overlayPage(editor, el, done); + el.appendChild(cmdLine.container); + if (editor) { + editor.cmdLine = cmdLine; + cmdLine.setOption("fontSize", editor.getOption("fontSize")); + } + if (message) { + cmdLine.setValue(message, 1); + } + if (options.selection) { + cmdLine.selection.setRange({ + start: cmdLine.session.doc.indexToPosition(options.selection[0]), + end: cmdLine.session.doc.indexToPosition(options.selection[1]) + }); + } + if (options.getCompletions) { + var popup = new AcePopup(); + popup.renderer.setStyle("ace_autocomplete_inline"); + popup.container.style.display = "block"; + popup.container.style.maxWidth = "600px"; + popup.container.style.width = "100%"; + popup.container.style.marginTop = "3px"; + popup.renderer.setScrollMargin(2, 2, 0, 0); + popup.autoSelect = false; + popup.renderer.$maxLines = 15; + popup.setRow(-1); + popup.on("click", function (e) { + var data = popup.getData(popup.getRow()); + if (!data["error"]) { + cmdLine.setValue(data.value || data["name"] || data); + accept(); + e.stop(); + } + }); + el.appendChild(popup.container); + updateCompletions(); + } + if (options.$rules) { + var tokenizer = new Tokenizer(options.$rules); + cmdLine.session.bgTokenizer.setTokenizer(tokenizer); + } + if (options.placeholder) { + cmdLine.setOption("placeholder", options.placeholder); + } + if (options.hasDescription) { + var promptTextContainer = dom.buildDom(["div", { class: "ace_prompt_text_container" }]); + dom.buildDom(options.prompt || "Press 'Enter' to confirm or 'Escape' to cancel", promptTextContainer); + el.appendChild(promptTextContainer); + } + overlay.setIgnoreFocusOut(options.ignoreFocusOut); + function accept() { + var val; + if (popup && popup.getCursorPosition().row > 0) { + val = valueFromRecentList(); + } + else { + val = cmdLine.getValue(); + } + var curData = popup ? popup.getData(popup.getRow()) : val; + if (curData && !curData["error"]) { + done(); + options.onAccept && options.onAccept({ + value: val, + item: curData + }, cmdLine); + } + } + var keys = { + "Enter": accept, + "Esc|Shift-Esc": function () { + options.onCancel && options.onCancel(cmdLine.getValue(), cmdLine); + done(); + } + }; + if (popup) { + Object.assign(keys, { + "Up": function (editor) { popup.goTo("up"); valueFromRecentList(); }, + "Down": function (editor) { popup.goTo("down"); valueFromRecentList(); }, + "Ctrl-Up|Ctrl-Home": function (editor) { popup.goTo("start"); valueFromRecentList(); }, + "Ctrl-Down|Ctrl-End": function (editor) { popup.goTo("end"); valueFromRecentList(); }, + "Tab": function (editor) { + popup.goTo("down"); + valueFromRecentList(); + }, + "PageUp": function (editor) { popup.gotoPageUp(); valueFromRecentList(); }, + "PageDown": function (editor) { popup.gotoPageDown(); valueFromRecentList(); } + }); + } + cmdLine.commands.bindKeys(keys); + function done() { + overlay.close(); + callback && callback(); + openPrompt = null; + } + cmdLine.on("input", function () { + options.onInput && options.onInput(); + updateCompletions(); + }); + function updateCompletions() { + if (options.getCompletions) { + var prefix; + if (options.getPrefix) { + prefix = options.getPrefix(cmdLine); + } + var completions = options.getCompletions(cmdLine); + popup.setData(completions, prefix); + popup.resize(true); + } + } + function valueFromRecentList() { + var current = popup.getData(popup.getRow()); + if (current && !current["error"]) + return current.value || current.caption || current; + } + cmdLine.resize(true); + if (popup) { + popup.resize(true); + } + cmdLine.focus(); + openPrompt = { + close: done, + name: options.name, + editor: editor + }; +} +prompt.gotoLine = function (editor, callback) { + function stringifySelection(selection) { + if (!Array.isArray(selection)) + selection = [selection]; + return selection.map(function (r) { + var cursor = r.isBackwards ? r.start : r.end; + var anchor = r.isBackwards ? r.end : r.start; + var row = anchor.row; + var s = (row + 1) + ":" + anchor.column; + if (anchor.row == cursor.row) { + if (anchor.column != cursor.column) + s += ">" + ":" + cursor.column; + } + else { + s += ">" + (cursor.row + 1) + ":" + cursor.column; + } + return s; + }).reverse().join(", "); + } + prompt(editor, ":" + stringifySelection(editor.selection.toJSON()), { + name: "gotoLine", + selection: [1, Number.MAX_VALUE], + onAccept: function (data) { + var value = data.value; + var _history = prompt.gotoLine["_history"]; + if (!_history) + prompt.gotoLine["_history"] = _history = []; + if (_history.indexOf(value) != -1) + _history.splice(_history.indexOf(value), 1); + _history.unshift(value); + if (_history.length > 20) + _history.length = 20; + var pos = editor.getCursorPosition(); + var ranges = []; + value.replace(/^:/, "").split(/,/).map(function (str) { + var parts = str.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean); + var i = 0; + function readPosition() { + var c = parts[i++]; + if (!c) + return; + if (c[0] == "c") { + var index = parseInt(c.slice(1)) || 0; + return editor.session.doc.indexToPosition(index); + } + var row = pos.row; + var column = 0; + if (/\d/.test(c)) { + row = parseInt(c) - 1; + c = parts[i++]; + } + if (c == ":") { + c = parts[i++]; + if (/\d/.test(c)) { + column = parseInt(c) || 0; + } + } + return { row: row, column: column }; + } + pos = readPosition(); + var range = Range.fromPoints(pos, pos); + if (parts[i] == ">") { + i++; + range.end = readPosition(); + } + else if (parts[i] == "<") { + i++; + range.start = readPosition(); + } + ranges.unshift(range); + }); + editor.selection.fromJSON(ranges); + var scrollTop = editor.renderer.scrollTop; + editor.renderer.scrollSelectionIntoView(editor.selection.anchor, editor.selection.cursor, 0.5); + editor.renderer.animateScrolling(scrollTop); + }, + history: function () { + if (!prompt.gotoLine["_history"]) + return []; + return prompt.gotoLine["_history"]; + }, + getCompletions: function (cmdLine) { + var value = cmdLine.getValue(); + var m = value.replace(/^:/, "").split(":"); + var row = Math.min(parseInt(m[0]) || 1, editor.session.getLength()) - 1; + var line = editor.session.getLine(row); + var current = value + " " + line; + return [current].concat(this.history()); + }, + $rules: { + start: [{ + regex: /\d+/, + token: "string" + }, { + regex: /[:,><+\-c]/, + token: "keyword" + }] + } + }); +}; +prompt.commands = function (editor, callback) { + function normalizeName(name) { + return (name || "").replace(/^./, function (x) { + return x.toUpperCase(x); + }).replace(/[a-z][A-Z]/g, function (x) { + return x[0] + " " + x[1].toLowerCase(x); + }); + } + function getEditorCommandsByName(excludeCommands) { + var commandsByName = []; + var commandMap = {}; + editor.keyBinding.$handlers.forEach(function (handler) { + var platform = handler["platform"]; + var cbn = handler["byName"]; + for (var i in cbn) { + var key = cbn[i].bindKey; + if (typeof key !== "string") { + key = key && key[platform] || ""; + } + var commands = cbn[i]; + var description = commands.description || normalizeName(commands.name); + if (!Array.isArray(commands)) + commands = [commands]; + commands.forEach(function (command) { + if (typeof command != "string") + command = command.name; + var needle = excludeCommands.find(function (el) { + return el === command; + }); + if (!needle) { + if (commandMap[command]) { + commandMap[command].key += "|" + key; + } + else { + commandMap[command] = { key: key, command: command, description: description }; + commandsByName.push(commandMap[command]); + } + } + }); + } + }); + return commandsByName; + } + var excludeCommandsList = ["insertstring", "inserttext", "setIndentation", "paste"]; + var shortcutsArray = getEditorCommandsByName(excludeCommandsList); + shortcutsArray = shortcutsArray.map(function (item) { + return { value: item.description, meta: item.key, command: item.command }; + }); + prompt(editor, "", { + name: "commands", + selection: [0, Number.MAX_VALUE], + maxHistoryCount: 5, + onAccept: function (data) { + if (data.item) { + var commandName = data.item.command; + this.addToHistory(data.item); + editor.execCommand(commandName); + } + }, + addToHistory: function (item) { + var history = this.history(); + history.unshift(item); + delete item.message; + for (var i = 1; i < history.length; i++) { + if (history[i]["command"] == item.command) { + history.splice(i, 1); + break; + } + } + if (this.maxHistoryCount > 0 && history.length > this.maxHistoryCount) { + history.splice(history.length - 1, 1); + } + prompt.commands["history"] = history; + }, + history: function () { + return prompt.commands["history"] || []; + }, + getPrefix: function (cmdLine) { + var currentPos = cmdLine.getCursorPosition(); + var filterValue = cmdLine.getValue(); + return filterValue.substring(0, currentPos.column); + }, + getCompletions: function (cmdLine) { + function getFilteredCompletions(commands, prefix) { + var resultCommands = JSON.parse(JSON.stringify(commands)); + var filtered = new FilteredList(resultCommands); + return filtered.filterCompletions(resultCommands, prefix); + } + function getUniqueCommandList(commands, usedCommands) { + if (!usedCommands || !usedCommands.length) { + return commands; + } + var excludeCommands = []; + usedCommands.forEach(function (item) { + excludeCommands.push(item.command); + }); + var resultCommands = []; + commands.forEach(function (item) { + if (excludeCommands.indexOf(item.command) === -1) { + resultCommands.push(item); + } + }); + return resultCommands; + } + var prefix = this.getPrefix(cmdLine); + var recentlyUsedCommands = getFilteredCompletions(this.history(), prefix); + var otherCommands = getUniqueCommandList(shortcutsArray, recentlyUsedCommands); + otherCommands = getFilteredCompletions(otherCommands, prefix); + if (recentlyUsedCommands.length && otherCommands.length) { + recentlyUsedCommands[0].message = nls("prompt.recently-used", "Recently used"); + otherCommands[0].message = nls("prompt.other-commands", "Other commands"); + } + var completions = recentlyUsedCommands.concat(otherCommands); + return completions.length > 0 ? completions : [{ + value: nls("prompt.no-matching-commands", "No matching commands"), + error: 1 + }]; + } + }); +}; +prompt.modes = function (editor, callback) { + var modesArray = modelist.modes; + modesArray = modesArray.map(function (item) { + return { value: item.caption, mode: item.name }; + }); + prompt(editor, "", { + name: "modes", + selection: [0, Number.MAX_VALUE], + onAccept: function (data) { + if (data.item) { + var modeName = "ace/mode/" + data.item.mode; + editor.session.setMode(modeName); + } + }, + getPrefix: function (cmdLine) { + var currentPos = cmdLine.getCursorPosition(); + var filterValue = cmdLine.getValue(); + return filterValue.substring(0, currentPos.column); + }, + getCompletions: function (cmdLine) { + function getFilteredCompletions(modes, prefix) { + var resultCommands = JSON.parse(JSON.stringify(modes)); + var filtered = new FilteredList(resultCommands); + return filtered.filterCompletions(resultCommands, prefix); + } + var prefix = this.getPrefix(cmdLine); + var completions = getFilteredCompletions(modesArray, prefix); + return completions.length > 0 ? completions : [{ + "caption": "No mode matching", + "value": "No mode matching", + "error": 1 + }]; + } + }); +}; +dom.importCssString(".ace_prompt_container {\n max-width: 603px;\n width: 100%;\n margin: 20px auto;\n padding: 3px;\n background: white;\n border-radius: 2px;\n box-shadow: 0px 2px 3px 0px #555;\n}", "promtp.css", false); +exports.prompt = prompt; + +}); (function() { + window.require(["ace/ext/prompt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-rtl.js b/ui/base1/ace/ext-rtl.js new file mode 100644 index 0000000..e7a269f --- /dev/null +++ b/ui/base1/ace/ext-rtl.js @@ -0,0 +1,120 @@ +define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var commands = [{ + name: "leftToRight", + bindKey: { win: "Ctrl-Alt-Shift-L", mac: "Command-Alt-Shift-L" }, + exec: function (editor) { + editor.session.$bidiHandler.setRtlDirection(editor, false); + }, + readOnly: true + }, { + name: "rightToLeft", + bindKey: { win: "Ctrl-Alt-Shift-R", mac: "Command-Alt-Shift-R" }, + exec: function (editor) { + editor.session.$bidiHandler.setRtlDirection(editor, true); + }, + readOnly: true + }]; +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + rtlText: { + set: function (val) { + if (val) { + this.on("change", onChange); + this.on("changeSelection", onChangeSelection); + this.renderer.on("afterRender", updateLineDirection); + this.commands.on("exec", onCommandEmitted); + this.commands.addCommands(commands); + } + else { + this.off("change", onChange); + this.off("changeSelection", onChangeSelection); + this.renderer.off("afterRender", updateLineDirection); + this.commands.off("exec", onCommandEmitted); + this.commands.removeCommands(commands); + clearTextLayer(this.renderer); + } + this.renderer.updateFull(); + } + }, + rtl: { + set: function (val) { + this.session.$bidiHandler.$isRtl = val; + if (val) { + this.setOption("rtlText", false); + this.renderer.on("afterRender", updateLineDirection); + this.session.$bidiHandler.seenBidi = true; + } + else { + this.renderer.off("afterRender", updateLineDirection); + clearTextLayer(this.renderer); + } + this.renderer.updateFull(); + } + } +}); +function onChangeSelection(e, editor) { + var lead = editor.getSelection().lead; + if (editor.session.$bidiHandler.isRtlLine(lead.row)) { + if (lead.column === 0) { + if (editor.session.$bidiHandler.isMoveLeftOperation && lead.row > 0) { + editor.getSelection().moveCursorTo(lead.row - 1, editor.session.getLine(lead.row - 1).length); + } + else { + if (editor.getSelection().isEmpty()) + lead.column += 1; + else + lead.setPosition(lead.row, lead.column + 1); + } + } + } +} +function onCommandEmitted(commadEvent) { + commadEvent.editor.session.$bidiHandler.isMoveLeftOperation = /gotoleft|selectleft|backspace|removewordleft/.test(commadEvent.command.name); +} +function onChange(delta, editor) { + var session = editor.session; + session.$bidiHandler.currentRow = null; + if (session.$bidiHandler.isRtlLine(delta.start.row) && delta.action === 'insert' && delta.lines.length > 1) { + for (var row = delta.start.row; row < delta.end.row; row++) { + if (session.getLine(row + 1).charAt(0) !== session.$bidiHandler.RLE) + session.doc.$lines[row + 1] = session.$bidiHandler.RLE + session.getLine(row + 1); + } + } +} +function updateLineDirection(e, renderer) { + var session = renderer.session; + var $bidiHandler = session.$bidiHandler; + var cells = renderer.$textLayer.$lines.cells; + var width = renderer.layerConfig.width - renderer.layerConfig.padding + "px"; + cells.forEach(function (cell) { + var style = cell.element.style; + if ($bidiHandler && $bidiHandler.isRtlLine(cell.row)) { + style.direction = "rtl"; + style.textAlign = "right"; + style.width = width; + } + else { + style.direction = ""; + style.textAlign = ""; + style.width = ""; + } + }); +} +function clearTextLayer(renderer) { + var lines = renderer.$textLayer.$lines; + lines.cells.forEach(clear); + lines.cellCache.forEach(clear); + function clear(cell) { + var style = cell.element.style; + style.direction = style.textAlign = style.width = ""; + } +} + +}); (function() { + window.require(["ace/ext/rtl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-searchbox.js b/ui/base1/ace/ext-searchbox.js new file mode 100644 index 0000000..7e98556 --- /dev/null +++ b/ui/base1/ace/ext-searchbox.js @@ -0,0 +1,344 @@ +define("ace/ext/searchbox-css",["require","exports","module"], function(require, exports, module){module.exports = "\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n background-color: #ddd;\n color: #666;\n border: 1px solid #cbcbcb;\n border-top: 0 none;\n overflow: hidden;\n margin: 0;\n padding: 4px 6px 0 4px;\n position: absolute;\n top: 0;\n z-index: 99;\n white-space: normal;\n}\n.ace_search.left {\n border-left: 0 none;\n border-radius: 0px 0px 5px 0px;\n left: 0;\n}\n.ace_search.right {\n border-radius: 0px 0px 0px 5px;\n border-right: 0 none;\n right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n margin: 0 20px 4px 0;\n overflow: hidden;\n line-height: 1.9;\n}\n.ace_replace_form {\n margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n outline: 1px solid red;\n}\n\n.ace_search_field {\n border-radius: 3px 0 0 3px;\n background-color: white;\n color: black;\n border: 1px solid #cbcbcb;\n border-right: 0 none;\n outline: 0;\n padding: 0;\n font-size: inherit;\n margin: 0;\n line-height: inherit;\n padding: 0 6px;\n min-width: 17em;\n vertical-align: top;\n min-height: 1.8em;\n box-sizing: content-box;\n}\n.ace_searchbtn {\n border: 1px solid #cbcbcb;\n line-height: inherit;\n display: inline-block;\n padding: 0 6px;\n background: #fff;\n border-right: 0 none;\n border-left: 1px solid #dcdcdc;\n cursor: pointer;\n margin: 0;\n position: relative;\n color: #666;\n}\n.ace_searchbtn:last-child {\n border-radius: 0 3px 3px 0;\n border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n background: none;\n cursor: default;\n}\n.ace_searchbtn:hover {\n background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n content: \"\";\n border: solid 2px #888;\n width: 0.5em;\n height: 0.5em;\n border-width: 2px 0 0 2px;\n display:inline-block;\n transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n border-radius: 50%;\n border: 0 none;\n color: #656565;\n cursor: pointer;\n font: 16px/16px Arial;\n padding: 0;\n height: 14px;\n width: 14px;\n top: 9px;\n right: 7px;\n position: absolute;\n}\n.ace_searchbtn_close:hover {\n background-color: #656565;\n background-position: 50% 100%;\n color: white;\n}\n\n.ace_button {\n margin-left: 2px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n opacity: 0.7;\n border: 1px solid rgba(100,100,100,0.23);\n padding: 1px;\n box-sizing: border-box!important;\n color: black;\n}\n\n.ace_button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_button:active {\n background-color: #ddd;\n}\n\n.ace_button.checked {\n border-color: #3399ff;\n opacity:1;\n}\n\n.ace_search_options{\n margin-bottom: 3px;\n text-align: right;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clear: both;\n}\n\n.ace_search_counter {\n float: left;\n font-family: arial;\n padding: 0 8px;\n}"; + +}); + +define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var event = require("../lib/event"); +var searchboxCss = require("./searchbox-css"); +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var keyUtil = require("../lib/keys"); +var nls = require("../config").nls; +var MAX_COUNT = 999; +dom.importCssString(searchboxCss, "ace_searchbox", false); +var SearchBox = /** @class */ (function () { + function SearchBox(editor, range, showReplaceForm) { + this.activeInput; + var div = dom.createElement("div"); + dom.buildDom(["div", { class: "ace_search right" }, + ["span", { action: "hide", class: "ace_searchbtn_close" }], + ["div", { class: "ace_search_form" }, + ["input", { class: "ace_search_field", placeholder: nls("search-box.find.placeholder", "Search for"), spellcheck: "false" }], + ["span", { action: "findPrev", class: "ace_searchbtn prev" }, "\u200b"], + ["span", { action: "findNext", class: "ace_searchbtn next" }, "\u200b"], + ["span", { action: "findAll", class: "ace_searchbtn", title: "Alt-Enter" }, nls("search-box.find-all.text", "All")] + ], + ["div", { class: "ace_replace_form" }, + ["input", { class: "ace_search_field", placeholder: nls("search-box.replace.placeholder", "Replace with"), spellcheck: "false" }], + ["span", { action: "replaceAndFindNext", class: "ace_searchbtn" }, nls("search-box.replace-next.text", "Replace")], + ["span", { action: "replaceAll", class: "ace_searchbtn" }, nls("search-box.replace-all.text", "All")] + ], + ["div", { class: "ace_search_options" }, + ["span", { action: "toggleReplace", class: "ace_button", title: nls("search-box.toggle-replace.title", "Toggle Replace mode"), + style: "float:left;margin-top:-2px;padding:0 5px;" }, "+"], + ["span", { class: "ace_search_counter" }], + ["span", { action: "toggleRegexpMode", class: "ace_button", title: nls("search-box.toggle-regexp.title", "RegExp Search") }, ".*"], + ["span", { action: "toggleCaseSensitive", class: "ace_button", title: nls("search-box.toggle-case.title", "CaseSensitive Search") }, "Aa"], + ["span", { action: "toggleWholeWords", class: "ace_button", title: nls("search-box.toggle-whole-word.title", "Whole Word Search") }, "\\b"], + ["span", { action: "searchInSelection", class: "ace_button", title: nls("search-box.toggle-in-selection.title", "Search In Selection") }, "S"] + ] + ], div); + this.element = div.firstChild; + this.setSession = this.setSession.bind(this); + this.$init(); + this.setEditor(editor); + dom.importCssString(searchboxCss, "ace_searchbox", editor.container); + } + SearchBox.prototype.setEditor = function (editor) { + editor.searchBox = this; + editor.renderer.scroller.appendChild(this.element); + this.editor = editor; + }; + SearchBox.prototype.setSession = function (e) { + this.searchRange = null; + this.$syncOptions(true); + }; + SearchBox.prototype.$initElements = function (sb) { + this.searchBox = sb.querySelector(".ace_search_form"); + this.replaceBox = sb.querySelector(".ace_replace_form"); + this.searchOption = sb.querySelector("[action=searchInSelection]"); + this.replaceOption = sb.querySelector("[action=toggleReplace]"); + this.regExpOption = sb.querySelector("[action=toggleRegexpMode]"); + this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]"); + this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]"); + this.searchInput = this.searchBox.querySelector(".ace_search_field"); + this.replaceInput = this.replaceBox.querySelector(".ace_search_field"); + this.searchCounter = sb.querySelector(".ace_search_counter"); + }; + SearchBox.prototype.$init = function () { + var sb = this.element; + this.$initElements(sb); + var _this = this; + event.addListener(sb, "mousedown", function (e) { + setTimeout(function () { + _this.activeInput.focus(); + }, 0); + event.stopPropagation(e); + }); + event.addListener(sb, "click", function (e) { + var t = e.target || e.srcElement; + var action = t.getAttribute("action"); + if (action && _this[action]) + _this[action](); + else if (_this.$searchBarKb.commands[action]) + _this.$searchBarKb.commands[action].exec(_this); + event.stopPropagation(e); + }); + event.addCommandKeyListener(sb, function (e, hashId, keyCode) { + var keyString = keyUtil.keyCodeToString(keyCode); + var command = _this.$searchBarKb.findKeyCommand(hashId, keyString); + if (command && command.exec) { + command.exec(_this); + event.stopEvent(e); + } + }); + this.$onChange = lang.delayedCall(function () { + _this.find(false, false); + }); + event.addListener(this.searchInput, "input", function () { + _this.$onChange.schedule(20); + }); + event.addListener(this.searchInput, "focus", function () { + _this.activeInput = _this.searchInput; + _this.searchInput.value && _this.highlight(); + }); + event.addListener(this.replaceInput, "focus", function () { + _this.activeInput = _this.replaceInput; + _this.searchInput.value && _this.highlight(); + }); + }; + SearchBox.prototype.setSearchRange = function (range) { + this.searchRange = range; + if (range) { + this.searchRangeMarker = this.editor.session.addMarker(range, "ace_active-line"); + } + else if (this.searchRangeMarker) { + this.editor.session.removeMarker(this.searchRangeMarker); + this.searchRangeMarker = null; + } + }; + SearchBox.prototype.$syncOptions = function (preventScroll) { + dom.setCssClass(this.replaceOption, "checked", this.searchRange); + dom.setCssClass(this.searchOption, "checked", this.searchOption.checked); + this.replaceOption.textContent = this.replaceOption.checked ? "-" : "+"; + dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); + dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); + dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); + var readOnly = this.editor.getReadOnly(); + this.replaceOption.style.display = readOnly ? "none" : ""; + this.replaceBox.style.display = this.replaceOption.checked && !readOnly ? "" : "none"; + this.find(false, false, preventScroll); + }; + SearchBox.prototype.highlight = function (re) { + this.editor.session.highlight(re || this.editor.$search.$options.re); + this.editor.renderer.updateBackMarkers(); + }; + SearchBox.prototype.find = function (skipCurrent, backwards, preventScroll) { + var range = this.editor.find(this.searchInput.value, { + skipCurrent: skipCurrent, + backwards: backwards, + wrap: true, + regExp: this.regExpOption.checked, + caseSensitive: this.caseSensitiveOption.checked, + wholeWord: this.wholeWordOption.checked, + preventScroll: preventScroll, + range: this.searchRange + }); + var noMatch = !range && this.searchInput.value; + dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); + this.editor._emit("findSearchBox", { match: !noMatch }); + this.highlight(); + this.updateCounter(); + }; + SearchBox.prototype.updateCounter = function () { + var editor = this.editor; + var regex = editor.$search.$options.re; + var supportsUnicodeFlag = regex.unicode; + var all = 0; + var before = 0; + if (regex) { + var value = this.searchRange + ? editor.session.getTextRange(this.searchRange) + : editor.getValue(); + var offset = editor.session.doc.positionToIndex(editor.selection.anchor); + if (this.searchRange) + offset -= editor.session.doc.positionToIndex(this.searchRange.start); + var last = regex.lastIndex = 0; + var m; + while ((m = regex.exec(value))) { + all++; + last = m.index; + if (last <= offset) + before++; + if (all > MAX_COUNT) + break; + if (!m[0]) { + regex.lastIndex = last += lang.skipEmptyMatch(value, last, supportsUnicodeFlag); + if (last >= value.length) + break; + } + } + } + this.searchCounter.textContent = nls("search-box.search-counter", "$0 of $1", [before, (all > MAX_COUNT ? MAX_COUNT + "+" : all)]); + }; + SearchBox.prototype.findNext = function () { + this.find(true, false); + }; + SearchBox.prototype.findPrev = function () { + this.find(true, true); + }; + SearchBox.prototype.findAll = function () { + var range = this.editor.findAll(this.searchInput.value, { + regExp: this.regExpOption.checked, + caseSensitive: this.caseSensitiveOption.checked, + wholeWord: this.wholeWordOption.checked + }); + var noMatch = !range && this.searchInput.value; + dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); + this.editor._emit("findSearchBox", { match: !noMatch }); + this.highlight(); + this.hide(); + }; + SearchBox.prototype.replace = function () { + if (!this.editor.getReadOnly()) + this.editor.replace(this.replaceInput.value); + }; + SearchBox.prototype.replaceAndFindNext = function () { + if (!this.editor.getReadOnly()) { + this.editor.replace(this.replaceInput.value); + this.findNext(); + } + }; + SearchBox.prototype.replaceAll = function () { + if (!this.editor.getReadOnly()) + this.editor.replaceAll(this.replaceInput.value); + }; + SearchBox.prototype.hide = function () { + this.active = false; + this.setSearchRange(null); + this.editor.off("changeSession", this.setSession); + this.element.style.display = "none"; + this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb); + this.editor.focus(); + }; + SearchBox.prototype.show = function (value, isReplace) { + this.active = true; + this.editor.on("changeSession", this.setSession); + this.element.style.display = ""; + this.replaceOption.checked = isReplace; + if (value) + this.searchInput.value = value; + this.searchInput.focus(); + this.searchInput.select(); + this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb); + this.$syncOptions(true); + }; + SearchBox.prototype.isFocused = function () { + var el = document.activeElement; + return el == this.searchInput || el == this.replaceInput; + }; + return SearchBox; +}()); +var $searchBarKb = new HashHandler(); +$searchBarKb.bindKeys({ + "Ctrl-f|Command-f": function (sb) { + var isReplace = sb.isReplace = !sb.isReplace; + sb.replaceBox.style.display = isReplace ? "" : "none"; + sb.replaceOption.checked = false; + sb.$syncOptions(); + sb.searchInput.focus(); + }, + "Ctrl-H|Command-Option-F": function (sb) { + if (sb.editor.getReadOnly()) + return; + sb.replaceOption.checked = true; + sb.$syncOptions(); + sb.replaceInput.focus(); + }, + "Ctrl-G|Command-G": function (sb) { + sb.findNext(); + }, + "Ctrl-Shift-G|Command-Shift-G": function (sb) { + sb.findPrev(); + }, + "esc": function (sb) { + setTimeout(function () { sb.hide(); }); + }, + "Return": function (sb) { + if (sb.activeInput == sb.replaceInput) + sb.replace(); + sb.findNext(); + }, + "Shift-Return": function (sb) { + if (sb.activeInput == sb.replaceInput) + sb.replace(); + sb.findPrev(); + }, + "Alt-Return": function (sb) { + if (sb.activeInput == sb.replaceInput) + sb.replaceAll(); + sb.findAll(); + }, + "Tab": function (sb) { + (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus(); + } +}); +$searchBarKb.addCommands([{ + name: "toggleRegexpMode", + bindKey: { win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/" }, + exec: function (sb) { + sb.regExpOption.checked = !sb.regExpOption.checked; + sb.$syncOptions(); + } + }, { + name: "toggleCaseSensitive", + bindKey: { win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I" }, + exec: function (sb) { + sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; + sb.$syncOptions(); + } + }, { + name: "toggleWholeWords", + bindKey: { win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W" }, + exec: function (sb) { + sb.wholeWordOption.checked = !sb.wholeWordOption.checked; + sb.$syncOptions(); + } + }, { + name: "toggleReplace", + exec: function (sb) { + sb.replaceOption.checked = !sb.replaceOption.checked; + sb.$syncOptions(); + } + }, { + name: "searchInSelection", + exec: function (sb) { + sb.searchOption.checked = !sb.searchRange; + sb.setSearchRange(sb.searchOption.checked && sb.editor.getSelectionRange()); + sb.$syncOptions(); + } + }]); +var $closeSearchBarKb = new HashHandler([{ + bindKey: "Esc", + name: "closeSearchBar", + exec: function (editor) { + editor.searchBox.hide(); + } + }]); +SearchBox.prototype.$searchBarKb = $searchBarKb; +SearchBox.prototype.$closeSearchBarKb = $closeSearchBarKb; +exports.SearchBox = SearchBox; +exports.Search = function (editor, isReplace) { + var sb = editor.searchBox || new SearchBox(editor); + sb.show(editor.session.getTextRange(), isReplace); +}; + +}); (function() { + window.require(["ace/ext/searchbox"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-settings_menu.js b/ui/base1/ace/ext-settings_menu.js new file mode 100644 index 0000000..5ffda4a --- /dev/null +++ b/ui/base1/ace/ext-settings_menu.js @@ -0,0 +1,789 @@ +define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"], function(require, exports, module){module.exports = "#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"; + +}); + +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +'use strict'; +var dom = require("../../lib/dom"); +var cssText = require("./settings_menu.css"); +dom.importCssString(cssText, "settings_menu.css", false); +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + var ignoreFocusOut = false; + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + function close() { + if (!closer) + return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + if (editor) { + editor.focus(); + } + closer = null; + callback && callback(); + } + function setIgnoreFocusOut(ignore) { + ignoreFocusOut = ignore; + if (ignore) { + closer.style.pointerEvents = "none"; + contentElement.style.pointerEvents = "auto"; + } + } + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + (editor ? 'background-color: rgba(0, 0, 0, 0.3);' : ''); + closer.addEventListener('click', function (e) { + if (!ignoreFocusOut) { + close(); + } + }); + document.addEventListener('keydown', documentEscListener); + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + closer.appendChild(contentElement); + document.body.appendChild(closer); + if (editor) { + editor.blur(); + } + return { + close: close, + setIgnoreFocusOut: setIgnoreFocusOut + }; +}; + +}); + +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module){"use strict"; +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} +var Mode = /** @class */ (function () { + function Mode(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function (a, b) { + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } + else { + re = "^.*\\.(" + extensions + ")$"; + } + this.extRe = new RegExp(re, "gi"); + } + Mode.prototype.supportsFile = function (filename) { + return filename.match(this.extRe); + }; + return Mode; +}()); +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript: ["as"], + ADA: ["ada|adb"], + Alda: ["alda"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl|asl.json"], + Assembly_ARM32: ["s"], + Assembly_x86: ["asm|a"], + Astro: ["astro"], + AutoHotKey: ["ahk"], + BatchFile: ["bat|cmd"], + BibTeX: ["bib"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm|cfc"], + Crystal: ["cr"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + Cuttlefish: ["conf"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Django: ["djt|html.djt|dj.html|djhtml"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Flix: ["flix"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Ion: ["ion"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|cjs|mjs"], + JEXL: ["jexl"], + JSON: ["json"], + JSON5: ["json5"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + Latte: ["latte"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + Log: ["log"], + LogiQL: ["logic|lql"], + Logtalk: ["lgt"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MediaWiki: ["wiki|mediawiki"], + MEL: ["mel"], + MIPS: ["s|asm"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nasal: ["nas"], + Nginx: ["nginx|conf"], + Nim: ["nim"], + Nix: ["nix"], + NSIS: ["nsi|nsh"], + Nunjucks: ["nunjucks|nunjs|nj|njk"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Odin: ["odin"], + PartiQL: ["partiql|pql"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + pgSQL: ["pgsql"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + PHP_Laravel_blade: ["blade.php"], + Pig: ["pig"], + PLSQL: ["plsql"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prisma: ["prisma"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + PRQL: ["prql"], + Puppet: ["epp|pp"], + Python: ["py"], + QML: ["qml"], + R: ["r"], + Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + Robot: ["robot|resource"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SaC: ["sac"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + Scrypt: ["scrypt"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + Smithy: ["smithy"], + snippets: ["snippets"], + Soy_Template: ["soy"], + Space: ["space"], + SPARQL: ["rq"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Turtle: ["ttl"], + Twig: ["twig|swig"], + Typescript: ["ts|mts|cts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Vue: ["vue"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Zig: ["zig"] +}; +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); + +define("ace/ext/themelist",["require","exports","module"], function(require, exports, module){/** + * Generates a list of themes available when ace was built. + * @fileOverview Generates a list of themes available when ace was built. + * @author + * Matthew Christopher Kastor-Inare III
+ * ☭ Hial Atropa!! ☭ + */ +"use strict"; +var themeData = [ + ["Chrome"], + ["Clouds"], + ["Crimson Editor"], + ["Dawn"], + ["Dreamweaver"], + ["Eclipse"], + ["GitHub Light Default"], + ["GitHub (Legacy)", "github", "light"], + ["IPlastic"], + ["Solarized Light"], + ["TextMate"], + ["Tomorrow"], + ["XCode"], + ["Kuroir"], + ["KatzenMilch"], + ["SQL Server", "sqlserver", "light"], + ["CloudEditor", "cloud_editor", "light"], + ["Ambiance", "ambiance", "dark"], + ["Chaos", "chaos", "dark"], + ["Clouds Midnight", "clouds_midnight", "dark"], + ["Dracula", "", "dark"], + ["Cobalt", "cobalt", "dark"], + ["Gruvbox", "gruvbox", "dark"], + ["Green on Black", "gob", "dark"], + ["idle Fingers", "idle_fingers", "dark"], + ["krTheme", "kr_theme", "dark"], + ["Merbivore", "merbivore", "dark"], + ["Merbivore Soft", "merbivore_soft", "dark"], + ["Mono Industrial", "mono_industrial", "dark"], + ["Monokai", "monokai", "dark"], + ["Nord Dark", "nord_dark", "dark"], + ["One Dark", "one_dark", "dark"], + ["Pastel on dark", "pastel_on_dark", "dark"], + ["Solarized Dark", "solarized_dark", "dark"], + ["Terminal", "terminal", "dark"], + ["Tomorrow Night", "tomorrow_night", "dark"], + ["Tomorrow Night Blue", "tomorrow_night_blue", "dark"], + ["Tomorrow Night Bright", "tomorrow_night_bright", "dark"], + ["Tomorrow Night 80s", "tomorrow_night_eighties", "dark"], + ["Twilight", "twilight", "dark"], + ["Vibrant Ink", "vibrant_ink", "dark"], + ["GitHub Dark", "github_dark", "dark"], + ["CloudEditor Dark", "cloud_editor_dark", "dark"] +]; +exports.themesByName = {}; +exports.themes = themeData.map(function (data) { + var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); + var theme = { + caption: data[0], + theme: "ace/theme/" + name, + isDark: data[2] == "dark", + name: name + }; + exports.themesByName[name] = theme; + return theme; +}); + +}); + +define("ace/ext/options",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/lib/oop","ace/config","ace/lib/event_emitter","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module){"use strict"; +require("./menu_tools/overlay_page"); +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var config = require("../config"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var buildDom = dom.buildDom; +var modelist = require("./modelist"); +var themelist = require("./themelist"); +var themes = { Bright: [], Dark: [] }; +themelist.themes.forEach(function (x) { + themes[x.isDark ? "Dark" : "Bright"].push({ caption: x.caption, value: x.theme }); +}); +var modes = modelist.modes.map(function (x) { + return { caption: x.caption, value: x.mode }; +}); +var optionGroups = { + Main: { + Mode: { + path: "mode", + type: "select", + items: modes + }, + Theme: { + path: "theme", + type: "select", + items: themes + }, + "Keybinding": { + type: "buttonBar", + path: "keyboardHandler", + items: [ + { caption: "Ace", value: null }, + { caption: "Vim", value: "ace/keyboard/vim" }, + { caption: "Emacs", value: "ace/keyboard/emacs" }, + { caption: "Sublime", value: "ace/keyboard/sublime" }, + { caption: "VSCode", value: "ace/keyboard/vscode" } + ] + }, + "Font Size": { + path: "fontSize", + type: "number", + defaultValue: 12, + defaults: [ + { caption: "12px", value: 12 }, + { caption: "24px", value: 24 } + ] + }, + "Soft Wrap": { + type: "buttonBar", + path: "wrap", + items: [ + { caption: "Off", value: "off" }, + { caption: "View", value: "free" }, + { caption: "margin", value: "printMargin" }, + { caption: "40", value: "40" } + ] + }, + "Cursor Style": { + path: "cursorStyle", + items: [ + { caption: "Ace", value: "ace" }, + { caption: "Slim", value: "slim" }, + { caption: "Smooth", value: "smooth" }, + { caption: "Smooth And Slim", value: "smooth slim" }, + { caption: "Wide", value: "wide" } + ] + }, + "Folding": { + path: "foldStyle", + items: [ + { caption: "Manual", value: "manual" }, + { caption: "Mark begin", value: "markbegin" }, + { caption: "Mark begin and end", value: "markbeginend" } + ] + }, + "Soft Tabs": [{ + path: "useSoftTabs" + }, { + ariaLabel: "Tab Size", + path: "tabSize", + type: "number", + values: [2, 3, 4, 8, 16] + }], + "Overscroll": { + type: "buttonBar", + path: "scrollPastEnd", + items: [ + { caption: "None", value: 0 }, + { caption: "Half", value: 0.5 }, + { caption: "Full", value: 1 } + ] + } + }, + More: { + "Atomic soft tabs": { + path: "navigateWithinSoftTabs" + }, + "Enable Behaviours": { + path: "behavioursEnabled" + }, + "Wrap with quotes": { + path: "wrapBehavioursEnabled" + }, + "Enable Auto Indent": { + path: "enableAutoIndent" + }, + "Full Line Selection": { + type: "checkbox", + values: "text|line", + path: "selectionStyle" + }, + "Highlight Active Line": { + path: "highlightActiveLine" + }, + "Show Invisibles": { + path: "showInvisibles" + }, + "Show Indent Guides": { + path: "displayIndentGuides" + }, + "Highlight Indent Guides": { + path: "highlightIndentGuides" + }, + "Persistent HScrollbar": { + path: "hScrollBarAlwaysVisible" + }, + "Persistent VScrollbar": { + path: "vScrollBarAlwaysVisible" + }, + "Animate scrolling": { + path: "animatedScroll" + }, + "Show Gutter": { + path: "showGutter" + }, + "Show Line Numbers": { + path: "showLineNumbers" + }, + "Relative Line Numbers": { + path: "relativeLineNumbers" + }, + "Fixed Gutter Width": { + path: "fixedWidthGutter" + }, + "Show Print Margin": [{ + path: "showPrintMargin" + }, { + ariaLabel: "Print Margin", + type: "number", + path: "printMarginColumn" + }], + "Indented Soft Wrap": { + path: "indentedSoftWrap" + }, + "Highlight selected word": { + path: "highlightSelectedWord" + }, + "Fade Fold Widgets": { + path: "fadeFoldWidgets" + }, + "Use textarea for IME": { + path: "useTextareaForIME" + }, + "Merge Undo Deltas": { + path: "mergeUndoDeltas", + items: [ + { caption: "Always", value: "always" }, + { caption: "Never", value: "false" }, + { caption: "Timed", value: "true" } + ] + }, + "Elastic Tabstops": { + path: "useElasticTabstops" + }, + "Incremental Search": { + path: "useIncrementalSearch" + }, + "Read-only": { + path: "readOnly" + }, + "Copy without selection": { + path: "copyWithEmptySelection" + }, + "Live Autocompletion": { + path: "enableLiveAutocompletion" + }, + "Custom scrollbar": { + path: "customScrollbar" + }, + "Use SVG gutter icons": { + path: "useSvgGutterIcons" + }, + "Annotations for folded lines": { + path: "showFoldedAnnotations" + }, + "Keyboard Accessibility Mode": { + path: "enableKeyboardAccessibility" + }, + "Gutter tooltip follows mouse": { + path: "tooltipFollowsMouse", + defaultValue: true + } + } +}; +var OptionPanel = /** @class */ (function () { + function OptionPanel(editor, element) { + this.editor = editor; + this.container = element || document.createElement("div"); + this.groups = []; + this.options = {}; + } + OptionPanel.prototype.add = function (config) { + if (config.Main) + oop.mixin(optionGroups.Main, config.Main); + if (config.More) + oop.mixin(optionGroups.More, config.More); + }; + OptionPanel.prototype.render = function () { + this.container.innerHTML = ""; + buildDom(["table", { role: "presentation", id: "controls" }, + this.renderOptionGroup(optionGroups.Main), + ["tr", null, ["td", { colspan: 2 }, + ["table", { role: "presentation", id: "more-controls" }, + this.renderOptionGroup(optionGroups.More) + ] + ]], + ["tr", null, ["td", { colspan: 2 }, "version " + config.version]] + ], this.container); + }; + OptionPanel.prototype.renderOptionGroup = function (group) { + return Object.keys(group).map(function (key, i) { + var item = group[key]; + if (!item.position) + item.position = i / 10000; + if (!item.label) + item.label = key; + return item; + }).sort(function (a, b) { + return a.position - b.position; + }).map(function (item) { + return this.renderOption(item.label, item); + }, this); + }; + OptionPanel.prototype.renderOptionControl = function (key, option) { + var self = this; + if (Array.isArray(option)) { + return option.map(function (x) { + return self.renderOptionControl(key, x); + }); + } + var control; + var value = self.getOption(option); + if (option.values && option.type != "checkbox") { + if (typeof option.values == "string") + option.values = option.values.split("|"); + option.items = option.values.map(function (v) { + return { value: v, name: v }; + }); + } + if (option.type == "buttonBar") { + control = ["div", { role: "group", "aria-labelledby": option.path + "-label" }, option.items.map(function (item) { + return ["button", { + value: item.value, + ace_selected_button: value == item.value, + 'aria-pressed': value == item.value, + onclick: function () { + self.setOption(option, item.value); + var nodes = this.parentNode.querySelectorAll("[ace_selected_button]"); + for (var i = 0; i < nodes.length; i++) { + nodes[i].removeAttribute("ace_selected_button"); + nodes[i].setAttribute("aria-pressed", false); + } + this.setAttribute("ace_selected_button", true); + this.setAttribute("aria-pressed", true); + } + }, item.desc || item.caption || item.name]; + })]; + } + else if (option.type == "number") { + control = ["input", { type: "number", value: value || option.defaultValue, style: "width:3em", oninput: function () { + self.setOption(option, parseInt(this.value)); + } }]; + if (option.ariaLabel) { + control[1]["aria-label"] = option.ariaLabel; + } + else { + control[1].id = key; + } + if (option.defaults) { + control = [control, option.defaults.map(function (item) { + return ["button", { onclick: function () { + var input = this.parentNode.firstChild; + input.value = item.value; + input.oninput(); + } }, item.caption]; + })]; + } + } + else if (option.items) { + var buildItems = function (items) { + return items.map(function (item) { + return ["option", { value: item.value || item.name }, item.desc || item.caption || item.name]; + }); + }; + var items = Array.isArray(option.items) + ? buildItems(option.items) + : Object.keys(option.items).map(function (key) { + return ["optgroup", { "label": key }, buildItems(option.items[key])]; + }); + control = ["select", { id: key, value: value, onchange: function () { + self.setOption(option, this.value); + } }, items]; + } + else { + if (typeof option.values == "string") + option.values = option.values.split("|"); + if (option.values) + value = value == option.values[1]; + control = ["input", { type: "checkbox", id: key, checked: value || null, onchange: function () { + var value = this.checked; + if (option.values) + value = option.values[value ? 1 : 0]; + self.setOption(option, value); + } }]; + if (option.type == "checkedNumber") { + control = [control, []]; + } + } + return control; + }; + OptionPanel.prototype.renderOption = function (key, option) { + if (option.path && !option.onchange && !this.editor.$options[option.path]) + return; + var path = Array.isArray(option) ? option[0].path : option.path; + this.options[path] = option; + var safeKey = "-" + path; + var safeId = path + "-label"; + var control = this.renderOptionControl(safeKey, option); + return ["tr", { class: "ace_optionsMenuEntry" }, ["td", + ["label", { for: safeKey, id: safeId }, key] + ], ["td", control]]; + }; + OptionPanel.prototype.setOption = function (option, value) { + if (typeof option == "string") + option = this.options[option]; + if (value == "false") + value = false; + if (value == "true") + value = true; + if (value == "null") + value = null; + if (value == "undefined") + value = undefined; + if (typeof value == "string" && parseFloat(value).toString() == value) + value = parseFloat(value); + if (option.onchange) + option.onchange(value); + else if (option.path) + this.editor.setOption(option.path, value); + this._signal("setOption", { name: option.path, value: value }); + }; + OptionPanel.prototype.getOption = function (option) { + if (option.getValue) + return option.getValue(); + return this.editor.getOption(option.path); + }; + return OptionPanel; +}()); +oop.implement(OptionPanel.prototype, EventEmitter); +exports.OptionPanel = OptionPanel; + +}); + +define("ace/ext/settings_menu",["require","exports","module","ace/ext/options","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ +"use strict"; +var OptionPanel = require("./options").OptionPanel; +var overlayPage = require('./menu_tools/overlay_page').overlayPage; +function showSettingsMenu(editor) { + if (!document.getElementById('ace_settingsmenu')) { + var options = new OptionPanel(editor); + options.render(); + options.container.id = "ace_settingsmenu"; + overlayPage(editor, options.container); + options.container.querySelector("select,input,button,checkbox").focus(); + } +} +module.exports.init = function () { + var Editor = require("../editor").Editor; + Editor.prototype.showSettingsMenu = function () { + showSettingsMenu(this); + }; +}; + +}); (function() { + window.require(["ace/ext/settings_menu"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-simple_tokenizer.js b/ui/base1/ace/ext-simple_tokenizer.js new file mode 100644 index 0000000..b1a91a0 --- /dev/null +++ b/ui/base1/ace/ext-simple_tokenizer.js @@ -0,0 +1,45 @@ +define("ace/ext/simple_tokenizer",["require","exports","module","ace/tokenizer","ace/layer/text_util"], function(require, exports, module){"use strict"; +var Tokenizer = require("../tokenizer").Tokenizer; +var isTextToken = require("../layer/text_util").isTextToken; +var SimpleTokenizer = /** @class */ (function () { + function SimpleTokenizer(content, tokenizer) { + this._lines = content.split(/\r\n|\r|\n/); + this._states = []; + this._tokenizer = tokenizer; + } + SimpleTokenizer.prototype.getTokens = function (row) { + var line = this._lines[row]; + var previousState = this._states[row - 1]; + var data = this._tokenizer.getLineTokens(line, previousState); + this._states[row] = data.state; + return data.tokens; + }; + SimpleTokenizer.prototype.getLength = function () { + return this._lines.length; + }; + return SimpleTokenizer; +}()); +function tokenize(content, highlightRules) { + var tokenizer = new SimpleTokenizer(content, new Tokenizer(highlightRules.getRules())); + var result = []; + for (var lineIndex = 0; lineIndex < tokenizer.getLength(); lineIndex++) { + var lineTokens = tokenizer.getTokens(lineIndex); + result.push(lineTokens.map(function (token) { return ({ + className: isTextToken(token.type) ? undefined : "ace_" + token.type.replace(/\./g, " ace_"), + value: token.value + }); })); + } + return result; +} +module.exports = { + tokenize: tokenize +}; + +}); (function() { + window.require(["ace/ext/simple_tokenizer"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-spellcheck.js b/ui/base1/ace/ext-spellcheck.js new file mode 100644 index 0000000..8f295a7 --- /dev/null +++ b/ui/base1/ace/ext-spellcheck.js @@ -0,0 +1,67 @@ +define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var event = require("../lib/event"); +exports.contextMenuHandler = function (e) { + var host = e.target; + var text = host.textInput.getElement(); + if (!host.selection.isEmpty()) + return; + var c = host.getCursorPosition(); + var r = host.session.getWordRange(c.row, c.column); + var w = host.session.getTextRange(r); + host.session.tokenRe.lastIndex = 0; + if (!host.session.tokenRe.test(w)) + return; + var PLACEHOLDER = "\x01\x01"; + var value = w + " " + PLACEHOLDER; + text.value = value; + text.setSelectionRange(w.length, w.length + 1); + text.setSelectionRange(0, 0); + text.setSelectionRange(0, w.length); + var afterKeydown = false; + event.addListener(text, "keydown", function onKeydown() { + event.removeListener(text, "keydown", onKeydown); + afterKeydown = true; + }); + host.textInput.setInputHandler(function (newVal) { + if (newVal == value) + return ''; + if (newVal.lastIndexOf(value, 0) === 0) + return newVal.slice(value.length); + if (newVal.substr(text.selectionEnd) == value) + return newVal.slice(0, -value.length); + if (newVal.slice(-2) == PLACEHOLDER) { + var val = newVal.slice(0, -2); + if (val.slice(-1) == " ") { + if (afterKeydown) + return val.substring(0, text.selectionEnd); + val = val.slice(0, -1); + host.session.replace(r, val); + return ""; + } + } + return newVal; + }); +}; +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + spellcheck: { + set: function (val) { + var text = this.textInput.getElement(); + text.spellcheck = !!val; + if (!val) + this.removeListener("nativecontextmenu", exports.contextMenuHandler); + else + this.on("nativecontextmenu", exports.contextMenuHandler); + }, + value: true + } +}); + +}); (function() { + window.require(["ace/ext/spellcheck"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-split.js b/ui/base1/ace/ext-split.js new file mode 100644 index 0000000..9cc75cc --- /dev/null +++ b/ui/base1/ace/ext-split.js @@ -0,0 +1,186 @@ +define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var lang = require("./lib/lang"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Editor = require("./editor").Editor; +var Renderer = require("./virtual_renderer").VirtualRenderer; +var EditSession = require("./edit_session").EditSession; +var Split; +Split = function (container, theme, splits) { + this.BELOW = 1; + this.BESIDE = 0; + this.$container = container; + this.$theme = theme; + this.$splits = 0; + this.$editorCSS = ""; + this.$editors = []; + this.$orientation = this.BESIDE; + this.setSplits(splits || 1); + this.$cEditor = this.$editors[0]; + this.on("focus", function (editor) { + this.$cEditor = editor; + }.bind(this)); +}; +(function () { + oop.implement(this, EventEmitter); + this.$createEditor = function () { + var el = document.createElement("div"); + el.className = this.$editorCSS; + el.style.cssText = "position: absolute; top:0px; bottom:0px"; + this.$container.appendChild(el); + var editor = new Editor(new Renderer(el, this.$theme)); + editor.on("focus", function () { + this._emit("focus", editor); + }.bind(this)); + this.$editors.push(editor); + editor.setFontSize(this.$fontSize); + return editor; + }; + this.setSplits = function (splits) { + var editor; + if (splits < 1) { + throw "The number of splits have to be > 0!"; + } + if (splits == this.$splits) { + return; + } + else if (splits > this.$splits) { + while (this.$splits < this.$editors.length && this.$splits < splits) { + editor = this.$editors[this.$splits]; + this.$container.appendChild(editor.container); + editor.setFontSize(this.$fontSize); + this.$splits++; + } + while (this.$splits < splits) { + this.$createEditor(); + this.$splits++; + } + } + else { + while (this.$splits > splits) { + editor = this.$editors[this.$splits - 1]; + this.$container.removeChild(editor.container); + this.$splits--; + } + } + this.resize(); + }; + this.getSplits = function () { + return this.$splits; + }; + this.getEditor = function (idx) { + return this.$editors[idx]; + }; + this.getCurrentEditor = function () { + return this.$cEditor; + }; + this.focus = function () { + this.$cEditor.focus(); + }; + this.blur = function () { + this.$cEditor.blur(); + }; + this.setTheme = function (theme) { + this.$editors.forEach(function (editor) { + editor.setTheme(theme); + }); + }; + this.setKeyboardHandler = function (keybinding) { + this.$editors.forEach(function (editor) { + editor.setKeyboardHandler(keybinding); + }); + }; + this.forEach = function (callback, scope) { + this.$editors.forEach(callback, scope); + }; + this.$fontSize = ""; + this.setFontSize = function (size) { + this.$fontSize = size; + this.forEach(function (editor) { + editor.setFontSize(size); + }); + }; + this.$cloneSession = function (session) { + var s = new EditSession(session.getDocument(), session.getMode()); + var undoManager = session.getUndoManager(); + s.setUndoManager(undoManager); + s.setTabSize(session.getTabSize()); + s.setUseSoftTabs(session.getUseSoftTabs()); + s.setOverwrite(session.getOverwrite()); + s.setBreakpoints(session.getBreakpoints()); + s.setUseWrapMode(session.getUseWrapMode()); + s.setUseWorker(session.getUseWorker()); + s.setWrapLimitRange(session.$wrapLimitRange.min, session.$wrapLimitRange.max); + s.$foldData = session.$cloneFoldData(); + return s; + }; + this.setSession = function (session, idx) { + var editor; + if (idx == null) { + editor = this.$cEditor; + } + else { + editor = this.$editors[idx]; + } + var isUsed = this.$editors.some(function (editor) { + return editor.session === session; + }); + if (isUsed) { + session = this.$cloneSession(session); + } + editor.setSession(session); + return session; + }; + this.getOrientation = function () { + return this.$orientation; + }; + this.setOrientation = function (orientation) { + if (this.$orientation == orientation) { + return; + } + this.$orientation = orientation; + this.resize(); + }; + this.resize = function () { + var width = this.$container.clientWidth; + var height = this.$container.clientHeight; + var editor; + if (this.$orientation == this.BESIDE) { + var editorWidth = width / this.$splits; + for (var i = 0; i < this.$splits; i++) { + editor = this.$editors[i]; + editor.container.style.width = editorWidth + "px"; + editor.container.style.top = "0px"; + editor.container.style.left = i * editorWidth + "px"; + editor.container.style.height = height + "px"; + editor.resize(); + } + } + else { + var editorHeight = height / this.$splits; + for (var i = 0; i < this.$splits; i++) { + editor = this.$editors[i]; + editor.container.style.width = width + "px"; + editor.container.style.top = i * editorHeight + "px"; + editor.container.style.left = "0px"; + editor.container.style.height = editorHeight + "px"; + editor.resize(); + } + } + }; +}).call(Split.prototype); +exports.Split = Split; + +}); + +define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module){"use strict"; +module.exports = require("../split"); + +}); (function() { + window.require(["ace/ext/split"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-static_highlight.js b/ui/base1/ace/ext-static_highlight.js new file mode 100644 index 0000000..8adb2e3 --- /dev/null +++ b/ui/base1/ace/ext-static_highlight.js @@ -0,0 +1,184 @@ +define("ace/ext/static-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace_static_highlight {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', 'Droid Sans Mono', monospace;\n font-size: 12px;\n white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n width: 2em;\n text-align: right;\n padding: 0 3px 0 0;\n margin-right: 3px;\n contain: none;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n top: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n content: counter(ace_line, decimal);\n counter-increment: ace_line;\n}\n.ace_static_highlight {\n counter-reset: ace_line;\n}\n"; + +}); + +define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/ext/static-css","ace/config","ace/lib/dom","ace/lib/lang"], function(require, exports, module){"use strict"; +var EditSession = require("../edit_session").EditSession; +var TextLayer = require("../layer/text").Text; +var baseStyles = require("./static-css"); +var config = require("../config"); +var dom = require("../lib/dom"); +var escapeHTML = require("../lib/lang").escapeHTML; +var Element = /** @class */ (function () { + function Element(type) { this.className; + this.type = type; + this.style = {}; + this.textContent = ""; + } + Element.prototype.cloneNode = function () { + return this; + }; + Element.prototype.appendChild = function (child) { + this.textContent += child.toString(); + }; + Element.prototype.toString = function () { + var stringBuilder = []; + if (this.type != "fragment") { + stringBuilder.push("<", this.type); + if (this.className) + stringBuilder.push(" class='", this.className, "'"); + var styleStr = []; + for (var key in this.style) { + styleStr.push(key, ":", this.style[key]); + } + if (styleStr.length) + stringBuilder.push(" style='", styleStr.join(""), "'"); + stringBuilder.push(">"); + } + if (this.textContent) { + stringBuilder.push(this.textContent); + } + if (this.type != "fragment") { + stringBuilder.push(""); + } + return stringBuilder.join(""); + }; + return Element; +}()); +var simpleDom = { + createTextNode: function (/** @type {string} */ textContent, /** @type {any} */ element) { + return escapeHTML(textContent); + }, + createElement: function (/** @type {string} */ type) { + return new Element(type); + }, + createFragment: function () { + return new Element("fragment"); + } +}; +var SimpleTextLayer = function () { + this.config = {}; + this.dom = simpleDom; +}; +SimpleTextLayer.prototype = TextLayer.prototype; +var highlight = function (el, opts, callback) { + var m = el.className.match(/lang-(\w+)/); + var mode = opts.mode || m && ("ace/mode/" + m[1]); + if (!mode) + return false; + var theme = opts.theme || "ace/theme/textmate"; + var data = ""; + var nodes = []; + if (el.firstElementChild) { + var textLen = 0; + for (var i = 0; i < el.childNodes.length; i++) { + var ch = el.childNodes[i]; + if (ch.nodeType == 3) { + textLen += ch.data.length; + data += ch.data; + } + else { + nodes.push(textLen, ch); + } + } + } + else { + data = el.textContent; + if (opts.trim) + data = data.trim(); + } + highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) { + dom.importCssString(highlighted.css, "ace_highlight", true); + el.innerHTML = highlighted.html; + var container = el.firstChild.firstChild; + for (var i = 0; i < nodes.length; i += 2) { + var pos = highlighted.session.doc.indexToPosition(nodes[i]); + var node = nodes[i + 1]; + var lineEl = container.children[pos.row]; + lineEl && lineEl.appendChild(node); + } + callback && callback(); + }); +}; +highlight.render = function (input, mode, theme, lineStart, disableGutter, callback) { + var waiting = 1; + var modeCache = EditSession.prototype.$modes; + if (typeof theme == "string") { + waiting++; + config.loadModule(['theme', theme], function (m) { + theme = m; + --waiting || done(); + }); + } + var modeOptions; + if (mode && typeof mode === "object" && !mode.getTokenizer) { + modeOptions = mode; + mode = modeOptions.path; + } + if (typeof mode == "string") { + waiting++; + config.loadModule(['mode', mode], function (m) { + if (!modeCache[ /**@type{string}*/(mode)] || modeOptions) + modeCache[ /**@type{string}*/(mode)] = new m.Mode(modeOptions); + mode = modeCache[ /**@type{string}*/(mode)]; + --waiting || done(); + }); + } + function done() { + var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter); + return callback ? callback(result) : result; + } + return --waiting || done(); +}; +highlight.renderSync = function (input, mode, theme, lineStart, disableGutter) { + lineStart = parseInt(lineStart || 1, 10); + var session = new EditSession(""); + session.setUseWorker(false); + session.setMode(mode); + var textLayer = new SimpleTextLayer(); + textLayer.setSession(session); + Object.keys(textLayer.$tabStrings).forEach(function (k) { + if (typeof textLayer.$tabStrings[k] == "string") { + var el = simpleDom.createFragment(); + el.textContent = textLayer.$tabStrings[k]; + textLayer.$tabStrings[k] = el; + } + }); + session.setValue(input); + var length = session.getLength(); + var outerEl = simpleDom.createElement("div"); + outerEl.className = theme.cssClass; + var innerEl = simpleDom.createElement("div"); + innerEl.className = "ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter"); + innerEl.style["counter-reset"] = "ace_line " + (lineStart - 1); + for (var ix = 0; ix < length; ix++) { + var lineEl = simpleDom.createElement("div"); + lineEl.className = "ace_line"; + if (!disableGutter) { + var gutterEl = simpleDom.createElement("span"); + gutterEl.className = "ace_gutter ace_gutter-cell"; + gutterEl.textContent = ""; + lineEl.appendChild(gutterEl); + } + textLayer.$renderLine(lineEl, ix, false); + lineEl.textContent += "\n"; + innerEl.appendChild(lineEl); + } + outerEl.appendChild(innerEl); + return { + css: baseStyles + theme.cssText, + html: outerEl.toString(), + session: session + }; +}; +module.exports = highlight; +module.exports.highlight = highlight; + +}); (function() { + window.require(["ace/ext/static_highlight"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-statusbar.js b/ui/base1/ace/ext-statusbar.js new file mode 100644 index 0000000..a71b32a --- /dev/null +++ b/ui/base1/ace/ext-statusbar.js @@ -0,0 +1,48 @@ +define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var StatusBar = /** @class */ (function () { + function StatusBar(editor, parentNode) { + this.element = dom.createElement("div"); + this.element.className = "ace_status-indicator"; + this.element.style.cssText = "display: inline-block;"; + parentNode.appendChild(this.element); + var statusUpdate = lang.delayedCall(function () { + this.updateStatus(editor); + }.bind(this)).schedule.bind(null, 100); + editor.on("changeStatus", statusUpdate); + editor.on("changeSelection", statusUpdate); + editor.on("keyboardActivity", statusUpdate); + } + StatusBar.prototype.updateStatus = function (editor) { + var status = []; + function add(str, separator) { + str && status.push(str, separator || "|"); + } + add(editor.keyBinding.getStatusText(editor)); + if (editor.commands.recording) + add("REC"); + var sel = editor.selection; + var c = sel.lead; + if (!sel.isEmpty()) { + var r = editor.getSelectionRange(); + add("(" + (r.end.row - r.start.row) + ":" + (r.end.column - r.start.column) + ")", " "); + } + add(c.row + ":" + c.column, " "); + if (sel.rangeCount) + add("[" + sel.rangeCount + "]", " "); + status.pop(); + this.element.textContent = status.join(""); + }; + return StatusBar; +}()); +exports.StatusBar = StatusBar; + +}); (function() { + window.require(["ace/ext/statusbar"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-textarea.js b/ui/base1/ace/ext-textarea.js new file mode 100644 index 0000000..f3860db --- /dev/null +++ b/ui/base1/ace/ext-textarea.js @@ -0,0 +1,380 @@ +define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/ace"], function(require, exports, module){"use strict"; +var event = require("../lib/event"); +var UA = require("../lib/useragent"); +var ace = require("../ace"); +module.exports = exports = ace; +var getCSSProperty = function (element, container, property) { + var ret = element.style[property]; + if (!ret) { + if (window.getComputedStyle) { + ret = window.getComputedStyle(element, '').getPropertyValue(property); + } + else { + ret = element.currentStyle[property]; + } + } + if (!ret || ret == 'auto' || ret == 'intrinsic') { + ret = container.style[property]; + } + return ret; +}; +function applyStyles(elm, styles) { + for (var style in styles) { + elm.style[style] = styles[style]; + } +} +function setupContainer(element, getValue) { + if (element.type != 'textarea') { + throw new Error("Textarea required!"); + } + var parentNode = element.parentNode; + var container = document.createElement('div'); + var resizeEvent = function () { + var style = 'position:relative;'; + [ + 'margin-top', 'margin-left', 'margin-right', 'margin-bottom' + ].forEach(function (item) { + style += item + ':' + + getCSSProperty(element, container, item) + ';'; + }); + var width = getCSSProperty(element, container, 'width') || (element.clientWidth + "px"); + var height = getCSSProperty(element, container, 'height') || (element.clientHeight + "px"); + style += 'height:' + height + ';width:' + width + ';'; + style += 'display:inline-block;'; + container.style.cssText = style; + }; + event.addListener(window, 'resize', resizeEvent); + resizeEvent(); + parentNode.insertBefore(container, element.nextSibling); + while (parentNode !== document) { + if (parentNode.tagName.toUpperCase() === 'FORM') { + var oldSumit = parentNode.onsubmit; + parentNode.onsubmit = function (evt) { + element.value = getValue(); + if (oldSumit) { + oldSumit.call(this, evt); + } + }; + break; + } + parentNode = parentNode.parentNode; + } + return container; +} +exports.transformTextarea = function (element, options) { + var isFocused = element.autofocus || document.activeElement == element; + var session; + var container = setupContainer(element, function () { + return session.getValue(); + }); + element.style.display = 'none'; + container.style.background = 'white'; + var editorDiv = document.createElement("div"); + applyStyles(editorDiv, { + top: "0px", + left: "0px", + right: "0px", + bottom: "0px", + border: "1px solid gray", + position: "absolute" + }); + container.appendChild(editorDiv); + var settingOpener = document.createElement("div"); + applyStyles(settingOpener, { + position: "absolute", + right: "0px", + bottom: "0px", + cursor: "nw-resize", + border: "solid 9px", + borderColor: "lightblue gray gray #ceade6", + zIndex: 101 + }); + var settingDiv = document.createElement("div"); + var settingDivStyles = { + top: "0px", + left: "20%", + right: "0px", + bottom: "0px", + position: "absolute", + padding: "5px", + zIndex: 100, + color: "white", + display: "none", + overflow: "auto", + fontSize: "14px", + boxShadow: "-5px 2px 3px gray" + }; + if (!UA.isOldIE) { + settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)"; + } + else { + settingDivStyles.backgroundColor = "#333"; + } + applyStyles(settingDiv, settingDivStyles); + container.appendChild(settingDiv); + options = options || exports.defaultOptions; + var editor = ace.edit(editorDiv); + session = editor.getSession(); + session.setValue(element.value || element.innerHTML); + if (isFocused) + editor.focus(); + container.appendChild(settingOpener); + setupApi(editor, editorDiv, settingDiv, ace, options); + setupSettingPanel(settingDiv, settingOpener, editor); + var state = ""; + event.addListener(settingOpener, "mousemove", function (e) { + var rect = this.getBoundingClientRect(); + var x = e.clientX - rect.left, y = e.clientY - rect.top; + if (x + y < (rect.width + rect.height) / 2) { + this.style.cursor = "pointer"; + state = "toggle"; + } + else { + state = "resize"; + this.style.cursor = "nw-resize"; + } + }); + event.addListener(settingOpener, "mousedown", function (e) { + e.preventDefault(); + if (state == "toggle") { + editor.setDisplaySettings(); + return; + } + container.style.zIndex = "100000"; + var rect = container.getBoundingClientRect(); + var startX = rect.width + rect.left - e.clientX; + var startY = rect.height + rect.top - e.clientY; + event.capture(settingOpener, function (e) { + container.style.width = e.clientX - rect.left + startX + "px"; + container.style.height = e.clientY - rect.top + startY + "px"; + editor.resize(); + }, function () { }); + }); + return editor; +}; +function setupApi(editor, editorDiv, settingDiv, ace, options) { + function toBool(value) { + return value === "true" || value == true; + } + editor.setDisplaySettings = function (display) { + if (display == null) + display = settingDiv.style.display == "none"; + if (display) { + settingDiv.style.display = "block"; + settingDiv.hideButton.focus(); + editor.on("focus", function onFocus() { + editor.removeListener("focus", onFocus); + settingDiv.style.display = "none"; + }); + } + else { + editor.focus(); + } + }; + editor.$setOption = editor.setOption; + editor.$getOption = editor.getOption; + editor.setOption = function (key, value) { + switch (key) { + case "mode": + editor.$setOption("mode", "ace/mode/" + value); + break; + case "theme": + editor.$setOption("theme", "ace/theme/" + value); + break; + case "keybindings": + switch (value) { + case "vim": + editor.setKeyboardHandler("ace/keyboard/vim"); + break; + case "emacs": + editor.setKeyboardHandler("ace/keyboard/emacs"); + break; + default: + editor.setKeyboardHandler(null); + } + break; + case "wrap": + case "fontSize": + editor.$setOption(key, value); + break; + default: + editor.$setOption(key, toBool(value)); + } + }; + editor.getOption = function (key) { + switch (key) { + case "mode": + return editor.$getOption("mode").substr("ace/mode/".length); + break; + case "theme": + return editor.$getOption("theme").substr("ace/theme/".length); + break; + case "keybindings": + var value = editor.getKeyboardHandler(); + switch (value && value.$id) { + case "ace/keyboard/vim": + return "vim"; + case "ace/keyboard/emacs": + return "emacs"; + default: + return "ace"; + } + break; + default: + return editor.$getOption(key); + } + }; + editor.setOptions(options); + return editor; +} +function setupSettingPanel(settingDiv, settingOpener, editor) { + var BOOL = null; + var desc = { + mode: "Mode:", + wrap: "Soft Wrap:", + theme: "Theme:", + fontSize: "Font Size:", + showGutter: "Display Gutter:", + keybindings: "Keyboard", + showPrintMargin: "Show Print Margin:", + useSoftTabs: "Use Soft Tabs:", + showInvisibles: "Show Invisibles" + }; + var optionValues = { + mode: { + text: "Plain", + javascript: "JavaScript", + xml: "XML", + html: "HTML", + css: "CSS", + scss: "SCSS", + python: "Python", + php: "PHP", + java: "Java", + ruby: "Ruby", + c_cpp: "C/C++", + coffee: "CoffeeScript", + json: "json", + perl: "Perl", + clojure: "Clojure", + ocaml: "OCaml", + csharp: "C#", + haxe: "haXe", + svg: "SVG", + textile: "Textile", + groovy: "Groovy", + liquid: "Liquid", + Scala: "Scala" + }, + theme: { + clouds: "Clouds", + clouds_midnight: "Clouds Midnight", + cobalt: "Cobalt", + crimson_editor: "Crimson Editor", + dawn: "Dawn", + gob: "Green on Black", + eclipse: "Eclipse", + idle_fingers: "Idle Fingers", + kr_theme: "Kr Theme", + merbivore: "Merbivore", + merbivore_soft: "Merbivore Soft", + mono_industrial: "Mono Industrial", + monokai: "Monokai", + pastel_on_dark: "Pastel On Dark", + solarized_dark: "Solarized Dark", + solarized_light: "Solarized Light", + textmate: "Textmate", + twilight: "Twilight", + vibrant_ink: "Vibrant Ink" + }, + showGutter: BOOL, + fontSize: { + "10px": "10px", + "11px": "11px", + "12px": "12px", + "14px": "14px", + "16px": "16px" + }, + wrap: { + off: "Off", + 40: "40", + 80: "80", + free: "Free" + }, + keybindings: { + ace: "ace", + vim: "vim", + emacs: "emacs" + }, + showPrintMargin: BOOL, + useSoftTabs: BOOL, + showInvisibles: BOOL + }; + var table = []; + table.push(""); + function renderOption(builder, option, obj, cValue) { + if (!obj) { + builder.push(""); + return; + } + builder.push(""); + } + for (var option in exports.defaultOptions) { + table.push(""); + table.push(""); + } + table.push("
SettingValue
", desc[option], ""); + renderOption(table, option, optionValues[option], editor.getOption(option)); + table.push("
"); + settingDiv.innerHTML = table.join(""); + var onChange = function (e) { + var select = e.currentTarget; + editor.setOption(select.title, select.value); + }; + var onClick = function (e) { + var cb = e.currentTarget; + editor.setOption(cb.title, cb.checked); + }; + var selects = settingDiv.getElementsByTagName("select"); + for (var i = 0; i < selects.length; i++) + selects[i].onchange = onChange; + var cbs = settingDiv.getElementsByTagName("input"); + for (var i = 0; i < cbs.length; i++) + cbs[i].onclick = onClick; + var button = document.createElement("input"); + button.type = "button"; + button.value = "Hide"; + event.addListener(button, "click", function () { + editor.setDisplaySettings(false); + }); + settingDiv.appendChild(button); + settingDiv.hideButton = button; +} +exports.defaultOptions = { + mode: "javascript", + theme: "textmate", + wrap: "off", + fontSize: "12px", + showGutter: "false", + keybindings: "ace", + showPrintMargin: "false", + useSoftTabs: "true", + showInvisibles: "false" +}; + +}); (function() { + window.require(["ace/ext/textarea"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-themelist.js b/ui/base1/ace/ext-themelist.js new file mode 100644 index 0000000..12d7692 --- /dev/null +++ b/ui/base1/ace/ext-themelist.js @@ -0,0 +1,74 @@ +define("ace/ext/themelist",["require","exports","module"], function(require, exports, module){/** + * Generates a list of themes available when ace was built. + * @fileOverview Generates a list of themes available when ace was built. + * @author + * Matthew Christopher Kastor-Inare III
+ * ☭ Hial Atropa!! ☭ + */ +"use strict"; +var themeData = [ + ["Chrome"], + ["Clouds"], + ["Crimson Editor"], + ["Dawn"], + ["Dreamweaver"], + ["Eclipse"], + ["GitHub Light Default"], + ["GitHub (Legacy)", "github", "light"], + ["IPlastic"], + ["Solarized Light"], + ["TextMate"], + ["Tomorrow"], + ["XCode"], + ["Kuroir"], + ["KatzenMilch"], + ["SQL Server", "sqlserver", "light"], + ["CloudEditor", "cloud_editor", "light"], + ["Ambiance", "ambiance", "dark"], + ["Chaos", "chaos", "dark"], + ["Clouds Midnight", "clouds_midnight", "dark"], + ["Dracula", "", "dark"], + ["Cobalt", "cobalt", "dark"], + ["Gruvbox", "gruvbox", "dark"], + ["Green on Black", "gob", "dark"], + ["idle Fingers", "idle_fingers", "dark"], + ["krTheme", "kr_theme", "dark"], + ["Merbivore", "merbivore", "dark"], + ["Merbivore Soft", "merbivore_soft", "dark"], + ["Mono Industrial", "mono_industrial", "dark"], + ["Monokai", "monokai", "dark"], + ["Nord Dark", "nord_dark", "dark"], + ["One Dark", "one_dark", "dark"], + ["Pastel on dark", "pastel_on_dark", "dark"], + ["Solarized Dark", "solarized_dark", "dark"], + ["Terminal", "terminal", "dark"], + ["Tomorrow Night", "tomorrow_night", "dark"], + ["Tomorrow Night Blue", "tomorrow_night_blue", "dark"], + ["Tomorrow Night Bright", "tomorrow_night_bright", "dark"], + ["Tomorrow Night 80s", "tomorrow_night_eighties", "dark"], + ["Twilight", "twilight", "dark"], + ["Vibrant Ink", "vibrant_ink", "dark"], + ["GitHub Dark", "github_dark", "dark"], + ["CloudEditor Dark", "cloud_editor_dark", "dark"] +]; +exports.themesByName = {}; +exports.themes = themeData.map(function (data) { + var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); + var theme = { + caption: data[0], + theme: "ace/theme/" + name, + isDark: data[2] == "dark", + name: name + }; + exports.themesByName[name] = theme; + return theme; +}); + +}); (function() { + window.require(["ace/ext/themelist"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/ext-whitespace.js b/ui/base1/ace/ext-whitespace.js new file mode 100644 index 0000000..ea93455 --- /dev/null +++ b/ui/base1/ace/ext-whitespace.js @@ -0,0 +1,192 @@ +define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module){"use strict"; +var lang = require("../lib/lang"); +exports.$detectIndentation = function (lines, fallback) { + var stats = []; + var changes = []; + var tabIndents = 0; + var prevSpaces = 0; + var max = Math.min(lines.length, 1000); + for (var i = 0; i < max; i++) { + var line = lines[i]; + if (!/^\s*[^*+\-\s]/.test(line)) + continue; + if (line[0] == "\t") { + tabIndents++; + prevSpaces = -Number.MAX_VALUE; + } + else { + var spaces = line.match(/^ */)[0].length; + if (spaces && line[spaces] != "\t") { + var diff = spaces - prevSpaces; + if (diff > 0 && !(prevSpaces % diff) && !(spaces % diff)) + changes[diff] = (changes[diff] || 0) + 1; + stats[spaces] = (stats[spaces] || 0) + 1; + } + prevSpaces = spaces; + } + while (i < max && line[line.length - 1] == "\\") + line = lines[i++]; + } + function getScore(indent) { + var score = 0; + for (var i = indent; i < stats.length; i += indent) + score += stats[i] || 0; + return score; + } + var changesTotal = changes.reduce(function (a, b) { return a + b; }, 0); + var first = { score: 0, length: 0 }; + var spaceIndents = 0; + for (var i = 1; i < 12; i++) { + var score = getScore(i); + if (i == 1) { + spaceIndents = score; + score = stats[1] ? 0.9 : 0.8; + if (!stats.length) + score = 0; + } + else + score /= spaceIndents; + if (changes[i]) + score += changes[i] / changesTotal; + if (score > first.score) + first = { score: score, length: i }; + } + if (first.score && first.score > 1.4) + var tabLength = first.length; + if (tabIndents > spaceIndents + 1) { + if (tabLength == 1 || spaceIndents < tabIndents / 4 || first.score < 1.8) + tabLength = undefined; + return { ch: "\t", length: tabLength }; + } + if (spaceIndents > tabIndents + 1) + return { ch: " ", length: tabLength }; +}; +exports.detectIndentation = function (session) { + var lines = session.getLines(0, 1000); + var indent = exports.$detectIndentation(lines) || {}; + if (indent.ch) + session.setUseSoftTabs(indent.ch == " "); + if (indent.length) + session.setTabSize(indent.length); + return indent; +}; +exports.trimTrailingSpace = function (session, options) { + var doc = session.getDocument(); + var lines = doc.getAllLines(); + var min = options && options.trimEmpty ? -1 : 0; + var cursors = [], ci = -1; + if (options && options.keepCursorPosition) { + if (session.selection.rangeCount) { + session.selection.rangeList.ranges.forEach(function (x, i, ranges) { + var next = ranges[i + 1]; + if (next && next.cursor.row == x.cursor.row) + return; + cursors.push(x.cursor); + }); + } + else { + cursors.push(session.selection.getCursor()); + } + ci = 0; + } + var cursorRow = cursors[ci] && cursors[ci].row; + for (var i = 0, l = lines.length; i < l; i++) { + var line = lines[i]; + var index = line.search(/\s+$/); + if (i == cursorRow) { + if (index < cursors[ci].column && index > min) + index = cursors[ci].column; + ci++; + cursorRow = cursors[ci] ? cursors[ci].row : -1; + } + if (index > min) + doc.removeInLine(i, index, line.length); + } +}; +exports.convertIndentation = function (session, ch, len) { + var oldCh = session.getTabString()[0]; + var oldLen = session.getTabSize(); + if (!len) + len = oldLen; + if (!ch) + ch = oldCh; + var tab = ch == "\t" ? ch : lang.stringRepeat(ch, len); + var doc = session.doc; + var lines = doc.getAllLines(); + var cache = {}; + var spaceCache = {}; + for (var i = 0, l = lines.length; i < l; i++) { + var line = lines[i]; + var match = line.match(/^\s*/)[0]; + if (match) { + var w = session.$getStringScreenWidth(match)[0]; + var tabCount = Math.floor(w / oldLen); + var reminder = w % oldLen; + var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount)); + toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder)); + if (toInsert != match) { + doc.removeInLine(i, 0, match.length); + doc.insertInLine({ row: i, column: 0 }, toInsert); + } + } + } + session.setTabSize(len); + session.setUseSoftTabs(ch == " "); +}; +exports.$parseStringArg = function (text) { + var indent = {}; + if (/t/.test(text)) + indent.ch = "\t"; + else if (/s/.test(text)) + indent.ch = " "; + var m = text.match(/\d+/); + if (m) + indent.length = parseInt(m[0], 10); + return indent; +}; +exports.$parseArg = function (arg) { + if (!arg) + return {}; + if (typeof arg == "string") + return exports.$parseStringArg(arg); + if (typeof arg.text == "string") + return exports.$parseStringArg(arg.text); + return arg; +}; +exports.commands = [{ + name: "detectIndentation", + description: "Detect indentation from content", + exec: function (editor) { + exports.detectIndentation(editor.session); + } + }, { + name: "trimTrailingSpace", + description: "Trim trailing whitespace", + exec: function (editor, args) { + exports.trimTrailingSpace(editor.session, args); + } + }, { + name: "convertIndentation", + description: "Convert indentation to ...", + exec: function (editor, arg) { + var indent = exports.$parseArg(arg); + exports.convertIndentation(editor.session, indent.ch, indent.length); + } + }, { + name: "setIndentation", + description: "Set indentation", + exec: function (editor, arg) { + var indent = exports.$parseArg(arg); + indent.length && editor.session.setTabSize(indent.length); + indent.ch && editor.session.setUseSoftTabs(indent.ch == " "); + } + }]; + +}); (function() { + window.require(["ace/ext/whitespace"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/keybinding-emacs.js b/ui/base1/ace/keybinding-emacs.js new file mode 100644 index 0000000..48fa352 --- /dev/null +++ b/ui/base1/ace/keybinding-emacs.js @@ -0,0 +1,1067 @@ +define("ace/occur",["require","exports","module","ace/lib/oop","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var oop = require("./lib/oop"); +var Search = require("./search").Search; +var EditSession = require("./edit_session").EditSession; +var SearchHighlight = require("./search_highlight").SearchHighlight; +var Occur = /** @class */ (function (_super) { + __extends(Occur, _super); + function Occur() { + return _super !== null && _super.apply(this, arguments) || this; + } + Occur.prototype.enter = function (editor, options) { + if (!options.needle) + return false; + var pos = editor.getCursorPosition(); + this.displayOccurContent(editor, options); + var translatedPos = this.originalToOccurPosition(editor.session, pos); + editor.moveCursorToPosition(translatedPos); + return true; + }; + Occur.prototype.exit = function (editor, options) { + var pos = options.translatePosition && editor.getCursorPosition(); + var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos); + this.displayOriginalContent(editor); + if (translatedPos) + editor.moveCursorToPosition(translatedPos); + return true; + }; + Occur.prototype.highlight = function (sess, regexp) { + var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(new SearchHighlight(null, "ace_occur-highlight", "text")); + hl.setRegexp(regexp); + sess._emit("changeBackMarker"); // force highlight layer redraw + }; + Occur.prototype.displayOccurContent = function (editor, options) { + this.$originalSession = editor.session; + var found = this.matchingLines(editor.session, options); + var lines = found.map(function (foundLine) { return foundLine.content; }); + var occurSession = new EditSession(lines.join('\n')); + occurSession.$occur = this; + occurSession.$occurMatchingLines = found; + editor.setSession(occurSession); + this.$useEmacsStyleLineStart = this.$originalSession.$useEmacsStyleLineStart; + occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; + this.highlight(occurSession, options.re); + occurSession._emit('changeBackMarker'); + }; + Occur.prototype.displayOriginalContent = function (editor) { + editor.setSession(this.$originalSession); + this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; + }; + Occur.prototype.originalToOccurPosition = function (session, pos) { + var lines = session.$occurMatchingLines; + var nullPos = { row: 0, column: 0 }; + if (!lines) + return nullPos; + for (var i = 0; i < lines.length; i++) { + if (lines[i].row === pos.row) + return { row: i, column: pos.column }; + } + return nullPos; + }; + Occur.prototype.occurToOriginalPosition = function (session, pos) { + var lines = session.$occurMatchingLines; + if (!lines || !lines[pos.row]) + return pos; + return { row: lines[pos.row].row, column: pos.column }; + }; + Occur.prototype.matchingLines = function (session, options) { + options = oop.mixin({}, options); + if (!session || !options.needle) + return []; + var search = new Search(); + search.set(options); + return search.findAll(session).reduce(function (lines, range) { + var row = range.start.row; + var last = lines[lines.length - 1]; + return last && last.row === row ? + lines : + lines.concat({ row: row, content: session.getLine(row) }); + }, []); + }; + return Occur; +}(Search)); +var dom = require('./lib/dom'); +dom.importCssString(".ace_occur-highlight {\n\ + border-radius: 4px;\n\ + background-color: rgba(87, 255, 8, 0.25);\n\ + position: absolute;\n\ + z-index: 4;\n\ + box-sizing: border-box;\n\ + box-shadow: 0 0 4px rgb(91, 255, 50);\n\ +}\n\ +.ace_dark .ace_occur-highlight {\n\ + background-color: rgb(80, 140, 85);\n\ + box-shadow: 0 0 4px rgb(60, 120, 70);\n\ +}\n", "incremental-occur-highlighting", false); +exports.Occur = Occur; + +}); + +define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module){var config = require("../config"), Occur = require("../occur").Occur; +var occurStartCommand = { + name: "occur", + exec: function (editor, options) { + var alreadyInOccur = !!editor.session.$occur; + var occurSessionActive = new Occur().enter(editor, options); + if (occurSessionActive && !alreadyInOccur) + OccurKeyboardHandler.installIn(editor); + }, + readOnly: true +}; +var occurCommands = [{ + name: "occurexit", + bindKey: 'esc|Ctrl-G', + exec: function (editor) { + var occur = editor.session.$occur; + if (!occur) + return; + occur.exit(editor, {}); + if (!editor.session.$occur) + OccurKeyboardHandler.uninstallFrom(editor); + }, + readOnly: true + }, { + name: "occuraccept", + bindKey: 'enter', + exec: function (editor) { + var occur = editor.session.$occur; + if (!occur) + return; + occur.exit(editor, { translatePosition: true }); + if (!editor.session.$occur) + OccurKeyboardHandler.uninstallFrom(editor); + }, + readOnly: true + }]; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var oop = require("../lib/oop"); +function OccurKeyboardHandler() { } +oop.inherits(OccurKeyboardHandler, HashHandler); +(function () { + this.isOccurHandler = true; + this.attach = function (editor) { + HashHandler.call(this, occurCommands, editor.commands.platform); + this.$editor = editor; + }; + var handleKeyboard$super = this.handleKeyboard; + this.handleKeyboard = function (data, hashId, key, keyCode) { + var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode); + return (cmd && cmd.command) ? cmd : undefined; + }; +}).call(OccurKeyboardHandler.prototype); +OccurKeyboardHandler.installIn = function (editor) { + var handler = new this(); + editor.keyBinding.addKeyboardHandler(handler); + editor.commands.addCommands(occurCommands); +}; +OccurKeyboardHandler.uninstallFrom = function (editor) { + editor.commands.removeCommands(occurCommands); + var handler = editor.getKeyboardHandler(); + if (handler.isOccurHandler) + editor.keyBinding.removeKeyboardHandler(handler); +}; +exports.occurStartCommand = occurStartCommand; + +}); + +define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module){var config = require("../config"); +var oop = require("../lib/oop"); +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var occurStartCommand = require("./occur_commands").occurStartCommand; +exports.iSearchStartCommands = [{ + name: "iSearch", + bindKey: { win: "Ctrl-F", mac: "Command-F" }, + exec: function (editor, options) { + config.loadModule(["core", "ace/incremental_search"], function (e) { + var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch(); + iSearch.activate(editor, options.backwards); + if (options.jumpToFirstMatch) + iSearch.next(options); + }); + }, + readOnly: true + }, { + name: "iSearchBackwards", + exec: function (editor, jumpToNext) { editor.execCommand('iSearch', { backwards: true }); }, + readOnly: true + }, { + name: "iSearchAndGo", + bindKey: { win: "Ctrl-K", mac: "Command-G" }, + exec: function (editor, jumpToNext) { editor.execCommand('iSearch', { jumpToFirstMatch: true, useCurrentOrPrevSearch: true }); }, + readOnly: true + }, { + name: "iSearchBackwardsAndGo", + bindKey: { win: "Ctrl-Shift-K", mac: "Command-Shift-G" }, + exec: function (editor) { editor.execCommand('iSearch', { jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true }); }, + readOnly: true + }]; +exports.iSearchCommands = [{ + name: "restartSearch", + bindKey: { win: "Ctrl-F", mac: "Command-F" }, + exec: function (iSearch) { + iSearch.cancelSearch(true); + } + }, { + name: "searchForward", + bindKey: { win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G" }, + exec: function (iSearch, options) { + options.useCurrentOrPrevSearch = true; + iSearch.next(options); + } + }, { + name: "searchBackward", + bindKey: { win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G" }, + exec: function (iSearch, options) { + options.useCurrentOrPrevSearch = true; + options.backwards = true; + iSearch.next(options); + } + }, { + name: "extendSearchTerm", + exec: function (iSearch, string) { + iSearch.addString(string); + } + }, { + name: "extendSearchTermSpace", + bindKey: "space", + exec: function (iSearch) { iSearch.addString(' '); } + }, { + name: "shrinkSearchTerm", + bindKey: "backspace", + exec: function (iSearch) { + iSearch.removeChar(); + } + }, { + name: 'confirmSearch', + bindKey: 'return', + exec: function (iSearch) { iSearch.deactivate(); } + }, { + name: 'cancelSearch', + bindKey: 'esc|Ctrl-G', + exec: function (iSearch) { iSearch.deactivate(true); } + }, { + name: 'occurisearch', + bindKey: 'Ctrl-O', + exec: function (iSearch) { + var options = oop.mixin({}, iSearch.$options); + iSearch.deactivate(); + occurStartCommand.exec(iSearch.$editor, options); + } + }, { + name: "yankNextWord", + bindKey: "Ctrl-w", + exec: function (iSearch) { + var ed = iSearch.$editor, range = ed.selection.getRangeOfMovements(function (sel) { sel.moveCursorWordRight(); }), string = ed.session.getTextRange(range); + iSearch.addString(string); + } + }, { + name: "yankNextChar", + bindKey: "Ctrl-Alt-y", + exec: function (iSearch) { + var ed = iSearch.$editor, range = ed.selection.getRangeOfMovements(function (sel) { sel.moveCursorRight(); }), string = ed.session.getTextRange(range); + iSearch.addString(string); + } + }, { + name: 'recenterTopBottom', + bindKey: 'Ctrl-l', + exec: function (iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); } + }, { + name: 'selectAllMatches', + bindKey: 'Ctrl-space', + exec: function (iSearch) { + var ed = iSearch.$editor, hl = ed.session.$isearchHighlight, ranges = hl && hl.cache ? hl.cache + .reduce(function (ranges, ea) { + return ranges.concat(ea ? ea : []); + }, []) : []; + iSearch.deactivate(false); + ranges.forEach(ed.selection.addRange.bind(ed.selection)); + } + }, { + name: 'searchAsRegExp', + bindKey: 'Alt-r', + exec: function (iSearch) { + iSearch.convertNeedleToRegExp(); + } + }].map(function (cmd) { + cmd.readOnly = true; + cmd.isIncrementalSearchCommand = true; + cmd.scrollIntoView = "animate-cursor"; + return cmd; +}); +function IncrementalSearchKeyboardHandler(iSearch) { + this.$iSearch = iSearch; +} +oop.inherits(IncrementalSearchKeyboardHandler, HashHandler); +(function () { + this.attach = function (editor) { + var iSearch = this.$iSearch; + HashHandler.call(this, exports.iSearchCommands, editor.commands.platform); + this.$commandExecHandler = editor.commands.on('exec', function (e) { + if (!e.command.isIncrementalSearchCommand) + return iSearch.deactivate(); + e.stopPropagation(); + e.preventDefault(); + var scrollTop = editor.session.getScrollTop(); + var result = e.command.exec(iSearch, e.args || {}); + editor.renderer.scrollCursorIntoView(null, 0.5); + editor.renderer.animateScrolling(scrollTop); + return result; + }); + }; + this.detach = function (editor) { + if (!this.$commandExecHandler) + return; + editor.commands.off('exec', this.$commandExecHandler); + delete this.$commandExecHandler; + }; + var handleKeyboard$super = this.handleKeyboard; + this.handleKeyboard = function (data, hashId, key, keyCode) { + if (((hashId === 1 /*ctrl*/ || hashId === 8 /*command*/) && key === 'v') + || (hashId === 1 /*ctrl*/ && key === 'y')) + return null; + var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode); + if (cmd && cmd.command) { + return cmd; + } + if (hashId == -1) { + var extendCmd = this.commands.extendSearchTerm; + if (extendCmd) { + return { command: extendCmd, args: key }; + } + } + return false; + }; +}).call(IncrementalSearchKeyboardHandler.prototype); +exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler; + +}); + +define("ace/incremental_search",["require","exports","module","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var Range = require("./range").Range; +var Search = require("./search").Search; +var SearchHighlight = require("./search_highlight").SearchHighlight; +var iSearchCommandModule = require("./commands/incremental_search_commands"); +var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler; +function isRegExp(obj) { + return obj instanceof RegExp; +} +function regExpToObject(re) { + var string = String(re), start = string.indexOf('/'), flagStart = string.lastIndexOf('/'); + return { + expression: string.slice(start + 1, flagStart), + flags: string.slice(flagStart + 1) + }; +} +function stringToRegExp(string, flags) { + try { + return new RegExp(string, flags); + } + catch (e) { + return string; + } +} +function objectToRegExp(obj) { + return stringToRegExp(obj.expression, obj.flags); +} +var IncrementalSearch = /** @class */ (function (_super) { + __extends(IncrementalSearch, _super); + function IncrementalSearch() { + var _this = _super.call(this) || this; + _this.$options = { wrap: false, skipCurrent: false }; + _this.$keyboardHandler = new ISearchKbd(_this); + return _this; + } + IncrementalSearch.prototype.activate = function (editor, backwards) { + this.$editor = editor; + this.$startPos = this.$currentPos = editor.getCursorPosition(); + this.$options.needle = ''; + this.$options.backwards = backwards; + editor.keyBinding.addKeyboardHandler(this.$keyboardHandler); + this.$originalEditorOnPaste = editor.onPaste; + editor.onPaste = this.onPaste.bind(this); + this.$mousedownHandler = editor.on('mousedown', this.onMouseDown.bind(this)); + this.selectionFix(editor); + this.statusMessage(true); + }; + IncrementalSearch.prototype.deactivate = function (reset) { + this.cancelSearch(reset); + var editor = this.$editor; + editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler); + if (this.$mousedownHandler) { + editor.off('mousedown', this.$mousedownHandler); + delete this.$mousedownHandler; + } + editor.onPaste = this.$originalEditorOnPaste; + this.message(''); + }; + IncrementalSearch.prototype.selectionFix = function (editor) { + if (editor.selection.isEmpty() && !editor.session.$emacsMark) { + editor.clearSelection(); + } + }; + IncrementalSearch.prototype.highlight = function (regexp) { + var sess = this.$editor.session, hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(new SearchHighlight(null, "ace_isearch-result", "text")); + hl.setRegexp(regexp); + sess._emit("changeBackMarker"); // force highlight layer redraw + }; + IncrementalSearch.prototype.cancelSearch = function (reset) { + var e = this.$editor; + this.$prevNeedle = this.$options.needle; + this.$options.needle = ''; + if (reset) { + e.moveCursorToPosition(this.$startPos); + this.$currentPos = this.$startPos; + } + else { + e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false); + } + this.highlight(null); + return Range.fromPoints(this.$currentPos, this.$currentPos); + }; + IncrementalSearch.prototype.highlightAndFindWithNeedle = function (moveToNext, needleUpdateFunc) { + if (!this.$editor) + return null; + var options = this.$options; + if (needleUpdateFunc) { + options.needle = needleUpdateFunc.call(this, options.needle || '') || ''; + } + if (options.needle.length === 0) { + this.statusMessage(true); + return this.cancelSearch(true); + } + options.start = this.$currentPos; + var session = this.$editor.session, found = this.find(session), shouldSelect = this.$editor.emacsMark ? + !!this.$editor.emacsMark() : !this.$editor.selection.isEmpty(); + if (found) { + if (options.backwards) + found = Range.fromPoints(found.end, found.start); + this.$editor.selection.setRange(Range.fromPoints(shouldSelect ? this.$startPos : found.end, found.end)); + if (moveToNext) + this.$currentPos = found.end; + this.highlight(options.re); + } + this.statusMessage(found); + return found; + }; + IncrementalSearch.prototype.addString = function (s) { + return this.highlightAndFindWithNeedle(false, function (needle) { + if (!isRegExp(needle)) + return needle + s; + var reObj = regExpToObject(needle); + reObj.expression += s; + return objectToRegExp(reObj); + }); + }; + IncrementalSearch.prototype.removeChar = function (c) { + return this.highlightAndFindWithNeedle(false, function (needle) { + if (!isRegExp(needle)) + return needle.substring(0, needle.length - 1); + var reObj = regExpToObject(needle); + reObj.expression = reObj.expression.substring(0, reObj.expression.length - 1); + return objectToRegExp(reObj); + }); + }; + IncrementalSearch.prototype.next = function (options) { + options = options || {}; + this.$options.backwards = !!options.backwards; + this.$currentPos = this.$editor.getCursorPosition(); + return this.highlightAndFindWithNeedle(true, function (needle) { + return options.useCurrentOrPrevSearch && needle.length === 0 ? + this.$prevNeedle || '' : needle; + }); + }; + IncrementalSearch.prototype.onMouseDown = function (evt) { + this.deactivate(); + return true; + }; + IncrementalSearch.prototype.onPaste = function (text) { + this.addString(text); + }; + IncrementalSearch.prototype.convertNeedleToRegExp = function () { + return this.highlightAndFindWithNeedle(false, function (needle) { + return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig'); + }); + }; + IncrementalSearch.prototype.convertNeedleToString = function () { + return this.highlightAndFindWithNeedle(false, function (needle) { + return isRegExp(needle) ? regExpToObject(needle).expression : needle; + }); + }; + IncrementalSearch.prototype.statusMessage = function (found) { + var options = this.$options, msg = ''; + msg += options.backwards ? 'reverse-' : ''; + msg += 'isearch: ' + options.needle; + msg += found ? '' : ' (not found)'; + this.message(msg); + }; + IncrementalSearch.prototype.message = function (msg) { + if (this.$editor.showCommandLine) { + this.$editor.showCommandLine(msg); + this.$editor.focus(); + } + }; + return IncrementalSearch; +}(Search)); +exports.IncrementalSearch = IncrementalSearch; +var dom = require('./lib/dom'); +dom.importCssString("\n.ace_marker-layer .ace_isearch-result {\n position: absolute;\n z-index: 6;\n box-sizing: border-box;\n}\ndiv.ace_isearch-result {\n border-radius: 4px;\n background-color: rgba(255, 200, 0, 0.5);\n box-shadow: 0 0 4px rgb(255, 200, 0);\n}\n.ace_dark div.ace_isearch-result {\n background-color: rgb(100, 110, 160);\n box-shadow: 0 0 4px rgb(80, 90, 140);\n}", "incremental-search-highlighting", false); +var commands = require("./commands/command_manager"); +(function () { + this.setupIncrementalSearch = function (editor, val) { + if (this.usesIncrementalSearch == val) + return; + this.usesIncrementalSearch = val; + var iSearchCommands = iSearchCommandModule.iSearchStartCommands; + var method = val ? 'addCommands' : 'removeCommands'; + this[method](iSearchCommands); + }; +}).call(commands.CommandManager.prototype); +var Editor = require("./editor").Editor; +require("./config").defineOptions(Editor.prototype, "editor", { + useIncrementalSearch: { + set: function (val) { + this.keyBinding.$handlers.forEach(function (handler) { + if (handler.setupIncrementalSearch) { + handler.setupIncrementalSearch(this, val); + } + }); + this._emit('incrementalSearchSettingChanged', { isEnabled: val }); + } + } +}); + +}); + +define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module){"use strict"; +var dom = require("../lib/dom"); +require("../incremental_search"); +var iSearchCommandModule = require("../commands/incremental_search_commands"); +var HashHandler = require("./hash_handler").HashHandler; +exports.handler = new HashHandler(); +exports.handler.isEmacs = true; +exports.handler.$id = "ace/keyboard/emacs"; +dom.importCssString("\n.emacs-mode .ace_cursor{\n border: 1px rgba(50,250,50,0.8) solid!important;\n box-sizing: border-box!important;\n background-color: rgba(0,250,0,0.9);\n opacity: 0.5;\n}\n.emacs-mode .ace_hidden-cursors .ace_cursor{\n opacity: 1;\n background-color: transparent;\n}\n.emacs-mode .ace_overwrite-cursors .ace_cursor {\n opacity: 1;\n background-color: transparent;\n border-width: 0 0 2px 2px !important;\n}\n.emacs-mode .ace_text-layer {\n z-index: 4\n}\n.emacs-mode .ace_cursor-layer {\n z-index: 2\n}", 'emacsMode'); +var $formerLongWords; +var $formerLineStart; +exports.handler.attach = function (editor) { + $formerLongWords = editor.session.$selectLongWords; + editor.session.$selectLongWords = true; + $formerLineStart = editor.session.$useEmacsStyleLineStart; + editor.session.$useEmacsStyleLineStart = true; + editor.session.$emacsMark = null; // the active mark + editor.session.$emacsMarkRing = editor.session.$emacsMarkRing || []; + editor.emacsMark = function () { + return this.session.$emacsMark; + }; + editor.setEmacsMark = function (p) { + this.session.$emacsMark = p; + }; + editor.pushEmacsMark = function (p, activate) { + var prevMark = this.session.$emacsMark; + if (prevMark) + pushUnique(this.session.$emacsMarkRing, prevMark); + if (!p || activate) + this.setEmacsMark(p); + else + pushUnique(this.session.$emacsMarkRing, p); + }; + editor.popEmacsMark = function () { + var mark = this.emacsMark(); + if (mark) { + this.setEmacsMark(null); + return mark; + } + return this.session.$emacsMarkRing.pop(); + }; + editor.getLastEmacsMark = function (p) { + return this.session.$emacsMark || this.session.$emacsMarkRing.slice(-1)[0]; + }; + editor.emacsMarkForSelection = function (replacement) { + var sel = this.selection, multiRangeLength = this.multiSelect ? + this.multiSelect.getAllRanges().length : 1, selIndex = sel.index || 0, markRing = this.session.$emacsMarkRing, markIndex = markRing.length - (multiRangeLength - selIndex), lastMark = markRing[markIndex] || sel.anchor; + if (replacement) { + markRing.splice(markIndex, 1, "row" in replacement && "column" in replacement ? + replacement : undefined); + } + return lastMark; + }; + editor.on("click", $resetMarkMode); + editor.on("changeSession", $kbSessionChange); + editor.renderer.$blockCursor = true; + editor.setStyle("emacs-mode"); + editor.commands.addCommands(commands); + exports.handler.platform = editor.commands.platform; + editor.$emacsModeHandler = this; + editor.on('copy', this.onCopy); + editor.on('paste', this.onPaste); +}; +function pushUnique(ring, mark) { + var last = ring[ring.length - 1]; + if (last && last.row === mark.row && last.column === mark.column) { + return; + } + ring.push(mark); +} +exports.handler.detach = function (editor) { + editor.renderer.$blockCursor = false; + editor.session.$selectLongWords = $formerLongWords; + editor.session.$useEmacsStyleLineStart = $formerLineStart; + editor.off("click", $resetMarkMode); + editor.off("changeSession", $kbSessionChange); + editor.unsetStyle("emacs-mode"); + editor.commands.removeCommands(commands); + editor.off('copy', this.onCopy); + editor.off('paste', this.onPaste); + editor.$emacsModeHandler = null; +}; +var $kbSessionChange = function (e) { + if (e.oldSession) { + e.oldSession.$selectLongWords = $formerLongWords; + e.oldSession.$useEmacsStyleLineStart = $formerLineStart; + } + $formerLongWords = e.session.$selectLongWords; + e.session.$selectLongWords = true; + $formerLineStart = e.session.$useEmacsStyleLineStart; + e.session.$useEmacsStyleLineStart = true; + if (!e.session.hasOwnProperty('$emacsMark')) + e.session.$emacsMark = null; + if (!e.session.hasOwnProperty('$emacsMarkRing')) + e.session.$emacsMarkRing = []; +}; +var $resetMarkMode = function (e) { + e.editor.session.$emacsMark = null; +}; +var keys = require("../lib/keys").KEY_MODS; +var eMods = { C: "ctrl", S: "shift", M: "alt", CMD: "command" }; +var combinations = ["C-S-M-CMD", + "S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M", + "M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S", + "CMD", "M", "S", "C"]; +combinations.forEach(function (c) { + var hashId = 0; + c.split("-").forEach(function (c) { + hashId = hashId | keys[eMods[c]]; + }); + eMods[hashId] = c.toLowerCase() + "-"; +}); +exports.handler.onCopy = function (e, editor) { + if (editor.$handlesEmacsOnCopy) + return; + editor.$handlesEmacsOnCopy = true; + exports.handler.commands.killRingSave.exec(editor); + editor.$handlesEmacsOnCopy = false; +}; +exports.handler.onPaste = function (e, editor) { + editor.pushEmacsMark(editor.getCursorPosition()); +}; +exports.handler.bindKey = function (key, command) { + if (typeof key == "object") + key = key[this.platform]; + if (!key) + return; + var ckb = this.commandKeyBinding; + key.split("|").forEach(function (keyPart) { + keyPart = keyPart.toLowerCase(); + ckb[keyPart] = command; + var keyParts = keyPart.split(" ").slice(0, -1); + keyParts.reduce(function (keyMapKeys, keyPart, i) { + var prefix = keyMapKeys[i - 1] ? keyMapKeys[i - 1] + ' ' : ''; + return keyMapKeys.concat([prefix + keyPart]); + }, []).forEach(function (keyPart) { + if (!ckb[keyPart]) + ckb[keyPart] = "null"; + }); + }, this); +}; +exports.handler.getStatusText = function (editor, data) { + var str = ""; + if (data.count) + str += data.count; + if (data.keyChain) + str += " " + data.keyChain; + return str; +}; +exports.handler.handleKeyboard = function (data, hashId, key, keyCode) { + if (keyCode === -1) + return undefined; + var editor = data.editor; + editor._signal("changeStatus"); + if (hashId == -1) { + editor.pushEmacsMark(); + if (data.count) { + var str = new Array(data.count + 1).join(key); + data.count = null; + return { command: "insertstring", args: str }; + } + } + var modifier = eMods[hashId]; + if (modifier == "c-" || data.count) { + var count = parseInt(key[key.length - 1]); + if (typeof count === 'number' && !isNaN(count)) { + data.count = Math.max(data.count, 0) || 0; + data.count = 10 * data.count + count; + return { command: "null" }; + } + } + if (modifier) + key = modifier + key; + if (data.keyChain) + key = data.keyChain += " " + key; + var command = this.commandKeyBinding[key]; + data.keyChain = command == "null" ? key : ""; + if (!command) + return undefined; + if (command === "null") + return { command: "null" }; + if (command === "universalArgument") { + data.count = -4; + return { command: "null" }; + } + var args; + if (typeof command !== "string") { + args = command.args; + if (command.command) + command = command.command; + if (command === "goorselect") { + command = editor.emacsMark() ? args[1] : args[0]; + args = null; + } + } + if (typeof command === "string") { + if (command === "insertstring" || + command === "splitline" || + command === "togglecomment") { + editor.pushEmacsMark(); + } + command = this.commands[command] || editor.commands.commands[command]; + if (!command) + return undefined; + } + if (!command.readOnly && !command.isYank) + data.lastCommand = null; + if (!command.readOnly && editor.emacsMark()) + editor.setEmacsMark(null); + if (data.count) { + var count = data.count; + data.count = 0; + if (!command || !command.handlesCount) { + return { + args: args, + command: { + exec: function (editor, args) { + for (var i = 0; i < count; i++) + command.exec(editor, args); + }, + multiSelectAction: command.multiSelectAction + } + }; + } + else { + if (!args) + args = {}; + if (typeof args === 'object') + args.count = count; + } + } + return { command: command, args: args }; +}; +exports.emacsKeys = { + "Up|C-p": { command: "goorselect", args: ["golineup", "selectup"] }, + "Down|C-n": { command: "goorselect", args: ["golinedown", "selectdown"] }, + "Left|C-b": { command: "goorselect", args: ["gotoleft", "selectleft"] }, + "Right|C-f": { command: "goorselect", args: ["gotoright", "selectright"] }, + "C-Left|M-b": { command: "goorselect", args: ["gotowordleft", "selectwordleft"] }, + "C-Right|M-f": { command: "goorselect", args: ["gotowordright", "selectwordright"] }, + "Home|C-a": { command: "goorselect", args: ["gotolinestart", "selecttolinestart"] }, + "End|C-e": { command: "goorselect", args: ["gotolineend", "selecttolineend"] }, + "C-Home|S-M-,": { command: "goorselect", args: ["gotostart", "selecttostart"] }, + "C-End|S-M-.": { command: "goorselect", args: ["gotoend", "selecttoend"] }, + "S-Up|S-C-p": "selectup", + "S-Down|S-C-n": "selectdown", + "S-Left|S-C-b": "selectleft", + "S-Right|S-C-f": "selectright", + "S-C-Left|S-M-b": "selectwordleft", + "S-C-Right|S-M-f": "selectwordright", + "S-Home|S-C-a": "selecttolinestart", + "S-End|S-C-e": "selecttolineend", + "S-C-Home": "selecttostart", + "S-C-End": "selecttoend", + "C-l": "recenterTopBottom", + "M-s": "centerselection", + "M-g": "gotoline", + "C-x C-p": "selectall", + "C-Down": { command: "goorselect", args: ["gotopagedown", "selectpagedown"] }, + "C-Up": { command: "goorselect", args: ["gotopageup", "selectpageup"] }, + "PageDown|C-v": { command: "goorselect", args: ["gotopagedown", "selectpagedown"] }, + "PageUp|M-v": { command: "goorselect", args: ["gotopageup", "selectpageup"] }, + "S-C-Down": "selectpagedown", + "S-C-Up": "selectpageup", + "C-s": "iSearch", + "C-r": "iSearchBackwards", + "M-C-s": "findnext", + "M-C-r": "findprevious", + "S-M-5": "replace", + "Backspace": "backspace", + "Delete|C-d": "del", + "Return|C-m": { command: "insertstring", args: "\n" }, // "newline" + "C-o": "splitline", + "M-d|C-Delete": { command: "killWord", args: "right" }, + "C-Backspace|M-Backspace|M-Delete": { command: "killWord", args: "left" }, + "C-k": "killLine", + "C-y|S-Delete": "yank", + "M-y": "yankRotate", + "C-g": "keyboardQuit", + "C-w|C-S-W": "killRegion", + "M-w": "killRingSave", + "C-Space": "setMark", + "C-x C-x": "exchangePointAndMark", + "C-t": "transposeletters", + "M-u": "touppercase", // Doesn't work + "M-l": "tolowercase", + "M-/": "autocomplete", // Doesn't work + "C-u": "universalArgument", + "M-;": "togglecomment", + "C-/|C-x u|S-C--|C-z": "undo", + "S-C-/|S-C-x u|C--|S-C-z": "redo", // infinite undo? + "C-x r": "selectRectangularRegion", + "M-x": { command: "focusCommandLine", args: "M-x " } +}; +exports.handler.bindKeys(exports.emacsKeys); +exports.handler.addCommands({ + recenterTopBottom: function (editor) { + var renderer = editor.renderer; + var pos = renderer.$cursorLayer.getPixelPosition(); + var h = renderer.$size.scrollerHeight - renderer.lineHeight; + var scrollTop = renderer.scrollTop; + if (Math.abs(pos.top - scrollTop) < 2) { + scrollTop = pos.top - h; + } + else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) { + scrollTop = pos.top; + } + else { + scrollTop = pos.top - h * 0.5; + } + editor.session.setScrollTop(scrollTop); + }, + selectRectangularRegion: function (editor) { + editor.multiSelect.toggleBlockSelection(); + }, + setMark: { + exec: function (editor, args) { + if (args && args.count) { + if (editor.inMultiSelectMode) + editor.forEachSelection(moveToMark); + else + moveToMark(); + moveToMark(); + return; + } + var mark = editor.emacsMark(), ranges = editor.selection.getAllRanges(), rangePositions = ranges.map(function (r) { return { row: r.start.row, column: r.start.column }; }), transientMarkModeActive = true, hasNoSelection = ranges.every(function (range) { return range.isEmpty(); }); + if (transientMarkModeActive && (mark || !hasNoSelection)) { + if (editor.inMultiSelectMode) + editor.forEachSelection({ exec: editor.clearSelection.bind(editor) }); + else + editor.clearSelection(); + if (mark) + editor.pushEmacsMark(null); + return; + } + if (!mark) { + rangePositions.forEach(function (pos) { editor.pushEmacsMark(pos); }); + editor.setEmacsMark(rangePositions[rangePositions.length - 1]); + return; + } + function moveToMark() { + var mark = editor.popEmacsMark(); + mark && editor.moveCursorToPosition(mark); + } + }, + readOnly: true, + handlesCount: true + }, + exchangePointAndMark: { + exec: function exchangePointAndMark$exec(editor, args) { + var sel = editor.selection; + if (!args.count && !sel.isEmpty()) { // just invert selection + sel.setSelectionRange(sel.getRange(), !sel.isBackwards()); + return; + } + if (args.count) { // replace mark and point + var pos = { row: sel.lead.row, column: sel.lead.column }; + sel.clearSelection(); + sel.moveCursorToPosition(editor.emacsMarkForSelection(pos)); + } + else { // create selection to last mark + sel.selectToPosition(editor.emacsMarkForSelection()); + } + }, + readOnly: true, + handlesCount: true, + multiSelectAction: "forEach" + }, + killWord: { + exec: function (editor, dir) { + editor.clearSelection(); + if (dir == "left") + editor.selection.selectWordLeft(); + else + editor.selection.selectWordRight(); + var range = editor.getSelectionRange(); + var text = editor.session.getTextRange(range); + exports.killRing.add(text); + editor.session.remove(range); + editor.clearSelection(); + }, + multiSelectAction: "forEach" + }, + killLine: function (editor) { + editor.pushEmacsMark(null); + editor.clearSelection(); + var range = editor.getSelectionRange(); + var line = editor.session.getLine(range.start.row); + range.end.column = line.length; + line = line.substr(range.start.column); + var foldLine = editor.session.getFoldLine(range.start.row); + if (foldLine && range.end.row != foldLine.end.row) { + range.end.row = foldLine.end.row; + line = "x"; + } + if (/^\s*$/.test(line)) { + range.end.row++; + line = editor.session.getLine(range.end.row); + range.end.column = /^\s*$/.test(line) ? line.length : 0; + } + var text = editor.session.getTextRange(range); + if (editor.prevOp.command == this) + exports.killRing.append(text); + else + exports.killRing.add(text); + editor.session.remove(range); + editor.clearSelection(); + }, + yank: function (editor) { + editor.onPaste(exports.killRing.get() || ''); + editor.keyBinding.$data.lastCommand = "yank"; + }, + yankRotate: function (editor) { + if (editor.keyBinding.$data.lastCommand != "yank") + return; + editor.undo(); + editor.session.$emacsMarkRing.pop(); // also undo recording mark + editor.onPaste(exports.killRing.rotate()); + editor.keyBinding.$data.lastCommand = "yank"; + }, + killRegion: { + exec: function (editor) { + exports.killRing.add(editor.getCopyText()); + editor.commands.byName.cut.exec(editor); + editor.setEmacsMark(null); + }, + readOnly: true, + multiSelectAction: "forEach" + }, + killRingSave: { + exec: function (editor) { + editor.$handlesEmacsOnCopy = true; + var marks = editor.session.$emacsMarkRing.slice(), deselectedMarks = []; + exports.killRing.add(editor.getCopyText()); + setTimeout(function () { + function deselect() { + var sel = editor.selection, range = sel.getRange(), pos = sel.isBackwards() ? range.end : range.start; + deselectedMarks.push({ row: pos.row, column: pos.column }); + sel.clearSelection(); + } + editor.$handlesEmacsOnCopy = false; + if (editor.inMultiSelectMode) + editor.forEachSelection({ exec: deselect }); + else + deselect(); + editor.setEmacsMark(null); + editor.session.$emacsMarkRing = marks.concat(deselectedMarks.reverse()); + }, 0); + }, + readOnly: true + }, + keyboardQuit: function (editor) { + editor.selection.clearSelection(); + editor.setEmacsMark(null); + editor.keyBinding.$data.count = null; + }, + focusCommandLine: function (editor, arg) { + if (editor.showCommandLine) + editor.showCommandLine(arg); + } +}); +exports.handler.addCommands(iSearchCommandModule.iSearchStartCommands); +var commands = exports.handler.commands; +commands.yank.isYank = true; +commands.yankRotate.isYank = true; +exports.killRing = { + $data: [], + add: function (str) { + str && this.$data.push(str); + if (this.$data.length > 30) + this.$data.shift(); + }, + append: function (str) { + var idx = this.$data.length - 1; + var text = this.$data[idx] || ""; + if (str) + text += str; + if (text) + this.$data[idx] = text; + }, + get: function (n) { + n = n || 1; + return this.$data.slice(this.$data.length - n, this.$data.length).reverse().join('\n'); + }, + pop: function () { + if (this.$data.length > 1) + this.$data.pop(); + return this.get(); + }, + rotate: function () { + this.$data.unshift(this.$data.pop()); + return this.get(); + } +}; + +}); (function() { + window.require(["ace/keyboard/emacs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/keybinding-sublime.js b/ui/base1/ace/keybinding-sublime.js new file mode 100644 index 0000000..be4430e --- /dev/null +++ b/ui/base1/ace/keybinding-sublime.js @@ -0,0 +1,409 @@ +define("ace/keyboard/sublime",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module){"use strict"; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +function moveBySubWords(editor, direction, extend) { + var selection = editor.selection; + var row = selection.lead.row; + var column = selection.lead.column; + var line = editor.session.getLine(row); + if (!line[column + direction]) { + var method = (extend ? "selectWord" : "moveCursorShortWord") + + (direction == 1 ? "Right" : "Left"); + return editor.selection[method](); + } + if (direction == -1) + column--; + while (line[column]) { + var type = getType(line[column]) + getType(line[column + direction]); + column += direction; + if (direction == 1) { + if (type == "WW" && getType(line[column + 1]) == "w") + break; + } + else { + if (type == "wW") { + if (getType(line[column - 1]) == "W") { + column -= 1; + break; + } + else { + continue; + } + } + if (type == "Ww") + break; + } + if (/w[s_oW]|_[sWo]|o[s_wW]|s[W]|W[so]/.test(type)) + break; + } + if (direction == -1) + column++; + if (extend) + editor.selection.moveCursorTo(row, column); + else + editor.selection.moveTo(row, column); + function getType(x) { + if (!x) + return "-"; + if (/\s/.test(x)) + return "s"; + if (x == "_") + return "_"; + if (x.toUpperCase() == x && x.toLowerCase() != x) + return "W"; + if (x.toUpperCase() != x && x.toLowerCase() == x) + return "w"; + return "o"; + } +} +exports.handler = new HashHandler(); +exports.handler.addCommands([{ + name: "find_all_under", + exec: function (editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + editor.findAll(); + }, + readOnly: true + }, { + name: "find_under", + exec: function (editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + editor.findNext(); + }, + readOnly: true + }, { + name: "find_under_prev", + exec: function (editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + editor.findPrevious(); + }, + readOnly: true + }, { + name: "find_under_expand", + exec: function (editor) { + editor.selectMore(1, false, true); + }, + scrollIntoView: "animate", + readOnly: true + }, { + name: "find_under_expand_skip", + exec: function (editor) { + editor.selectMore(1, true, true); + }, + scrollIntoView: "animate", + readOnly: true + }, { + name: "delete_to_hard_bol", + exec: function (editor) { + var pos = editor.selection.getCursor(); + editor.session.remove({ + start: { row: pos.row, column: 0 }, + end: pos + }); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "delete_to_hard_eol", + exec: function (editor) { + var pos = editor.selection.getCursor(); + editor.session.remove({ + start: pos, + end: { row: pos.row, column: Infinity } + }); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "moveToWordStartLeft", + exec: function (editor) { + editor.selection.moveCursorLongWordLeft(); + editor.clearSelection(); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "moveToWordEndRight", + exec: function (editor) { + editor.selection.moveCursorLongWordRight(); + editor.clearSelection(); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "selectToWordStartLeft", + exec: function (editor) { + var sel = editor.selection; + sel.$moveSelection(sel.moveCursorLongWordLeft); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "selectToWordEndRight", + exec: function (editor) { + var sel = editor.selection; + sel.$moveSelection(sel.moveCursorLongWordRight); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" + }, { + name: "selectSubWordRight", + exec: function (editor) { + moveBySubWords(editor, 1, true); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "selectSubWordLeft", + exec: function (editor) { + moveBySubWords(editor, -1, true); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "moveSubWordRight", + exec: function (editor) { + moveBySubWords(editor, 1); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }, { + name: "moveSubWordLeft", + exec: function (editor) { + moveBySubWords(editor, -1); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true + }]); +[{ + bindKey: { mac: "cmd-k cmd-backspace|cmd-backspace", win: "ctrl-shift-backspace|ctrl-k ctrl-backspace" }, + name: "removetolinestarthard" + }, { + bindKey: { mac: "cmd-k cmd-k|cmd-delete|ctrl-k", win: "ctrl-shift-delete|ctrl-k ctrl-k" }, + name: "removetolineendhard" + }, { + bindKey: { mac: "cmd-shift-d", win: "ctrl-shift-d" }, + name: "duplicateSelection" + }, { + bindKey: { mac: "cmd-l", win: "ctrl-l" }, + name: "expandtoline" + }, + { + bindKey: { mac: "cmd-shift-a", win: "ctrl-shift-a" }, + name: "expandSelection", + args: { to: "tag" } + }, { + bindKey: { mac: "cmd-shift-j", win: "ctrl-shift-j" }, + name: "expandSelection", + args: { to: "indentation" } + }, { + bindKey: { mac: "ctrl-shift-m", win: "ctrl-shift-m" }, + name: "expandSelection", + args: { to: "brackets" } + }, { + bindKey: { mac: "cmd-shift-space", win: "ctrl-shift-space" }, + name: "expandSelection", + args: { to: "scope" } + }, + { + bindKey: { mac: "ctrl-cmd-g", win: "alt-f3" }, + name: "find_all_under" + }, { + bindKey: { mac: "alt-cmd-g", win: "ctrl-f3" }, + name: "find_under" + }, { + bindKey: { mac: "shift-alt-cmd-g", win: "ctrl-shift-f3" }, + name: "find_under_prev" + }, { + bindKey: { mac: "cmd-g", win: "f3" }, + name: "findnext" + }, { + bindKey: { mac: "shift-cmd-g", win: "shift-f3" }, + name: "findprevious" + }, { + bindKey: { mac: "cmd-d", win: "ctrl-d" }, + name: "find_under_expand" + }, { + bindKey: { mac: "cmd-k cmd-d", win: "ctrl-k ctrl-d" }, + name: "find_under_expand_skip" + }, + { + bindKey: { mac: "cmd-alt-[", win: "ctrl-shift-[" }, + name: "toggleFoldWidget" + }, { + bindKey: { mac: "cmd-alt-]", win: "ctrl-shift-]" }, + name: "unfold" + }, { + bindKey: { mac: "cmd-k cmd-0|cmd-k cmd-j", win: "ctrl-k ctrl-0|ctrl-k ctrl-j" }, + name: "unfoldall" + }, { + bindKey: { mac: "cmd-k cmd-1", win: "ctrl-k ctrl-1" }, + name: "foldOther", + args: { level: 1 } + }, + { + bindKey: { win: "ctrl-left", mac: "alt-left" }, + name: "moveToWordStartLeft" + }, { + bindKey: { win: "ctrl-right", mac: "alt-right" }, + name: "moveToWordEndRight" + }, { + bindKey: { win: "ctrl-shift-left", mac: "alt-shift-left" }, + name: "selectToWordStartLeft" + }, { + bindKey: { win: "ctrl-shift-right", mac: "alt-shift-right" }, + name: "selectToWordEndRight" + }, + { + bindKey: { mac: "ctrl-alt-shift-right|ctrl-shift-right", win: "alt-shift-right" }, + name: "selectSubWordRight" + }, { + bindKey: { mac: "ctrl-alt-shift-left|ctrl-shift-left", win: "alt-shift-left" }, + name: "selectSubWordLeft" + }, { + bindKey: { mac: "ctrl-alt-right|ctrl-right", win: "alt-right" }, + name: "moveSubWordRight" + }, { + bindKey: { mac: "ctrl-alt-left|ctrl-left", win: "alt-left" }, + name: "moveSubWordLeft" + }, + { + bindKey: { mac: "ctrl-m", win: "ctrl-m" }, + name: "jumptomatching", + args: { to: "brackets" } + }, + { + bindKey: { mac: "ctrl-f6", win: "ctrl-f6" }, + name: "goToNextError" + }, { + bindKey: { mac: "ctrl-shift-f6", win: "ctrl-shift-f6" }, + name: "goToPreviousError" + }, + { + bindKey: { mac: "ctrl-o" }, + name: "splitline" + }, + { + bindKey: { mac: "ctrl-shift-w", win: "alt-shift-w" }, + name: "surrowndWithTag" + }, { + bindKey: { mac: "cmd-alt-.", win: "alt-." }, + name: "close_tag" + }, + { + bindKey: { mac: "cmd-j", win: "ctrl-j" }, + name: "joinlines" + }, + { + bindKey: { mac: "ctrl--", win: "alt--" }, + name: "jumpBack" + }, { + bindKey: { mac: "ctrl-shift--", win: "alt-shift--" }, + name: "jumpForward" + }, + { + bindKey: { mac: "cmd-k cmd-l", win: "ctrl-k ctrl-l" }, + name: "tolowercase" + }, { + bindKey: { mac: "cmd-k cmd-u", win: "ctrl-k ctrl-u" }, + name: "touppercase" + }, + { + bindKey: { mac: "cmd-shift-v", win: "ctrl-shift-v" }, + name: "paste_and_indent" + }, { + bindKey: { mac: "cmd-k cmd-v|cmd-alt-v", win: "ctrl-k ctrl-v" }, + name: "paste_from_history" + }, + { + bindKey: { mac: "cmd-shift-enter", win: "ctrl-shift-enter" }, + name: "addLineBefore" + }, { + bindKey: { mac: "cmd-enter", win: "ctrl-enter" }, + name: "addLineAfter" + }, { + bindKey: { mac: "ctrl-shift-k", win: "ctrl-shift-k" }, + name: "removeline" + }, { + bindKey: { mac: "ctrl-alt-up", win: "ctrl-up" }, + name: "scrollup" + }, { + bindKey: { mac: "ctrl-alt-down", win: "ctrl-down" }, + name: "scrolldown" + }, { + bindKey: { mac: "cmd-a", win: "ctrl-a" }, + name: "selectall" + }, { + bindKey: { linux: "alt-shift-down", mac: "ctrl-shift-down", win: "ctrl-alt-down" }, + name: "addCursorBelow" + }, { + bindKey: { linux: "alt-shift-up", mac: "ctrl-shift-up", win: "ctrl-alt-up" }, + name: "addCursorAbove" + }, + { + bindKey: { mac: "cmd-k cmd-c|ctrl-l", win: "ctrl-k ctrl-c" }, + name: "centerselection" + }, + { + bindKey: { mac: "f5", win: "f9" }, + name: "sortlines" + }, + { + bindKey: { mac: "ctrl-f5", win: "ctrl-f9" }, + name: "sortlines", + args: { caseSensitive: true } + }, + { + bindKey: { mac: "cmd-shift-l", win: "ctrl-shift-l" }, + name: "splitSelectionIntoLines" + }, { + bindKey: { mac: "ctrl-cmd-down", win: "ctrl-shift-down" }, + name: "movelinesdown" + }, { + bindKey: { mac: "ctrl-cmd-up", win: "ctrl-shift-up" }, + name: "movelinesup" + }, { + bindKey: { mac: "alt-down", win: "alt-down" }, + name: "modifyNumberDown" + }, { + bindKey: { mac: "alt-up", win: "alt-up" }, + name: "modifyNumberUp" + }, { + bindKey: { mac: "cmd-/", win: "ctrl-/" }, + name: "togglecomment" + }, { + bindKey: { mac: "cmd-alt-/", win: "ctrl-shift-/" }, + name: "toggleBlockComment" + }, + { + bindKey: { linux: "ctrl-alt-q", mac: "ctrl-q", win: "ctrl-q" }, + name: "togglerecording" + }, { + bindKey: { linux: "ctrl-alt-shift-q", mac: "ctrl-shift-q", win: "ctrl-shift-q" }, + name: "replaymacro" + }, + { + bindKey: { mac: "ctrl-t", win: "ctrl-t" }, + name: "transpose" + } +].forEach(function (binding) { + var command = exports.handler.commands[binding.name]; + if (command) + command.bindKey = binding.bindKey; + exports.handler.bindKey(binding.bindKey, command || binding.name); +}); + +}); (function() { + window.require(["ace/keyboard/sublime"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/keybinding-vim.js b/ui/base1/ace/keybinding-vim.js new file mode 100644 index 0000000..4643cb3 --- /dev/null +++ b/ui/base1/ace/keybinding-vim.js @@ -0,0 +1,7056 @@ +define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +function hardWrap(editor, options) { + var max = options.column || editor.getOption("printMarginColumn"); + var allowMerge = options.allowMerge != false; + var row = Math.min(options.startRow, options.endRow); + var endRow = Math.max(options.startRow, options.endRow); + var session = editor.session; + while (row <= endRow) { + var line = session.getLine(row); + if (line.length > max) { + var space = findSpace(line, max, 5); + if (space) { + var indentation = /^\s*/.exec(line)[0]; + session.replace(new Range(row, space.start, row, space.end), "\n" + indentation); + } + endRow++; + } + else if (allowMerge && /\S/.test(line) && row != endRow) { + var nextLine = session.getLine(row + 1); + if (nextLine && /\S/.test(nextLine)) { + var trimmedLine = line.replace(/\s+$/, ""); + var trimmedNextLine = nextLine.replace(/^\s+/, ""); + var mergedLine = trimmedLine + " " + trimmedNextLine; + var space = findSpace(mergedLine, max, 5); + if (space && space.start > trimmedLine.length || mergedLine.length < max) { + var replaceRange = new Range(row, trimmedLine.length, row + 1, nextLine.length - trimmedNextLine.length); + session.replace(replaceRange, " "); + row--; + endRow--; + } + else if (trimmedLine.length < line.length) { + session.remove(new Range(row, trimmedLine.length, row, line.length)); + } + } + } + row++; + } + function findSpace(line, max, min) { + if (line.length < max) + return; + var before = line.slice(0, max); + var after = line.slice(max); + var spaceAfter = /^(?:(\s+)|(\S+)(\s+))/.exec(after); + var spaceBefore = /(?:(\s+)|(\s+)(\S+))$/.exec(before); + var start = 0; + var end = 0; + if (spaceBefore && !spaceBefore[2]) { + start = max - spaceBefore[1].length; + end = max; + } + if (spaceAfter && !spaceAfter[2]) { + if (!start) + start = max; + end = max + spaceAfter[1].length; + } + if (start) { + return { + start: start, + end: end + }; + } + if (spaceBefore && spaceBefore[2] && spaceBefore.index > min) { + return { + start: spaceBefore.index, + end: spaceBefore.index + spaceBefore[2].length + }; + } + if (spaceAfter && spaceAfter[2]) { + start = max + spaceAfter[2].length; + return { + start: start, + end: start + spaceAfter[3].length + }; + } + } +} +function wrapAfterInput(e) { + if (e.command.name == "insertstring" && /\S/.test(e.args)) { + var editor = e.editor; + var cursor = editor.selection.cursor; + if (cursor.column <= editor.renderer.$printMarginColumn) + return; + var lastDelta = editor.session.$undoManager.$lastDelta; + hardWrap(editor, { + startRow: cursor.row, endRow: cursor.row, + allowMerge: false + }); + if (lastDelta != editor.session.$undoManager.$lastDelta) + editor.session.markUndoGroup(); + } +} +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + hardWrap: { + set: function (val) { + if (val) { + this.commands.on("afterExec", wrapAfterInput); + } + else { + this.commands.off("afterExec", wrapAfterInput); + } + }, + value: false + } +}); +exports.hardWrap = hardWrap; + +}); + +define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"], function(require, exports, module){// CodeMirror, copyright (c) by Marijn Haverbeke and others +'use strict'; +function log() { + var d = ""; + function format(p) { + if (typeof p != "object") + return p + ""; + if ("line" in p) { + return p.line + ":" + p.ch; + } + if ("anchor" in p) { + return format(p.anchor) + "->" + format(p.head); + } + if (Array.isArray(p)) + return "[" + p.map(function (x) { + return format(x); + }) + "]"; + return JSON.stringify(p); + } + for (var i = 0; i < arguments.length; i++) { + var p = arguments[i]; + var f = format(p); + d += f + " "; + } + console.log(d); +} +var Range = require("../range").Range; +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var domLib = require("../lib/dom"); +var oop = require("../lib/oop"); +var KEYS = require("../lib/keys"); +var event = require("../lib/event"); +var Search = require("../search").Search; +var useragent = require("../lib/useragent"); +var SearchHighlight = require("../search_highlight").SearchHighlight; +var multiSelectCommands = require("../commands/multi_select_commands"); +var TextModeTokenRe = require("../mode/text").Mode.prototype.tokenRe; +var hardWrap = require("../ext/hardwrap").hardWrap; +require("../multi_select"); +var CodeMirror = function (ace) { + this.ace = ace; + this.state = {}; + this.marks = {}; + this.options = {}; + this.$uid = 0; + this.onChange = this.onChange.bind(this); + this.onSelectionChange = this.onSelectionChange.bind(this); + this.onBeforeEndOperation = this.onBeforeEndOperation.bind(this); + this.ace.on('change', this.onChange); + this.ace.on('changeSelection', this.onSelectionChange); + this.ace.on('beforeEndOperation', this.onBeforeEndOperation); +}; +CodeMirror.Pos = function (line, ch) { + if (!(this instanceof Pos)) + return new Pos(line, ch); + this.line = line; + this.ch = ch; +}; +CodeMirror.defineOption = function (name, val, setter) { }; +CodeMirror.commands = { + redo: function (cm) { cm.ace.redo(); }, + undo: function (cm) { cm.ace.undo(); }, + newlineAndIndent: function (cm) { cm.ace.insert("\n"); }, + goLineLeft: function (cm) { cm.ace.selection.moveCursorLineStart(); }, + goLineRight: function (cm) { cm.ace.selection.moveCursorLineEnd(); } +}; +CodeMirror.keyMap = {}; +CodeMirror.addClass = CodeMirror.rmClass = function () { }; +CodeMirror.e_stop = CodeMirror.e_preventDefault = event.stopEvent; +CodeMirror.keyName = function (e) { + var key = (KEYS[e.keyCode] || e.key || ""); + if (key.length == 1) + key = key.toUpperCase(); + key = event.getModifierString(e).replace(/(^|-)\w/g, function (m) { + return m.toUpperCase(); + }) + key; + return key; +}; +CodeMirror.keyMap['default'] = function (key) { + return function (cm) { + var cmd = cm.ace.commands.commandKeyBinding[key.toLowerCase()]; + return cmd && cm.ace.execCommand(cmd) !== false; + }; +}; +CodeMirror.lookupKey = function lookupKey(key, map, handle) { + if (!map) + map = "default"; + if (typeof map == "string") + map = CodeMirror.keyMap[map] || CodeMirror.keyMap['default']; + var found = typeof map == "function" ? map(key) : map[key]; + if (found === false) + return "nothing"; + if (found === "...") + return "multi"; + if (found != null && handle(found)) + return "handled"; + if (map.fallthrough) { + if (!Array.isArray(map.fallthrough)) + return lookupKey(key, map.fallthrough, handle); + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle); + if (result) + return result; + } + } +}; +CodeMirror.findMatchingTag = function (cm, head) { + return cm.findMatchingTag(head); +}; +CodeMirror.findEnclosingTag = function (cm, head) { +}; +CodeMirror.signal = function (o, name, e) { return o._signal(name, e); }; +CodeMirror.on = event.addListener; +CodeMirror.off = event.removeListener; +CodeMirror.isWordChar = function (ch) { + if (ch < "\x7f") + return /^\w$/.test(ch); + TextModeTokenRe.lastIndex = 0; + return TextModeTokenRe.test(ch); +}; +(function () { + oop.implement(CodeMirror.prototype, EventEmitter); + this.destroy = function () { + this.ace.off('change', this.onChange); + this.ace.off('changeSelection', this.onSelectionChange); + this.ace.off('beforeEndOperation', this.onBeforeEndOperation); + this.removeOverlay(); + }; + this.virtualSelectionMode = function () { + return this.ace.inVirtualSelectionMode && this.ace.selection.index; + }; + this.onChange = function (delta) { + if (this.$lineHandleChanges) { + this.$lineHandleChanges.push(delta); + } + var change = { text: delta.action[0] == 'i' ? delta.lines : [] }; + var curOp = this.curOp = this.curOp || {}; + if (!curOp.changeHandlers) + curOp.changeHandlers = this._eventRegistry["change"] && this._eventRegistry["change"].slice(); + if (!curOp.lastChange) { + curOp.lastChange = curOp.change = change; + } + else { + curOp.lastChange.next = curOp.lastChange = change; + } + this.$updateMarkers(delta); + }; + this.onSelectionChange = function () { + var curOp = this.curOp = this.curOp || {}; + if (!curOp.cursorActivityHandlers) + curOp.cursorActivityHandlers = this._eventRegistry["cursorActivity"] && this._eventRegistry["cursorActivity"].slice(); + this.curOp.cursorActivity = true; + if (this.ace.inMultiSelectMode) { + this.ace.keyBinding.removeKeyboardHandler(multiSelectCommands.keyboardHandler); + } + }; + this.operation = function (fn, force) { + if (!force && this.curOp || force && this.curOp && this.curOp.force) { + return fn(); + } + if (force || !this.ace.curOp) { + if (this.curOp) + this.onBeforeEndOperation(); + } + if (!this.ace.curOp) { + var prevOp = this.ace.prevOp; + this.ace.startOperation({ + command: { name: "vim", scrollIntoView: "cursor" } + }); + } + var curOp = this.curOp = this.curOp || {}; + this.curOp.force = force; + var result = fn(); + if (this.ace.curOp && this.ace.curOp.command.name == "vim") { + if (this.state.dialog) + this.ace.curOp.command.scrollIntoView = this.ace.curOp.vimDialogScroll; + this.ace.endOperation(); + if (!curOp.cursorActivity && !curOp.lastChange && prevOp) + this.ace.prevOp = prevOp; + } + if (force || !this.ace.curOp) { + if (this.curOp) + this.onBeforeEndOperation(); + } + return result; + }; + this.onBeforeEndOperation = function () { + var op = this.curOp; + if (op) { + if (op.change) { + this.signal("change", op.change, op); + } + if (op && op.cursorActivity) { + this.signal("cursorActivity", null, op); + } + this.curOp = null; + } + }; + this.signal = function (eventName, e, handlers) { + var listeners = handlers ? handlers[eventName + "Handlers"] + : (this._eventRegistry || {})[eventName]; + if (!listeners) + return; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) + listeners[i](this, e); + }; + this.firstLine = function () { return 0; }; + this.lastLine = function () { return this.ace.session.getLength() - 1; }; + this.lineCount = function () { return this.ace.session.getLength(); }; + this.setCursor = function (line, ch) { + if (typeof line === 'object') { + ch = line.ch; + line = line.line; + } + var shouldScroll = !this.curOp && !this.ace.inVirtualSelectionMode; + if (!this.ace.inVirtualSelectionMode) + this.ace.exitMultiSelectMode(); + this.ace.session.unfold({ row: line, column: ch }); + this.ace.selection.moveTo(line, ch); + if (shouldScroll) { + this.ace.renderer.scrollCursorIntoView(); + this.ace.endOperation(); + } + }; + this.getCursor = function (p) { + var sel = this.ace.selection; + var pos = p == 'anchor' ? (sel.isEmpty() ? sel.lead : sel.anchor) : + p == 'head' || !p ? sel.lead : sel.getRange()[p]; + return toCmPos(pos); + }; + this.listSelections = function (p) { + var ranges = this.ace.multiSelect.rangeList.ranges; + if (!ranges.length || this.ace.inVirtualSelectionMode) + return [{ anchor: this.getCursor('anchor'), head: this.getCursor('head') }]; + return ranges.map(function (r) { + return { + anchor: this.clipPos(toCmPos(r.cursor == r.end ? r.start : r.end)), + head: this.clipPos(toCmPos(r.cursor)) + }; + }, this); + }; + this.setSelections = function (p, primIndex) { + var sel = this.ace.multiSelect; + var ranges = p.map(function (x) { + var anchor = toAcePos(x.anchor); + var head = toAcePos(x.head); + var r = Range.comparePoints(anchor, head) < 0 + ? new Range.fromPoints(anchor, head) + : new Range.fromPoints(head, anchor); + r.cursor = Range.comparePoints(r.start, head) ? r.end : r.start; + return r; + }); + if (this.ace.inVirtualSelectionMode) { + this.ace.selection.fromOrientedRange(ranges[0]); + return; + } + if (!primIndex) { + ranges = ranges.reverse(); + } + else if (ranges[primIndex]) { + ranges.push(ranges.splice(primIndex, 1)[0]); + } + sel.toSingleRange(ranges[0].clone()); + var session = this.ace.session; + for (var i = 0; i < ranges.length; i++) { + var range = session.$clipRangeToDocument(ranges[i]); // todo why ace doesn't do this? + sel.addRange(range); + } + }; + this.setSelection = function (a, h, options) { + var sel = this.ace.selection; + sel.moveTo(a.line, a.ch); + sel.selectTo(h.line, h.ch); + if (options && options.origin == '*mouse') { + this.onBeforeEndOperation(); + } + }; + this.somethingSelected = function (p) { + return !this.ace.selection.isEmpty(); + }; + this.clipPos = function (p) { + var pos = this.ace.session.$clipPositionToDocument(p.line, p.ch); + return toCmPos(pos); + }; + this.foldCode = function (pos) { + this.ace.session.$toggleFoldWidget(pos.line, {}); + }; + this.markText = function (cursor) { + return { clear: function () { }, find: function () { } }; + }; + this.$updateMarkers = function (delta) { + var isInsert = delta.action == "insert"; + var start = delta.start; + var end = delta.end; + var rowShift = (end.row - start.row) * (isInsert ? 1 : -1); + var colShift = (end.column - start.column) * (isInsert ? 1 : -1); + if (isInsert) + end = start; + for (var i in this.marks) { + var point = this.marks[i]; + var cmp = Range.comparePoints(point, start); + if (cmp < 0) { + continue; // delta starts after the range + } + if (cmp === 0) { + if (isInsert) { + if (!point.$insertRight) { + cmp = 1; + } + else if (point.bias == 1) { + cmp = 1; + } + else { + point.bias = -1; + continue; + } + } + } + var cmp2 = isInsert ? cmp : Range.comparePoints(point, end); + if (cmp2 > 0) { + point.row += rowShift; + point.column += point.row == end.row ? colShift : 0; + continue; + } + if (!isInsert && cmp2 <= 0) { + point.row = start.row; + point.column = start.column; + if (cmp2 === 0) + point.bias = 1; + } + } + }; + var Marker = function (cm, id, row, column) { + this.cm = cm; + this.id = id; + this.row = row; + this.column = column; + cm.marks[this.id] = this; + }; + Marker.prototype.clear = function () { delete this.cm.marks[this.id]; }; + Marker.prototype.find = function () { return toCmPos(this); }; + this.setBookmark = function (cursor, options) { + var bm = new Marker(this, this.$uid++, cursor.line, cursor.ch); + if (!options || !options.insertLeft) + bm.$insertRight = true; + this.marks[bm.id] = bm; + return bm; + }; + this.moveH = function (increment, unit) { + if (unit == 'char') { + var sel = this.ace.selection; + sel.clearSelection(); + sel.moveCursorBy(0, increment); + } + }; + this.findPosV = function (start, amount, unit, goalColumn) { + if (unit == 'page') { + var renderer = this.ace.renderer; + var config = renderer.layerConfig; + amount = amount * Math.floor(config.height / config.lineHeight); + unit = 'line'; + } + if (unit == 'line') { + var screenPos = this.ace.session.documentToScreenPosition(start.line, start.ch); + if (goalColumn != null) + screenPos.column = goalColumn; + screenPos.row += amount; + screenPos.row = Math.min(Math.max(0, screenPos.row), this.ace.session.getScreenLength() - 1); + var pos = this.ace.session.screenToDocumentPosition(screenPos.row, screenPos.column); + return toCmPos(pos); + } + else { + debugger; + } + }; + this.charCoords = function (pos, mode) { + if (mode == 'div' || !mode) { + var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch); + return { left: sc.column, top: sc.row }; + } + if (mode == 'local') { + var renderer = this.ace.renderer; + var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch); + var lh = renderer.layerConfig.lineHeight; + var cw = renderer.layerConfig.characterWidth; + var top = lh * sc.row; + return { left: sc.column * cw, top: top, bottom: top + lh }; + } + }; + this.coordsChar = function (pos, mode) { + var renderer = this.ace.renderer; + if (mode == 'local') { + var row = Math.max(0, Math.floor(pos.top / renderer.lineHeight)); + var col = Math.max(0, Math.floor(pos.left / renderer.characterWidth)); + var ch = renderer.session.screenToDocumentPosition(row, col); + return toCmPos(ch); + } + else if (mode == 'div') { + throw "not implemented"; + } + }; + this.getSearchCursor = function (query, pos, caseFold) { + var caseSensitive = false; + var isRegexp = false; + if (query instanceof RegExp && !query.global) { + caseSensitive = !query.ignoreCase; + query = query.source; + isRegexp = true; + } + if (query == "\\n") { + query = "\n"; + isRegexp = false; + } + var search = new Search(); + if (pos.ch == undefined) + pos.ch = Number.MAX_VALUE; + var acePos = { row: pos.line, column: pos.ch }; + var cm = this; + var last = null; + return { + findNext: function () { return this.find(false); }, + findPrevious: function () { return this.find(true); }, + find: function (back) { + search.setOptions({ + needle: query, + caseSensitive: caseSensitive, + wrap: false, + backwards: back, + regExp: isRegexp, + start: last || acePos + }); + var range = search.find(cm.ace.session); + last = range; + return last && [!last.isEmpty()]; + }, + from: function () { return last && toCmPos(last.start); }, + to: function () { return last && toCmPos(last.end); }, + replace: function (text) { + if (last) { + last.end = cm.ace.session.doc.replace(last, text); + } + } + }; + }; + this.scrollTo = function (x, y) { + var renderer = this.ace.renderer; + var config = renderer.layerConfig; + var maxHeight = config.maxHeight; + maxHeight -= (renderer.$size.scrollerHeight - renderer.lineHeight) * renderer.$scrollPastEnd; + if (y != null) + this.ace.session.setScrollTop(Math.max(0, Math.min(y, maxHeight))); + if (x != null) + this.ace.session.setScrollLeft(Math.max(0, Math.min(x, config.width))); + }; + this.scrollInfo = function () { return 0; }; + this.scrollIntoView = function (pos, margin) { + if (pos) { + var renderer = this.ace.renderer; + var viewMargin = { "top": 0, "bottom": margin }; + renderer.scrollCursorIntoView(toAcePos(pos), (renderer.lineHeight * 2) / renderer.$size.scrollerHeight, viewMargin); + } + }; + this.getLine = function (row) { return this.ace.session.getLine(row); }; + this.getRange = function (s, e) { + return this.ace.session.getTextRange(new Range(s.line, s.ch, e.line, e.ch)); + }; + this.replaceRange = function (text, s, e) { + if (!e) + e = s; + var range = new Range(s.line, s.ch, e.line, e.ch); + this.ace.session.$clipRangeToDocument(range); + return this.ace.session.replace(range, text); + }; + this.replaceSelection = + this.replaceSelections = function (p) { + var strings = Array.isArray(p) && p; + var sel = this.ace.selection; + if (this.ace.inVirtualSelectionMode) { + this.ace.session.replace(sel.getRange(), strings ? p[0] || "" : p); + return; + } + sel.inVirtualSelectionMode = true; + var ranges = sel.rangeList.ranges; + if (!ranges.length) + ranges = [this.ace.multiSelect.getRange()]; + for (var i = ranges.length; i--;) + this.ace.session.replace(ranges[i], strings ? p[i] || "" : p); + sel.inVirtualSelectionMode = false; + }; + this.getSelection = function () { + return this.ace.getSelectedText(); + }; + this.getSelections = function () { + return this.listSelections().map(function (x) { + return this.getRange(x.anchor, x.head); + }, this); + }; + this.getInputField = function () { + return this.ace.textInput.getElement(); + }; + this.getWrapperElement = function () { + return this.ace.container; + }; + var optMap = { + indentWithTabs: "useSoftTabs", + indentUnit: "tabSize", + tabSize: "tabSize", + firstLineNumber: "firstLineNumber", + readOnly: "readOnly" + }; + this.setOption = function (name, val) { + this.state[name] = val; + switch (name) { + case 'indentWithTabs': + name = optMap[name]; + val = !val; + break; + case 'keyMap': + this.state.$keyMap = val; + return; + break; + default: + name = optMap[name]; + } + if (name) + this.ace.setOption(name, val); + }; + this.getOption = function (name) { + var val; + var aceOpt = optMap[name]; + if (aceOpt) + val = this.ace.getOption(aceOpt); + switch (name) { + case 'indentWithTabs': + name = optMap[name]; + return !val; + case 'keyMap': + return this.state.$keyMap || 'vim'; + } + return aceOpt ? val : this.state[name]; + }; + this.toggleOverwrite = function (on) { + this.state.overwrite = on; + return this.ace.setOverwrite(on); + }; + this.addOverlay = function (o) { + if (!this.$searchHighlight || !this.$searchHighlight.session) { + var highlight = new SearchHighlight(null, "ace_highlight-marker", "text"); + var marker = this.ace.session.addDynamicMarker(highlight); + highlight.id = marker.id; + highlight.session = this.ace.session; + highlight.destroy = function (o) { + highlight.session.off("change", highlight.updateOnChange); + highlight.session.off("changeEditor", highlight.destroy); + highlight.session.removeMarker(highlight.id); + highlight.session = null; + }; + highlight.updateOnChange = function (delta) { + var row = delta.start.row; + if (row == delta.end.row) + highlight.cache[row] = undefined; + else + highlight.cache.splice(row, highlight.cache.length); + }; + highlight.session.on("changeEditor", highlight.destroy); + highlight.session.on("change", highlight.updateOnChange); + } + var re = new RegExp(o.query.source, "gmi"); + this.$searchHighlight = o.highlight = highlight; + this.$searchHighlight.setRegexp(re); + this.ace.renderer.updateBackMarkers(); + }; + this.removeOverlay = function (o) { + if (this.$searchHighlight && this.$searchHighlight.session) { + this.$searchHighlight.destroy(); + } + }; + this.getScrollInfo = function () { + var renderer = this.ace.renderer; + var config = renderer.layerConfig; + return { + left: renderer.scrollLeft, + top: renderer.scrollTop, + height: config.maxHeight, + width: config.width, + clientHeight: config.height, + clientWidth: config.width + }; + }; + this.getValue = function () { + return this.ace.getValue(); + }; + this.setValue = function (v) { + return this.ace.setValue(v, -1); + }; + this.getTokenTypeAt = function (pos) { + var token = this.ace.session.getTokenAt(pos.line, pos.ch); + return token && /comment|string/.test(token.type) ? "string" : ""; + }; + this.findMatchingBracket = function (pos) { + var m = this.ace.session.findMatchingBracket(toAcePos(pos)); + return { to: m && toCmPos(m) }; + }; + this.findMatchingTag = function (pos) { + var m = this.ace.session.getMatchingTags(toAcePos(pos)); + if (!m) + return; + return { + open: { + from: toCmPos(m.openTag.start), + to: toCmPos(m.openTag.end) + }, + close: { + from: toCmPos(m.closeTag.start), + to: toCmPos(m.closeTag.end) + } + }; + }; + this.indentLine = function (line, method) { + if (method === true) + this.ace.session.indentRows(line, line, "\t"); + else if (method === false) + this.ace.session.outdentRows(new Range(line, 0, line, 0)); + }; + this.indexFromPos = function (pos) { + return this.ace.session.doc.positionToIndex(toAcePos(pos)); + }; + this.posFromIndex = function (index) { + return toCmPos(this.ace.session.doc.indexToPosition(index)); + }; + this.focus = function (index) { + return this.ace.textInput.focus(); + }; + this.blur = function (index) { + return this.ace.blur(); + }; + this.defaultTextHeight = function (index) { + return this.ace.renderer.layerConfig.lineHeight; + }; + this.scanForBracket = function (pos, dir, _, options) { + var re = options.bracketRegex.source; + var tokenRe = /paren|text|operator|tag/; + if (dir == 1) { + var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), tokenRe); + } + else { + var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), { row: pos.line, column: pos.ch + 1 }, tokenRe); + if (!m && options.bracketRegex && options.bracketRegex.test(this.getLine(pos.line)[pos.ch - 1])) { + m = { row: pos.line, column: pos.ch - 1 }; + } + } + return m && { pos: toCmPos(m) }; + }; + this.refresh = function () { + return this.ace.resize(true); + }; + this.getMode = function () { + return { name: this.getOption("mode") }; + }; + this.execCommand = function (name) { + if (CodeMirror.commands.hasOwnProperty(name)) + return CodeMirror.commands[name](this); + if (name == "indentAuto") + return this.ace.execCommand("autoindent"); + console.log(name + " is not implemented"); + }; + this.getLineNumber = function (handle) { + var deltas = this.$lineHandleChanges; + if (!deltas) + return null; + var row = handle.row; + for (var i = 0; i < deltas.length; i++) { + var delta = deltas[i]; + if (delta.start.row != delta.end.row) { + if (delta.action[0] == "i") { + if (delta.start.row < row) + row += delta.end.row - delta.start.row; + } + else { + if (delta.start.row < row) { + if (row < delta.end.row || row == delta.end.row && delta.start.column > 0) { + return null; + } + row -= delta.end.row - delta.start.row; + } + } + } + } + return row; + }; + this.getLineHandle = function (row) { + if (!this.$lineHandleChanges) + this.$lineHandleChanges = []; + return { text: this.ace.session.getLine(row), row: row }; + }; + this.releaseLineHandles = function () { + this.$lineHandleChanges = undefined; + }; + this.getLastEditEnd = function () { + var undoManager = this.ace.session.$undoManager; + if (undoManager && undoManager.$lastDelta) + return toCmPos(undoManager.$lastDelta.end); + }; +}).call(CodeMirror.prototype); +function toAcePos(cmPos) { + return { row: cmPos.line, column: cmPos.ch }; +} +function toCmPos(acePos) { + return new Pos(acePos.row, acePos.column); +} +var StringStream = CodeMirror.StringStream = function (string, tabSize) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; +}; +StringStream.prototype = { + eol: function () { return this.pos >= this.string.length; }, + sol: function () { return this.pos == this.lineStart; }, + peek: function () { return this.string.charAt(this.pos) || undefined; }, + next: function () { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }, + eat: function (match) { + var ch = this.string.charAt(this.pos); + if (typeof match == "string") + var ok = ch == match; + else + var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) { + ++this.pos; + return ch; + } + }, + eatWhile: function (match) { + var start = this.pos; + while (this.eat(match)) { } + return this.pos > start; + }, + eatSpace: function () { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) + ++this.pos; + return this.pos > start; + }, + skipToEnd: function () { this.pos = this.string.length; }, + skipTo: function (ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) { + this.pos = found; + return true; + } + }, + backUp: function (n) { this.pos -= n; }, + column: function () { + throw "not implemented"; + }, + indentation: function () { + throw "not implemented"; + }, + match: function (pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) + this.pos += pattern.length; + return true; + } + } + else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) + return null; + if (match && consume !== false) + this.pos += match[0].length; + return match; + } + }, + current: function () { return this.string.slice(this.start, this.pos); }, + hideFirstChars: function (n, inner) { + this.lineStart += n; + try { + return inner(); + } + finally { + this.lineStart -= n; + } + } +}; +CodeMirror.defineExtension = function (name, fn) { + CodeMirror.prototype[name] = fn; +}; +domLib.importCssString(".normal-mode .ace_cursor{\n border: none;\n background-color: rgba(255,0,0,0.5);\n}\n.normal-mode .ace_hidden-cursors .ace_cursor{\n background-color: transparent;\n border: 1px solid red;\n opacity: 0.7\n}\n.ace_dialog {\n position: absolute;\n left: 0; right: 0;\n background: inherit;\n z-index: 15;\n padding: .1em .8em;\n overflow: hidden;\n color: inherit;\n}\n.ace_dialog-top {\n border-bottom: 1px solid #444;\n top: 0;\n}\n.ace_dialog-bottom {\n border-top: 1px solid #444;\n bottom: 0;\n}\n.ace_dialog input {\n border: none;\n outline: none;\n background: transparent;\n width: 20em;\n color: inherit;\n font-family: monospace;\n}", "vimMode", false); +(function () { + function dialogDiv(cm, template, bottom) { + var wrap = cm.ace.container; + var dialog; + dialog = wrap.appendChild(document.createElement("div")); + if (bottom) + dialog.className = "ace_dialog ace_dialog-bottom"; + else + dialog.className = "ace_dialog ace_dialog-top"; + if (typeof template == "string") { + dialog.innerHTML = template; + } + else { // Assuming it's a detached DOM element. + dialog.appendChild(template); + } + return dialog; + } + function closeNotification(cm, newVal) { + if (cm.state.currentNotificationClose) + cm.state.currentNotificationClose(); + cm.state.currentNotificationClose = newVal; + } + CodeMirror.defineExtension("openDialog", function (template, callback, options) { + if (this.virtualSelectionMode()) + return; + if (!options) + options = {}; + closeNotification(this, null); + var dialog = dialogDiv(this, template, options.bottom); + var closed = false, me = this; + this.state.dialog = dialog; + function close(newVal) { + if (typeof newVal == 'string') { + inp.value = newVal; + } + else { + if (closed) + return; + if (newVal && newVal.type == "blur") { + if (document.activeElement === inp) + return; + } + if (me.state.dialog == dialog) { + me.state.dialog = null; + me.focus(); + } + closed = true; + dialog.remove(); + if (options.onClose) + options.onClose(dialog); + var cm = me; + if (cm.state.vim) { + cm.state.vim.status = null; + cm.ace._signal("changeStatus"); + cm.ace.renderer.$loop.schedule(cm.ace.renderer.CHANGE_CURSOR); + } + } + } + var inp = dialog.getElementsByTagName("input")[0], button; + if (inp) { + if (options.value) { + inp.value = options.value; + if (options.selectValueOnOpen !== false) + inp.select(); + } + if (options.onInput) + CodeMirror.on(inp, "input", function (e) { options.onInput(e, inp.value, close); }); + if (options.onKeyUp) + CodeMirror.on(inp, "keyup", function (e) { options.onKeyUp(e, inp.value, close); }); + CodeMirror.on(inp, "keydown", function (e) { + if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { + return; + } + if (e.keyCode == 13) + callback(inp.value); + if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) { + CodeMirror.e_stop(e); + close(); + } + }); + if (options.closeOnBlur !== false) + CodeMirror.on(inp, "blur", close); + inp.focus(); + } + else if (button = dialog.getElementsByTagName("button")[0]) { + CodeMirror.on(button, "click", function () { + close(); + me.focus(); + }); + if (options.closeOnBlur !== false) + CodeMirror.on(button, "blur", close); + button.focus(); + } + return close; + }); + CodeMirror.defineExtension("openNotification", function (template, options) { + if (this.virtualSelectionMode()) + return; + closeNotification(this, close); + var dialog = dialogDiv(this, template, options && options.bottom); + var closed = false, doneTimer; + var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000; + function close() { + if (closed) + return; + closed = true; + clearTimeout(doneTimer); + dialog.remove(); + } + CodeMirror.on(dialog, 'click', function (e) { + CodeMirror.e_preventDefault(e); + close(); + }); + if (duration) + doneTimer = setTimeout(close, duration); + return close; + }); +})(); +var Pos = CodeMirror.Pos; +function updateSelectionForSurrogateCharacters(cm, curStart, curEnd) { + if (curStart.line === curEnd.line && curStart.ch >= curEnd.ch - 1) { + var text = cm.getLine(curStart.line); + var charCode = text.charCodeAt(curStart.ch); + if (0xD800 <= charCode && charCode <= 0xD8FF) { + curEnd.ch += 1; + } + } + return { start: curStart, end: curEnd }; +} +var defaultKeymap = [ + { keys: '', type: 'keyToKey', toKeys: 'h' }, + { keys: '', type: 'keyToKey', toKeys: 'l' }, + { keys: '', type: 'keyToKey', toKeys: 'k' }, + { keys: '', type: 'keyToKey', toKeys: 'j' }, + { keys: 'g', type: 'keyToKey', toKeys: 'gk' }, + { keys: 'g', type: 'keyToKey', toKeys: 'gj' }, + { keys: '', type: 'keyToKey', toKeys: 'l' }, + { keys: '', type: 'keyToKey', toKeys: 'h' }, + { keys: '', type: 'keyToKey', toKeys: 'x' }, + { keys: '', type: 'keyToKey', toKeys: 'W' }, + { keys: '', type: 'keyToKey', toKeys: 'B' }, + { keys: '', type: 'keyToKey', toKeys: 'w' }, + { keys: '', type: 'keyToKey', toKeys: 'b' }, + { keys: '', type: 'keyToKey', toKeys: 'j' }, + { keys: '', type: 'keyToKey', toKeys: 'k' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, + { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, + { keys: '', type: 'keyToKey', toKeys: '' }, // ipad keyboard sends C-Esc instead of C-[ + { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, + { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' }, + { keys: 's', type: 'keyToKey', toKeys: 'c', context: 'visual' }, + { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' }, + { keys: 'S', type: 'keyToKey', toKeys: 'VdO', context: 'visual' }, + { keys: '', type: 'keyToKey', toKeys: '0' }, + { keys: '', type: 'keyToKey', toKeys: '$' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: 'j^', context: 'normal' }, + { keys: '', type: 'keyToKey', toKeys: 'i', context: 'normal' }, + { keys: '', type: 'action', action: 'toggleOverwrite', context: 'insert' }, + { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true } }, + { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true } }, + { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true } }, + { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false } }, + { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true } }, + { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true } }, + { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true } }, + { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true } }, + { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false } }, + { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false } }, + { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true } }, + { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true } }, + { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true } }, + { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false } }, + { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true } }, + { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true } }, + { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true } }, + { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true } }, + { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true } }, + { keys: '(', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: false } }, + { keys: ')', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: true } }, + { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true } }, + { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false } }, + { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true } }, + { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true } }, + { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true } }, + { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true } }, + { keys: "g$", type: "motion", motion: "moveToEndOfDisplayLine" }, + { keys: "g^", type: "motion", motion: "moveToStartOfDisplayLine" }, + { keys: "g0", type: "motion", motion: "moveToStartOfDisplayLine" }, + { keys: '0', type: 'motion', motion: 'moveToStartOfLine' }, + { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar: true } }, + { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar: true } }, + { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar: true, repeatOffset: -1 } }, + { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true } }, + { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true } }, + { keys: 'f', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true, inclusive: true } }, + { keys: 'F', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false } }, + { keys: 't', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true } }, + { keys: 'T', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false } }, + { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true } }, + { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false } }, + { keys: '\'', type: 'motion', motion: 'goToMark', motionArgs: { toJumplist: true, linewise: true } }, + { keys: '`', type: 'motion', motion: 'goToMark', motionArgs: { toJumplist: true } }, + { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } }, + { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } }, + { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } }, + { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } }, + { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true } }, + { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true } }, + { keys: ']', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true } }, + { keys: '[', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true } }, + { keys: '|', type: 'motion', motion: 'moveToColumn' }, + { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context: 'visual' }, + { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: { sameLine: true }, context: 'visual' }, + { keys: 'd', type: 'operator', operator: 'delete' }, + { keys: 'y', type: 'operator', operator: 'yank' }, + { keys: 'c', type: 'operator', operator: 'change' }, + { keys: '=', type: 'operator', operator: 'indentAuto' }, + { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true } }, + { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false } }, + { keys: 'g~', type: 'operator', operator: 'changeCase' }, + { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: { toLower: true }, isEdit: true }, + { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: { toLower: false }, isEdit: true }, + { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true } }, + { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true } }, + { keys: 'gn', type: 'motion', motion: 'findAndSelectNextInclusive', motionArgs: { forward: true } }, + { keys: 'gN', type: 'motion', motion: 'findAndSelectNextInclusive', motionArgs: { forward: false } }, + { keys: 'gq', type: 'operator', operator: 'hardWrap' }, + { keys: 'gw', type: 'operator', operator: 'hardWrap', operatorArgs: { keepCursor: true } }, + { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false } }, + { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true } }, + { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal' }, + { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual' }, + { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'expandToLine', motionArgs: { linewise: true }, context: 'normal' }, + { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual' }, + { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal' }, + { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual' }, + { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal' }, + { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual' }, + { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveToStartOfLine', context: 'insert' }, + { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' }, + { keys: '', type: 'idle', context: 'normal' }, + { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true } }, + { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false } }, + { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true } }, + { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true } }, + { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' }, + { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' }, + { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' }, + { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' }, + { keys: 'gi', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'lastEdit' }, context: 'normal' }, + { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank' }, context: 'normal' }, + { keys: 'gI', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'bol' }, context: 'normal' }, + { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' }, + { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' }, + { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' }, + { keys: 'v', type: 'action', action: 'toggleVisualMode' }, + { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true } }, + { keys: '', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true } }, + { keys: '', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true } }, + { keys: 'gv', type: 'action', action: 'reselectLastSelection' }, + { keys: 'J', type: 'action', action: 'joinLines', isEdit: true }, + { keys: 'gJ', type: 'action', action: 'joinLines', actionArgs: { keepSpaces: true }, isEdit: true }, + { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true } }, + { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true } }, + { keys: 'r', type: 'action', action: 'replace', isEdit: true }, + { keys: '@', type: 'action', action: 'replayMacro' }, + { keys: 'q', type: 'action', action: 'enterMacroRecordMode' }, + { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }, context: 'normal' }, + { keys: 'R', type: 'operator', operator: 'change', operatorArgs: { linewise: true, fullLine: true }, context: 'visual', exitVisualBlock: true }, + { keys: 'u', type: 'action', action: 'undo', context: 'normal' }, + { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: { toLower: true }, context: 'visual', isEdit: true }, + { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: { toLower: false }, context: 'visual', isEdit: true }, + { keys: '', type: 'action', action: 'redo' }, + { keys: 'm', type: 'action', action: 'setMark' }, + { keys: '"', type: 'action', action: 'setRegister' }, + { keys: '', type: 'action', action: 'insertRegister', context: 'insert', isEdit: true }, + { keys: '', type: 'action', action: 'oneNormalCommand', context: 'insert' }, + { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' } }, + { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' } }, + { keys: 'z', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' } }, + { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: '.', type: 'action', action: 'repeatLastEdit' }, + { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: { increase: true, backtrack: false } }, + { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: { increase: false, backtrack: false } }, + { keys: '', type: 'action', action: 'indent', actionArgs: { indentRight: true }, context: 'insert' }, + { keys: '', type: 'action', action: 'indent', actionArgs: { indentRight: false }, context: 'insert' }, + { keys: 'a', type: 'motion', motion: 'textObjectManipulation' }, + { keys: 'i', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true } }, + { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true } }, + { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true } }, + { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true } }, + { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true } }, + { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true } }, + { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true } }, + { keys: ':', type: 'ex' } +]; +var defaultKeymapLength = defaultKeymap.length; +var defaultExCommandMap = [ + { name: 'colorscheme', shortName: 'colo' }, + { name: 'map' }, + { name: 'imap', shortName: 'im' }, + { name: 'nmap', shortName: 'nm' }, + { name: 'vmap', shortName: 'vm' }, + { name: 'omap', shortName: 'om' }, + { name: 'noremap', shortName: 'no' }, + { name: 'nnoremap', shortName: 'nn' }, + { name: 'vnoremap', shortName: 'vn' }, + { name: 'inoremap', shortName: 'ino' }, + { name: 'onoremap', shortName: 'ono' }, + { name: 'unmap' }, + { name: 'mapclear', shortName: 'mapc' }, + { name: 'nmapclear', shortName: 'nmapc' }, + { name: 'vmapclear', shortName: 'vmapc' }, + { name: 'imapclear', shortName: 'imapc' }, + { name: 'omapclear', shortName: 'omapc' }, + { name: 'write', shortName: 'w' }, + { name: 'undo', shortName: 'u' }, + { name: 'redo', shortName: 'red' }, + { name: 'set', shortName: 'se' }, + { name: 'setlocal', shortName: 'setl' }, + { name: 'setglobal', shortName: 'setg' }, + { name: 'sort', shortName: 'sor' }, + { name: 'substitute', shortName: 's', possiblyAsync: true }, + { name: 'startinsert', shortName: 'start' }, + { name: 'nohlsearch', shortName: 'noh' }, + { name: 'yank', shortName: 'y' }, + { name: 'delmarks', shortName: 'delm' }, + { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, + { name: 'vglobal', shortName: 'v' }, + { name: 'delete', shortName: 'd' }, + { name: 'join', shortName: 'j' }, + { name: 'normal', shortName: 'norm' }, + { name: 'global', shortName: 'g' } +]; +var langmap = parseLangmap(''); +function enterVimMode(cm) { + cm.setOption('disableInput', true); + cm.setOption('showCursorWhenSelecting', false); + CodeMirror.signal(cm, "vim-mode-change", { mode: "normal" }); + cm.on('cursorActivity', onCursorActivity); + maybeInitVimState(cm); + CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm)); +} +function leaveVimMode(cm) { + cm.setOption('disableInput', false); + cm.off('cursorActivity', onCursorActivity); + CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm)); + cm.state.vim = null; + if (highlightTimeout) + clearTimeout(highlightTimeout); +} +function getOnPasteFn(cm) { + var vim = cm.state.vim; + if (!vim.onPasteFn) { + vim.onPasteFn = function () { + if (!vim.insertMode) { + cm.setCursor(offsetCursor(cm.getCursor(), 0, 1)); + actions.enterInsertMode(cm, {}, vim); + } + }; + } + return vim.onPasteFn; +} +var numberRegex = /[\d]/; +var wordCharTest = [CodeMirror.isWordChar, function (ch) { + return ch && !CodeMirror.isWordChar(ch) && !/\s/.test(ch); + }], bigWordCharTest = [function (ch) { + return /\S/.test(ch); + }]; +var validMarks = ['<', '>']; +var validRegisters = ['-', '"', '.', ':', '_', '/', '+']; +var latinCharRegex = /^\w$/; +var upperCaseChars; +try { + upperCaseChars = new RegExp("^[\\p{Lu}]$", "u"); +} +catch (_) { + upperCaseChars = /^[A-Z]$/; +} +function isLine(cm, line) { + return line >= cm.firstLine() && line <= cm.lastLine(); +} +function isLowerCase(k) { + return (/^[a-z]$/).test(k); +} +function isMatchableSymbol(k) { + return '()[]{}'.indexOf(k) != -1; +} +function isNumber(k) { + return numberRegex.test(k); +} +function isUpperCase(k) { + return upperCaseChars.test(k); +} +function isWhiteSpaceString(k) { + return (/^\s*$/).test(k); +} +function isEndOfSentenceSymbol(k) { + return '.?!'.indexOf(k) != -1; +} +function inArray(val, arr) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == val) { + return true; + } + } + return false; +} +var options = {}; +function defineOption(name, defaultValue, type, aliases, callback) { + if (defaultValue === undefined && !callback) { + throw Error('defaultValue is required unless callback is provided'); + } + if (!type) { + type = 'string'; + } + options[name] = { + type: type, + defaultValue: defaultValue, + callback: callback + }; + if (aliases) { + for (var i = 0; i < aliases.length; i++) { + options[aliases[i]] = options[name]; + } + } + if (defaultValue) { + setOption(name, defaultValue); + } +} +function setOption(name, value, cm, cfg) { + var option = options[name]; + cfg = cfg || {}; + var scope = cfg.scope; + if (!option) { + return new Error('Unknown option: ' + name); + } + if (option.type == 'boolean') { + if (value && value !== true) { + return new Error('Invalid argument: ' + name + '=' + value); + } + else if (value !== false) { + value = true; + } + } + if (option.callback) { + if (scope !== 'local') { + option.callback(value, undefined); + } + if (scope !== 'global' && cm) { + option.callback(value, cm); + } + } + else { + if (scope !== 'local') { + option.value = option.type == 'boolean' ? !!value : value; + } + if (scope !== 'global' && cm) { + cm.state.vim.options[name] = { value: value }; + } + } +} +function getOption(name, cm, cfg) { + var option = options[name]; + cfg = cfg || {}; + var scope = cfg.scope; + if (!option) { + return new Error('Unknown option: ' + name); + } + if (option.callback) { + var local = cm && option.callback(undefined, cm); + if (scope !== 'global' && local !== undefined) { + return local; + } + if (scope !== 'local') { + return option.callback(); + } + return; + } + else { + var local = (scope !== 'global') && (cm && cm.state.vim.options[name]); + return (local || (scope !== 'local') && option || {}).value; + } +} +defineOption('filetype', undefined, 'string', ['ft'], function (name, cm) { + if (cm === undefined) { + return; + } + if (name === undefined) { + var mode = cm.getOption('mode'); + return mode == 'null' ? '' : mode; + } + else { + var mode = name == '' ? 'null' : name; + cm.setOption('mode', mode); + } +}); +defineOption('textwidth', 80, 'number', ['tw'], function (width, cm) { + if (cm === undefined) { + return; + } + if (width === undefined) { + var value = cm.getOption('textwidth'); + return value; + } + else { + var column = Math.round(width); + if (column > 1) { + cm.setOption('textwidth', column); + } + } +}); +var createCircularJumpList = function () { + var size = 100; + var pointer = -1; + var head = 0; + var tail = 0; + var buffer = new Array(size); + function add(cm, oldCur, newCur) { + var current = pointer % size; + var curMark = buffer[current]; + function useNextSlot(cursor) { + var next = ++pointer % size; + var trashMark = buffer[next]; + if (trashMark) { + trashMark.clear(); + } + buffer[next] = cm.setBookmark(cursor); + } + if (curMark) { + var markPos = curMark.find(); + if (markPos && !cursorEqual(markPos, oldCur)) { + useNextSlot(oldCur); + } + } + else { + useNextSlot(oldCur); + } + useNextSlot(newCur); + head = pointer; + tail = pointer - size + 1; + if (tail < 0) { + tail = 0; + } + } + function move(cm, offset) { + pointer += offset; + if (pointer > head) { + pointer = head; + } + else if (pointer < tail) { + pointer = tail; + } + var mark = buffer[(size + pointer) % size]; + if (mark && !mark.find()) { + var inc = offset > 0 ? 1 : -1; + var newCur; + var oldCur = cm.getCursor(); + do { + pointer += inc; + mark = buffer[(size + pointer) % size]; + if (mark && + (newCur = mark.find()) && + !cursorEqual(oldCur, newCur)) { + break; + } + } while (pointer < head && pointer > tail); + } + return mark; + } + function find(cm, offset) { + var oldPointer = pointer; + var mark = move(cm, offset); + pointer = oldPointer; + return mark && mark.find(); + } + return { + cachedCursor: undefined, //used for # and * jumps + add: add, + find: find, + move: move + }; +}; +var createInsertModeChanges = function (c) { + if (c) { + return { + changes: c.changes, + expectCursorActivityForChange: c.expectCursorActivityForChange + }; + } + return { + changes: [], + expectCursorActivityForChange: false + }; +}; +function MacroModeState() { + this.latestRegister = undefined; + this.isPlaying = false; + this.isRecording = false; + this.replaySearchQueries = []; + this.onRecordingDone = undefined; + this.lastInsertModeChanges = createInsertModeChanges(); +} +MacroModeState.prototype = { + exitMacroRecordMode: function () { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.onRecordingDone) { + macroModeState.onRecordingDone(); // close dialog + } + macroModeState.onRecordingDone = undefined; + macroModeState.isRecording = false; + }, + enterMacroRecordMode: function (cm, registerName) { + var register = vimGlobalState.registerController.getRegister(registerName); + if (register) { + register.clear(); + this.latestRegister = registerName; + if (cm.openDialog) { + var template = dom('span', { class: 'cm-vim-message' }, 'recording @' + registerName); + this.onRecordingDone = cm.openDialog(template, null, { bottom: true }); + } + this.isRecording = true; + } + } +}; +function maybeInitVimState(cm) { + if (!cm.state.vim) { + cm.state.vim = { + inputState: new InputState(), + lastEditInputState: undefined, + lastEditActionCommand: undefined, + lastHPos: -1, + lastHSPos: -1, + lastMotion: null, + marks: {}, + insertMode: false, + insertModeReturn: false, + insertModeRepeat: undefined, + visualMode: false, + visualLine: false, + visualBlock: false, + lastSelection: null, + lastPastedText: null, + sel: {}, + options: {}, + expectLiteralNext: false + }; + } + return cm.state.vim; +} +var vimGlobalState; +function resetVimGlobalState() { + vimGlobalState = { + searchQuery: null, + searchIsReversed: false, + lastSubstituteReplacePart: undefined, + jumpList: createCircularJumpList(), + macroModeState: new MacroModeState, + lastCharacterSearch: { increment: 0, forward: true, selectedCharacter: '' }, + registerController: new RegisterController({}), + searchHistoryController: new HistoryController(), + exCommandHistoryController: new HistoryController() + }; + for (var optionName in options) { + var option = options[optionName]; + option.value = option.defaultValue; + } +} +var lastInsertModeKeyTimer; +var vimApi = { + enterVimMode: enterVimMode, + leaveVimMode: leaveVimMode, + buildKeyMap: function () { + }, + getRegisterController: function () { + return vimGlobalState.registerController; + }, + resetVimGlobalState_: resetVimGlobalState, + getVimGlobalState_: function () { + return vimGlobalState; + }, + maybeInitVimState_: maybeInitVimState, + suppressErrorLogging: false, + InsertModeKey: InsertModeKey, + map: function (lhs, rhs, ctx) { + exCommandDispatcher.map(lhs, rhs, ctx); + }, + unmap: function (lhs, ctx) { + return exCommandDispatcher.unmap(lhs, ctx); + }, + noremap: function (lhs, rhs, ctx) { + exCommandDispatcher.map(lhs, rhs, ctx, true); + }, + mapclear: function (ctx) { + var actualLength = defaultKeymap.length, origLength = defaultKeymapLength; + var userKeymap = defaultKeymap.slice(0, actualLength - origLength); + defaultKeymap = defaultKeymap.slice(actualLength - origLength); + if (ctx) { + for (var i = userKeymap.length - 1; i >= 0; i--) { + var mapping = userKeymap[i]; + if (ctx !== mapping.context) { + if (mapping.context) { + this._mapCommand(mapping); + } + else { + var contexts = ['normal', 'insert', 'visual']; + for (var j in contexts) { + if (contexts[j] !== ctx) { + var newMapping = {}; + for (var key in mapping) { + newMapping[key] = mapping[key]; + } + newMapping.context = contexts[j]; + this._mapCommand(newMapping); + } + } + } + } + } + } + }, + langmap: updateLangmap, + vimKeyFromEvent: vimKeyFromEvent, + setOption: setOption, + getOption: getOption, + defineOption: defineOption, + defineEx: function (name, prefix, func) { + if (!prefix) { + prefix = name; + } + else if (name.indexOf(prefix) !== 0) { + throw new Error('(Vim.defineEx) "' + prefix + '" is not a prefix of "' + name + '", command not registered'); + } + exCommands[name] = func; + exCommandDispatcher.commandMap_[prefix] = { name: name, shortName: prefix, type: 'api' }; + }, + handleKey: function (cm, key, origin) { + var command = this.findKey(cm, key, origin); + if (typeof command === 'function') { + return command(); + } + }, + multiSelectHandleKey: multiSelectHandleKey, + findKey: function (cm, key, origin) { + var vim = maybeInitVimState(cm); + function handleMacroRecording() { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isRecording) { + if (key == 'q') { + macroModeState.exitMacroRecordMode(); + clearInputState(cm); + return true; + } + if (origin != 'mapping') { + logKey(macroModeState, key); + } + } + } + function handleEsc() { + if (key == '') { + if (vim.visualMode) { + exitVisualMode(cm); + } + else if (vim.insertMode) { + exitInsertMode(cm); + } + else { + return; + } + clearInputState(cm); + return true; + } + } + function handleKeyInsertMode() { + if (handleEsc()) { + return true; + } + vim.inputState.keyBuffer.push(key); + var keys = vim.inputState.keyBuffer.join(""); + var keysAreChars = key.length == 1; + var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); + var changeQueue = vim.inputState.changeQueue; + if (match.type == 'none') { + clearInputState(cm); + return false; + } + else if (match.type == 'partial') { + if (match.expectLiteralNext) + vim.expectLiteralNext = true; + if (lastInsertModeKeyTimer) { + window.clearTimeout(lastInsertModeKeyTimer); + } + lastInsertModeKeyTimer = keysAreChars && window.setTimeout(function () { if (vim.insertMode && vim.inputState.keyBuffer.length) { + clearInputState(cm); + } }, getOption('insertModeEscKeysTimeout')); + if (keysAreChars) { + var selections = cm.listSelections(); + if (!changeQueue || changeQueue.removed.length != selections.length) + changeQueue = vim.inputState.changeQueue = new ChangeQueue; + changeQueue.inserted += key; + for (var i = 0; i < selections.length; i++) { + var from = cursorMin(selections[i].anchor, selections[i].head); + var to = cursorMax(selections[i].anchor, selections[i].head); + var text = cm.getRange(from, cm.state.overwrite ? offsetCursor(to, 0, 1) : to); + changeQueue.removed[i] = (changeQueue.removed[i] || "") + text; + } + } + return !keysAreChars; + } + vim.expectLiteralNext = false; + if (lastInsertModeKeyTimer) { + window.clearTimeout(lastInsertModeKeyTimer); + } + if (match.command && changeQueue) { + var selections = cm.listSelections(); + for (var i = 0; i < selections.length; i++) { + var here = selections[i].head; + cm.replaceRange(changeQueue.removed[i] || "", offsetCursor(here, 0, -changeQueue.inserted.length), here, '+input'); + } + vimGlobalState.macroModeState.lastInsertModeChanges.changes.pop(); + } + if (!match.command) + clearInputState(cm); + return match.command; + } + function handleKeyNonInsertMode() { + if (handleMacroRecording() || handleEsc()) { + return true; + } + vim.inputState.keyBuffer.push(key); + var keys = vim.inputState.keyBuffer.join(""); + if (/^[1-9]\d*$/.test(keys)) { + return true; + } + var keysMatcher = /^(\d*)(.*)$/.exec(keys); + if (!keysMatcher) { + clearInputState(cm); + return false; + } + var context = vim.visualMode ? 'visual' : + 'normal'; + var mainKey = keysMatcher[2] || keysMatcher[1]; + if (vim.inputState.operatorShortcut && vim.inputState.operatorShortcut.slice(-1) == mainKey) { + mainKey = vim.inputState.operatorShortcut; + } + var match = commandDispatcher.matchCommand(mainKey, defaultKeymap, vim.inputState, context); + if (match.type == 'none') { + clearInputState(cm); + return false; + } + else if (match.type == 'partial') { + if (match.expectLiteralNext) + vim.expectLiteralNext = true; + return true; + } + else if (match.type == 'clear') { + clearInputState(cm); + return true; + } + vim.expectLiteralNext = false; + vim.inputState.keyBuffer.length = 0; + keysMatcher = /^(\d*)(.*)$/.exec(keys); + if (keysMatcher[1] && keysMatcher[1] != '0') { + vim.inputState.pushRepeatDigit(keysMatcher[1]); + } + return match.command; + } + var command; + if (vim.insertMode) { + command = handleKeyInsertMode(); + } + else { + command = handleKeyNonInsertMode(); + } + if (command === false) { + return !vim.insertMode && key.length === 1 ? function () { return true; } : undefined; + } + else if (command === true) { + return function () { return true; }; + } + else { + return function () { + if ((command.operator || command.isEdit) && cm.getOption('readOnly')) + return; // ace_patch + return cm.operation(function () { + cm.curOp.isVimOp = true; + try { + if (command.type == 'keyToKey') { + doKeyToKey(cm, command.toKeys, command); + } + else { + commandDispatcher.processCommand(cm, vim, command); + } + } + catch (e) { + cm.state.vim = undefined; + maybeInitVimState(cm); + if (!vimApi.suppressErrorLogging) { + console['log'](e); + } + throw e; + } + return true; + }); + }; + } + }, + handleEx: function (cm, input) { + exCommandDispatcher.processCommand(cm, input); + }, + defineMotion: defineMotion, + defineAction: defineAction, + defineOperator: defineOperator, + mapCommand: mapCommand, + _mapCommand: _mapCommand, + defineRegister: defineRegister, + exitVisualMode: exitVisualMode, + exitInsertMode: exitInsertMode +}; +var keyToKeyStack = []; +var noremap = false; +var virtualPrompt; +function sendKeyToPrompt(key) { + if (key[0] == "<") { + var lowerKey = key.toLowerCase().slice(1, -1); + var parts = lowerKey.split('-'); + lowerKey = parts.pop() || ''; + if (lowerKey == 'lt') + key = '<'; + else if (lowerKey == 'space') + key = ' '; + else if (lowerKey == 'cr') + key = '\n'; + else if (vimToCmKeyMap[lowerKey]) { + var value = virtualPrompt.value; + var event = { + key: vimToCmKeyMap[lowerKey], + target: { + value: value, + selectionEnd: value.length, + selectionStart: value.length + } + }; + if (virtualPrompt.onKeyDown) { + virtualPrompt.onKeyDown(event, virtualPrompt.value, close); + } + if (virtualPrompt && virtualPrompt.onKeyUp) { + virtualPrompt.onKeyUp(event, virtualPrompt.value, close); + } + return; + } + } + if (key == '\n') { + var prompt = virtualPrompt; + virtualPrompt = null; + prompt.onClose && prompt.onClose(prompt.value); + } + else { + virtualPrompt.value = (virtualPrompt.value || '') + key; + } + function close(value) { + if (typeof value == 'string') { + virtualPrompt.value = value; + } + else { + virtualPrompt = null; + } + } +} +function doKeyToKey(cm, keys, fromKey) { + var noremapBefore = noremap; + if (fromKey) { + if (keyToKeyStack.indexOf(fromKey) != -1) + return; + keyToKeyStack.push(fromKey); + noremap = fromKey.noremap != false; + } + try { + var vim = maybeInitVimState(cm); + var keyRe = /<(?:[CSMA]-)*\w+>|./gi; + var match; + while ((match = keyRe.exec(keys))) { + var key = match[0]; + var wasInsert = vim.insertMode; + if (virtualPrompt) { + sendKeyToPrompt(key); + continue; + } + var result = vimApi.handleKey(cm, key, 'mapping'); + if (!result && wasInsert && vim.insertMode) { + if (key[0] == "<") { + var lowerKey = key.toLowerCase().slice(1, -1); + var parts = lowerKey.split('-'); + lowerKey = parts.pop() || ''; + if (lowerKey == 'lt') + key = '<'; + else if (lowerKey == 'space') + key = ' '; + else if (lowerKey == 'cr') + key = '\n'; + else if (vimToCmKeyMap.hasOwnProperty(lowerKey)) { + key = vimToCmKeyMap[lowerKey]; + sendCmKey(cm, key); + continue; + } + else { + key = key[0]; + keyRe.lastIndex = match.index + 1; + } + } + cm.replaceSelection(key); + } + } + } + finally { + keyToKeyStack.pop(); + noremap = keyToKeyStack.length ? noremapBefore : false; + if (!keyToKeyStack.length && virtualPrompt) { + var promptOptions = virtualPrompt; + virtualPrompt = null; + showPrompt(cm, promptOptions); + } + } +} +var specialKey = { + Return: 'CR', Backspace: 'BS', 'Delete': 'Del', Escape: 'Esc', Insert: 'Ins', + ArrowLeft: 'Left', ArrowRight: 'Right', ArrowUp: 'Up', ArrowDown: 'Down', + Enter: 'CR', ' ': 'Space' +}; +var ignoredKeys = { Shift: 1, Alt: 1, Command: 1, Control: 1, + CapsLock: 1, AltGraph: 1, Dead: 1, Unidentified: 1 }; +var vimToCmKeyMap = {}; +'Left|Right|Up|Down|End|Home'.split('|').concat(Object.keys(specialKey)).forEach(function (x) { + vimToCmKeyMap[(specialKey[x] || '').toLowerCase()] + = vimToCmKeyMap[x.toLowerCase()] = x; +}); +function vimKeyFromEvent(e, vim) { + var key = e.key; + if (ignoredKeys[key]) + return; + if (key.length > 1 && key[0] == "n") { + key = key.replace("Numpad", ""); + } + key = specialKey[key] || key; + var name = ''; + if (e.ctrlKey) { + name += 'C-'; + } + if (e.altKey) { + name += 'A-'; + } + if (e.metaKey) { + name += 'M-'; + } + if (CodeMirror.isMac && e.altKey && !e.metaKey && !e.ctrlKey) { + name = name.slice(2); + } + if ((name || key.length > 1) && e.shiftKey) { + name += 'S-'; + } + if (vim && !vim.expectLiteralNext && key.length == 1) { + if (langmap.keymap && key in langmap.keymap) { + if (langmap.remapCtrl != false || !name) + key = langmap.keymap[key]; + } + else if (key.charCodeAt(0) > 255) { + var code = e.code && e.code.slice(-1) || ""; + if (!e.shiftKey) + code = code.toLowerCase(); + if (code) + key = code; + } + } + name += key; + if (name.length > 1) { + name = '<' + name + '>'; + } + return name; +} +; +function updateLangmap(langmapString, remapCtrl) { + if (langmap.string !== langmapString) { + langmap = parseLangmap(langmapString); + } + langmap.remapCtrl = remapCtrl; +} +function parseLangmap(langmapString) { + var keymap = {}; + if (!langmapString) + return { keymap: keymap, string: '' }; + function getEscaped(list) { + return list.split(/\\?(.)/).filter(Boolean); + } + langmapString.split(/((?:[^\\,]|\\.)+),/).map(function (part) { + if (!part) + return; + var semicolon = part.split(/((?:[^\\;]|\\.)+);/); + if (semicolon.length == 3) { + var from = getEscaped(semicolon[1]); + var to = getEscaped(semicolon[2]); + if (from.length !== to.length) + return; // skip over malformed part + for (var i = 0; i < from.length; ++i) + keymap[from[i]] = to[i]; + } + else if (semicolon.length == 1) { + var pairs = getEscaped(part); + if (pairs.length % 2 !== 0) + return; // skip over malformed part + for (var i = 0; i < pairs.length; i += 2) + keymap[pairs[i]] = pairs[i + 1]; + } + }); + return { keymap: keymap, string: langmapString }; +} +defineOption('langmap', undefined, 'string', ['lmap'], function (name, cm) { + if (name === undefined) { + return langmap.string; + } + else { + updateLangmap(name); + } +}); +function InputState() { + this.prefixRepeat = []; + this.motionRepeat = []; + this.operator = null; + this.operatorArgs = null; + this.motion = null; + this.motionArgs = null; + this.keyBuffer = []; // For matching multi-key commands. + this.registerName = null; // Defaults to the unnamed register. + this.changeQueue = null; // For restoring text used by insert mode keybindings +} +InputState.prototype.pushRepeatDigit = function (n) { + if (!this.operator) { + this.prefixRepeat = this.prefixRepeat.concat(n); + } + else { + this.motionRepeat = this.motionRepeat.concat(n); + } +}; +InputState.prototype.getRepeat = function () { + var repeat = 0; + if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) { + repeat = 1; + if (this.prefixRepeat.length > 0) { + repeat *= parseInt(this.prefixRepeat.join(''), 10); + } + if (this.motionRepeat.length > 0) { + repeat *= parseInt(this.motionRepeat.join(''), 10); + } + } + return repeat; +}; +function clearInputState(cm, reason) { + cm.state.vim.inputState = new InputState(); + cm.state.vim.expectLiteralNext = false; + CodeMirror.signal(cm, 'vim-command-done', reason); +} +function ChangeQueue() { + this.removed = []; + this.inserted = ""; +} +function Register(text, linewise, blockwise) { + this.clear(); + this.keyBuffer = [text || '']; + this.insertModeChanges = []; + this.searchQueries = []; + this.linewise = !!linewise; + this.blockwise = !!blockwise; +} +Register.prototype = { + setText: function (text, linewise, blockwise) { + this.keyBuffer = [text || '']; + this.linewise = !!linewise; + this.blockwise = !!blockwise; + }, + pushText: function (text, linewise) { + if (linewise) { + if (!this.linewise) { + this.keyBuffer.push('\n'); + } + this.linewise = true; + } + this.keyBuffer.push(text); + }, + pushInsertModeChanges: function (changes) { + this.insertModeChanges.push(createInsertModeChanges(changes)); + }, + pushSearchQuery: function (query) { + this.searchQueries.push(query); + }, + clear: function () { + this.keyBuffer = []; + this.insertModeChanges = []; + this.searchQueries = []; + this.linewise = false; + }, + toString: function () { + return this.keyBuffer.join(''); + } +}; +function defineRegister(name, register) { + var registers = vimGlobalState.registerController.registers; + if (!name || name.length != 1) { + throw Error('Register name must be 1 character'); + } + registers[name] = register; + validRegisters.push(name); +} +function RegisterController(registers) { + this.registers = registers; + this.unnamedRegister = registers['"'] = new Register(); + registers['.'] = new Register(); + registers[':'] = new Register(); + registers['/'] = new Register(); + registers['+'] = new Register(); +} +RegisterController.prototype = { + pushText: function (registerName, operator, text, linewise, blockwise) { + if (registerName === '_') + return; + if (linewise && text.charAt(text.length - 1) !== '\n') { + text += '\n'; + } + var register = this.isValidRegister(registerName) ? + this.getRegister(registerName) : null; + if (!register) { + switch (operator) { + case 'yank': + this.registers['0'] = new Register(text, linewise, blockwise); + break; + case 'delete': + case 'change': + if (text.indexOf('\n') == -1) { + this.registers['-'] = new Register(text, linewise); + } + else { + this.shiftNumericRegisters_(); + this.registers['1'] = new Register(text, linewise); + } + break; + } + this.unnamedRegister.setText(text, linewise, blockwise); + return; + } + var append = isUpperCase(registerName); + if (append) { + register.pushText(text, linewise); + } + else { + register.setText(text, linewise, blockwise); + } + if (registerName === '+' && typeof navigator !== 'undefined' && + typeof navigator.clipboard !== 'undefined' && + typeof navigator.clipboard.readText === 'function') { + navigator.clipboard.writeText(text); + } + this.unnamedRegister.setText(register.toString(), linewise); + }, + getRegister: function (name) { + if (!this.isValidRegister(name)) { + return this.unnamedRegister; + } + name = name.toLowerCase(); + if (!this.registers[name]) { + this.registers[name] = new Register(); + } + return this.registers[name]; + }, + isValidRegister: function (name) { + return name && (inArray(name, validRegisters) || latinCharRegex.test(name)); + }, + shiftNumericRegisters_: function () { + for (var i = 9; i >= 2; i--) { + this.registers[i] = this.getRegister('' + (i - 1)); + } + } +}; +function HistoryController() { + this.historyBuffer = []; + this.iterator = 0; + this.initialPrefix = null; +} +HistoryController.prototype = { + nextMatch: function (input, up) { + var historyBuffer = this.historyBuffer; + var dir = up ? -1 : 1; + if (this.initialPrefix === null) + this.initialPrefix = input; + for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i += dir) { + var element = historyBuffer[i]; + for (var j = 0; j <= element.length; j++) { + if (this.initialPrefix == element.substring(0, j)) { + this.iterator = i; + return element; + } + } + } + if (i >= historyBuffer.length) { + this.iterator = historyBuffer.length; + return this.initialPrefix; + } + if (i < 0) + return input; + }, + pushInput: function (input) { + var index = this.historyBuffer.indexOf(input); + if (index > -1) + this.historyBuffer.splice(index, 1); + if (input.length) + this.historyBuffer.push(input); + }, + reset: function () { + this.initialPrefix = null; + this.iterator = this.historyBuffer.length; + } +}; +var commandDispatcher = { + matchCommand: function (keys, keyMap, inputState, context) { + var matches = commandMatches(keys, keyMap, context, inputState); + if (!matches.full && !matches.partial) { + return { type: 'none' }; + } + else if (!matches.full && matches.partial) { + return { + type: 'partial', + expectLiteralNext: matches.partial.length == 1 && matches.partial[0].keys.slice(-11) == '' // langmap literal logic + }; + } + var bestMatch; + for (var i = 0; i < matches.full.length; i++) { + var match = matches.full[i]; + if (!bestMatch) { + bestMatch = match; + } + } + if (bestMatch.keys.slice(-11) == '' || bestMatch.keys.slice(-10) == '') { + var character = lastChar(keys); + if (!character || character.length > 1) + return { type: 'clear' }; + inputState.selectedCharacter = character; + } + return { type: 'full', command: bestMatch }; + }, + processCommand: function (cm, vim, command) { + vim.inputState.repeatOverride = command.repeatOverride; + switch (command.type) { + case 'motion': + this.processMotion(cm, vim, command); + break; + case 'operator': + this.processOperator(cm, vim, command); + break; + case 'operatorMotion': + this.processOperatorMotion(cm, vim, command); + break; + case 'action': + this.processAction(cm, vim, command); + break; + case 'search': + this.processSearch(cm, vim, command); + break; + case 'ex': + case 'keyToEx': + this.processEx(cm, vim, command); + break; + default: + break; + } + }, + processMotion: function (cm, vim, command) { + vim.inputState.motion = command.motion; + vim.inputState.motionArgs = copyArgs(command.motionArgs); + this.evalInput(cm, vim); + }, + processOperator: function (cm, vim, command) { + var inputState = vim.inputState; + if (inputState.operator) { + if (inputState.operator == command.operator) { + inputState.motion = 'expandToLine'; + inputState.motionArgs = { linewise: true }; + this.evalInput(cm, vim); + return; + } + else { + clearInputState(cm); + } + } + inputState.operator = command.operator; + inputState.operatorArgs = copyArgs(command.operatorArgs); + if (command.keys.length > 1) { + inputState.operatorShortcut = command.keys; + } + if (command.exitVisualBlock) { + vim.visualBlock = false; + updateCmSelection(cm); + } + if (vim.visualMode) { + this.evalInput(cm, vim); + } + }, + processOperatorMotion: function (cm, vim, command) { + var visualMode = vim.visualMode; + var operatorMotionArgs = copyArgs(command.operatorMotionArgs); + if (operatorMotionArgs) { + if (visualMode && operatorMotionArgs.visualLine) { + vim.visualLine = true; + } + } + this.processOperator(cm, vim, command); + if (!visualMode) { + this.processMotion(cm, vim, command); + } + }, + processAction: function (cm, vim, command) { + var inputState = vim.inputState; + var repeat = inputState.getRepeat(); + var repeatIsExplicit = !!repeat; + var actionArgs = copyArgs(command.actionArgs) || {}; + if (inputState.selectedCharacter) { + actionArgs.selectedCharacter = inputState.selectedCharacter; + } + if (command.operator) { + this.processOperator(cm, vim, command); + } + if (command.motion) { + this.processMotion(cm, vim, command); + } + if (command.motion || command.operator) { + this.evalInput(cm, vim); + } + actionArgs.repeat = repeat || 1; + actionArgs.repeatIsExplicit = repeatIsExplicit; + actionArgs.registerName = inputState.registerName; + clearInputState(cm); + vim.lastMotion = null; + if (command.isEdit) { + this.recordLastEdit(vim, inputState, command); + } + actions[command.action](cm, actionArgs, vim); + }, + processSearch: function (cm, vim, command) { + if (!cm.getSearchCursor) { + return; + } + var forward = command.searchArgs.forward; + var wholeWordOnly = command.searchArgs.wholeWordOnly; + getSearchState(cm).setReversed(!forward); + var promptPrefix = (forward) ? '/' : '?'; + var originalQuery = getSearchState(cm).getQuery(); + var originalScrollPos = cm.getScrollInfo(); + function handleQuery(query, ignoreCase, smartCase) { + vimGlobalState.searchHistoryController.pushInput(query); + vimGlobalState.searchHistoryController.reset(); + try { + updateSearchQuery(cm, query, ignoreCase, smartCase); + } + catch (e) { + showConfirm(cm, 'Invalid regex: ' + query); + clearInputState(cm); + return; + } + commandDispatcher.processMotion(cm, vim, { + type: 'motion', + motion: 'findNext', + motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist } + }); + } + function onPromptClose(query) { + handleQuery(query, true /** ignoreCase */, true /** smartCase */); + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isRecording) { + logSearchQuery(macroModeState, query); + } + } + function onPromptKeyUp(e, query, close) { + var keyName = vimKeyFromEvent(e), up, offset; + if (keyName == '' || keyName == '') { + up = keyName == '' ? true : false; + offset = e.target ? e.target.selectionEnd : 0; + query = vimGlobalState.searchHistoryController.nextMatch(query, up) || ''; + close(query); + if (offset && e.target) + e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length); + } + else if (keyName && keyName != '' && keyName != '') { + vimGlobalState.searchHistoryController.reset(); + } + var parsedQuery; + try { + parsedQuery = updateSearchQuery(cm, query, true /** ignoreCase */, true /** smartCase */); + } + catch (e) { + } + if (parsedQuery) { + cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30); + } + else { + clearSearchHighlight(cm); + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + } + } + function onPromptKeyDown(e, query, close) { + var keyName = vimKeyFromEvent(e); + if (keyName == '' || keyName == '' || keyName == '' || + (keyName == '' && query == '')) { + vimGlobalState.searchHistoryController.pushInput(query); + vimGlobalState.searchHistoryController.reset(); + updateSearchQuery(cm, originalQuery); + clearSearchHighlight(cm); + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + CodeMirror.e_stop(e); + clearInputState(cm); + close(); + cm.focus(); + } + else if (keyName == '' || keyName == '') { + CodeMirror.e_stop(e); + } + else if (keyName == '') { + CodeMirror.e_stop(e); + close(''); + } + } + switch (command.searchArgs.querySrc) { + case 'prompt': + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isPlaying) { + var query = macroModeState.replaySearchQueries.shift(); + handleQuery(query, true /** ignoreCase */, false /** smartCase */); + } + else { + showPrompt(cm, { + onClose: onPromptClose, + prefix: promptPrefix, + desc: '(JavaScript regexp)', + onKeyUp: onPromptKeyUp, + onKeyDown: onPromptKeyDown + }); + } + break; + case 'wordUnderCursor': + var word = expandWordUnderCursor(cm, { noSymbol: true }); + var isKeyword = true; + if (!word) { + word = expandWordUnderCursor(cm, { noSymbol: false }); + isKeyword = false; + } + if (!word) { + showConfirm(cm, 'No word under cursor'); + clearInputState(cm); + return; + } + var query = cm.getLine(word.start.line).substring(word.start.ch, word.end.ch); + if (isKeyword && wholeWordOnly) { + query = '\\b' + query + '\\b'; + } + else { + query = escapeRegex(query); + } + vimGlobalState.jumpList.cachedCursor = cm.getCursor(); + cm.setCursor(word.start); + handleQuery(query, true /** ignoreCase */, false /** smartCase */); + break; + } + }, + processEx: function (cm, vim, command) { + function onPromptClose(input) { + vimGlobalState.exCommandHistoryController.pushInput(input); + vimGlobalState.exCommandHistoryController.reset(); + exCommandDispatcher.processCommand(cm, input); + if (cm.state.vim) + clearInputState(cm); + } + function onPromptKeyDown(e, input, close) { + var keyName = vimKeyFromEvent(e), up, offset; + if (keyName == '' || keyName == '' || keyName == '' || + (keyName == '' && input == '')) { + vimGlobalState.exCommandHistoryController.pushInput(input); + vimGlobalState.exCommandHistoryController.reset(); + CodeMirror.e_stop(e); + clearInputState(cm); + close(); + cm.focus(); + } + if (keyName == '' || keyName == '') { + CodeMirror.e_stop(e); + up = keyName == '' ? true : false; + offset = e.target ? e.target.selectionEnd : 0; + input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || ''; + close(input); + if (offset && e.target) + e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length); + } + else if (keyName == '') { + CodeMirror.e_stop(e); + close(''); + } + else if (keyName && keyName != '' && keyName != '') { + vimGlobalState.exCommandHistoryController.reset(); + } + } + if (command.type == 'keyToEx') { + exCommandDispatcher.processCommand(cm, command.exArgs.input); + } + else { + if (vim.visualMode) { + showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', + onKeyDown: onPromptKeyDown, selectValueOnOpen: false }); + } + else { + showPrompt(cm, { onClose: onPromptClose, prefix: ':', + onKeyDown: onPromptKeyDown }); + } + } + }, + evalInput: function (cm, vim) { + var inputState = vim.inputState; + var motion = inputState.motion; + var motionArgs = inputState.motionArgs || {}; + var operator = inputState.operator; + var operatorArgs = inputState.operatorArgs || {}; + var registerName = inputState.registerName; + var sel = vim.sel; + var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head) : cm.getCursor('head')); + var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor')); + var oldHead = copyCursor(origHead); + var oldAnchor = copyCursor(origAnchor); + var newHead, newAnchor; + var repeat; + if (operator) { + this.recordLastEdit(vim, inputState); + } + if (inputState.repeatOverride !== undefined) { + repeat = inputState.repeatOverride; + } + else { + repeat = inputState.getRepeat(); + } + if (repeat > 0 && motionArgs.explicitRepeat) { + motionArgs.repeatIsExplicit = true; + } + else if (motionArgs.noRepeat || + (!motionArgs.explicitRepeat && repeat === 0)) { + repeat = 1; + motionArgs.repeatIsExplicit = false; + } + if (inputState.selectedCharacter) { + motionArgs.selectedCharacter = operatorArgs.selectedCharacter = + inputState.selectedCharacter; + } + motionArgs.repeat = repeat; + clearInputState(cm); + if (motion) { + var motionResult = motions[motion](cm, origHead, motionArgs, vim, inputState); + vim.lastMotion = motions[motion]; + if (!motionResult) { + return; + } + if (motionArgs.toJumplist) { + if (!operator && cm.ace.curOp != null) + cm.ace.curOp.command.scrollIntoView = "center-animate"; // ace_patch + var jumpList = vimGlobalState.jumpList; + var cachedCursor = jumpList.cachedCursor; + if (cachedCursor) { + recordJumpPosition(cm, cachedCursor, motionResult); + delete jumpList.cachedCursor; + } + else { + recordJumpPosition(cm, origHead, motionResult); + } + } + if (motionResult instanceof Array) { + newAnchor = motionResult[0]; + newHead = motionResult[1]; + } + else { + newHead = motionResult; + } + if (!newHead) { + newHead = copyCursor(origHead); + } + if (vim.visualMode) { + if (!(vim.visualBlock && newHead.ch === Infinity)) { + newHead = clipCursorToContent(cm, newHead, oldHead); + } + if (newAnchor) { + newAnchor = clipCursorToContent(cm, newAnchor); + } + newAnchor = newAnchor || oldAnchor; + sel.anchor = newAnchor; + sel.head = newHead; + updateCmSelection(cm); + updateMark(cm, vim, '<', cursorIsBefore(newAnchor, newHead) ? newAnchor + : newHead); + updateMark(cm, vim, '>', cursorIsBefore(newAnchor, newHead) ? newHead + : newAnchor); + } + else if (!operator) { + if (cm.ace.curOp) + cm.ace.curOp.vimDialogScroll = "center-animate"; // ace_patch + newHead = clipCursorToContent(cm, newHead, oldHead); + cm.setCursor(newHead.line, newHead.ch); + } + } + if (operator) { + if (operatorArgs.lastSel) { + newAnchor = oldAnchor; + var lastSel = operatorArgs.lastSel; + var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line); + var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch); + if (lastSel.visualLine) { + newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch); + } + else if (lastSel.visualBlock) { + newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset); + } + else if (lastSel.head.line == lastSel.anchor.line) { + newHead = new Pos(oldAnchor.line, oldAnchor.ch + chOffset); + } + else { + newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch); + } + vim.visualMode = true; + vim.visualLine = lastSel.visualLine; + vim.visualBlock = lastSel.visualBlock; + sel = vim.sel = { + anchor: newAnchor, + head: newHead + }; + updateCmSelection(cm); + } + else if (vim.visualMode) { + operatorArgs.lastSel = { + anchor: copyCursor(sel.anchor), + head: copyCursor(sel.head), + visualBlock: vim.visualBlock, + visualLine: vim.visualLine + }; + } + var curStart, curEnd, linewise, mode; + var cmSel; + if (vim.visualMode) { + curStart = cursorMin(sel.head, sel.anchor); + curEnd = cursorMax(sel.head, sel.anchor); + linewise = vim.visualLine || operatorArgs.linewise; + mode = vim.visualBlock ? 'block' : + linewise ? 'line' : + 'char'; + var newPositions = updateSelectionForSurrogateCharacters(cm, curStart, curEnd); + cmSel = makeCmSelection(cm, { + anchor: newPositions.start, + head: newPositions.end + }, mode); + if (linewise) { + var ranges = cmSel.ranges; + if (mode == 'block') { + for (var i = 0; i < ranges.length; i++) { + ranges[i].head.ch = lineLength(cm, ranges[i].head.line); + } + } + else if (mode == 'line') { + ranges[0].head = new Pos(ranges[0].head.line + 1, 0); + } + } + } + else { + curStart = copyCursor(newAnchor || oldAnchor); + curEnd = copyCursor(newHead || oldHead); + if (cursorIsBefore(curEnd, curStart)) { + var tmp = curStart; + curStart = curEnd; + curEnd = tmp; + } + linewise = motionArgs.linewise || operatorArgs.linewise; + if (linewise) { + expandSelectionToLine(cm, curStart, curEnd); + } + else if (motionArgs.forward) { + clipToLine(cm, curStart, curEnd); + } + mode = 'char'; + var exclusive = !motionArgs.inclusive || linewise; + var newPositions = updateSelectionForSurrogateCharacters(cm, curStart, curEnd); + cmSel = makeCmSelection(cm, { + anchor: newPositions.start, + head: newPositions.end + }, mode, exclusive); + } + cm.setSelections(cmSel.ranges, cmSel.primary); + vim.lastMotion = null; + operatorArgs.repeat = repeat; // For indent in visual mode. + operatorArgs.registerName = registerName; + operatorArgs.linewise = linewise; + var operatorMoveTo = operators[operator](cm, operatorArgs, cmSel.ranges, oldAnchor, newHead); + if (vim.visualMode) { + exitVisualMode(cm, operatorMoveTo != null); + } + if (operatorMoveTo) { + cm.setCursor(operatorMoveTo); + } + } + }, + recordLastEdit: function (vim, inputState, actionCommand) { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isPlaying) { + return; + } + vim.lastEditInputState = inputState; + vim.lastEditActionCommand = actionCommand; + macroModeState.lastInsertModeChanges.changes = []; + macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; + macroModeState.lastInsertModeChanges.visualBlock = vim.visualBlock ? vim.sel.head.line - vim.sel.anchor.line : 0; + } +}; +var motions = { + moveToTopLine: function (cm, _head, motionArgs) { + var line = getUserVisibleLines(cm).top + motionArgs.repeat - 1; + return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + }, + moveToMiddleLine: function (cm) { + var range = getUserVisibleLines(cm); + var line = Math.floor((range.top + range.bottom) * 0.5); + return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + }, + moveToBottomLine: function (cm, _head, motionArgs) { + var line = getUserVisibleLines(cm).bottom - motionArgs.repeat + 1; + return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + }, + expandToLine: function (_cm, head, motionArgs) { + var cur = head; + return new Pos(cur.line + motionArgs.repeat - 1, Infinity); + }, + findNext: function (cm, _head, motionArgs) { + var state = getSearchState(cm); + var query = state.getQuery(); + if (!query) { + return; + } + var prev = !motionArgs.forward; + prev = (state.isReversed()) ? !prev : prev; + highlightSearchMatches(cm, query); + return findNext(cm, prev /** prev */, query, motionArgs.repeat); + }, + findAndSelectNextInclusive: function (cm, _head, motionArgs, vim, prevInputState) { + var state = getSearchState(cm); + var query = state.getQuery(); + if (!query) { + return; + } + var prev = !motionArgs.forward; + prev = (state.isReversed()) ? !prev : prev; + var next = findNextFromAndToInclusive(cm, prev, query, motionArgs.repeat, vim); + if (!next) { + return; + } + if (prevInputState.operator) { + return next; + } + var from = next[0]; + var to = new Pos(next[1].line, next[1].ch - 1); + if (vim.visualMode) { + if (vim.visualLine || vim.visualBlock) { + vim.visualLine = false; + vim.visualBlock = false; + CodeMirror.signal(cm, "vim-mode-change", { mode: "visual", subMode: "" }); + } + var anchor = vim.sel.anchor; + if (anchor) { + if (state.isReversed()) { + if (motionArgs.forward) { + return [anchor, from]; + } + return [anchor, to]; + } + else { + if (motionArgs.forward) { + return [anchor, to]; + } + return [anchor, from]; + } + } + } + else { + vim.visualMode = true; + vim.visualLine = false; + vim.visualBlock = false; + CodeMirror.signal(cm, "vim-mode-change", { mode: "visual", subMode: "" }); + } + return prev ? [to, from] : [from, to]; + }, + goToMark: function (cm, _head, motionArgs, vim) { + var pos = getMarkPos(cm, vim, motionArgs.selectedCharacter); + if (pos) { + return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos; + } + return null; + }, + moveToOtherHighlightedEnd: function (cm, _head, motionArgs, vim) { + if (vim.visualBlock && motionArgs.sameLine) { + var sel = vim.sel; + return [ + clipCursorToContent(cm, new Pos(sel.anchor.line, sel.head.ch)), + clipCursorToContent(cm, new Pos(sel.head.line, sel.anchor.ch)) + ]; + } + else { + return ([vim.sel.head, vim.sel.anchor]); + } + }, + jumpToMark: function (cm, head, motionArgs, vim) { + var best = head; + for (var i = 0; i < motionArgs.repeat; i++) { + var cursor = best; + for (var key in vim.marks) { + if (!isLowerCase(key)) { + continue; + } + var mark = vim.marks[key].find(); + var isWrongDirection = (motionArgs.forward) ? + cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark); + if (isWrongDirection) { + continue; + } + if (motionArgs.linewise && (mark.line == cursor.line)) { + continue; + } + var equal = cursorEqual(cursor, best); + var between = (motionArgs.forward) ? + cursorIsBetween(cursor, mark, best) : + cursorIsBetween(best, mark, cursor); + if (equal || between) { + best = mark; + } + } + } + if (motionArgs.linewise) { + best = new Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line))); + } + return best; + }, + moveByCharacters: function (_cm, head, motionArgs) { + var cur = head; + var repeat = motionArgs.repeat; + var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat; + return new Pos(cur.line, ch); + }, + moveByLines: function (cm, head, motionArgs, vim) { + var cur = head; + var endCh = cur.ch; + switch (vim.lastMotion) { + case this.moveByLines: + case this.moveByDisplayLines: + case this.moveByScroll: + case this.moveToColumn: + case this.moveToEol: + endCh = vim.lastHPos; + break; + default: + vim.lastHPos = endCh; + } + var repeat = motionArgs.repeat + (motionArgs.repeatOffset || 0); + var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; + var first = cm.firstLine(); + var last = cm.lastLine(); + if (line < first && cur.line == first) { + return this.moveToStartOfLine(cm, head, motionArgs, vim); + } + else if (line > last && cur.line == last) { + return moveToEol(cm, head, motionArgs, vim, true); + } + var fold = cm.ace.session.getFoldLine(line); + if (fold) { + if (motionArgs.forward) { + if (line > fold.start.row) + line = fold.end.row + 1; + } + else { + line = fold.start.row; + } + } + if (motionArgs.toFirstChar) { + endCh = findFirstNonWhiteSpaceCharacter(cm.getLine(line)); + vim.lastHPos = endCh; + } + vim.lastHSPos = cm.charCoords(new Pos(line, endCh), 'div').left; + return new Pos(line, endCh); + }, + moveByDisplayLines: function (cm, head, motionArgs, vim) { + var cur = head; + switch (vim.lastMotion) { + case this.moveByDisplayLines: + case this.moveByScroll: + case this.moveByLines: + case this.moveToColumn: + case this.moveToEol: + break; + default: + vim.lastHSPos = cm.charCoords(cur, 'div').left; + } + var repeat = motionArgs.repeat; + var res = cm.findPosV(cur, (motionArgs.forward ? repeat : -repeat), 'line', vim.lastHSPos); + if (res.hitSide) { + if (motionArgs.forward) { + var lastCharCoords = cm.charCoords(res, 'div'); + var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos }; + var res = cm.coordsChar(goalCoords, 'div'); + } + else { + var resCoords = cm.charCoords(new Pos(cm.firstLine(), 0), 'div'); + resCoords.left = vim.lastHSPos; + res = cm.coordsChar(resCoords, 'div'); + } + } + vim.lastHPos = res.ch; + return res; + }, + moveByPage: function (cm, head, motionArgs) { + var curStart = head; + var repeat = motionArgs.repeat; + return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page'); + }, + moveByParagraph: function (cm, head, motionArgs) { + var dir = motionArgs.forward ? 1 : -1; + return findParagraph(cm, head, motionArgs.repeat, dir); + }, + moveBySentence: function (cm, head, motionArgs) { + var dir = motionArgs.forward ? 1 : -1; + return findSentence(cm, head, motionArgs.repeat, dir); + }, + moveByScroll: function (cm, head, motionArgs, vim) { + var scrollbox = cm.getScrollInfo(); + var curEnd = null; + var repeat = motionArgs.repeat; + if (!repeat) { + repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight()); + } + var orig = cm.charCoords(head, 'local'); + motionArgs.repeat = repeat; + curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim); + if (!curEnd) { + return null; + } + var dest = cm.charCoords(curEnd, 'local'); + cm.scrollTo(null, scrollbox.top + dest.top - orig.top); + return curEnd; + }, + moveByWords: function (cm, head, motionArgs) { + return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward, !!motionArgs.wordEnd, !!motionArgs.bigWord); + }, + moveTillCharacter: function (cm, head, motionArgs) { + var repeat = motionArgs.repeat; + var curEnd = moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter, head); + var increment = motionArgs.forward ? -1 : 1; + recordLastCharacterSearch(increment, motionArgs); + if (!curEnd) + return null; + curEnd.ch += increment; + return curEnd; + }, + moveToCharacter: function (cm, head, motionArgs) { + var repeat = motionArgs.repeat; + recordLastCharacterSearch(0, motionArgs); + return moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter, head) || head; + }, + moveToSymbol: function (cm, head, motionArgs) { + var repeat = motionArgs.repeat; + return findSymbol(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head; + }, + moveToColumn: function (cm, head, motionArgs, vim) { + var repeat = motionArgs.repeat; + vim.lastHPos = repeat - 1; + vim.lastHSPos = cm.charCoords(head, 'div').left; + return moveToColumn(cm, repeat); + }, + moveToEol: function (cm, head, motionArgs, vim) { + return moveToEol(cm, head, motionArgs, vim, false); + }, + moveToFirstNonWhiteSpaceCharacter: function (cm, head) { + var cursor = head; + return new Pos(cursor.line, findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line))); + }, + moveToMatchedSymbol: function (cm, head) { + var cursor = head; + var line = cursor.line; + var ch = cursor.ch; + var lineText = cm.getLine(line); + var symbol; + for (; ch < lineText.length; ch++) { + symbol = lineText.charAt(ch); + if (symbol && isMatchableSymbol(symbol)) { + var style = cm.getTokenTypeAt(new Pos(line, ch + 1)); + if (style !== "string" && style !== "comment") { + break; + } + } + } + if (ch < lineText.length) { + var re = /[<>]/.test(lineText[ch]) ? /[(){}[\]<>]/ : /[(){}[\]]/; //ace_patch? + var matched = cm.findMatchingBracket(new Pos(line, ch + 1), { bracketRegex: re }); + return matched.to; + } + else { + return cursor; + } + }, + moveToStartOfLine: function (_cm, head) { + return new Pos(head.line, 0); + }, + moveToLineOrEdgeOfDocument: function (cm, _head, motionArgs) { + var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine(); + if (motionArgs.repeatIsExplicit) { + lineNum = motionArgs.repeat - cm.getOption('firstLineNumber'); + } + return new Pos(lineNum, findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum))); + }, + moveToStartOfDisplayLine: function (cm) { + cm.execCommand("goLineLeft"); + return cm.getCursor(); + }, + moveToEndOfDisplayLine: function (cm) { + cm.execCommand("goLineRight"); + var head = cm.getCursor(); + if (head.sticky == "before") + head.ch--; + return head; + }, + textObjectManipulation: function (cm, head, motionArgs, vim) { + var mirroredPairs = { '(': ')', ')': '(', + '{': '}', '}': '{', + '[': ']', ']': '[', + '<': '>', '>': '<' }; + var selfPaired = { '\'': true, '"': true, '`': true }; + var character = motionArgs.selectedCharacter; + if (character == 'b') { + character = '('; + } + else if (character == 'B') { + character = '{'; + } + var inclusive = !motionArgs.textObjectInner; + var tmp, move; + if (mirroredPairs[character]) { + move = true; + tmp = selectCompanionObject(cm, head, character, inclusive); + if (!tmp) { + var sc = cm.getSearchCursor(new RegExp("\\" + character, "g"), head); + if (sc.find()) { + tmp = selectCompanionObject(cm, sc.from(), character, inclusive); + } + } + } + else if (selfPaired[character]) { + move = true; + tmp = findBeginningAndEnd(cm, head, character, inclusive); + } + else if (character === 'W' || character === 'w') { + var repeat = motionArgs.repeat || 1; + while (repeat-- > 0) { + var repeated = expandWordUnderCursor(cm, { + inclusive: inclusive, + innerWord: !inclusive, + bigWord: character === 'W', + noSymbol: character === 'W', + multiline: true + }, tmp && tmp.end); + if (repeated) { + if (!tmp) + tmp = repeated; + tmp.end = repeated.end; + } + } + } + else if (character === 'p') { + tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive); + motionArgs.linewise = true; + if (vim.visualMode) { + if (!vim.visualLine) { + vim.visualLine = true; + } + } + else { + var operatorArgs = vim.inputState.operatorArgs; + if (operatorArgs) { + operatorArgs.linewise = true; + } + tmp.end.line--; + } + } + else if (character === 't') { + tmp = expandTagUnderCursor(cm, head, inclusive); + } + else if (character === 's') { + var content = cm.getLine(head.line); + if (head.ch > 0 && isEndOfSentenceSymbol(content[head.ch])) { + head.ch -= 1; + } + var end = getSentence(cm, head, motionArgs.repeat, 1, inclusive); + var start = getSentence(cm, head, motionArgs.repeat, -1, inclusive); + if (isWhiteSpaceString(cm.getLine(start.line)[start.ch]) + && isWhiteSpaceString(cm.getLine(end.line)[end.ch - 1])) { + start = { line: start.line, ch: start.ch + 1 }; + } + tmp = { start: start, end: end }; + } + if (!tmp) { + return null; + } + if (!cm.state.vim.visualMode) { + return [tmp.start, tmp.end]; + } + else { + return expandSelection(cm, tmp.start, tmp.end, move); + } + }, + repeatLastCharacterSearch: function (cm, head, motionArgs) { + var lastSearch = vimGlobalState.lastCharacterSearch; + var repeat = motionArgs.repeat; + var forward = motionArgs.forward === lastSearch.forward; + var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); + cm.moveH(-increment, 'char'); + motionArgs.inclusive = forward ? true : false; + var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter); + if (!curEnd) { + cm.moveH(increment, 'char'); + return head; + } + curEnd.ch += increment; + return curEnd; + } +}; +function defineMotion(name, fn) { + motions[name] = fn; +} +function fillArray(val, times) { + var arr = []; + for (var i = 0; i < times; i++) { + arr.push(val); + } + return arr; +} +var operators = { + change: function (cm, args, ranges) { + var finalHead, text; + var vim = cm.state.vim; + var anchor = ranges[0].anchor, head = ranges[0].head; + if (!vim.visualMode) { + text = cm.getRange(anchor, head); + var lastState = vim.lastEditInputState || {}; + if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) { + var match = (/\s+$/).exec(text); + if (match && lastState.motionArgs && lastState.motionArgs.forward) { + head = offsetCursor(head, 0, -match[0].length); + text = text.slice(0, -match[0].length); + } + } + if (args.linewise) { + anchor = new Pos(anchor.line, findFirstNonWhiteSpaceCharacter(cm.getLine(anchor.line))); + if (head.line > anchor.line) { + head = new Pos(head.line - 1, Number.MAX_VALUE); + } + } + cm.replaceRange('', anchor, head); + finalHead = anchor; + } + else if (args.fullLine) { + head.ch = Number.MAX_VALUE; + head.line--; + cm.setSelection(anchor, head); + text = cm.getSelection(); + cm.replaceSelection(""); + finalHead = anchor; + } + else { + text = cm.getSelection(); + var replacement = fillArray('', ranges.length); + cm.replaceSelections(replacement); + finalHead = cursorMin(ranges[0].head, ranges[0].anchor); + } + vimGlobalState.registerController.pushText(args.registerName, 'change', text, args.linewise, ranges.length > 1); + actions.enterInsertMode(cm, { head: finalHead }, cm.state.vim); + }, + 'delete': function (cm, args, ranges) { + var finalHead, text; + var vim = cm.state.vim; + if (!vim.visualBlock) { + var anchor = ranges[0].anchor, head = ranges[0].head; + if (args.linewise && + head.line != cm.firstLine() && + anchor.line == cm.lastLine() && + anchor.line == head.line - 1) { + if (anchor.line == cm.firstLine()) { + anchor.ch = 0; + } + else { + anchor = new Pos(anchor.line - 1, lineLength(cm, anchor.line - 1)); + } + } + text = cm.getRange(anchor, head); + cm.replaceRange('', anchor, head); + finalHead = anchor; + if (args.linewise) { + finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor); + } + } + else { + text = cm.getSelection(); + var replacement = fillArray('', ranges.length); + cm.replaceSelections(replacement); + finalHead = cursorMin(ranges[0].head, ranges[0].anchor); + } + vimGlobalState.registerController.pushText(args.registerName, 'delete', text, args.linewise, vim.visualBlock); + return clipCursorToContent(cm, finalHead); + }, + indent: function (cm, args, ranges) { + var vim = cm.state.vim; + if (cm.indentMore) { + var repeat = (vim.visualMode) ? args.repeat : 1; + for (var j = 0; j < repeat; j++) { + if (args.indentRight) + cm.indentMore(); + else + cm.indentLess(); + } + } + else { + var startLine = ranges[0].anchor.line; + var endLine = vim.visualBlock ? + ranges[ranges.length - 1].anchor.line : + ranges[0].head.line; + var repeat = (vim.visualMode) ? args.repeat : 1; + if (args.linewise) { + endLine--; + } + for (var i = startLine; i <= endLine; i++) { + for (var j = 0; j < repeat; j++) { + cm.indentLine(i, args.indentRight); + } + } + } + return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); + }, + indentAuto: function (cm, _args, ranges) { + cm.execCommand("indentAuto"); + return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); + }, + hardWrap: function (cm, operatorArgs, ranges, oldAnchor, newHead) { + if (!cm.hardWrap) + return; + var from = ranges[0].anchor.line; + var to = ranges[0].head.line; + if (operatorArgs.linewise) + to--; + var endRow = cm.hardWrap({ from: from, to: to }); + if (endRow > from && operatorArgs.linewise) + endRow--; + return operatorArgs.keepCursor ? oldAnchor : new Pos(endRow, 0); + }, + changeCase: function (cm, args, ranges, oldAnchor, newHead) { + var selections = cm.getSelections(); + var swapped = []; + var toLower = args.toLower; + for (var j = 0; j < selections.length; j++) { + var toSwap = selections[j]; + var text = ''; + if (toLower === true) { + text = toSwap.toLowerCase(); + } + else if (toLower === false) { + text = toSwap.toUpperCase(); + } + else { + for (var i = 0; i < toSwap.length; i++) { + var character = toSwap.charAt(i); + text += isUpperCase(character) ? character.toLowerCase() : + character.toUpperCase(); + } + } + swapped.push(text); + } + cm.replaceSelections(swapped); + if (args.shouldMoveCursor) { + return newHead; + } + else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) { + return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor); + } + else if (args.linewise) { + return oldAnchor; + } + else { + return cursorMin(ranges[0].anchor, ranges[0].head); + } + }, + yank: function (cm, args, ranges, oldAnchor) { + var vim = cm.state.vim; + var text = cm.getSelection(); + var endPos = vim.visualMode + ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor) + : oldAnchor; + vimGlobalState.registerController.pushText(args.registerName, 'yank', text, args.linewise, vim.visualBlock); + return endPos; + } +}; +function defineOperator(name, fn) { + operators[name] = fn; +} +var actions = { + jumpListWalk: function (cm, actionArgs, vim) { + if (vim.visualMode) { + return; + } + var repeat = actionArgs.repeat; + var forward = actionArgs.forward; + var jumpList = vimGlobalState.jumpList; + var mark = jumpList.move(cm, forward ? repeat : -repeat); + var markPos = mark ? mark.find() : undefined; + markPos = markPos ? markPos : cm.getCursor(); + cm.setCursor(markPos); + cm.ace.curOp.command.scrollIntoView = "center-animate"; // ace_patch + }, + scroll: function (cm, actionArgs, vim) { + if (vim.visualMode) { + return; + } + var repeat = actionArgs.repeat || 1; + var lineHeight = cm.defaultTextHeight(); + var top = cm.getScrollInfo().top; + var delta = lineHeight * repeat; + var newPos = actionArgs.forward ? top + delta : top - delta; + var cursor = copyCursor(cm.getCursor()); + var cursorCoords = cm.charCoords(cursor, 'local'); + if (actionArgs.forward) { + if (newPos > cursorCoords.top) { + cursor.line += (newPos - cursorCoords.top) / lineHeight; + cursor.line = Math.ceil(cursor.line); + cm.setCursor(cursor); + cursorCoords = cm.charCoords(cursor, 'local'); + cm.scrollTo(null, cursorCoords.top); + } + else { + cm.scrollTo(null, newPos); + } + } + else { + var newBottom = newPos + cm.getScrollInfo().clientHeight; + if (newBottom < cursorCoords.bottom) { + cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight; + cursor.line = Math.floor(cursor.line); + cm.setCursor(cursor); + cursorCoords = cm.charCoords(cursor, 'local'); + cm.scrollTo(null, cursorCoords.bottom - cm.getScrollInfo().clientHeight); + } + else { + cm.scrollTo(null, newPos); + } + } + }, + scrollToCursor: function (cm, actionArgs) { + var lineNum = cm.getCursor().line; + var charCoords = cm.charCoords(new Pos(lineNum, 0), 'local'); + var height = cm.getScrollInfo().clientHeight; + var y = charCoords.top; + switch (actionArgs.position) { + case 'center': + y = charCoords.bottom - height / 2; + break; + case 'bottom': + var lineLastCharPos = new Pos(lineNum, cm.getLine(lineNum).length - 1); + var lineLastCharCoords = cm.charCoords(lineLastCharPos, 'local'); + var lineHeight = lineLastCharCoords.bottom - y; + y = y - height + lineHeight; + break; + } + cm.scrollTo(null, y); + }, + replayMacro: function (cm, actionArgs, vim) { + var registerName = actionArgs.selectedCharacter; + var repeat = actionArgs.repeat; + var macroModeState = vimGlobalState.macroModeState; + if (registerName == '@') { + registerName = macroModeState.latestRegister; + } + else { + macroModeState.latestRegister = registerName; + } + while (repeat--) { + executeMacroRegister(cm, vim, macroModeState, registerName); + } + }, + enterMacroRecordMode: function (cm, actionArgs) { + var macroModeState = vimGlobalState.macroModeState; + var registerName = actionArgs.selectedCharacter; + if (vimGlobalState.registerController.isValidRegister(registerName)) { + macroModeState.enterMacroRecordMode(cm, registerName); + } + }, + toggleOverwrite: function (cm) { + if (!cm.state.overwrite) { + cm.toggleOverwrite(true); + cm.setOption('keyMap', 'vim-replace'); + CodeMirror.signal(cm, "vim-mode-change", { mode: "replace" }); + } + else { + cm.toggleOverwrite(false); + cm.setOption('keyMap', 'vim-insert'); + CodeMirror.signal(cm, "vim-mode-change", { mode: "insert" }); + } + }, + enterInsertMode: function (cm, actionArgs, vim) { + if (cm.getOption('readOnly')) { + return; + } + vim.insertMode = true; + vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1; + var insertAt = (actionArgs) ? actionArgs.insertAt : null; + var sel = vim.sel; + var head = actionArgs.head || cm.getCursor('head'); + var height = cm.listSelections().length; + if (insertAt == 'eol') { + head = new Pos(head.line, lineLength(cm, head.line)); + } + else if (insertAt == 'bol') { + head = new Pos(head.line, 0); + } + else if (insertAt == 'charAfter') { + var newPosition = updateSelectionForSurrogateCharacters(cm, head, offsetCursor(head, 0, 1)); + head = newPosition.end; + } + else if (insertAt == 'firstNonBlank') { + var newPosition = updateSelectionForSurrogateCharacters(cm, head, motions.moveToFirstNonWhiteSpaceCharacter(cm, head)); + head = newPosition.end; + } + else if (insertAt == 'startOfSelectedArea') { + if (!vim.visualMode) + return; + if (!vim.visualBlock) { + if (sel.head.line < sel.anchor.line) { + head = sel.head; + } + else { + head = new Pos(sel.anchor.line, 0); + } + } + else { + head = new Pos(Math.min(sel.head.line, sel.anchor.line), Math.min(sel.head.ch, sel.anchor.ch)); + height = Math.abs(sel.head.line - sel.anchor.line) + 1; + } + } + else if (insertAt == 'endOfSelectedArea') { + if (!vim.visualMode) + return; + if (!vim.visualBlock) { + if (sel.head.line >= sel.anchor.line) { + head = offsetCursor(sel.head, 0, 1); + } + else { + head = new Pos(sel.anchor.line, 0); + } + } + else { + head = new Pos(Math.min(sel.head.line, sel.anchor.line), Math.max(sel.head.ch, sel.anchor.ch) + 1); + height = Math.abs(sel.head.line - sel.anchor.line) + 1; + } + } + else if (insertAt == 'inplace') { + if (vim.visualMode) { + return; + } + } + else if (insertAt == 'lastEdit') { + head = getLastEditPos(cm) || head; + } + cm.setOption('disableInput', false); + if (actionArgs && actionArgs.replace) { + cm.toggleOverwrite(true); + cm.setOption('keyMap', 'vim-replace'); + CodeMirror.signal(cm, "vim-mode-change", { mode: "replace" }); + } + else { + cm.toggleOverwrite(false); + cm.setOption('keyMap', 'vim-insert'); + CodeMirror.signal(cm, "vim-mode-change", { mode: "insert" }); + } + if (!vimGlobalState.macroModeState.isPlaying) { + cm.on('change', onChange); + if (vim.insertEnd) + vim.insertEnd.clear(); + vim.insertEnd = cm.setBookmark(head, { insertLeft: true }); + CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); + } + if (vim.visualMode) { + exitVisualMode(cm); + } + selectForInsert(cm, head, height); + }, + toggleVisualMode: function (cm, actionArgs, vim) { + var repeat = actionArgs.repeat; + var anchor = cm.getCursor(); + var head; + if (!vim.visualMode) { + vim.visualMode = true; + vim.visualLine = !!actionArgs.linewise; + vim.visualBlock = !!actionArgs.blockwise; + head = clipCursorToContent(cm, new Pos(anchor.line, anchor.ch + repeat - 1)); + var newPosition = updateSelectionForSurrogateCharacters(cm, anchor, head); + vim.sel = { + anchor: newPosition.start, + head: newPosition.end + }; + CodeMirror.signal(cm, "vim-mode-change", { mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : "" }); + updateCmSelection(cm); + updateMark(cm, vim, '<', cursorMin(anchor, head)); + updateMark(cm, vim, '>', cursorMax(anchor, head)); + } + else if (vim.visualLine ^ actionArgs.linewise || + vim.visualBlock ^ actionArgs.blockwise) { + vim.visualLine = !!actionArgs.linewise; + vim.visualBlock = !!actionArgs.blockwise; + CodeMirror.signal(cm, "vim-mode-change", { mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : "" }); + updateCmSelection(cm); + } + else { + exitVisualMode(cm); + } + }, + reselectLastSelection: function (cm, _actionArgs, vim) { + var lastSelection = vim.lastSelection; + if (vim.visualMode) { + updateLastSelection(cm, vim); + } + if (lastSelection) { + var anchor = lastSelection.anchorMark.find(); + var head = lastSelection.headMark.find(); + if (!anchor || !head) { + return; + } + vim.sel = { + anchor: anchor, + head: head + }; + vim.visualMode = true; + vim.visualLine = lastSelection.visualLine; + vim.visualBlock = lastSelection.visualBlock; + updateCmSelection(cm); + updateMark(cm, vim, '<', cursorMin(anchor, head)); + updateMark(cm, vim, '>', cursorMax(anchor, head)); + CodeMirror.signal(cm, 'vim-mode-change', { + mode: 'visual', + subMode: vim.visualLine ? 'linewise' : + vim.visualBlock ? 'blockwise' : '' + }); + } + }, + joinLines: function (cm, actionArgs, vim) { + var curStart, curEnd; + if (vim.visualMode) { + curStart = cm.getCursor('anchor'); + curEnd = cm.getCursor('head'); + if (cursorIsBefore(curEnd, curStart)) { + var tmp = curEnd; + curEnd = curStart; + curStart = tmp; + } + curEnd.ch = lineLength(cm, curEnd.line) - 1; + } + else { + var repeat = Math.max(actionArgs.repeat, 2); + curStart = cm.getCursor(); + curEnd = clipCursorToContent(cm, new Pos(curStart.line + repeat - 1, Infinity)); + } + var finalCh = 0; + for (var i = curStart.line; i < curEnd.line; i++) { + finalCh = lineLength(cm, curStart.line); + var text = ''; + var nextStartCh = 0; + if (!actionArgs.keepSpaces) { + var nextLine = cm.getLine(curStart.line + 1); + nextStartCh = nextLine.search(/\S/); + if (nextStartCh == -1) { + nextStartCh = nextLine.length; + } + else { + text = " "; + } + } + cm.replaceRange(text, new Pos(curStart.line, finalCh), new Pos(curStart.line + 1, nextStartCh)); + } + var curFinalPos = clipCursorToContent(cm, new Pos(curStart.line, finalCh)); + if (vim.visualMode) { + exitVisualMode(cm, false); + } + cm.setCursor(curFinalPos); + }, + newLineAndEnterInsertMode: function (cm, actionArgs, vim) { + vim.insertMode = true; + var insertAt = copyCursor(cm.getCursor()); + if (insertAt.line === cm.firstLine() && !actionArgs.after) { + cm.replaceRange('\n', new Pos(cm.firstLine(), 0)); + cm.setCursor(cm.firstLine(), 0); + } + else { + insertAt.line = (actionArgs.after) ? insertAt.line : + insertAt.line - 1; + insertAt.ch = lineLength(cm, insertAt.line); + cm.setCursor(insertAt); + var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment || + CodeMirror.commands.newlineAndIndent; + newlineFn(cm); + } + this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim); + }, + paste: function (cm, actionArgs, vim) { + var _this = this; + var register = vimGlobalState.registerController.getRegister(actionArgs.registerName); + var fallback = function () { + var text = register.toString(); + _this.continuePaste(cm, actionArgs, vim, text, register); + }; + if (actionArgs.registerName === '+' && + typeof navigator !== 'undefined' && + typeof navigator.clipboard !== 'undefined' && + typeof navigator.clipboard.readText === 'function') { + navigator.clipboard.readText().then(function (value) { + _this.continuePaste(cm, actionArgs, vim, value, register); + }, function () { fallback(); }); + } + else { + fallback(); + } + }, + continuePaste: function (cm, actionArgs, vim, text, register) { + var cur = copyCursor(cm.getCursor()); + if (!text) { + return; + } + if (actionArgs.matchIndent) { + var tabSize = cm.getOption("tabSize"); + var whitespaceLength = function (str) { + var tabs = (str.split("\t").length - 1); + var spaces = (str.split(" ").length - 1); + return tabs * tabSize + spaces * 1; + }; + var currentLine = cm.getLine(cm.getCursor().line); + var indent = whitespaceLength(currentLine.match(/^\s*/)[0]); + var chompedText = text.replace(/\n$/, ''); + var wasChomped = text !== chompedText; + var firstIndent = whitespaceLength(text.match(/^\s*/)[0]); + var text = chompedText.replace(/^\s*/gm, function (wspace) { + var newIndent = indent + (whitespaceLength(wspace) - firstIndent); + if (newIndent < 0) { + return ""; + } + else if (cm.getOption("indentWithTabs")) { + var quotient = Math.floor(newIndent / tabSize); + return Array(quotient + 1).join('\t'); + } + else { + return Array(newIndent + 1).join(' '); + } + }); + text += wasChomped ? "\n" : ""; + } + if (actionArgs.repeat > 1) { + var text = Array(actionArgs.repeat + 1).join(text); + } + var linewise = register.linewise; + var blockwise = register.blockwise; + if (blockwise) { + text = text.split('\n'); + if (linewise) { + text.pop(); + } + for (var i = 0; i < text.length; i++) { + text[i] = (text[i] == '') ? ' ' : text[i]; + } + cur.ch += actionArgs.after ? 1 : 0; + cur.ch = Math.min(lineLength(cm, cur.line), cur.ch); + } + else if (linewise) { + if (vim.visualMode) { + text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n'; + } + else if (actionArgs.after) { + text = '\n' + text.slice(0, text.length - 1); + cur.ch = lineLength(cm, cur.line); + } + else { + cur.ch = 0; + } + } + else { + cur.ch += actionArgs.after ? 1 : 0; + } + var curPosFinal; + if (vim.visualMode) { + vim.lastPastedText = text; + var lastSelectionCurEnd; + var selectedArea = getSelectedAreaRange(cm, vim); + var selectionStart = selectedArea[0]; + var selectionEnd = selectedArea[1]; + var selectedText = cm.getSelection(); + var selections = cm.listSelections(); + var emptyStrings = new Array(selections.length).join('1').split('1'); + if (vim.lastSelection) { + lastSelectionCurEnd = vim.lastSelection.headMark.find(); + } + vimGlobalState.registerController.unnamedRegister.setText(selectedText); + if (blockwise) { + cm.replaceSelections(emptyStrings); + selectionEnd = new Pos(selectionStart.line + text.length - 1, selectionStart.ch); + cm.setCursor(selectionStart); + selectBlock(cm, selectionEnd); + cm.replaceSelections(text); + curPosFinal = selectionStart; + } + else if (vim.visualBlock) { + cm.replaceSelections(emptyStrings); + cm.setCursor(selectionStart); + cm.replaceRange(text, selectionStart, selectionStart); + curPosFinal = selectionStart; + } + else { + cm.replaceRange(text, selectionStart, selectionEnd); + curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1); + } + if (lastSelectionCurEnd) { + vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd); + } + if (linewise) { + curPosFinal.ch = 0; + } + } + else { + if (blockwise) { + cm.setCursor(cur); + for (var i = 0; i < text.length; i++) { + var line = cur.line + i; + if (line > cm.lastLine()) { + cm.replaceRange('\n', new Pos(line, 0)); + } + var lastCh = lineLength(cm, line); + if (lastCh < cur.ch) { + extendLineToColumn(cm, line, cur.ch); + } + } + cm.setCursor(cur); + selectBlock(cm, new Pos(cur.line + text.length - 1, cur.ch)); + cm.replaceSelections(text); + curPosFinal = cur; + } + else { + cm.replaceRange(text, cur); + if (linewise) { + var line = actionArgs.after ? cur.line + 1 : cur.line; + curPosFinal = new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + } + else { + curPosFinal = copyCursor(cur); + if (!/\n/.test(text)) { + curPosFinal.ch += text.length - (actionArgs.after ? 1 : 0); + } + } + } + } + if (vim.visualMode) { + exitVisualMode(cm, false); + } + cm.setCursor(curPosFinal); + }, + undo: function (cm, actionArgs) { + cm.operation(function () { + repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)(); + cm.setCursor(clipCursorToContent(cm, cm.getCursor('start'))); + }); + }, + redo: function (cm, actionArgs) { + repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); + }, + setRegister: function (_cm, actionArgs, vim) { + vim.inputState.registerName = actionArgs.selectedCharacter; + }, + insertRegister: function (cm, actionArgs, vim) { + var registerName = actionArgs.selectedCharacter; + var register = vimGlobalState.registerController.getRegister(registerName); + var text = register && register.toString(); + if (text) { + cm.replaceSelection(text); + } + }, + oneNormalCommand: function (cm, actionArgs, vim) { + exitInsertMode(cm, true); + vim.insertModeReturn = true; + CodeMirror.on(cm, 'vim-command-done', function handler() { + if (vim.visualMode) + return; + if (vim.insertModeReturn) { + vim.insertModeReturn = false; + if (!vim.insertMode) { + actions.enterInsertMode(cm, {}, vim); + } + } + CodeMirror.off(cm, 'vim-command-done', handler); + }); + }, + setMark: function (cm, actionArgs, vim) { + var markName = actionArgs.selectedCharacter; + updateMark(cm, vim, markName, cm.getCursor()); + }, + replace: function (cm, actionArgs, vim) { + var replaceWith = actionArgs.selectedCharacter; + var curStart = cm.getCursor(); + var replaceTo; + var curEnd; + var selections = cm.listSelections(); + if (vim.visualMode) { + curStart = cm.getCursor('start'); + curEnd = cm.getCursor('end'); + } + else { + var line = cm.getLine(curStart.line); + replaceTo = curStart.ch + actionArgs.repeat; + if (replaceTo > line.length) { + replaceTo = line.length; + } + curEnd = new Pos(curStart.line, replaceTo); + } + var newPositions = updateSelectionForSurrogateCharacters(cm, curStart, curEnd); + curStart = newPositions.start; + curEnd = newPositions.end; + if (replaceWith == '\n') { + if (!vim.visualMode) + cm.replaceRange('', curStart, curEnd); + (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm); + } + else { + var replaceWithStr = cm.getRange(curStart, curEnd); + replaceWithStr = replaceWithStr.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, replaceWith); + replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith); + if (vim.visualBlock) { + var spaces = new Array(cm.getOption("tabSize") + 1).join(' '); + replaceWithStr = cm.getSelection(); + replaceWithStr = replaceWithStr.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, replaceWith); + replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n'); + cm.replaceSelections(replaceWithStr); + } + else { + cm.replaceRange(replaceWithStr, curStart, curEnd); + } + if (vim.visualMode) { + curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ? + selections[0].anchor : selections[0].head; + cm.setCursor(curStart); + exitVisualMode(cm, false); + } + else { + cm.setCursor(offsetCursor(curEnd, 0, -1)); + } + } + }, + incrementNumberToken: function (cm, actionArgs) { + var cur = cm.getCursor(); + var lineStr = cm.getLine(cur.line); + var re = /(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi; + var match; + var start; + var end; + var numberStr; + while ((match = re.exec(lineStr)) !== null) { + start = match.index; + end = start + match[0].length; + if (cur.ch < end) + break; + } + if (!actionArgs.backtrack && (end <= cur.ch)) + return; + if (match) { + var baseStr = match[2] || match[4]; + var digits = match[3] || match[5]; + var increment = actionArgs.increase ? 1 : -1; + var base = { '0b': 2, '0': 8, '': 10, '0x': 16 }[baseStr.toLowerCase()]; + var number = parseInt(match[1] + digits, base) + (increment * actionArgs.repeat); + numberStr = number.toString(base); + var zeroPadding = baseStr ? new Array(digits.length - numberStr.length + 1 + match[1].length).join('0') : ''; + if (numberStr.charAt(0) === '-') { + numberStr = '-' + baseStr + zeroPadding + numberStr.substr(1); + } + else { + numberStr = baseStr + zeroPadding + numberStr; + } + var from = new Pos(cur.line, start); + var to = new Pos(cur.line, end); + cm.replaceRange(numberStr, from, to); + } + else { + return; + } + cm.setCursor(new Pos(cur.line, start + numberStr.length - 1)); + }, + repeatLastEdit: function (cm, actionArgs, vim) { + var lastEditInputState = vim.lastEditInputState; + if (!lastEditInputState) { + return; + } + var repeat = actionArgs.repeat; + if (repeat && actionArgs.repeatIsExplicit) { + vim.lastEditInputState.repeatOverride = repeat; + } + else { + repeat = vim.lastEditInputState.repeatOverride || repeat; + } + repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); + }, + indent: function (cm, actionArgs) { + cm.indentLine(cm.getCursor().line, actionArgs.indentRight); + }, + exitInsertMode: exitInsertMode +}; +function defineAction(name, fn) { + actions[name] = fn; +} +function clipCursorToContent(cm, cur, oldCur) { + var vim = cm.state.vim; + var includeLineBreak = vim.insertMode || vim.visualMode; + var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine()); + var text = cm.getLine(line); + var maxCh = text.length - 1 + Number(!!includeLineBreak); + var ch = Math.min(Math.max(0, cur.ch), maxCh); + var charCode = text.charCodeAt(ch); + if (0xDC00 <= charCode && charCode <= 0xDFFF) { + var direction = 1; + if (oldCur && oldCur.line == line && oldCur.ch > ch) { + direction = -1; + } + ch += direction; + if (ch > maxCh) + ch -= 2; + } + return new Pos(line, ch); +} +function copyArgs(args) { + var ret = {}; + for (var prop in args) { + if (args.hasOwnProperty(prop)) { + ret[prop] = args[prop]; + } + } + return ret; +} +function offsetCursor(cur, offsetLine, offsetCh) { + if (typeof offsetLine === 'object') { + offsetCh = offsetLine.ch; + offsetLine = offsetLine.line; + } + return new Pos(cur.line + offsetLine, cur.ch + offsetCh); +} +function commandMatches(keys, keyMap, context, inputState) { + if (inputState.operator) + context = "operatorPending"; + var match, partial = [], full = []; + var startIndex = noremap ? keyMap.length - defaultKeymapLength : 0; + for (var i = startIndex; i < keyMap.length; i++) { + var command = keyMap[i]; + if (context == 'insert' && command.context != 'insert' || + (command.context && command.context != context) || + inputState.operator && command.type == 'action' || + !(match = commandMatch(keys, command.keys))) { + continue; + } + if (match == 'partial') { + partial.push(command); + } + if (match == 'full') { + full.push(command); + } + } + return { + partial: partial.length && partial, + full: full.length && full + }; +} +function commandMatch(pressed, mapped) { + var isLastCharacter = mapped.slice(-11) == ''; + var isLastRegister = mapped.slice(-10) == ''; + if (isLastCharacter || isLastRegister) { + var prefixLen = mapped.length - (isLastCharacter ? 11 : 10); + var pressedPrefix = pressed.slice(0, prefixLen); + var mappedPrefix = mapped.slice(0, prefixLen); + return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' : + mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false; + } + else { + return pressed == mapped ? 'full' : + mapped.indexOf(pressed) == 0 ? 'partial' : false; + } +} +function lastChar(keys) { + var match = /^.*(<[^>]+>)$/.exec(keys); + var selectedCharacter = match ? match[1] : keys.slice(-1); + if (selectedCharacter.length > 1) { + switch (selectedCharacter) { + case '': + selectedCharacter = '\n'; + break; + case '': + selectedCharacter = ' '; + break; + default: + selectedCharacter = ''; + break; + } + } + return selectedCharacter; +} +function repeatFn(cm, fn, repeat) { + return function () { + for (var i = 0; i < repeat; i++) { + fn(cm); + } + }; +} +function copyCursor(cur) { + return new Pos(cur.line, cur.ch); +} +function cursorEqual(cur1, cur2) { + return cur1.ch == cur2.ch && cur1.line == cur2.line; +} +function cursorIsBefore(cur1, cur2) { + if (cur1.line < cur2.line) { + return true; + } + if (cur1.line == cur2.line && cur1.ch < cur2.ch) { + return true; + } + return false; +} +function cursorMin(cur1, cur2) { + if (arguments.length > 2) { + cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1)); + } + return cursorIsBefore(cur1, cur2) ? cur1 : cur2; +} +function cursorMax(cur1, cur2) { + if (arguments.length > 2) { + cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1)); + } + return cursorIsBefore(cur1, cur2) ? cur2 : cur1; +} +function cursorIsBetween(cur1, cur2, cur3) { + var cur1before2 = cursorIsBefore(cur1, cur2); + var cur2before3 = cursorIsBefore(cur2, cur3); + return cur1before2 && cur2before3; +} +function lineLength(cm, lineNum) { + return cm.getLine(lineNum).length; +} +function trim(s) { + if (s.trim) { + return s.trim(); + } + return s.replace(/^\s+|\s+$/g, ''); +} +function escapeRegex(s) { + return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1'); +} +function extendLineToColumn(cm, lineNum, column) { + var endCh = lineLength(cm, lineNum); + var spaces = new Array(column - endCh + 1).join(' '); + cm.setCursor(new Pos(lineNum, endCh)); + cm.replaceRange(spaces, cm.getCursor()); +} +function selectBlock(cm, selectionEnd) { + var selections = [], ranges = cm.listSelections(); + var head = copyCursor(cm.clipPos(selectionEnd)); + var isClipped = !cursorEqual(selectionEnd, head); + var curHead = cm.getCursor('head'); + var primIndex = getIndex(ranges, curHead); + var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor); + var max = ranges.length - 1; + var index = max - primIndex > primIndex ? max : 0; + var base = ranges[index].anchor; + var firstLine = Math.min(base.line, head.line); + var lastLine = Math.max(base.line, head.line); + var baseCh = base.ch, headCh = head.ch; + var dir = ranges[index].head.ch - baseCh; + var newDir = headCh - baseCh; + if (dir > 0 && newDir <= 0) { + baseCh++; + if (!isClipped) { + headCh--; + } + } + else if (dir < 0 && newDir >= 0) { + baseCh--; + if (!wasClipped) { + headCh++; + } + } + else if (dir < 0 && newDir == -1) { + baseCh--; + headCh++; + } + for (var line = firstLine; line <= lastLine; line++) { + var range = { anchor: new Pos(line, baseCh), head: new Pos(line, headCh) }; + selections.push(range); + } + cm.setSelections(selections); + selectionEnd.ch = headCh; + base.ch = baseCh; + return base; +} +function selectForInsert(cm, head, height) { + var sel = []; + for (var i = 0; i < height; i++) { + var lineHead = offsetCursor(head, i, 0); + sel.push({ anchor: lineHead, head: lineHead }); + } + cm.setSelections(sel, 0); +} +function getIndex(ranges, cursor, end) { + for (var i = 0; i < ranges.length; i++) { + var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor); + var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor); + if (atAnchor || atHead) { + return i; + } + } + return -1; +} +function getSelectedAreaRange(cm, vim) { + var lastSelection = vim.lastSelection; + var getCurrentSelectedAreaRange = function () { + var selections = cm.listSelections(); + var start = selections[0]; + var end = selections[selections.length - 1]; + var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head; + var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor; + return [selectionStart, selectionEnd]; + }; + var getLastSelectedAreaRange = function () { + var selectionStart = cm.getCursor(); + var selectionEnd = cm.getCursor(); + var block = lastSelection.visualBlock; + if (block) { + var width = block.width; + var height = block.height; + selectionEnd = new Pos(selectionStart.line + height, selectionStart.ch + width); + var selections = []; + for (var i = selectionStart.line; i < selectionEnd.line; i++) { + var anchor = new Pos(i, selectionStart.ch); + var head = new Pos(i, selectionEnd.ch); + var range = { anchor: anchor, head: head }; + selections.push(range); + } + cm.setSelections(selections); + } + else { + var start = lastSelection.anchorMark.find(); + var end = lastSelection.headMark.find(); + var line = end.line - start.line; + var ch = end.ch - start.ch; + selectionEnd = { line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch }; + if (lastSelection.visualLine) { + selectionStart = new Pos(selectionStart.line, 0); + selectionEnd = new Pos(selectionEnd.line, lineLength(cm, selectionEnd.line)); + } + cm.setSelection(selectionStart, selectionEnd); + } + return [selectionStart, selectionEnd]; + }; + if (!vim.visualMode) { + return getLastSelectedAreaRange(); + } + else { + return getCurrentSelectedAreaRange(); + } +} +function updateLastSelection(cm, vim) { + var anchor = vim.sel.anchor; + var head = vim.sel.head; + if (vim.lastPastedText) { + head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length); + vim.lastPastedText = null; + } + vim.lastSelection = { 'anchorMark': cm.setBookmark(anchor), + 'headMark': cm.setBookmark(head), + 'anchor': copyCursor(anchor), + 'head': copyCursor(head), + 'visualMode': vim.visualMode, + 'visualLine': vim.visualLine, + 'visualBlock': vim.visualBlock }; +} +function expandSelection(cm, start, end, move) { + var sel = cm.state.vim.sel; + var head = move ? start : sel.head; + var anchor = move ? start : sel.anchor; + var tmp; + if (cursorIsBefore(end, start)) { + tmp = end; + end = start; + start = tmp; + } + if (cursorIsBefore(head, anchor)) { + head = cursorMin(start, head); + anchor = cursorMax(anchor, end); + } + else { + anchor = cursorMin(start, anchor); + head = cursorMax(head, end); + head = offsetCursor(head, 0, -1); + if (head.ch == -1 && head.line != cm.firstLine()) { + head = new Pos(head.line - 1, lineLength(cm, head.line - 1)); + } + } + return [anchor, head]; +} +function updateCmSelection(cm, sel, mode) { + var vim = cm.state.vim; + sel = sel || vim.sel; + var mode = mode || + vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char'; + var cmSel = makeCmSelection(cm, sel, mode); + cm.setSelections(cmSel.ranges, cmSel.primary); +} +function makeCmSelection(cm, sel, mode, exclusive) { + var head = copyCursor(sel.head); + var anchor = copyCursor(sel.anchor); + if (mode == 'char') { + var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; + var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; + head = offsetCursor(sel.head, 0, headOffset); + anchor = offsetCursor(sel.anchor, 0, anchorOffset); + return { + ranges: [{ anchor: anchor, head: head }], + primary: 0 + }; + } + else if (mode == 'line') { + if (!cursorIsBefore(sel.head, sel.anchor)) { + anchor.ch = 0; + var lastLine = cm.lastLine(); + if (head.line > lastLine) { + head.line = lastLine; + } + head.ch = lineLength(cm, head.line); + } + else { + head.ch = 0; + anchor.ch = lineLength(cm, anchor.line); + } + return { + ranges: [{ anchor: anchor, head: head }], + primary: 0 + }; + } + else if (mode == 'block') { + var top = Math.min(anchor.line, head.line), fromCh = anchor.ch, bottom = Math.max(anchor.line, head.line), toCh = head.ch; + if (fromCh < toCh) { + toCh += 1; + } + else { + fromCh += 1; + } + ; + var height = bottom - top + 1; + var primary = head.line == top ? 0 : height - 1; + var ranges = []; + for (var i = 0; i < height; i++) { + ranges.push({ + anchor: new Pos(top + i, fromCh), + head: new Pos(top + i, toCh) + }); + } + return { + ranges: ranges, + primary: primary + }; + } +} +function getHead(cm) { + var cur = cm.getCursor('head'); + if (cm.getSelection().length == 1) { + cur = cursorMin(cur, cm.getCursor('anchor')); + } + return cur; +} +function exitVisualMode(cm, moveHead) { + var vim = cm.state.vim; + if (moveHead !== false) { + cm.setCursor(clipCursorToContent(cm, vim.sel.head)); + } + updateLastSelection(cm, vim); + vim.visualMode = false; + vim.visualLine = false; + vim.visualBlock = false; + if (!vim.insertMode) + CodeMirror.signal(cm, "vim-mode-change", { mode: "normal" }); +} +function clipToLine(cm, curStart, curEnd) { + var selection = cm.getRange(curStart, curEnd); + if (/\n\s*$/.test(selection)) { + var lines = selection.split('\n'); + lines.pop(); + var line; + for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) { + curEnd.line--; + curEnd.ch = 0; + } + if (line) { + curEnd.line--; + curEnd.ch = lineLength(cm, curEnd.line); + } + else { + curEnd.ch = 0; + } + } +} +function expandSelectionToLine(_cm, curStart, curEnd) { + curStart.ch = 0; + curEnd.ch = 0; + curEnd.line++; +} +function findFirstNonWhiteSpaceCharacter(text) { + if (!text) { + return 0; + } + var firstNonWS = text.search(/\S/); + return firstNonWS == -1 ? text.length : firstNonWS; +} +function expandWordUnderCursor(cm, _a, cursor) { + var inclusive = _a.inclusive, innerWord = _a.innerWord, bigWord = _a.bigWord, noSymbol = _a.noSymbol, multiline = _a.multiline; + var cur = cursor || getHead(cm); + var line = cm.getLine(cur.line); + var endLine = line; + var startLineNumber = cur.line; + var endLineNumber = startLineNumber; + var idx = cur.ch; + var wordOnNextLine; + var test = noSymbol ? wordCharTest[0] : bigWordCharTest[0]; + if (innerWord && /\s/.test(line.charAt(idx))) { + test = function (ch) { return /\s/.test(ch); }; + } + else { + while (!test(line.charAt(idx))) { + idx++; + if (idx >= line.length) { + if (!multiline) + return null; + idx--; + wordOnNextLine = findWord(cm, cur, true, bigWord, true); + break; + } + } + if (bigWord) { + test = bigWordCharTest[0]; + } + else { + test = wordCharTest[0]; + if (!test(line.charAt(idx))) { + test = wordCharTest[1]; + } + } + } + var end = idx, start = idx; + while (test(line.charAt(start)) && start >= 0) { + start--; + } + start++; + if (wordOnNextLine) { + end = wordOnNextLine.to; + endLineNumber = wordOnNextLine.line; + endLine = cm.getLine(endLineNumber); + if (!endLine && end == 0) + end++; + } + else { + while (test(line.charAt(end)) && end < line.length) { + end++; + } + } + if (inclusive) { + var wordEnd = end; + var startsWithSpace = cur.ch <= start && /\s/.test(line.charAt(cur.ch)); + if (!startsWithSpace) { + while (/\s/.test(endLine.charAt(end)) && end < endLine.length) { + end++; + } + } + if (wordEnd == end || startsWithSpace) { + var wordStart = start; + while (/\s/.test(line.charAt(start - 1)) && start > 0) { + start--; + } + if (!start && !startsWithSpace) { + start = wordStart; + } + } + } + return { start: new Pos(startLineNumber, start), end: new Pos(endLineNumber, end) }; +} +function expandTagUnderCursor(cm, head, inclusive) { + var cur = head; + if (!CodeMirror.findMatchingTag || !CodeMirror.findEnclosingTag) { + return { start: cur, end: cur }; + } + var tags = CodeMirror.findMatchingTag(cm, head) || CodeMirror.findEnclosingTag(cm, head); + if (!tags || !tags.open || !tags.close) { + return { start: cur, end: cur }; + } + if (inclusive) { + return { start: tags.open.from, end: tags.close.to }; + } + return { start: tags.open.to, end: tags.close.from }; +} +function recordJumpPosition(cm, oldCur, newCur) { + if (!cursorEqual(oldCur, newCur)) { + vimGlobalState.jumpList.add(cm, oldCur, newCur); + } +} +function recordLastCharacterSearch(increment, args) { + vimGlobalState.lastCharacterSearch.increment = increment; + vimGlobalState.lastCharacterSearch.forward = args.forward; + vimGlobalState.lastCharacterSearch.selectedCharacter = args.selectedCharacter; +} +var symbolToMode = { + '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket', + '[': 'section', ']': 'section', + '*': 'comment', '/': 'comment', + 'm': 'method', 'M': 'method', + '#': 'preprocess' +}; +var findSymbolModes = { + bracket: { + isComplete: function (state) { + if (state.nextCh === state.symb) { + state.depth++; + if (state.depth >= 1) + return true; + } + else if (state.nextCh === state.reverseSymb) { + state.depth--; + } + return false; + } + }, + section: { + init: function (state) { + state.curMoveThrough = true; + state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}'; + }, + isComplete: function (state) { + return state.index === 0 && state.nextCh === state.symb; + } + }, + comment: { + isComplete: function (state) { + var found = state.lastCh === '*' && state.nextCh === '/'; + state.lastCh = state.nextCh; + return found; + } + }, + method: { + init: function (state) { + state.symb = (state.symb === 'm' ? '{' : '}'); + state.reverseSymb = state.symb === '{' ? '}' : '{'; + }, + isComplete: function (state) { + if (state.nextCh === state.symb) + return true; + return false; + } + }, + preprocess: { + init: function (state) { + state.index = 0; + }, + isComplete: function (state) { + if (state.nextCh === '#') { + var token = state.lineText.match(/^#(\w+)/)[1]; + if (token === 'endif') { + if (state.forward && state.depth === 0) { + return true; + } + state.depth++; + } + else if (token === 'if') { + if (!state.forward && state.depth === 0) { + return true; + } + state.depth--; + } + if (token === 'else' && state.depth === 0) + return true; + } + return false; + } + } +}; +function findSymbol(cm, repeat, forward, symb) { + var cur = copyCursor(cm.getCursor()); + var increment = forward ? 1 : -1; + var endLine = forward ? cm.lineCount() : -1; + var curCh = cur.ch; + var line = cur.line; + var lineText = cm.getLine(line); + var state = { + lineText: lineText, + nextCh: lineText.charAt(curCh), + lastCh: null, + index: curCh, + symb: symb, + reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb], + forward: forward, + depth: 0, + curMoveThrough: false + }; + var mode = symbolToMode[symb]; + if (!mode) + return cur; + var init = findSymbolModes[mode].init; + var isComplete = findSymbolModes[mode].isComplete; + if (init) { + init(state); + } + while (line !== endLine && repeat) { + state.index += increment; + state.nextCh = state.lineText.charAt(state.index); + if (!state.nextCh) { + line += increment; + state.lineText = cm.getLine(line) || ''; + if (increment > 0) { + state.index = 0; + } + else { + var lineLen = state.lineText.length; + state.index = (lineLen > 0) ? (lineLen - 1) : 0; + } + state.nextCh = state.lineText.charAt(state.index); + } + if (isComplete(state)) { + cur.line = line; + cur.ch = state.index; + repeat--; + } + } + if (state.nextCh || state.curMoveThrough) { + return new Pos(line, state.index); + } + return cur; +} +function findWord(cm, cur, forward, bigWord, emptyLineIsWord) { + var lineNum = cur.line; + var pos = cur.ch; + var line = cm.getLine(lineNum); + var dir = forward ? 1 : -1; + var charTests = bigWord ? bigWordCharTest : wordCharTest; + if (emptyLineIsWord && line == '') { + lineNum += dir; + line = cm.getLine(lineNum); + if (!isLine(cm, lineNum)) { + return null; + } + pos = (forward) ? 0 : line.length; + } + while (true) { + if (emptyLineIsWord && line == '') { + return { from: 0, to: 0, line: lineNum }; + } + var stop = (dir > 0) ? line.length : -1; + var wordStart = stop, wordEnd = stop; + while (pos != stop) { + var foundWord = false; + for (var i = 0; i < charTests.length && !foundWord; ++i) { + if (charTests[i](line.charAt(pos))) { + wordStart = pos; + while (pos != stop && charTests[i](line.charAt(pos))) { + pos += dir; + } + wordEnd = pos; + foundWord = wordStart != wordEnd; + if (wordStart == cur.ch && lineNum == cur.line && + wordEnd == wordStart + dir) { + continue; + } + else { + return { + from: Math.min(wordStart, wordEnd + 1), + to: Math.max(wordStart, wordEnd), + line: lineNum + }; + } + } + } + if (!foundWord) { + pos += dir; + } + } + lineNum += dir; + if (!isLine(cm, lineNum)) { + return null; + } + line = cm.getLine(lineNum); + pos = (dir > 0) ? 0 : line.length; + } +} +function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) { + var curStart = copyCursor(cur); + var words = []; + if (forward && !wordEnd || !forward && wordEnd) { + repeat++; + } + var emptyLineIsWord = !(forward && wordEnd); + for (var i = 0; i < repeat; i++) { + var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord); + if (!word) { + var eodCh = lineLength(cm, cm.lastLine()); + words.push(forward + ? { line: cm.lastLine(), from: eodCh, to: eodCh } + : { line: 0, from: 0, to: 0 }); + break; + } + words.push(word); + cur = new Pos(word.line, forward ? (word.to - 1) : word.from); + } + var shortCircuit = words.length != repeat; + var firstWord = words[0]; + var lastWord = words.pop(); + if (forward && !wordEnd) { + if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) { + lastWord = words.pop(); + } + return new Pos(lastWord.line, lastWord.from); + } + else if (forward && wordEnd) { + return new Pos(lastWord.line, lastWord.to - 1); + } + else if (!forward && wordEnd) { + if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { + lastWord = words.pop(); + } + return new Pos(lastWord.line, lastWord.to); + } + else { + return new Pos(lastWord.line, lastWord.from); + } +} +function moveToEol(cm, head, motionArgs, vim, keepHPos) { + var cur = head; + var retval = new Pos(cur.line + motionArgs.repeat - 1, Infinity); + var end = cm.clipPos(retval); + end.ch--; + if (!keepHPos) { + vim.lastHPos = Infinity; + vim.lastHSPos = cm.charCoords(end, 'div').left; + } + return retval; +} +function moveToCharacter(cm, repeat, forward, character, head) { + var cur = head || cm.getCursor(); + var start = cur.ch; + var idx; + for (var i = 0; i < repeat; i++) { + var line = cm.getLine(cur.line); + idx = charIdxInLine(start, line, character, forward, true); + if (idx == -1) { + return null; + } + start = idx; + } + return new Pos(cm.getCursor().line, idx); +} +function moveToColumn(cm, repeat) { + var line = cm.getCursor().line; + return clipCursorToContent(cm, new Pos(line, repeat - 1)); +} +function updateMark(cm, vim, markName, pos) { + if (!inArray(markName, validMarks) && !latinCharRegex.test(markName)) { + return; + } + if (vim.marks[markName]) { + vim.marks[markName].clear(); + } + vim.marks[markName] = cm.setBookmark(pos); +} +function charIdxInLine(start, line, character, forward, includeChar) { + var idx; + if (forward) { + idx = line.indexOf(character, start + 1); + if (idx != -1 && !includeChar) { + idx -= 1; + } + } + else { + idx = line.lastIndexOf(character, start - 1); + if (idx != -1 && !includeChar) { + idx += 1; + } + } + return idx; +} +function findParagraph(cm, head, repeat, dir, inclusive) { + var line = head.line; + var min = cm.firstLine(); + var max = cm.lastLine(); + var start, end, i = line; + function isEmpty(i) { return !/\S/.test(cm.getLine(i)); } // ace_patch + function isBoundary(i, dir, any) { + if (any) { + return isEmpty(i) != isEmpty(i + dir); + } + return !isEmpty(i) && isEmpty(i + dir); + } + function skipFold(i) { + dir = dir > 0 ? 1 : -1; + var foldLine = cm.ace.session.getFoldLine(i); + if (foldLine) { + if (i + dir > foldLine.start.row && i + dir < foldLine.end.row) + dir = (dir > 0 ? foldLine.end.row : foldLine.start.row) - i; + } + } + if (dir) { + while (min <= i && i <= max && repeat > 0) { + skipFold(i); + if (isBoundary(i, dir)) { + repeat--; + } + i += dir; + } + return new Pos(i, 0); + } + var vim = cm.state.vim; + if (vim.visualLine && isBoundary(line, 1, true)) { + var anchor = vim.sel.anchor; + if (isBoundary(anchor.line, -1, true)) { + if (!inclusive || anchor.line != line) { + line += 1; + } + } + } + var startState = isEmpty(line); + for (i = line; i <= max && repeat; i++) { + if (isBoundary(i, 1, true)) { + if (!inclusive || isEmpty(i) != startState) { + repeat--; + } + } + } + end = new Pos(i, 0); + if (i > max && !startState) { + startState = true; + } + else { + inclusive = false; + } + for (i = line; i > min; i--) { + if (!inclusive || isEmpty(i) == startState || i == line) { + if (isBoundary(i, -1, true)) { + break; + } + } + } + start = new Pos(i, 0); + return { start: start, end: end }; +} +function getSentence(cm, cur, repeat, dir, inclusive /*includes whitespace*/) { + function nextChar(curr) { + if (curr.pos + curr.dir < 0 || curr.pos + curr.dir >= curr.line.length) { + curr.line = null; + } + else { + curr.pos += curr.dir; + } + } + function forward(cm, ln, pos, dir) { + var line = cm.getLine(ln); + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + if (curr.line === "") { + return { ln: curr.ln, pos: curr.pos }; + } + var lastSentencePos = curr.pos; + nextChar(curr); + while (curr.line !== null) { + lastSentencePos = curr.pos; + if (isEndOfSentenceSymbol(curr.line[curr.pos])) { + if (!inclusive) { + return { ln: curr.ln, pos: curr.pos + 1 }; + } + else { + nextChar(curr); + while (curr.line !== null) { + if (isWhiteSpaceString(curr.line[curr.pos])) { + lastSentencePos = curr.pos; + nextChar(curr); + } + else { + break; + } + } + return { ln: curr.ln, pos: lastSentencePos + 1 }; + } + } + nextChar(curr); + } + return { ln: curr.ln, pos: lastSentencePos + 1 }; + } + function reverse(cm, ln, pos, dir) { + var line = cm.getLine(ln); + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + if (curr.line === "") { + return { ln: curr.ln, pos: curr.pos }; + } + var lastSentencePos = curr.pos; + nextChar(curr); + while (curr.line !== null) { + if (!isWhiteSpaceString(curr.line[curr.pos]) && !isEndOfSentenceSymbol(curr.line[curr.pos])) { + lastSentencePos = curr.pos; + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos])) { + if (!inclusive) { + return { ln: curr.ln, pos: lastSentencePos }; + } + else { + if (isWhiteSpaceString(curr.line[curr.pos + 1])) { + return { ln: curr.ln, pos: curr.pos + 1 }; + } + else { + return { ln: curr.ln, pos: lastSentencePos }; + } + } + } + nextChar(curr); + } + curr.line = line; + if (inclusive && isWhiteSpaceString(curr.line[curr.pos])) { + return { ln: curr.ln, pos: curr.pos }; + } + else { + return { ln: curr.ln, pos: lastSentencePos }; + } + } + var curr_index = { + ln: cur.line, + pos: cur.ch, + }; + while (repeat > 0) { + if (dir < 0) { + curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir); + } + else { + curr_index = forward(cm, curr_index.ln, curr_index.pos, dir); + } + repeat--; + } + return new Pos(curr_index.ln, curr_index.pos); +} +function findSentence(cm, cur, repeat, dir) { + function nextChar(cm, idx) { + if (idx.pos + idx.dir < 0 || idx.pos + idx.dir >= idx.line.length) { + idx.ln += idx.dir; + if (!isLine(cm, idx.ln)) { + idx.line = null; + idx.ln = null; + idx.pos = null; + return; + } + idx.line = cm.getLine(idx.ln); + idx.pos = (idx.dir > 0) ? 0 : idx.line.length - 1; + } + else { + idx.pos += idx.dir; + } + } + function forward(cm, ln, pos, dir) { + var line = cm.getLine(ln); + var stop = (line === ""); + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + var last_valid = { + ln: curr.ln, + pos: curr.pos, + }; + var skip_empty_lines = (curr.line === ""); + nextChar(cm, curr); + while (curr.line !== null) { + last_valid.ln = curr.ln; + last_valid.pos = curr.pos; + if (curr.line === "" && !skip_empty_lines) { + return { ln: curr.ln, pos: curr.pos, }; + } + else if (stop && curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) { + return { ln: curr.ln, pos: curr.pos, }; + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) + && !stop + && (curr.pos === curr.line.length - 1 + || isWhiteSpaceString(curr.line[curr.pos + 1]))) { + stop = true; + } + nextChar(cm, curr); + } + var line = cm.getLine(last_valid.ln); + last_valid.pos = 0; + for (var i = line.length - 1; i >= 0; --i) { + if (!isWhiteSpaceString(line[i])) { + last_valid.pos = i; + break; + } + } + return last_valid; + } + function reverse(cm, ln, pos, dir) { + var line = cm.getLine(ln); + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + var last_valid = { + ln: curr.ln, + pos: null, + }; + var skip_empty_lines = (curr.line === ""); + nextChar(cm, curr); + while (curr.line !== null) { + if (curr.line === "" && !skip_empty_lines) { + if (last_valid.pos !== null) { + return last_valid; + } + else { + return { ln: curr.ln, pos: curr.pos }; + } + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) + && last_valid.pos !== null + && !(curr.ln === last_valid.ln && curr.pos + 1 === last_valid.pos)) { + return last_valid; + } + else if (curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) { + skip_empty_lines = false; + last_valid = { ln: curr.ln, pos: curr.pos }; + } + nextChar(cm, curr); + } + var line = cm.getLine(last_valid.ln); + last_valid.pos = 0; + for (var i = 0; i < line.length; ++i) { + if (!isWhiteSpaceString(line[i])) { + last_valid.pos = i; + break; + } + } + return last_valid; + } + var curr_index = { + ln: cur.line, + pos: cur.ch, + }; + while (repeat > 0) { + if (dir < 0) { + curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir); + } + else { + curr_index = forward(cm, curr_index.ln, curr_index.pos, dir); + } + repeat--; + } + return new Pos(curr_index.ln, curr_index.pos); +} +function selectCompanionObject(cm, head, symb, inclusive) { + var cur = head, start, end; + var bracketRegexp = ({ + '(': /[()]/, ')': /[()]/, + '[': /[[\]]/, ']': /[[\]]/, + '{': /[{}]/, '}': /[{}]/, + '<': /[<>]/, '>': /[<>]/ + })[symb]; + var openSym = ({ + '(': '(', ')': '(', + '[': '[', ']': '[', + '{': '{', '}': '{', + '<': '<', '>': '<' + })[symb]; + var curChar = cm.getLine(cur.line).charAt(cur.ch); + var offset = curChar === openSym ? 1 : 0; + start = cm.scanForBracket(new Pos(cur.line, cur.ch + offset), -1, undefined, { 'bracketRegex': bracketRegexp }); + end = cm.scanForBracket(new Pos(cur.line, cur.ch + offset), 1, undefined, { 'bracketRegex': bracketRegexp }); + if (!start || !end) + return null; + start = start.pos; + end = end.pos; + if ((start.line == end.line && start.ch > end.ch) + || (start.line > end.line)) { + var tmp = start; + start = end; + end = tmp; + } + if (inclusive) { + end.ch += 1; + } + else { + start.ch += 1; + } + return { start: start, end: end }; +} +function findBeginningAndEnd(cm, head, symb, inclusive) { + var cur = copyCursor(head); + var line = cm.getLine(cur.line); + var chars = line.split(''); + var start, end, i, len; + var firstIndex = chars.indexOf(symb); + if (cur.ch < firstIndex) { + cur.ch = firstIndex; + } + else if (firstIndex < cur.ch && chars[cur.ch] == symb) { + var stringAfter = /string/.test(cm.getTokenTypeAt(offsetCursor(head, 0, 1))); + var stringBefore = /string/.test(cm.getTokenTypeAt(head)); + var isStringStart = stringAfter && !stringBefore; + if (!isStringStart) { + end = cur.ch; // assign end to the current cursor + --cur.ch; // make sure to look backwards + } + } + if (chars[cur.ch] == symb && !end) { + start = cur.ch + 1; // assign start to ahead of the cursor + } + else { + for (i = cur.ch; i > -1 && !start; i--) { + if (chars[i] == symb) { + start = i + 1; + } + } + } + if (start && !end) { + for (i = start, len = chars.length; i < len && !end; i++) { + if (chars[i] == symb) { + end = i; + } + } + } + if (!start || !end) { + return { start: cur, end: cur }; + } + if (inclusive) { + --start; + ++end; + } + return { + start: new Pos(cur.line, start), + end: new Pos(cur.line, end) + }; +} +defineOption('pcre', true, 'boolean'); +function SearchState() { } +SearchState.prototype = { + getQuery: function () { + return vimGlobalState.query; + }, + setQuery: function (query) { + vimGlobalState.query = query; + }, + getOverlay: function () { + return this.searchOverlay; + }, + setOverlay: function (overlay) { + this.searchOverlay = overlay; + }, + isReversed: function () { + return vimGlobalState.isReversed; + }, + setReversed: function (reversed) { + vimGlobalState.isReversed = reversed; + }, + getScrollbarAnnotate: function () { + return this.annotate; + }, + setScrollbarAnnotate: function (annotate) { + this.annotate = annotate; + } +}; +function getSearchState(cm) { + var vim = cm.state.vim; + return vim.searchState_ || (vim.searchState_ = new SearchState()); +} +function splitBySlash(argString) { + return splitBySeparator(argString, '/'); +} +function findUnescapedSlashes(argString) { + return findUnescapedSeparators(argString, '/'); +} +function splitBySeparator(argString, separator) { + var slashes = findUnescapedSeparators(argString, separator) || []; + if (!slashes.length) + return []; + var tokens = []; + if (slashes[0] !== 0) + return; + for (var i = 0; i < slashes.length; i++) { + if (typeof slashes[i] == 'number') + tokens.push(argString.substring(slashes[i] + 1, slashes[i + 1])); + } + return tokens; +} +function findUnescapedSeparators(str, separator) { + if (!separator) + separator = '/'; + var escapeNextChar = false; + var slashes = []; + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + if (!escapeNextChar && c == separator) { + slashes.push(i); + } + escapeNextChar = !escapeNextChar && (c == '\\'); + } + return slashes; +} +function translateRegex(str) { + var specials = '|(){'; + var unescape = '}'; + var escapeNextChar = false; + var out = []; + for (var i = -1; i < str.length; i++) { + var c = str.charAt(i) || ''; + var n = str.charAt(i + 1) || ''; + var specialComesNext = (n && specials.indexOf(n) != -1); + if (escapeNextChar) { + if (c !== '\\' || !specialComesNext) { + out.push(c); + } + escapeNextChar = false; + } + else { + if (c === '\\') { + escapeNextChar = true; + if (n && unescape.indexOf(n) != -1) { + specialComesNext = true; + } + if (!specialComesNext || n === '\\') { + out.push(c); + } + } + else { + out.push(c); + if (specialComesNext && n !== '\\') { + out.push('\\'); + } + } + } + } + return out.join(''); +} +var charUnescapes = { '\\n': '\n', '\\r': '\r', '\\t': '\t' }; +function translateRegexReplace(str) { + var escapeNextChar = false; + var out = []; + for (var i = -1; i < str.length; i++) { + var c = str.charAt(i) || ''; + var n = str.charAt(i + 1) || ''; + if (charUnescapes[c + n]) { + out.push(charUnescapes[c + n]); + i++; + } + else if (escapeNextChar) { + out.push(c); + escapeNextChar = false; + } + else { + if (c === '\\') { + escapeNextChar = true; + if ((isNumber(n) || n === '$')) { + out.push('$'); + } + else if (n !== '/' && n !== '\\') { + out.push('\\'); + } + } + else { + if (c === '$') { + out.push('$'); + } + out.push(c); + if (n === '/') { + out.push('\\'); + } + } + } + } + return out.join(''); +} +var unescapes = { '\\/': '/', '\\\\': '\\', '\\n': '\n', '\\r': '\r', '\\t': '\t', '\\&': '&' }; +function unescapeRegexReplace(str) { + var stream = new CodeMirror.StringStream(str); + var output = []; + while (!stream.eol()) { + while (stream.peek() && stream.peek() != '\\') { + output.push(stream.next()); + } + var matched = false; + for (var matcher in unescapes) { + if (stream.match(matcher, true)) { + matched = true; + output.push(unescapes[matcher]); + break; + } + } + if (!matched) { + output.push(stream.next()); + } + } + return output.join(''); +} +function parseQuery(query, ignoreCase, smartCase) { + var lastSearchRegister = vimGlobalState.registerController.getRegister('/'); + lastSearchRegister.setText(query); + if (query instanceof RegExp) { + return query; + } + var slashes = findUnescapedSlashes(query); + var regexPart; + var forceIgnoreCase; + if (!slashes.length) { + regexPart = query; + } + else { + regexPart = query.substring(0, slashes[0]); + var flagsPart = query.substring(slashes[0]); + forceIgnoreCase = (flagsPart.indexOf('i') != -1); + } + if (!regexPart) { + return null; + } + if (!getOption('pcre')) { + regexPart = translateRegex(regexPart); + } + if (smartCase) { + ignoreCase = (/^[^A-Z]*$/).test(regexPart); + } + var regexp = new RegExp(regexPart, (ignoreCase || forceIgnoreCase) ? 'im' : 'm'); + return regexp; +} +function dom(n) { + if (typeof n === 'string') + n = document.createElement(n); + for (var a, i = 1; i < arguments.length; i++) { + if (!(a = arguments[i])) + continue; + if (typeof a !== 'object') + a = document.createTextNode(a); + if (a.nodeType) + n.appendChild(a); + else + for (var key in a) { + if (!Object.prototype.hasOwnProperty.call(a, key)) + continue; + if (key[0] === '$') + n.style[key.slice(1)] = a[key]; + else + n.setAttribute(key, a[key]); + } + } + return n; +} +function showConfirm(cm, template) { + var pre = dom('div', { $color: 'red', $whiteSpace: 'pre', class: 'cm-vim-message' }, template); + if (cm.openNotification) { + cm.openNotification(pre, { bottom: true, duration: 5000 }); + } + else { + alert(pre.innerText); + } +} +function makePrompt(prefix, desc) { + return dom('div', { $display: 'flex' }, dom('span', { $fontFamily: 'monospace', $whiteSpace: 'pre', $flex: 1 }, prefix, dom('input', { type: 'text', autocorrect: 'off', + autocapitalize: 'off', spellcheck: 'false', $width: '100%' })), desc && dom('span', { $color: '#888' }, desc)); +} +function showPrompt(cm, options) { + if (keyToKeyStack.length) { + if (!options.value) + options.value = ''; + virtualPrompt = options; + return; + } + var template = makePrompt(options.prefix, options.desc); + if (cm.openDialog) { + cm.openDialog(template, options.onClose, { + onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp, + bottom: true, selectValueOnOpen: false, value: options.value + }); + } + else { + var shortText = ''; + if (typeof options.prefix != "string" && options.prefix) + shortText += options.prefix.textContent; + if (options.desc) + shortText += " " + options.desc; + options.onClose(prompt(shortText, '')); + } +} +function regexEqual(r1, r2) { + if (r1 instanceof RegExp && r2 instanceof RegExp) { + var props = ['global', 'multiline', 'ignoreCase', 'source']; + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + if (r1[prop] !== r2[prop]) { + return false; + } + } + return true; + } + return false; +} +function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) { + if (!rawQuery) { + return; + } + var state = getSearchState(cm); + var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase); + if (!query) { + return; + } + highlightSearchMatches(cm, query); + if (regexEqual(query, state.getQuery())) { + return query; + } + state.setQuery(query); + return query; +} +function searchOverlay(query) { + if (query.source.charAt(0) == '^') { + var matchSol = true; + } + return { + token: function (stream) { + if (matchSol && !stream.sol()) { + stream.skipToEnd(); + return; + } + var match = stream.match(query, false); + if (match) { + if (match[0].length == 0) { + stream.next(); + return 'searching'; + } + if (!stream.sol()) { + stream.backUp(1); + if (!query.exec(stream.next() + match[0])) { + stream.next(); + return null; + } + } + stream.match(query); + return 'searching'; + } + while (!stream.eol()) { + stream.next(); + if (stream.match(query, false)) + break; + } + }, + query: query + }; +} +var highlightTimeout = 0; +function highlightSearchMatches(cm, query) { + clearTimeout(highlightTimeout); + var searchState = getSearchState(cm); + searchState.highlightTimeout = highlightTimeout; + highlightTimeout = setTimeout(function () { + if (!cm.state.vim) + return; + var searchState = getSearchState(cm); + searchState.highlightTimeout = null; + var overlay = searchState.getOverlay(); + if (!overlay || query != overlay.query) { + if (overlay) { + cm.removeOverlay(overlay); + } + overlay = searchOverlay(query); + cm.addOverlay(overlay); + if (cm.showMatchesOnScrollbar) { + if (searchState.getScrollbarAnnotate()) { + searchState.getScrollbarAnnotate().clear(); + } + searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query)); + } + searchState.setOverlay(overlay); + } + }, 50); +} +function findNext(cm, prev, query, repeat) { + if (repeat === undefined) { + repeat = 1; + } + return cm.operation(function () { + var pos = cm.getCursor(); + var cursor = cm.getSearchCursor(query, pos); + for (var i = 0; i < repeat; i++) { + var found = cursor.find(prev); + if (i == 0 && found && cursorEqual(cursor.from(), pos)) { + var lastEndPos = prev ? cursor.from() : cursor.to(); + found = cursor.find(prev); + if (found && !found[0] && cursorEqual(cursor.from(), lastEndPos)) { + if (cm.getLine(lastEndPos.line).length == lastEndPos.ch) + found = cursor.find(prev); + } + } + if (!found) { + cursor = cm.getSearchCursor(query, (prev) ? new Pos(cm.lastLine()) : new Pos(cm.firstLine(), 0)); + if (!cursor.find(prev)) { + return; + } + } + } + return cursor.from(); + }); +} +function findNextFromAndToInclusive(cm, prev, query, repeat, vim) { + if (repeat === undefined) { + repeat = 1; + } + return cm.operation(function () { + var pos = cm.getCursor(); + var cursor = cm.getSearchCursor(query, pos); + var found = cursor.find(!prev); + if (!vim.visualMode && found && cursorEqual(cursor.from(), pos)) { + cursor.find(!prev); + } + for (var i = 0; i < repeat; i++) { + found = cursor.find(prev); + if (!found) { + cursor = cm.getSearchCursor(query, (prev) ? new Pos(cm.lastLine()) : new Pos(cm.firstLine(), 0)); + if (!cursor.find(prev)) { + return; + } + } + } + return [cursor.from(), cursor.to()]; + }); +} +function clearSearchHighlight(cm) { + var state = getSearchState(cm); + if (state.highlightTimeout) { + clearTimeout(state.highlightTimeout); + state.highlightTimeout = null; + } + cm.removeOverlay(getSearchState(cm).getOverlay()); + state.setOverlay(null); + if (state.getScrollbarAnnotate()) { + state.getScrollbarAnnotate().clear(); + state.setScrollbarAnnotate(null); + } +} +function isInRange(pos, start, end) { + if (typeof pos != 'number') { + pos = pos.line; + } + if (start instanceof Array) { + return inArray(pos, start); + } + else { + if (typeof end == 'number') { + return (pos >= start && pos <= end); + } + else { + return pos == start; + } + } +} +function getUserVisibleLines(cm) { + var renderer = cm.ace.renderer; + return { + top: renderer.getFirstFullyVisibleRow(), + bottom: renderer.getLastFullyVisibleRow() + }; +} +function getMarkPos(cm, vim, markName) { + if (markName == '\'' || markName == '`') { + return vimGlobalState.jumpList.find(cm, -1) || new Pos(0, 0); + } + else if (markName == '.') { + return getLastEditPos(cm); + } + var mark = vim.marks[markName]; + return mark && mark.find(); +} +function getLastEditPos(cm) { + if (cm.getLastEditEnd) { + return cm.getLastEditEnd(); + } + var done = cm.doc.history.done; + for (var i = done.length; i--;) { + if (done[i].changes) { + return copyCursor(done[i].changes[0].to); + } + } +} +var ExCommandDispatcher = function () { + this.buildCommandMap_(); +}; +ExCommandDispatcher.prototype = { + processCommand: function (cm, input, opt_params) { + var that = this; + cm.operation(function () { + cm.curOp.isVimOp = true; + that._processCommand(cm, input, opt_params); + }); + }, + _processCommand: function (cm, input, opt_params) { + var vim = cm.state.vim; + var commandHistoryRegister = vimGlobalState.registerController.getRegister(':'); + var previousCommand = commandHistoryRegister.toString(); + var inputStream = new CodeMirror.StringStream(input); + commandHistoryRegister.setText(input); + var params = opt_params || {}; + params.input = input; + try { + this.parseInput_(cm, inputStream, params); + } + catch (e) { + showConfirm(cm, e.toString()); + throw e; + } + if (vim.visualMode) { + exitVisualMode(cm); + } + var command; + var commandName; + if (!params.commandName) { + if (params.line !== undefined) { + commandName = 'move'; + } + } + else { + command = this.matchCommand_(params.commandName); + if (command) { + commandName = command.name; + if (command.excludeFromCommandHistory) { + commandHistoryRegister.setText(previousCommand); + } + this.parseCommandArgs_(inputStream, params, command); + if (command.type == 'exToKey') { + doKeyToKey(cm, command.toKeys, command); + return; + } + else if (command.type == 'exToEx') { + this.processCommand(cm, command.toInput); + return; + } + } + } + if (!commandName) { + showConfirm(cm, 'Not an editor command ":' + input + '"'); + return; + } + try { + exCommands[commandName](cm, params); + if ((!command || !command.possiblyAsync) && params.callback) { + params.callback(); + } + } + catch (e) { + showConfirm(cm, e.toString()); + throw e; + } + }, + parseInput_: function (cm, inputStream, result) { + inputStream.eatWhile(':'); + if (inputStream.eat('%')) { + result.line = cm.firstLine(); + result.lineEnd = cm.lastLine(); + } + else { + result.line = this.parseLineSpec_(cm, inputStream); + if (result.line !== undefined && inputStream.eat(',')) { + result.lineEnd = this.parseLineSpec_(cm, inputStream); + } + } + if (result.line == undefined) { + if (cm.state.vim.visualMode) { + var pos = getMarkPos(cm, cm.state.vim, '<'); + result.selectionLine = pos && pos.line; + pos = getMarkPos(cm, cm.state.vim, '>'); + result.selectionLineEnd = pos && pos.line; + } + else { + result.selectionLine = cm.getCursor().line; + } + } + else { + result.selectionLine = result.line; + result.selectionLineEnd = result.lineEnd; + } + var commandMatch = inputStream.match(/^(\w+|!!|@@|[!#&*<=>@~])/); + if (commandMatch) { + result.commandName = commandMatch[1]; + } + else { + result.commandName = inputStream.match(/.*/)[0]; + } + return result; + }, + parseLineSpec_: function (cm, inputStream) { + var numberMatch = inputStream.match(/^(\d+)/); + if (numberMatch) { + return parseInt(numberMatch[1], 10) - 1; + } + switch (inputStream.next()) { + case '.': + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); + case '$': + return this.parseLineSpecOffset_(inputStream, cm.lastLine()); + case '\'': + var markName = inputStream.next(); + var markPos = getMarkPos(cm, cm.state.vim, markName); + if (!markPos) + throw new Error('Mark not set'); + return this.parseLineSpecOffset_(inputStream, markPos.line); + case '-': + case '+': + inputStream.backUp(1); + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); + default: + inputStream.backUp(1); + return undefined; + } + }, + parseLineSpecOffset_: function (inputStream, line) { + var offsetMatch = inputStream.match(/^([+-])?(\d+)/); + if (offsetMatch) { + var offset = parseInt(offsetMatch[2], 10); + if (offsetMatch[1] == "-") { + line -= offset; + } + else { + line += offset; + } + } + return line; + }, + parseCommandArgs_: function (inputStream, params, command) { + if (inputStream.eol()) { + return; + } + params.argString = inputStream.match(/.*/)[0]; + var delim = command.argDelimiter || /\s+/; + var args = trim(params.argString).split(delim); + if (args.length && args[0]) { + params.args = args; + } + }, + matchCommand_: function (commandName) { + for (var i = commandName.length; i > 0; i--) { + var prefix = commandName.substring(0, i); + if (this.commandMap_[prefix]) { + var command = this.commandMap_[prefix]; + if (command.name.indexOf(commandName) === 0) { + return command; + } + } + } + return null; + }, + buildCommandMap_: function () { + this.commandMap_ = {}; + for (var i = 0; i < defaultExCommandMap.length; i++) { + var command = defaultExCommandMap[i]; + var key = command.shortName || command.name; + this.commandMap_[key] = command; + } + }, + map: function (lhs, rhs, ctx, noremap) { + if (lhs != ':' && lhs.charAt(0) == ':') { + if (ctx) { + throw Error('Mode not supported for ex mappings'); + } + var commandName = lhs.substring(1); + if (rhs != ':' && rhs.charAt(0) == ':') { + this.commandMap_[commandName] = { + name: commandName, + type: 'exToEx', + toInput: rhs.substring(1), + user: true + }; + } + else { + this.commandMap_[commandName] = { + name: commandName, + type: 'exToKey', + toKeys: rhs, + user: true + }; + } + } + else { + var mapping = { + keys: lhs, + type: 'keyToKey', + toKeys: rhs, + noremap: !!noremap + }; + if (ctx) { + mapping.context = ctx; + } + defaultKeymap.unshift(mapping); + } + }, + unmap: function (lhs, ctx) { + if (lhs != ':' && lhs.charAt(0) == ':') { + if (ctx) { + throw Error('Mode not supported for ex mappings'); + } + var commandName = lhs.substring(1); + if (this.commandMap_[commandName] && this.commandMap_[commandName].user) { + delete this.commandMap_[commandName]; + return true; + } + } + else { + var keys = lhs; + for (var i = 0; i < defaultKeymap.length; i++) { + if (keys == defaultKeymap[i].keys + && defaultKeymap[i].context === ctx) { + defaultKeymap.splice(i, 1); + return true; + } + } + } + } +}; +var exCommands = { + colorscheme: function (cm, params) { + if (!params.args || params.args.length < 1) { + showConfirm(cm, cm.getOption('theme')); + return; + } + cm.setOption('theme', params.args[0]); + }, + map: function (cm, params, ctx, defaultOnly) { + var mapArgs = params.args; + if (!mapArgs || mapArgs.length < 2) { + if (cm) { + showConfirm(cm, 'Invalid mapping: ' + params.input); + } + return; + } + exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx, defaultOnly); + }, + imap: function (cm, params) { this.map(cm, params, 'insert'); }, + nmap: function (cm, params) { this.map(cm, params, 'normal'); }, + vmap: function (cm, params) { this.map(cm, params, 'visual'); }, + omap: function (cm, params) { this.map(cm, params, 'operatorPending'); }, + noremap: function (cm, params) { this.map(cm, params, undefined, true); }, + inoremap: function (cm, params) { this.map(cm, params, 'insert', true); }, + nnoremap: function (cm, params) { this.map(cm, params, 'normal', true); }, + vnoremap: function (cm, params) { this.map(cm, params, 'visual', true); }, + onoremap: function (cm, params) { this.map(cm, params, 'operatorPending', true); }, + unmap: function (cm, params, ctx) { + var mapArgs = params.args; + if (!mapArgs || mapArgs.length < 1 || !exCommandDispatcher.unmap(mapArgs[0], ctx)) { + if (cm) { + showConfirm(cm, 'No such mapping: ' + params.input); + } + } + }, + mapclear: function (cm, params) { vimApi.mapclear(); }, + imapclear: function (cm, params) { vimApi.mapclear('insert'); }, + nmapclear: function (cm, params) { vimApi.mapclear('normal'); }, + vmapclear: function (cm, params) { vimApi.mapclear('visual'); }, + omapclear: function (cm, params) { vimApi.mapclear('operatorPending'); }, + move: function (cm, params) { + commandDispatcher.processCommand(cm, cm.state.vim, { + type: 'motion', + motion: 'moveToLineOrEdgeOfDocument', + motionArgs: { forward: false, explicitRepeat: true, + linewise: true }, + repeatOverride: params.line + 1 + }); + }, + set: function (cm, params) { + var setArgs = params.args; + var setCfg = params.setCfg || {}; + if (!setArgs || setArgs.length < 1) { + if (cm) { + showConfirm(cm, 'Invalid mapping: ' + params.input); + } + return; + } + var expr = setArgs[0].split('='); + var optionName = expr[0]; + var value = expr[1]; + var forceGet = false; + var forceToggle = false; + if (optionName.charAt(optionName.length - 1) == '?') { + if (value) { + throw Error('Trailing characters: ' + params.argString); + } + optionName = optionName.substring(0, optionName.length - 1); + forceGet = true; + } + else if (optionName.charAt(optionName.length - 1) == '!') { + optionName = optionName.substring(0, optionName.length - 1); + forceToggle = true; + } + if (value === undefined && optionName.substring(0, 2) == 'no') { + optionName = optionName.substring(2); + value = false; + } + var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean'; + if (optionIsBoolean) { + if (forceToggle) { + value = !getOption(optionName, cm, setCfg); + } + else if (value == undefined) { + value = true; + } + } + if (!optionIsBoolean && value === undefined || forceGet) { + var oldValue = getOption(optionName, cm, setCfg); + if (oldValue instanceof Error) { + showConfirm(cm, oldValue.message); + } + else if (oldValue === true || oldValue === false) { + showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName); + } + else { + showConfirm(cm, ' ' + optionName + '=' + oldValue); + } + } + else { + var setOptionReturn = setOption(optionName, value, cm, setCfg); + if (setOptionReturn instanceof Error) { + showConfirm(cm, setOptionReturn.message); + } + } + }, + setlocal: function (cm, params) { + params.setCfg = { scope: 'local' }; + this.set(cm, params); + }, + setglobal: function (cm, params) { + params.setCfg = { scope: 'global' }; + this.set(cm, params); + }, + registers: function (cm, params) { + var regArgs = params.args; + var registers = vimGlobalState.registerController.registers; + var regInfo = '----------Registers----------\n\n'; + if (!regArgs) { + for (var registerName in registers) { + var text = registers[registerName].toString(); + if (text.length) { + regInfo += '"' + registerName + ' ' + text + '\n'; + } + } + } + else { + var registerName; + regArgs = regArgs.join(''); + for (var i = 0; i < regArgs.length; i++) { + registerName = regArgs.charAt(i); + if (!vimGlobalState.registerController.isValidRegister(registerName)) { + continue; + } + var register = registers[registerName] || new Register(); + regInfo += '"' + registerName + ' ' + register.toString() + '\n'; + } + } + showConfirm(cm, regInfo); + }, + sort: function (cm, params) { + var reverse, ignoreCase, unique, number, pattern; + function parseArgs() { + if (params.argString) { + var args = new CodeMirror.StringStream(params.argString); + if (args.eat('!')) { + reverse = true; + } + if (args.eol()) { + return; + } + if (!args.eatSpace()) { + return 'Invalid arguments'; + } + var opts = args.match(/([dinuox]+)?\s*(\/.+\/)?\s*/); + if (!opts && !args.eol()) { + return 'Invalid arguments'; + } + if (opts[1]) { + ignoreCase = opts[1].indexOf('i') != -1; + unique = opts[1].indexOf('u') != -1; + var decimal = opts[1].indexOf('d') != -1 || opts[1].indexOf('n') != -1 && 1; + var hex = opts[1].indexOf('x') != -1 && 1; + var octal = opts[1].indexOf('o') != -1 && 1; + if (decimal + hex + octal > 1) { + return 'Invalid arguments'; + } + number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; + } + if (opts[2]) { + pattern = new RegExp(opts[2].substr(1, opts[2].length - 2), ignoreCase ? 'i' : ''); + } + } + } + var err = parseArgs(); + if (err) { + showConfirm(cm, err + ': ' + params.argString); + return; + } + var lineStart = params.line || cm.firstLine(); + var lineEnd = params.lineEnd || params.line || cm.lastLine(); + if (lineStart == lineEnd) { + return; + } + var curStart = new Pos(lineStart, 0); + var curEnd = new Pos(lineEnd, lineLength(cm, lineEnd)); + var text = cm.getRange(curStart, curEnd).split('\n'); + var numberRegex = pattern ? pattern : + (number == 'decimal') ? /(-?)([\d]+)/ : + (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : + (number == 'octal') ? /([0-7]+)/ : null; + var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; + var numPart = [], textPart = []; + if (number || pattern) { + for (var i = 0; i < text.length; i++) { + var matchPart = pattern ? text[i].match(pattern) : null; + if (matchPart && matchPart[0] != '') { + numPart.push(matchPart); + } + else if (!pattern && numberRegex.exec(text[i])) { + numPart.push(text[i]); + } + else { + textPart.push(text[i]); + } + } + } + else { + textPart = text; + } + function compareFn(a, b) { + if (reverse) { + var tmp; + tmp = a; + a = b; + b = tmp; + } + if (ignoreCase) { + a = a.toLowerCase(); + b = b.toLowerCase(); + } + var anum = number && numberRegex.exec(a); + var bnum = number && numberRegex.exec(b); + if (!anum) { + return a < b ? -1 : 1; + } + anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix); + bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); + return anum - bnum; + } + function comparePatternFn(a, b) { + if (reverse) { + var tmp; + tmp = a; + a = b; + b = tmp; + } + if (ignoreCase) { + a[0] = a[0].toLowerCase(); + b[0] = b[0].toLowerCase(); + } + return (a[0] < b[0]) ? -1 : 1; + } + numPart.sort(pattern ? comparePatternFn : compareFn); + if (pattern) { + for (var i = 0; i < numPart.length; i++) { + numPart[i] = numPart[i].input; + } + } + else if (!number) { + textPart.sort(compareFn); + } + text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); + if (unique) { // Remove duplicate lines + var textOld = text; + var lastLine; + text = []; + for (var i = 0; i < textOld.length; i++) { + if (textOld[i] != lastLine) { + text.push(textOld[i]); + } + lastLine = textOld[i]; + } + } + cm.replaceRange(text.join('\n'), curStart, curEnd); + }, + vglobal: function (cm, params) { + this.global(cm, params); + }, + normal: function (cm, params) { + var argString = params.argString; + if (argString && argString[0] == '!') { + argString = argString.slice(1); + noremap = true; + } + argString = argString.trimStart(); + if (!argString) { + showConfirm(cm, 'Argument is required.'); + return; + } + var line = params.line; + if (typeof line == 'number') { + var lineEnd = isNaN(params.lineEnd) ? line : params.lineEnd; + for (var i = line; i <= lineEnd; i++) { + cm.setCursor(i, 0); + doKeyToKey(cm, params.argString.trimStart()); + if (cm.state.vim.insertMode) { + exitInsertMode(cm, true); + } + } + } + else { + doKeyToKey(cm, params.argString.trimStart()); + if (cm.state.vim.insertMode) { + exitInsertMode(cm, true); + } + } + }, + global: function (cm, params) { + var argString = params.argString; + if (!argString) { + showConfirm(cm, 'Regular Expression missing from global'); + return; + } + var inverted = params.commandName[0] === 'v'; + if (argString[0] === '!' && params.commandName[0] === 'g') { + inverted = true; + argString = argString.slice(1); + } + var lineStart = (params.line !== undefined) ? params.line : cm.firstLine(); + var lineEnd = params.lineEnd || params.line || cm.lastLine(); + var tokens = splitBySlash(argString); + var regexPart = argString, cmd; + if (tokens.length) { + regexPart = tokens[0]; + cmd = tokens.slice(1, tokens.length).join('/'); + } + if (regexPart) { + try { + updateSearchQuery(cm, regexPart, true /** ignoreCase */, true /** smartCase */); + } + catch (e) { + showConfirm(cm, 'Invalid regex: ' + regexPart); + return; + } + } + var query = getSearchState(cm).getQuery(); + var matchedLines = []; + for (var i = lineStart; i <= lineEnd; i++) { + var line = cm.getLine(i); + var matched = query.test(line); + if (matched !== inverted) { + matchedLines.push(cmd ? cm.getLineHandle(i) : line); + } + } + if (!cmd) { + showConfirm(cm, matchedLines.join('\n')); + return; + } + var index = 0; + var nextCommand = function () { + if (index < matchedLines.length) { + var lineHandle = matchedLines[index++]; + var lineNum = cm.getLineNumber(lineHandle); + if (lineNum == null) { + nextCommand(); + return; + } + var command = (lineNum + 1) + cmd; + exCommandDispatcher.processCommand(cm, command, { + callback: nextCommand + }); + } + else if (cm.releaseLineHandles) { + cm.releaseLineHandles(); + } + }; + nextCommand(); + }, + substitute: function (cm, params) { + if (!cm.getSearchCursor) { + throw new Error('Search feature not available. Requires searchcursor.js or ' + + 'any other getSearchCursor implementation.'); + } + var argString = params.argString; + var tokens = argString ? splitBySeparator(argString, argString[0]) : []; + var regexPart, replacePart = '', trailing, flagsPart, count; + var confirm = false; // Whether to confirm each replace. + var global = false; // True to replace all instances on a line, false to replace only 1. + if (tokens.length) { + regexPart = tokens[0]; + if (getOption('pcre') && regexPart !== '') { + regexPart = new RegExp(regexPart).source; //normalize not escaped characters + } + replacePart = tokens[1]; + if (replacePart !== undefined) { + if (getOption('pcre')) { + replacePart = unescapeRegexReplace(replacePart.replace(/([^\\])&/g, "$1$$&")); + } + else { + replacePart = translateRegexReplace(replacePart); + } + vimGlobalState.lastSubstituteReplacePart = replacePart; + } + trailing = tokens[2] ? tokens[2].split(' ') : []; + } + else { + if (argString && argString.length) { + showConfirm(cm, 'Substitutions should be of the form ' + + ':s/pattern/replace/'); + return; + } + } + if (trailing) { + flagsPart = trailing[0]; + count = parseInt(trailing[1]); + if (flagsPart) { + if (flagsPart.indexOf('c') != -1) { + confirm = true; + } + if (flagsPart.indexOf('g') != -1) { + global = true; + } + if (getOption('pcre')) { + regexPart = regexPart + '/' + flagsPart; + } + else { + regexPart = regexPart.replace(/\//g, "\\/") + '/' + flagsPart; + } + } + } + if (regexPart) { + try { + updateSearchQuery(cm, regexPart, true /** ignoreCase */, true /** smartCase */); + } + catch (e) { + showConfirm(cm, 'Invalid regex: ' + regexPart); + return; + } + } + replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart; + if (replacePart === undefined) { + showConfirm(cm, 'No previous substitute regular expression'); + return; + } + var state = getSearchState(cm); + var query = state.getQuery(); + var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line; + var lineEnd = params.lineEnd || lineStart; + if (lineStart == cm.firstLine() && lineEnd == cm.lastLine()) { + lineEnd = Infinity; + } + if (count) { + lineStart = lineEnd; + lineEnd = lineStart + count - 1; + } + var startPos = clipCursorToContent(cm, new Pos(lineStart, 0)); + var cursor = cm.getSearchCursor(query, startPos); + doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback); + }, + startinsert: function (cm, params) { + doKeyToKey(cm, params.argString == '!' ? 'A' : 'i', {}); + }, + redo: CodeMirror.commands.redo, + undo: CodeMirror.commands.undo, + write: function (cm) { + if (CodeMirror.commands.save) { + CodeMirror.commands.save(cm); + } + else if (cm.save) { + cm.save(); + } + }, + nohlsearch: function (cm) { + clearSearchHighlight(cm); + }, + yank: function (cm) { + var cur = copyCursor(cm.getCursor()); + var line = cur.line; + var lineText = cm.getLine(line); + vimGlobalState.registerController.pushText('0', 'yank', lineText, true, true); + }, + delete: function (cm, params) { + var line = params.selectionLine; + var lineEnd = isNaN(params.selectionLineEnd) ? line : params.selectionLineEnd; + operators.delete(cm, { linewise: true }, [ + { anchor: new Pos(line, 0), + head: new Pos(lineEnd + 1, 0) } + ]); + }, + join: function (cm, params) { + var line = params.selectionLine; + var lineEnd = isNaN(params.selectionLineEnd) ? line : params.selectionLineEnd; + cm.setCursor(new Pos(line, 0)); + actions.joinLines(cm, { repeat: lineEnd - line }, cm.state.vim); + }, + delmarks: function (cm, params) { + if (!params.argString || !trim(params.argString)) { + showConfirm(cm, 'Argument required'); + return; + } + var state = cm.state.vim; + var stream = new CodeMirror.StringStream(trim(params.argString)); + while (!stream.eol()) { + stream.eatSpace(); + var count = stream.pos; + if (!stream.match(/[a-zA-Z]/, false)) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + var sym = stream.next(); + if (stream.match('-', true)) { + if (!stream.match(/[a-zA-Z]/, false)) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + var startMark = sym; + var finishMark = stream.next(); + if (isLowerCase(startMark) && isLowerCase(finishMark) || + isUpperCase(startMark) && isUpperCase(finishMark)) { + var start = startMark.charCodeAt(0); + var finish = finishMark.charCodeAt(0); + if (start >= finish) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + for (var j = 0; j <= finish - start; j++) { + var mark = String.fromCharCode(start + j); + delete state.marks[mark]; + } + } + else { + showConfirm(cm, 'Invalid argument: ' + startMark + '-'); + return; + } + } + else { + delete state.marks[sym]; + } + } + } +}; +var exCommandDispatcher = new ExCommandDispatcher(); +function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, replaceWith, callback) { + cm.state.vim.exMode = true; + var done = false; + var lastPos, modifiedLineNumber, joined; + function replaceAll() { + cm.operation(function () { + while (!done) { + replace(); + next(); + } + stop(); + }); + } + function replace() { + var text = cm.getRange(searchCursor.from(), searchCursor.to()); + var newText = text.replace(query, replaceWith); + var unmodifiedLineNumber = searchCursor.to().line; + searchCursor.replace(newText); + modifiedLineNumber = searchCursor.to().line; + lineEnd += modifiedLineNumber - unmodifiedLineNumber; + joined = modifiedLineNumber < unmodifiedLineNumber; + } + function findNextValidMatch() { + var lastMatchTo = lastPos && copyCursor(searchCursor.to()); + var match = searchCursor.findNext(); + if (match && !match[0] && lastMatchTo && cursorEqual(searchCursor.from(), lastMatchTo)) { + match = searchCursor.findNext(); + } + return match; + } + function next() { + while (findNextValidMatch() && + isInRange(searchCursor.from(), lineStart, lineEnd)) { + if (!global && searchCursor.from().line == modifiedLineNumber && !joined) { + continue; + } + cm.scrollIntoView(searchCursor.from(), 30); + cm.setSelection(searchCursor.from(), searchCursor.to()); + lastPos = searchCursor.from(); + done = false; + return; + } + done = true; + } + function stop(close) { + if (close) { + close(); + } + cm.focus(); + if (lastPos) { + cm.setCursor(lastPos); + var vim = cm.state.vim; + vim.exMode = false; + vim.lastHPos = vim.lastHSPos = lastPos.ch; + } + if (callback) { + callback(); + } + } + function onPromptKeyDown(e, _value, close) { + CodeMirror.e_stop(e); + var keyName = vimKeyFromEvent(e); + switch (keyName) { + case 'y': + replace(); + next(); + break; + case 'n': + next(); + break; + case 'a': + var savedCallback = callback; + callback = undefined; + cm.operation(replaceAll); + callback = savedCallback; + break; + case 'l': + replace(); + case 'q': + case '': + case '': + case '': + stop(close); + break; + } + if (done) { + stop(close); + } + return true; + } + next(); + if (done) { + showConfirm(cm, 'No matches for ' + query.source); + return; + } + if (!confirm) { + replaceAll(); + if (callback) { + callback(); + } + return; + } + showPrompt(cm, { + prefix: dom('span', 'replace with ', dom('strong', replaceWith), ' (y/n/a/q/l)'), + onKeyDown: onPromptKeyDown + }); +} +function exitInsertMode(cm, keepCursor) { + var vim = cm.state.vim; + var macroModeState = vimGlobalState.macroModeState; + var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.'); + var isPlaying = macroModeState.isPlaying; + var lastChange = macroModeState.lastInsertModeChanges; + if (!isPlaying) { + cm.off('change', onChange); + if (vim.insertEnd) + vim.insertEnd.clear(); + vim.insertEnd = null; + CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); + } + if (!isPlaying && vim.insertModeRepeat > 1) { + repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, true /** repeatForInsert */); + vim.lastEditInputState.repeatOverride = vim.insertModeRepeat; + } + delete vim.insertModeRepeat; + vim.insertMode = false; + if (!keepCursor) { + cm.setCursor(cm.getCursor().line, cm.getCursor().ch - 1); + } + cm.setOption('keyMap', 'vim'); + cm.setOption('disableInput', true); + cm.toggleOverwrite(false); // exit replace mode if we were in it. + insertModeChangeRegister.setText(lastChange.changes.join('')); + CodeMirror.signal(cm, "vim-mode-change", { mode: "normal" }); + if (macroModeState.isRecording) { + logInsertModeChange(macroModeState); + } +} +function _mapCommand(command) { + defaultKeymap.unshift(command); +} +function mapCommand(keys, type, name, args, extra) { + var command = { keys: keys, type: type }; + command[type] = name; + command[type + "Args"] = args; + for (var key in extra) + command[key] = extra[key]; + _mapCommand(command); +} +defineOption('insertModeEscKeysTimeout', 200, 'number'); +function executeMacroRegister(cm, vim, macroModeState, registerName) { + var register = vimGlobalState.registerController.getRegister(registerName); + if (registerName == ':') { + if (register.keyBuffer[0]) { + exCommandDispatcher.processCommand(cm, register.keyBuffer[0]); + } + macroModeState.isPlaying = false; + return; + } + var keyBuffer = register.keyBuffer; + var imc = 0; + macroModeState.isPlaying = true; + macroModeState.replaySearchQueries = register.searchQueries.slice(0); + for (var i = 0; i < keyBuffer.length; i++) { + var text = keyBuffer[i]; + var match, key; + while (text) { + match = (/<\w+-.+?>|<\w+>|./).exec(text); + key = match[0]; + text = text.substring(match.index + key.length); + vimApi.handleKey(cm, key, 'macro'); + if (vim.insertMode) { + var changes = register.insertModeChanges[imc++].changes; + vimGlobalState.macroModeState.lastInsertModeChanges.changes = + changes; + repeatInsertModeChanges(cm, changes, 1); + exitInsertMode(cm); + } + } + } + macroModeState.isPlaying = false; +} +function logKey(macroModeState, key) { + if (macroModeState.isPlaying) { + return; + } + var registerName = macroModeState.latestRegister; + var register = vimGlobalState.registerController.getRegister(registerName); + if (register) { + register.pushText(key); + } +} +function logInsertModeChange(macroModeState) { + if (macroModeState.isPlaying) { + return; + } + var registerName = macroModeState.latestRegister; + var register = vimGlobalState.registerController.getRegister(registerName); + if (register && register.pushInsertModeChanges) { + register.pushInsertModeChanges(macroModeState.lastInsertModeChanges); + } +} +function logSearchQuery(macroModeState, query) { + if (macroModeState.isPlaying) { + return; + } + var registerName = macroModeState.latestRegister; + var register = vimGlobalState.registerController.getRegister(registerName); + if (register && register.pushSearchQuery) { + register.pushSearchQuery(query); + } +} +function onChange(cm, changeObj) { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + if (!macroModeState.isPlaying) { + var vim = cm.state.vim; + while (changeObj) { + lastChange.expectCursorActivityForChange = true; + if (lastChange.ignoreCount > 1) { + lastChange.ignoreCount--; + } + else if (changeObj.origin == '+input' || changeObj.origin == 'paste' + || changeObj.origin === undefined /* only in testing */) { + var selectionCount = cm.listSelections().length; + if (selectionCount > 1) + lastChange.ignoreCount = selectionCount; + var text = changeObj.text.join('\n'); + if (lastChange.maybeReset) { + lastChange.changes = []; + lastChange.maybeReset = false; + } + if (text) { + if (cm.state.overwrite && !/\n/.test(text)) { + lastChange.changes.push([text]); + } + else { + if (text.length > 1) { + var insertEnd = vim && vim.insertEnd && vim.insertEnd.find(); + var cursor = cm.getCursor(); + if (insertEnd && insertEnd.line == cursor.line) { + var offset = insertEnd.ch - cursor.ch; + if (offset > 0 && offset < text.length) { + lastChange.changes.push([text, offset]); + text = ''; + } + } + } + if (text) + lastChange.changes.push(text); + } + } + } + changeObj = changeObj.next; + } + } +} +function onCursorActivity(cm) { + var vim = cm.state.vim; + if (vim.insertMode) { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isPlaying) { + return; + } + var lastChange = macroModeState.lastInsertModeChanges; + if (lastChange.expectCursorActivityForChange) { + lastChange.expectCursorActivityForChange = false; + } + else { + lastChange.maybeReset = true; + if (vim.insertEnd) + vim.insertEnd.clear(); + vim.insertEnd = cm.setBookmark(cm.getCursor(), { insertLeft: true }); + } + } + else if (!cm.curOp.isVimOp) { + handleExternalSelection(cm, vim); + } +} +function handleExternalSelection(cm, vim, keepHPos) { + var anchor = cm.getCursor('anchor'); + var head = cm.getCursor('head'); + if (vim.visualMode && !cm.somethingSelected()) { + exitVisualMode(cm, false); + } + else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) { + vim.visualMode = true; + vim.visualLine = false; + CodeMirror.signal(cm, "vim-mode-change", { mode: "visual" }); + } + if (vim.visualMode) { + var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; + var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; + head = offsetCursor(head, 0, headOffset); + anchor = offsetCursor(anchor, 0, anchorOffset); + vim.sel = { + anchor: anchor, + head: head + }; + updateMark(cm, vim, '<', cursorMin(head, anchor)); + updateMark(cm, vim, '>', cursorMax(head, anchor)); + } + else if (!vim.insertMode && !keepHPos) { + vim.lastHPos = cm.getCursor().ch; + } +} +function InsertModeKey(keyName, e) { + this.keyName = keyName; + this.key = e.key; + this.ctrlKey = e.ctrlKey; + this.altKey = e.altKey; + this.metaKey = e.metaKey; + this.shiftKey = e.shiftKey; +} +function onKeyEventTargetKeyDown(e) { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + var keyName = CodeMirror.keyName ? CodeMirror.keyName(e) : e.key; + if (!keyName) { + return; + } + if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { + if (lastChange.maybeReset) { + lastChange.changes = []; + lastChange.maybeReset = false; + } + lastChange.changes.push(new InsertModeKey(keyName, e)); + } +} +function repeatLastEdit(cm, vim, repeat, repeatForInsert) { + var macroModeState = vimGlobalState.macroModeState; + macroModeState.isPlaying = true; + var isAction = !!vim.lastEditActionCommand; + var cachedInputState = vim.inputState; + function repeatCommand() { + if (isAction) { + commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand); + } + else { + commandDispatcher.evalInput(cm, vim); + } + } + function repeatInsert(repeat) { + if (macroModeState.lastInsertModeChanges.changes.length > 0) { + repeat = !vim.lastEditActionCommand ? 1 : repeat; + var changeObject = macroModeState.lastInsertModeChanges; + repeatInsertModeChanges(cm, changeObject.changes, repeat); + } + } + vim.inputState = vim.lastEditInputState; + if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) { + for (var i = 0; i < repeat; i++) { + repeatCommand(); + repeatInsert(1); + } + } + else { + if (!repeatForInsert) { + repeatCommand(); + } + repeatInsert(repeat); + } + vim.inputState = cachedInputState; + if (vim.insertMode && !repeatForInsert) { + exitInsertMode(cm); + } + macroModeState.isPlaying = false; +} +function sendCmKey(cm, key) { + CodeMirror.lookupKey(key, 'vim-insert', function keyHandler(binding) { + if (typeof binding == 'string') { + CodeMirror.commands[binding](cm); + } + else { + binding(cm); + } + return true; + }); +} +function repeatInsertModeChanges(cm, changes, repeat) { + var head = cm.getCursor('head'); + var visualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.visualBlock; + if (visualBlock) { + selectForInsert(cm, head, visualBlock + 1); + repeat = cm.listSelections().length; + cm.setCursor(head); + } + for (var i = 0; i < repeat; i++) { + if (visualBlock) { + cm.setCursor(offsetCursor(head, i, 0)); + } + for (var j = 0; j < changes.length; j++) { + var change = changes[j]; + if (change instanceof InsertModeKey) { + sendCmKey(cm, change.keyName, change); + } + else if (typeof change == "string") { + cm.replaceSelection(change); + } + else { + var start = cm.getCursor(); + var end = offsetCursor(start, 0, change[0].length - (change[1] || 0)); + cm.replaceRange(change[0], start, change[1] ? start : end); + cm.setCursor(end); + } + } + } + if (visualBlock) { + cm.setCursor(offsetCursor(head, 0, 1)); + } +} +CodeMirror.Vim = vimApi; +var specialKeyAce = { 'return': 'CR', backspace: 'BS', 'delete': 'Del', esc: 'Esc', + left: 'Left', right: 'Right', up: 'Up', down: 'Down', space: 'Space', insert: 'Ins', + home: 'Home', end: 'End', pageup: 'PageUp', pagedown: 'PageDown', enter: 'CR' +}; +function lookupKey(hashId, key, e, vim) { + if (key.length > 1 && key[0] == "n") { + key = key.replace("numpad", ""); + } + key = specialKeyAce[key] || key; + var name = ''; + if (e.ctrlKey) { + name += 'C-'; + } + if (e.altKey) { + name += 'A-'; + } + if ((name || key.length > 1) && e.shiftKey) { + name += 'S-'; + } + if (vim && !vim.expectLiteralNext && key.length == 1) { + if (langmap.keymap && key in langmap.keymap) { + if (langmap.remapCtrl !== false || !name) + key = langmap.keymap[key]; + } + else if (key.charCodeAt(0) > 255) { + var code = e.code && e.code.slice(-1) || ""; + if (!e.shiftKey) + code = code.toLowerCase(); + if (code) + key = code; + } + } + name += key; + if (name.length > 1) { + name = '<' + name + '>'; + } + return name; +} +var handleKey = vimApi.handleKey.bind(vimApi); +vimApi.handleKey = function (cm, key, origin) { + return cm.operation(function () { + return handleKey(cm, key, origin); + }, true); +}; +function cloneVimState(state) { + var n = new state.constructor(); + Object.keys(state).forEach(function (key) { + if (key == "insertEnd") + return; + var o = state[key]; + if (Array.isArray(o)) + o = o.slice(); + else if (o && typeof o == "object" && o.constructor != Object) + o = cloneVimState(o); + n[key] = o; + }); + if (state.sel) { + n.sel = { + head: state.sel.head && copyCursor(state.sel.head), + anchor: state.sel.anchor && copyCursor(state.sel.anchor) + }; + } + return n; +} +function multiSelectHandleKey(cm, key, origin) { + var isHandled = false; + var vim = vimApi.maybeInitVimState_(cm); + var visualBlock = vim.visualBlock || vim.wasInVisualBlock; + var wasMultiselect = cm.ace.inMultiSelectMode; + if (vim.wasInVisualBlock && !wasMultiselect) { + vim.wasInVisualBlock = false; + } + else if (wasMultiselect && vim.visualBlock) { + vim.wasInVisualBlock = true; + } + if (key == '' && !vim.insertMode && !vim.visualMode && wasMultiselect) { + cm.ace.exitMultiSelectMode(); + } + else if (visualBlock || !wasMultiselect || cm.ace.inVirtualSelectionMode) { + isHandled = vimApi.handleKey(cm, key, origin); + } + else { + var old = cloneVimState(vim); + var changeQueueList = vim.inputState.changeQueueList || []; + cm.operation(function () { + cm.curOp.isVimOp = true; + var index = 0; + cm.ace.forEachSelection(function () { + var sel = cm.ace.selection; + cm.state.vim.lastHPos = sel.$desiredColumn == null ? sel.lead.column : sel.$desiredColumn; + cm.state.vim.inputState.changeQueue = changeQueueList[index]; + var head = cm.getCursor("head"); + var anchor = cm.getCursor("anchor"); + var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; + var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; + head = offsetCursor(head, 0, headOffset); + anchor = offsetCursor(anchor, 0, anchorOffset); + cm.state.vim.sel.head = head; + cm.state.vim.sel.anchor = anchor; + isHandled = handleKey(cm, key, origin); + sel.$desiredColumn = cm.state.vim.lastHPos == -1 ? null : cm.state.vim.lastHPos; + if (cm.ace.inVirtualSelectionMode) { + changeQueueList[index] = cm.state.vim.inputState.changeQueue; + } + if (cm.virtualSelectionMode()) { + cm.state.vim = cloneVimState(old); + } + index++; + }); + if (cm.curOp.cursorActivity && !isHandled) + cm.curOp.cursorActivity = false; + vim.status = cm.state.vim.status; + cm.state.vim = vim; + vim.inputState.changeQueueList = changeQueueList; + vim.inputState.changeQueue = null; + }, true); + } + if (isHandled && !vim.visualMode && !vim.insert && vim.visualMode != cm.somethingSelected()) { + handleExternalSelection(cm, vim, true); + } + return isHandled; +} +resetVimGlobalState(); +exports.CodeMirror = CodeMirror; +var getVim = vimApi.maybeInitVimState_; +exports.handler = { + $id: "ace/keyboard/vim", + drawCursor: function (element, pixelPos, config, sel, session) { + var vim = this.state.vim || {}; + var w = config.characterWidth; + var h = config.lineHeight; + var top = pixelPos.top; + var left = pixelPos.left; + if (!vim.insertMode) { + var isbackwards = !sel.cursor + ? session.selection.isBackwards() || session.selection.isEmpty() + : Range.comparePoints(sel.cursor, sel.start) <= 0; + if (!isbackwards && left > w) + left -= w; + } + if (!vim.insertMode && vim.status) { + h = h / 2; + top += h; + } + domLib.translate(element, left, top); + domLib.setStyle(element.style, "width", w + "px"); + domLib.setStyle(element.style, "height", h + "px"); + }, + $getDirectionForHighlight: function (editor) { + var cm = editor.state.cm; + var vim = getVim(cm); + if (!vim.insertMode) { + return editor.session.selection.isBackwards() || editor.session.selection.isEmpty(); + } + }, + handleKeyboard: function (data, hashId, key, keyCode, e) { + var editor = data.editor; + var cm = editor.state.cm; + var vim = getVim(cm); + if (keyCode == -1) + return; + if (!vim.insertMode) { + if (hashId == -1) { + if (key.charCodeAt(0) > 0xFF) { + if (data.inputKey) { + key = data.inputKey; + if (key && data.inputHash == 4) + key = key.toUpperCase(); + } + } + data.inputChar = key; + } + else if (hashId == 4 || hashId == 0) { + if (data.inputKey == key && data.inputHash == hashId && data.inputChar) { + key = data.inputChar; + hashId = -1; + } + else { + data.inputChar = null; + data.inputKey = key; + data.inputHash = hashId; + } + } + else { + data.inputChar = data.inputKey = null; + } + } + if (cm.state.overwrite && vim.insertMode && key == "backspace" && hashId == 0) { + return { command: "gotoleft" }; + } + if (key == "c" && hashId == 1) { // key == "ctrl-c" + if (!useragent.isMac && editor.getCopyText()) { + editor.once("copy", function () { + if (vim.insertMode) + editor.selection.clearSelection(); + else + cm.operation(function () { exitVisualMode(cm); }); + }); + return { command: "null", passEvent: true }; + } + } + if (key == "esc" && !vim.insertMode && !vim.visualMode && !cm.ace.inMultiSelectMode) { + var searchState = getSearchState(cm); + var overlay = searchState.getOverlay(); + if (overlay) + cm.removeOverlay(overlay); + } + if (hashId == -1 || hashId & 1 || hashId === 0 && key.length > 1) { + var insertMode = vim.insertMode; + var name = lookupKey(hashId, key, e || {}, vim); + if (vim.status == null) + vim.status = ""; + var isHandled = multiSelectHandleKey(cm, name, 'user'); + vim = getVim(cm); // may be changed by multiSelectHandleKey + if (isHandled && vim.status != null) + vim.status += name; + else if (vim.status == null) + vim.status = ""; + cm._signal("changeStatus"); + if (!isHandled && (hashId != -1 || insertMode)) + return; + return { command: "null", passEvent: !isHandled }; + } + }, + attach: function (editor) { + if (!editor.state) + editor.state = {}; + var cm = new CodeMirror(editor); + editor.state.cm = cm; + editor.$vimModeHandler = this; + enterVimMode(cm); + getVim(cm).status = null; + cm.on('vim-command-done', function () { + if (cm.virtualSelectionMode()) + return; + getVim(cm).status = null; + cm.ace._signal("changeStatus"); + cm.ace.session.markUndoGroup(); + }); + cm.on("changeStatus", function () { + cm.ace.renderer.updateCursor(); + cm.ace._signal("changeStatus"); + }); + cm.on("vim-mode-change", function () { + if (cm.virtualSelectionMode()) + return; + updateInputMode(); + cm._signal("changeStatus"); + }); + function updateInputMode() { + var isIntsert = getVim(cm).insertMode; + cm.ace.renderer.setStyle("normal-mode", !isIntsert); + editor.textInput.setCommandMode(!isIntsert); + editor.renderer.$keepTextAreaAtCursor = isIntsert; + editor.renderer.$blockCursor = !isIntsert; + } + updateInputMode(); + editor.renderer.$cursorLayer.drawCursor = this.drawCursor.bind(cm); + }, + detach: function (editor) { + var cm = editor.state.cm; + leaveVimMode(cm); + cm.destroy(); + editor.state.cm = null; + editor.$vimModeHandler = null; + editor.renderer.$cursorLayer.drawCursor = null; + editor.renderer.setStyle("normal-mode", false); + editor.textInput.setCommandMode(false); + editor.renderer.$keepTextAreaAtCursor = true; + }, + getStatusText: function (editor) { + var cm = editor.state.cm; + var vim = getVim(cm); + if (vim.insertMode) + return "INSERT"; + var status = ""; + if (vim.visualMode) { + status += "VISUAL"; + if (vim.visualLine) + status += " LINE"; + if (vim.visualBlock) + status += " BLOCK"; + } + if (vim.status) + status += (status ? " " : "") + vim.status; + return status; + } +}; +vimApi.defineOption({ + name: "wrap", + set: function (value, cm) { + if (cm) { + cm.ace.setOption("wrap", value); + } + }, + type: "boolean" +}, false); +vimApi.defineEx('write', 'w', function () { + console.log(':write is not implemented'); +}); +defaultKeymap.push({ keys: 'zc', type: 'action', action: 'fold', actionArgs: { open: false } }, { keys: 'zC', type: 'action', action: 'fold', actionArgs: { open: false, all: true } }, { keys: 'zo', type: 'action', action: 'fold', actionArgs: { open: true } }, { keys: 'zO', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, { keys: 'za', type: 'action', action: 'fold', actionArgs: { toggle: true } }, { keys: 'zA', type: 'action', action: 'fold', actionArgs: { toggle: true, all: true } }, { keys: 'zf', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, { keys: 'zd', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAbove" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelow" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAboveSkipCurrent" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelowSkipCurrent" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreBefore" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreAfter" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextBefore" } }, { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextAfter" } }); +defaultKeymap.push({ + keys: 'gq', + type: 'operator', + operator: 'hardWrap' +}); +vimApi.defineOperator("hardWrap", function (cm, operatorArgs, ranges, oldAnchor, newHead) { + var anchor = ranges[0].anchor.line; + var head = ranges[0].head.line; + if (operatorArgs.linewise) + head--; + hardWrap(cm.ace, { startRow: anchor, endRow: head }); + return Pos(head, 0); +}); +defineOption('textwidth', undefined, 'number', ['tw'], function (width, cm) { + if (cm === undefined) { + return; + } + if (width === undefined) { + var value = cm.ace.getOption('printMarginColumn'); + return value; + } + else { + var column = Math.round(width); + if (column > 1) { + cm.ace.setOption('printMarginColumn', column); + } + } +}); +actions.aceCommand = function (cm, actionArgs, vim) { + cm.vimCmd = actionArgs; + if (cm.ace.inVirtualSelectionMode) + cm.ace.on("beforeEndOperation", delayedExecAceCommand); + else + delayedExecAceCommand(null, cm.ace); +}; +function delayedExecAceCommand(op, ace) { + ace.off("beforeEndOperation", delayedExecAceCommand); + var cmd = ace.state.cm.vimCmd; + if (cmd) { + ace.execCommand(cmd.exec ? cmd : cmd.name, cmd.args); + } + ace.curOp = ace.prevOp; +} +actions.fold = function (cm, actionArgs, vim) { + cm.ace.execCommand(['toggleFoldWidget', 'toggleFoldWidget', 'foldOther', 'unfoldall' + ][(actionArgs.all ? 2 : 0) + (actionArgs.open ? 1 : 0)]); +}; +defaultKeymapLength = defaultKeymap.length; // ace_patch +exports.handler.defaultKeymap = defaultKeymap; +exports.handler.actions = actions; +exports.Vim = vimApi; + +}); (function() { + window.require(["ace/keyboard/vim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/keybinding-vscode.js b/ui/base1/ace/keybinding-vscode.js new file mode 100644 index 0000000..1098cf8 --- /dev/null +++ b/ui/base1/ace/keybinding-vscode.js @@ -0,0 +1,255 @@ +define("ace/keyboard/vscode",["require","exports","module","ace/keyboard/hash_handler","ace/config"], function(require, exports, module){"use strict"; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var config = require("../config"); +exports.handler = new HashHandler(); +exports.handler.$id = "ace/keyboard/vscode"; +exports.handler.addCommands([{ + name: "toggleWordWrap", + exec: function (editor) { + var wrapUsed = editor.session.getUseWrapMode(); + editor.session.setUseWrapMode(!wrapUsed); + }, + readOnly: true + }, { + name: "navigateToLastEditLocation", + exec: function (editor) { + var lastDelta = editor.session.getUndoManager().$lastDelta; + var range = (lastDelta.action == "remove") ? lastDelta.start : lastDelta.end; + editor.moveCursorTo(range.row, range.column); + editor.clearSelection(); + } + }, { + name: "replaceAll", + exec: function (editor) { + if (!editor.searchBox) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, true); + }); + } + else { + if (editor.searchBox.active === true && editor.searchBox.replaceOption.checked === true) { + editor.searchBox.replaceAll(); + } + } + } + }, { + name: "replaceOne", + exec: function (editor) { + if (!editor.searchBox) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, true); + }); + } + else { + if (editor.searchBox.active === true && editor.searchBox.replaceOption.checked === true) { + editor.searchBox.replace(); + } + } + } + }, { + name: "selectAllMatches", + exec: function (editor) { + if (!editor.searchBox) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, false); + }); + } + else { + if (editor.searchBox.active === true) { + editor.searchBox.findAll(); + } + } + } + }, { + name: "toggleFindCaseSensitive", + exec: function (editor) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, false); + var sb = editor.searchBox; + sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; + sb.$syncOptions(); + }); + } + }, { + name: "toggleFindInSelection", + exec: function (editor) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, false); + var sb = editor.searchBox; + sb.searchOption.checked = !sb.searchRange; + sb.setSearchRange(sb.searchOption.checked && sb.editor.getSelectionRange()); + sb.$syncOptions(); + }); + } + }, { + name: "toggleFindRegex", + exec: function (editor) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, false); + var sb = editor.searchBox; + sb.regExpOption.checked = !sb.regExpOption.checked; + sb.$syncOptions(); + }); + } + }, { + name: "toggleFindWholeWord", + exec: function (editor) { + config.loadModule("ace/ext/searchbox", function (e) { + e.Search(editor, false); + var sb = editor.searchBox; + sb.wholeWordOption.checked = !sb.wholeWordOption.checked; + sb.$syncOptions(); + }); + } + }, { + name: "removeSecondaryCursors", + exec: function (editor) { + var ranges = editor.selection.ranges; + if (ranges && ranges.length > 1) + editor.selection.toSingleRange(ranges[ranges.length - 1]); + else + editor.selection.clearSelection(); + } + }]); +[{ + bindKey: { mac: "Ctrl-G", win: "Ctrl-G" }, + name: "gotoline" + }, { + bindKey: { mac: "Command-Shift-L|Command-F2", win: "Ctrl-Shift-L|Ctrl-F2" }, + name: "findAll" + }, { + bindKey: { mac: "Shift-F8|Shift-Option-F8", win: "Shift-F8|Shift-Alt-F8" }, + name: "goToPreviousError" + }, { + bindKey: { mac: "F8|Option-F8", win: "F8|Alt-F8" }, + name: "goToNextError" + }, { + bindKey: { mac: "Command-Shift-P|F1", win: "Ctrl-Shift-P|F1" }, + name: "openCommandPalette" + }, { + bindKey: { mac: "Shift-Option-Up", win: "Alt-Shift-Up" }, + name: "copylinesup" + }, { + bindKey: { mac: "Shift-Option-Down", win: "Alt-Shift-Down" }, + name: "copylinesdown" + }, { + bindKey: { mac: "Command-Shift-K", win: "Ctrl-Shift-K" }, + name: "removeline" + }, { + bindKey: { mac: "Command-Enter", win: "Ctrl-Enter" }, + name: "addLineAfter" + }, { + bindKey: { mac: "Command-Shift-Enter", win: "Ctrl-Shift-Enter" }, + name: "addLineBefore" + }, { + bindKey: { mac: "Command-Shift-\\", win: "Ctrl-Shift-\\" }, + name: "jumptomatching" + }, { + bindKey: { mac: "Command-]", win: "Ctrl-]" }, + name: "blockindent" + }, { + bindKey: { mac: "Command-[", win: "Ctrl-[" }, + name: "blockoutdent" + }, { + bindKey: { mac: "Ctrl-PageDown", win: "Alt-PageDown" }, + name: "pagedown" + }, { + bindKey: { mac: "Ctrl-PageUp", win: "Alt-PageUp" }, + name: "pageup" + }, { + bindKey: { mac: "Shift-Option-A", win: "Shift-Alt-A" }, + name: "toggleBlockComment" + }, { + bindKey: { mac: "Option-Z", win: "Alt-Z" }, + name: "toggleWordWrap" + }, { + bindKey: { mac: "Command-G", win: "F3|Ctrl-K Ctrl-D" }, + name: "findnext" + }, { + bindKey: { mac: "Command-Shift-G", win: "Shift-F3" }, + name: "findprevious" + }, { + bindKey: { mac: "Option-Enter", win: "Alt-Enter" }, + name: "selectAllMatches" + }, { + bindKey: { mac: "Command-D", win: "Ctrl-D" }, + name: "selectMoreAfter" + }, { + bindKey: { mac: "Command-K Command-D", win: "Ctrl-K Ctrl-D" }, + name: "selectOrFindNext" + }, { + bindKey: { mac: "Shift-Option-I", win: "Shift-Alt-I" }, + name: "splitSelectionIntoLines" + }, { + bindKey: { mac: "Command-K M", win: "Ctrl-K M" }, + name: "modeSelect" + }, { + bindKey: { mac: "Command-Option-[", win: "Ctrl-Shift-[" }, + name: "toggleFoldWidget" + }, { + bindKey: { mac: "Command-Option-]", win: "Ctrl-Shift-]" }, + name: "toggleFoldWidget" + }, { + bindKey: { mac: "Command-K Command-0", win: "Ctrl-K Ctrl-0" }, + name: "foldall" + }, { + bindKey: { mac: "Command-K Command-J", win: "Ctrl-K Ctrl-J" }, + name: "unfoldall" + }, { + bindKey: { mac: "Command-K Command-1", win: "Ctrl-K Ctrl-1" }, + name: "foldOther" + }, { + bindKey: { mac: "Command-K Command-Q", win: "Ctrl-K Ctrl-Q" }, + name: "navigateToLastEditLocation" + }, { + bindKey: { mac: "Command-K Command-R|Command-K Command-S", win: "Ctrl-K Ctrl-R|Ctrl-K Ctrl-S" }, + name: "showKeyboardShortcuts" + }, { + bindKey: { mac: "Command-K Command-X", win: "Ctrl-K Ctrl-X" }, + name: "trimTrailingSpace" + }, { + bindKey: { mac: "Shift-Down|Command-Shift-Down", win: "Shift-Down|Ctrl-Shift-Down" }, + name: "selectdown" + }, { + bindKey: { mac: "Shift-Up|Command-Shift-Up", win: "Shift-Up|Ctrl-Shift-Up" }, + name: "selectup" + }, { + bindKey: { mac: "Command-Alt-Enter", win: "Ctrl-Alt-Enter" }, + name: "replaceAll" + }, { + bindKey: { mac: "Command-Shift-1", win: "Ctrl-Shift-1" }, + name: "replaceOne" + }, { + bindKey: { mac: "Option-C", win: "Alt-C" }, + name: "toggleFindCaseSensitive" + }, { + bindKey: { mac: "Option-L", win: "Alt-L" }, + name: "toggleFindInSelection" + }, { + bindKey: { mac: "Option-R", win: "Alt-R" }, + name: "toggleFindRegex" + }, { + bindKey: { mac: "Option-W", win: "Alt-W" }, + name: "toggleFindWholeWord" + }, { + bindKey: { mac: "Command-L", win: "Ctrl-L" }, + name: "expandtoline" + }, { + bindKey: { mac: "Shift-Esc", win: "Shift-Esc" }, + name: "removeSecondaryCursors" + } +].forEach(function (binding) { + var command = exports.handler.commands[binding.name]; + if (command) + command.bindKey = binding.bindKey; + exports.handler.bindKey(binding.bindKey, command || binding.name); +}); + +}); (function() { + window.require(["ace/keyboard/vscode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-abap.js b/ui/base1/ace/mode-abap.js new file mode 100644 index 0000000..fa6e26a --- /dev/null +++ b/ui/base1/ace/mode-abap.js @@ -0,0 +1,200 @@ +define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * based on + * " Vim ABAP syntax file + * " Language: SAP - ABAP/R4 + * " Revision: 2.1 + * " Maintainer: Marius Piedallu van Wyk + * " Last Change: 2012 Oct 23 + */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AbapHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": "ADD ALIAS ALIASES ASCENDING ASSERT ASSIGN ASSIGNING AT BACK" + + " CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY" + + " DATA DEFINE DEFINITION DEFERRED DELETE DESCENDING DESCRIBE DETAIL DIVIDE DO" + + " ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT" + + " FETCH FIELDS FORM FORMAT FREE FROM FUNCTION" + + " GENERATE GET" + + " HIDE" + + " IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION" + + " LEAVE LIKE LINE LOAD LOCAL LOOP" + + " MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY" + + " ON OVERLAY OPTIONAL OTHERS" + + " PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT" + + " RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURN RETURNING ROLLBACK" + + " SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS" + + " TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES" + + " UNASSIGN ULINE UNPACK UPDATE" + + " WHEN WHILE WINDOW WRITE" + + " OCCURS STRUCTURE OBJECT PROPERTY" + + " CASTING APPEND RAISING VALUE COLOR" + + " CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT" + + " ID NUMBER FOR TITLE OUTPUT" + + " WITH EXIT USING" + + " INTO WHERE GROUP BY HAVING ORDER BY SINGLE" + + " APPENDING CORRESPONDING FIELDS OF TABLE" + + " LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING" + + " EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN", + "constant.language": "TRUE FALSE NULL SPACE", + "support.type": "c n i p f d t x string xstring decfloat16 decfloat34", + "keyword.operator": "abs sign ceil floor trunc frac acos asin atan cos sin tan" + + " abapOperator cosh sinh tanh exp log log10 sqrt" + + " strlen xstrlen charlen numofchar dbmaxlen lines" + }, "text", true, " "); + var compoundKeywords = "WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|" + + "EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|" + + "END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|" + + "RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|" + + "WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|" + + "(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)" + + "(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|" + + "LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|" + + "CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|" + + "FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|" + + "NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|" + + "START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|" + + "TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|" + + "IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)"; + this.$rules = { + "start": [ + { token: "string", regex: "`", next: "string" }, + { token: "string", regex: "'", next: "qstring" }, + { token: "doc.comment", regex: /^\*.+/ }, + { token: "comment", regex: /".+$/ }, + { token: "invalid", regex: "\\.{2,}" }, + { token: "keyword.operator", regex: /\W[\-+%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/ }, + { token: "paren.lparen", regex: "[\\[({]" }, + { token: "paren.rparen", regex: "[\\])}]" }, + { token: "constant.numeric", regex: "[+-]?\\d+\\b" }, + { token: "variable.parameter", regex: /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/ }, + { token: "keyword", regex: compoundKeywords }, + { token: "variable.parameter", regex: /\w+-\w[\-\w]*/ }, + { token: keywordMapper, regex: "\\b\\w+\\b" }, + { caseInsensitive: true } + ], + "qstring": [ + { token: "constant.language.escape", regex: "''" }, + { token: "string", regex: "'", next: "start" }, + { defaultToken: "string" } + ], + "string": [ + { token: "constant.language.escape", regex: "``" }, + { token: "string", regex: "`", next: "start" }, + { defaultToken: "string" } + ] + }; +}; +oop.inherits(AbapHighlightRules, TextHighlightRules); +exports.AbapHighlightRules = AbapHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module){"use strict"; +var Rules = require("./abap_highlight_rules").AbapHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Range = require("../range").Range; +var TextMode = require("./text").Mode; +var oop = require("../lib/oop"); +function Mode() { + this.HighlightRules = Rules; + this.foldingRules = new FoldMode(); +} +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = '"'; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + return indent; + }; + this.$id = "ace/mode/abap"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/abap"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-abc.js b/ui/base1/ace/mode-abc.js new file mode 100644 index 0000000..e93f435 --- /dev/null +++ b/ui/base1/ace/mode-abc.js @@ -0,0 +1,243 @@ +define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was partially autogenerated from https://github.com/jimhawkridge/SublimeABC + + Modifications + + - more classes to express the abc semantic + - added syntax highlighting for Zupfnoter conventions (https://github.com/bwl21/zupfnoter) + - separate note pitch and note duration - even if it looks the same + + ***********************************************************************************************/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ABCHighlightRules = function () { + this.$rules = { + start: [ + { + token: ['zupfnoter.information.comment.line.percentage', 'information.keyword', 'in formation.keyword.embedded'], + regex: '(%%%%)(hn\\.[a-z]*)(.*)', + comment: 'Instruction Comment' + }, + { + token: ['information.comment.line.percentage', 'information.keyword.embedded'], + regex: '(%%)(.*)', + comment: 'Instruction Comment' + }, + { + token: 'comment.line.percentage', + regex: '%.*', + comment: 'Comments' + }, + { + token: 'barline.keyword.operator', + regex: '[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+', + comment: 'Bar lines' + }, + { + token: ['information.keyword.embedded', 'information.argument.string.unquoted'], + regex: '(\\[[A-Za-z]:)([^\\]]*\\])', + comment: 'embedded Header lines' + }, + { + token: ['information.keyword', 'information.argument.string.unquoted'], + regex: '^([A-Za-z]:)([^%\\\\]*)', + comment: 'Header lines' + }, + { + token: ['text', 'entity.name.function', 'string.unquoted', 'text'], + regex: '(\\[)([A-Z]:)(.*?)(\\])', + comment: 'Inline fields' + }, + { + token: ['accent.constant.language', 'pitch.constant.numeric', 'duration.constant.numeric'], + regex: '([\\^=_]*)([A-Ga-gz][,\']*)([0-9]*/*[><0-9]*)', + comment: 'Notes' + }, + { + token: 'zupfnoter.jumptarget.string.quoted', + regex: '[\\"!]\\^\\:.*?[\\"!]', + comment: 'Zupfnoter jumptarget' + }, { + token: 'zupfnoter.goto.string.quoted', + regex: '[\\"!]\\^\\@.*?[\\"!]', + comment: 'Zupfnoter goto' + }, + { + token: 'zupfnoter.annotation.string.quoted', + regex: '[\\"!]\\^\\!.*?[\\"!]', + comment: 'Zupfnoter annoation' + }, + { + token: 'zupfnoter.annotationref.string.quoted', + regex: '[\\"!]\\^\\#.*?[\\"!]', + comment: 'Zupfnoter annotation reference' + }, + { + token: 'chordname.string.quoted', + regex: '[\\"!]\\^.*?[\\"!]', + comment: 'abc chord' + }, + { + token: 'string.quoted', + regex: '[\\"!].*?[\\"!]', + comment: 'abc annotation' + } + ] + }; + this.normalizeRules(); +}; +ABCHighlightRules.metaData = { + fileTypes: ['abc'], + name: 'ABC', + scopeName: 'text.abcnotation' +}; +oop.inherits(ABCHighlightRules, TextHighlightRules); +exports.ABCHighlightRules = ABCHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js + */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ABCHighlightRules = require("./abc_highlight_rules").ABCHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ABCHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "%"; + this.$id = "ace/mode/abc"; + this.snippetFileId = "ace/snippets/abc"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/abc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-actionscript.js b/ui/base1/ace/mode-actionscript.js new file mode 100644 index 0000000..2dc1fae --- /dev/null +++ b/ui/base1/ace/mode-actionscript.js @@ -0,0 +1,234 @@ +define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from tm bundles\actionscript.tmbundle\Syntaxes\ActionScript.plist (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ActionScriptHighlightRules = function () { + this.$rules = { start: [{ token: 'support.class.actionscript.2', + regex: '\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b' }, + { token: 'support.function.actionscript.2', + regex: '\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b' }, + { token: 'support.constant.actionscript.2', + regex: '\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b' }, + { token: 'keyword.control.actionscript.2', + regex: '\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b' }, + { token: 'storage.type.actionscript.2', + regex: '\\b(?:Boolean|Number|String|Void)\\b' }, + { token: 'constant.language.actionscript.2', + regex: '\\b(?:null|undefined|true|false)\\b' }, + { token: 'constant.numeric.actionscript.2', + regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b' }, + { token: 'punctuation.definition.string.begin.actionscript.2', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.actionscript.2', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.actionscript.2', + regex: '\\\\.' }, + { defaultToken: 'string.quoted.double.actionscript.2' }] }, + { token: 'punctuation.definition.string.begin.actionscript.2', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.actionscript.2', + regex: '\'', + next: 'pop' }, + { token: 'constant.character.escape.actionscript.2', + regex: '\\\\.' }, + { defaultToken: 'string.quoted.single.actionscript.2' }] }, + { token: 'support.constant.actionscript.2', + regex: '\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b' }, + { token: 'punctuation.definition.comment.actionscript.2', + regex: '/\\*', + push: [{ token: 'punctuation.definition.comment.actionscript.2', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.actionscript.2' }] }, + { token: 'punctuation.definition.comment.actionscript.2', + regex: '//.*$', + push_: [{ token: 'comment.line.double-slash.actionscript.2', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-slash.actionscript.2' }] }, + { token: 'keyword.operator.actionscript.2', + regex: '\\binstanceof\\b' }, + { token: 'keyword.operator.symbolic.actionscript.2', + regex: '[-!%&*+=/?:]' }, + { token: ['meta.preprocessor.actionscript.2', + 'punctuation.definition.preprocessor.actionscript.2', + 'meta.preprocessor.actionscript.2'], + regex: '^([ \\t]*)(#)([a-zA-Z]+)' }, + { token: ['storage.type.function.actionscript.2', + 'meta.function.actionscript.2', + 'entity.name.function.actionscript.2', + 'meta.function.actionscript.2', + 'punctuation.definition.parameters.begin.actionscript.2'], + regex: '\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()', + push: [{ token: 'punctuation.definition.parameters.end.actionscript.2', + regex: '\\)', + next: 'pop' }, + { token: 'variable.parameter.function.actionscript.2', + regex: '[^,)$]+' }, + { defaultToken: 'meta.function.actionscript.2' }] }, + { token: ['storage.type.class.actionscript.2', + 'meta.class.actionscript.2', + 'entity.name.type.class.actionscript.2', + 'meta.class.actionscript.2', + 'storage.modifier.extends.actionscript.2', + 'meta.class.actionscript.2', + 'entity.other.inherited-class.actionscript.2'], + regex: '\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?' }] }; + this.normalizeRules(); +}; +ActionScriptHighlightRules.metaData = { fileTypes: ['as'], + keyEquivalent: '^~A', + name: 'ActionScript', + scopeName: 'source.actionscript.2' }; +oop.inherits(ActionScriptHighlightRules, TextHighlightRules); +exports.ActionScriptHighlightRules = ActionScriptHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ActionScriptHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/actionscript"; + this.snippetFileId = "ace/snippets/actionscript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/actionscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ada.js b/ui/base1/ace/mode-ada.js new file mode 100644 index 0000000..fe91d70 --- /dev/null +++ b/ui/base1/ace/mode-ada.js @@ -0,0 +1,108 @@ +define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AdaHighlightRules = function () { + var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" + + "access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" + + "array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" + + "body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" + + "|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor"; + var builtinConstants = ("true|false|null"); + var builtinFunctions = ("count|min|max|avg|sum|rank|now|coalesce|main"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "--.*$" + }, { + token: "string", // " string + regex: '".*?"' + }, { + token: "string", // character + regex: "'.'" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }] + }; +}; +oop.inherits(AdaHighlightRules, TextHighlightRules); +exports.AdaHighlightRules = AdaHighlightRules; + +}); + +define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = AdaHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*(begin|loop|then|is|do)\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + var complete_line = line + input; + if (complete_line.match(/^\s*(begin|end)$/)) { + return true; + } + return false; + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine).length; + var indent = this.$getIndent(line).length; + if (indent <= prevIndent) { + return; + } + session.outdentRows(new Range(row, 0, row + 2, 0)); + }; + this.$id = "ace/mode/ada"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ada"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-alda.js b/ui/base1/ace/mode-alda.js new file mode 100644 index 0000000..b54df15 --- /dev/null +++ b/ui/base1/ace/mode-alda.js @@ -0,0 +1,279 @@ +define("ace/mode/alda_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from ../../src/alda.JSON-tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AldaHighlightRules = function () { + this.$rules = { + pitch: [{ + token: "variable.parameter.operator.pitch.alda", + regex: /(?:[+\-]+|\=)/ + }, { + token: "", + regex: "", + next: "timing" + }], + timing: [{ + token: "string.quoted.operator.timing.alda", + regex: /\d+(?:s|ms)?/ + }, { + token: "", + regex: "", + next: "start" + }], + start: [{ + token: [ + "constant.language.instrument.alda", + "constant.language.instrument.alda", + "meta.part.call.alda", + "storage.type.nickname.alda", + "meta.part.call.alda" + ], + regex: /^([a-zA-Z]{2}[\w\-+\'()]*)((?:\s*\/\s*[a-zA-Z]{2}[\w\-+\'()]*)*)(?:(\s*)(\"[a-zA-Z]{2}[\w\-+\'()]*\"))?(\s*:)/ + }, { + token: [ + "text", + "entity.other.inherited-class.voice.alda", + "text" + ], + regex: /^(\s*)(V\d+)(:)/ + }, { + token: "comment.line.number-sign.alda", + regex: /#.*$/ + }, { + token: "entity.name.function.pipe.measure.alda", + regex: /\|/ + }, { + token: "comment.block.inline.alda", + regex: /\(comment\b/, + push: [{ + token: "comment.block.inline.alda", + regex: /\)/, + next: "pop" + }, { + defaultToken: "comment.block.inline.alda" + }] + }, { + token: "entity.name.function.marker.alda", + regex: /%[a-zA-Z]{2}[\w\-+\'()]*/ + }, { + token: "entity.name.function.at-marker.alda", + regex: /@[a-zA-Z]{2}[\w\-+\'()]*/ + }, { + token: "keyword.operator.octave-change.alda", + regex: /\bo\d+\b/ + }, { + token: "keyword.operator.octave-shift.alda", + regex: /[><]/ + }, { + token: "keyword.operator.repeat.alda", + regex: /\*\s*\d+/ + }, { + token: "string.quoted.operator.timing.alda", + regex: /[.]|r\d*(?:s|ms)?/ + }, { + token: "text", + regex: /([cdefgab])/, + next: "pitch" + }, { + token: "string.quoted.operator.timing.alda", + regex: /~/, + next: "timing" + }, { + token: "punctuation.section.embedded.cram.alda", + regex: /\}/, + next: "timing" + }, { + token: "constant.numeric.subchord.alda", + regex: /\// + }, { + todo: { + token: "punctuation.section.embedded.cram.alda", + regex: /\{/, + push: [{ + token: "punctuation.section.embedded.cram.alda", + regex: /\}/, + next: "pop" + }, { + include: "$self" + }] + } + }, { + todo: { + token: "keyword.control.sequence.alda", + regex: /\[/, + push: [{ + token: "keyword.control.sequence.alda", + regex: /\]/, + next: "pop" + }, { + include: "$self" + }] + } + }, { + token: "meta.inline.clojure.alda", + regex: /\(/, + push: [{ + token: "meta.inline.clojure.alda", + regex: /\)/, + next: "pop" + }, { + include: "source.clojure" + }, { + defaultToken: "meta.inline.clojure.alda" + }] + }] + }; + this.normalizeRules(); +}; +AldaHighlightRules.metaData = { + scopeName: "source.alda", + fileTypes: ["alda"], + name: "Alda" +}; +oop.inherits(AldaHighlightRules, TextHighlightRules); +exports.AldaHighlightRules = AldaHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/alda",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/alda_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AldaHighlightRules = require("./alda_highlight_rules").AldaHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = AldaHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/alda"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/alda"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-apache_conf.js b/ui/base1/ace/mode-apache_conf.js new file mode 100644 index 0000000..237e73e --- /dev/null +++ b/ui/base1/ace/mode-apache_conf.js @@ -0,0 +1,318 @@ +define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.github.com/colinta/ApacheConf.tmLanguage/master/ApacheConf.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ApacheConfHighlightRules = function () { + this.$rules = { start: [{ token: ['punctuation.definition.comment.apacheconf', + 'comment.line.hash.ini', + 'comment.line.hash.ini'], + regex: '^((?:\\s)*)(#)(.*$)' }, + { token: ['punctuation.definition.tag.apacheconf', + 'entity.tag.apacheconf', + 'text', + 'string.value.apacheconf', + 'punctuation.definition.tag.apacheconf'], + regex: '(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)' }, + { token: ['punctuation.definition.tag.apacheconf', + 'entity.tag.apacheconf', + 'punctuation.definition.tag.apacheconf'], + regex: '()' }, + { token: ['keyword.alias.apacheconf', 'text', + 'string.regexp.apacheconf', 'text', + 'string.replacement.apacheconf', 'text'], + regex: '(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)' }, + { token: ['keyword.alias.apacheconf', 'text', + 'entity.status.apacheconf', 'text', + 'string.regexp.apacheconf', 'text', + 'string.path.apacheconf', 'text'], + regex: '(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, + { token: ['keyword.alias.apacheconf', 'text', + 'entity.status.apacheconf', 'text', + 'string.path.apacheconf', 'text', + 'string.path.apacheconf', 'text'], + regex: '(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, + { token: ['keyword.alias.apacheconf', 'text', + 'string.regexp.apacheconf', 'text', + 'string.path.apacheconf', 'text'], + regex: '(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?' }, + { token: ['keyword.alias.apacheconf', 'text', + 'string.path.apacheconf', 'text', + 'string.path.apacheconf', 'text'], + regex: '(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, + { token: 'keyword.core.apacheconf', + regex: '\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b' }, + { token: 'keyword.mpm.apacheconf', + regex: '\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b' }, + { token: 'keyword.access.apacheconf', + regex: '\\b(?:Allow|Deny|Order)\\b' }, + { token: 'keyword.actions.apacheconf', + regex: '\\b(?:Action|Script)\\b' }, + { token: 'keyword.alias.apacheconf', + regex: '\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b' }, + { token: 'keyword.auth.apacheconf', + regex: '\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b' }, + { token: 'keyword.auth_anon.apacheconf', + regex: '\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b' }, + { token: 'keyword.auth_dbm.apacheconf', + regex: '\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b' }, + { token: 'keyword.auth_digest.apacheconf', + regex: '\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b' }, + { token: 'keyword.auth_ldap.apacheconf', + regex: '\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b' }, + { token: 'keyword.autoindex.apacheconf', + regex: '\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b' }, + { token: 'keyword.cache.apacheconf', + regex: '\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b' }, + { token: 'keyword.cern_meta.apacheconf', + regex: '\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b' }, + { token: 'keyword.cgi.apacheconf', + regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b' }, + { token: 'keyword.cgid.apacheconf', + regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b' }, + { token: 'keyword.charset_lite.apacheconf', + regex: '\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b' }, + { token: 'keyword.dav.apacheconf', + regex: '\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b' }, + { token: 'keyword.deflate.apacheconf', + regex: '\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b' }, + { token: 'keyword.dir.apacheconf', + regex: '\\b(?:DirectoryIndex|DirectorySlash)\\b' }, + { token: 'keyword.disk_cache.apacheconf', + regex: '\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b' }, + { token: 'keyword.dumpio.apacheconf', + regex: '\\b(?:DumpIOInput|DumpIOOutput)\\b' }, + { token: 'keyword.env.apacheconf', + regex: '\\b(?:PassEnv|SetEnv|UnsetEnv)\\b' }, + { token: 'keyword.expires.apacheconf', + regex: '\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b' }, + { token: 'keyword.ext_filter.apacheconf', + regex: '\\b(?:ExtFilterDefine|ExtFilterOptions)\\b' }, + { token: 'keyword.file_cache.apacheconf', + regex: '\\b(?:CacheFile|MMapFile)\\b' }, + { token: 'keyword.headers.apacheconf', + regex: '\\b(?:Header|RequestHeader)\\b' }, + { token: 'keyword.imap.apacheconf', + regex: '\\b(?:ImapBase|ImapDefault|ImapMenu)\\b' }, + { token: 'keyword.include.apacheconf', + regex: '\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b' }, + { token: 'keyword.isapi.apacheconf', + regex: '\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b' }, + { token: 'keyword.ldap.apacheconf', + regex: '\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b' }, + { token: 'keyword.log.apacheconf', + regex: '\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b' }, + { token: 'keyword.mem_cache.apacheconf', + regex: '\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b' }, + { token: 'keyword.mime.apacheconf', + regex: '\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b' }, + { token: 'keyword.misc.apacheconf', + regex: '\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b' }, + { token: 'keyword.negotiation.apacheconf', + regex: '\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b' }, + { token: 'keyword.nw_ssl.apacheconf', + regex: '\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b' }, + { token: 'keyword.proxy.apacheconf', + regex: '\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b' }, + { token: 'keyword.rewrite.apacheconf', + regex: '\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b' }, + { token: 'keyword.setenvif.apacheconf', + regex: '\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b' }, + { token: 'keyword.so.apacheconf', + regex: '\\b(?:LoadFile|LoadModule)\\b' }, + { token: 'keyword.ssl.apacheconf', + regex: '\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b' }, + { token: 'keyword.usertrack.apacheconf', + regex: '\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b' }, + { token: 'keyword.vhost_alias.apacheconf', + regex: '\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b' }, + { token: ['keyword.php.apacheconf', + 'text', + 'entity.property.apacheconf', + 'text', + 'string.value.apacheconf', + 'text'], + regex: '\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)' }, + { token: ['punctuation.variable.apacheconf', + 'variable.env.apacheconf', + 'variable.misc.apacheconf', + 'punctuation.variable.apacheconf'], + regex: '(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})' }, + { token: ['entity.mime-type.apacheconf', 'text'], + regex: '\\b((?:text|image|application|video|audio)/.+?)(\\s)' }, + { token: 'entity.helper.apacheconf', + regex: '\\b(?:from|unset|set|on|off)\\b', + caseInsensitive: true }, + { token: 'constant.integer.apacheconf', regex: '\\b\\d+\\b' }, + { token: ['text', + 'punctuation.definition.flag.apacheconf', + 'string.flag.apacheconf', + 'punctuation.definition.flag.apacheconf', + 'text'], + regex: '(\\s)(\\[)(.*?)(\\])(\\s)' }] }; + this.normalizeRules(); +}; +ApacheConfHighlightRules.metaData = { fileTypes: ['conf', + 'CONF', + 'htaccess', + 'HTACCESS', + 'htgroups', + 'HTGROUPS', + 'htpasswd', + 'HTPASSWD', + '.htaccess', + '.HTACCESS', + '.htgroups', + '.HTGROUPS', + '.htpasswd', + '.HTPASSWD'], + name: 'Apache Conf', + scopeName: 'source.apacheconf' }; +oop.inherits(ApacheConfHighlightRules, TextHighlightRules); +exports.ApacheConfHighlightRules = ApacheConfHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ApacheConfHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/apache_conf"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/apache_conf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-apex.js b/ui/base1/ace/mode-apex.js new file mode 100644 index 0000000..584b250 --- /dev/null +++ b/ui/base1/ace/mode-apex.js @@ -0,0 +1,402 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/apex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("../mode/text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = require("../mode/doc_comment_highlight_rules").DocCommentHighlightRules; +var ApexHighlightRules = function () { + var mainKeywordMapper = this.createKeywordMapper({ + "variable.language": "activate|any|autonomous|begin|bigdecimal|byte|cast|char|collect|const" + + "|end|exit|export|float|goto|group|having|hint|import|inner|into|join|loop|number|object|of|outer" + + "|parallel|pragma|retrieve|returning|search|short|stat|synchronized|then|this_month" + + "|transaction|type|when", + "keyword": "private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final" + + "|and|array|as|asc|break|bulk|by|catch|class|commit|continue|convertcurrency" + + "|delete|desc|do|else|enum|extends|false|final|finally|for|from|future|global" + + "|if|implements|in|insert|instanceof|interface|last_90_days|last_month" + + "|last_n_days|last_week|like|limit|list|map|merge|new|next_90_days|next_month|next_n_days" + + "|next_week|not|null|nulls|on|or|override|package|return" + + "|rollback|savepoint|select|set|sort|super|testmethod|this|this_week|throw|today" + + "|tolabel|tomorrow|trigger|true|try|undelete|update|upsert|using|virtual|webservice" + + "|where|while|yesterday|switch|case|default", + "storage.type": "def|boolean|byte|char|short|int|float|pblob|date|datetime|decimal|double|id|integer|long|string|time|void|blob|Object", + "constant.language": "true|false|null|after|before|count|excludes|first|includes|last|order|sharing|with", + "support.function": "system|apex|label|apexpages|userinfo|schema" + }, "identifier", true); + function keywordMapper(value) { + if (value.slice(-3) == "__c") + return "support.function"; + return mainKeywordMapper(value); + } + function string(start, options) { + return { + regex: start + (options.multiline ? "" : "(?=.)"), + token: "string.start", + next: [{ + regex: options.escape, + token: "character.escape" + }, { + regex: options.error, + token: "error.invalid" + }, { + regex: start + (options.multiline ? "" : "|$"), + token: "string.end", + next: options.next || "start" + }, { + defaultToken: "string" + }] + }; + } + function comments() { + return [{ + token: "comment", + regex: "\\/\\/(?=.)", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: "start" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: "start" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; + } + this.$rules = { + start: [ + string("'", { + escape: /\\[nb'"\\]/, + error: /\\./, + multiline: false + }), + comments("c"), + { + type: "decoration", + token: [ + "meta.package.apex", + "keyword.other.package.apex", + "meta.package.apex", + "storage.modifier.package.apex", + "meta.package.apex", + "punctuation.terminator.apex" + ], + regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*)((?:;)?))?/ + }, { + regex: /@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, + token: "constant.language" + }, + { + regex: /[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, + token: keywordMapper + }, + { + regex: "`#%", + token: "error.invalid" + }, { + token: "constant.numeric", // float + regex: /[+-]?\d+(?:(?:\.\d*)?(?:[LlDdEe][+-]?\d+)?)\b|\.\d+[LlDdEe]/ + }, { + token: "keyword.operator", + regex: /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[]/, + next: "maybe_soql", + merge: false + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start", + merge: false + }, { + token: "paren.rparen", + regex: /[\])}]/, + merge: false + } + ], + maybe_soql: [{ + regex: /\s+/, + token: "text" + }, { + regex: /(SELECT|FIND)\b/, + token: "keyword", + caseInsensitive: true, + next: "soql" + }, { + regex: "", + token: "none", + next: "start" + }], + soql: [{ + regex: "(:?ASC|BY|CATEGORY|CUBE|DATA|DESC|END|FIND|FIRST|FOR|FROM|GROUP|HAVING|IN|LAST" + + "|LIMIT|NETWORK|NULLS|OFFSET|ORDER|REFERENCE|RETURNING|ROLLUP|SCOPE|SELECT" + + "|SNIPPET|TRACKING|TYPEOF|UPDATE|USING|VIEW|VIEWSTAT|WHERE|WITH|AND|OR)\\b", + token: "keyword", + caseInsensitive: true + }, { + regex: "(:?target_length|toLabel|convertCurrency|count|Contact|Account|User|FIELDS)\\b", + token: "support.function", + caseInsensitive: true + }, { + token: "paren.rparen", + regex: /[\]]/, + next: "start", + merge: false + }, + string("'", { + escape: /\\[nb'"\\]/, + error: /\\./, + multiline: false, + next: "soql" + }), + string('"', { + escape: /\\[nb'"\\]/, + error: /\\./, + multiline: false, + next: "soql" + }), + { + regex: /\\./, + token: "character.escape" + }, + { + regex: /[\?\&\|\!\{\}\[\]\(\)\^\~\*\:\"\'\+\-\,\.=\\\/]/, + token: "keyword.operator" + }], + "log-start": [{ + token: "timestamp.invisible", + regex: /^[\d:.() ]+\|/, + next: "log-header" + }, { + token: "timestamp.invisible", + regex: /^ (Number of|Maximum)[^:]*:/, + next: "log-comment" + }, { + token: "invisible", + regex: /^Execute Anonymous:/, + next: "log-comment" + }, { + defaultToken: "text" + }], + "log-comment": [{ + token: "log-comment", + regex: /.*$/, + next: "log-start" + }], + "log-header": [{ + token: "timestamp.invisible", + regex: /((USER_DEBUG|\[\d+\]|DEBUG)\|)+/ + }, + { + token: "keyword", + regex: "(?:EXECUTION_FINISHED|EXECUTION_STARTED|CODE_UNIT_STARTED" + + "|CUMULATIVE_LIMIT_USAGE|LIMIT_USAGE_FOR_NS" + + "|CUMULATIVE_LIMIT_USAGE_END|CODE_UNIT_FINISHED)" + }, { + regex: "", + next: "log-start" + }] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(ApexHighlightRules, TextHighlightRules); +exports.ApexHighlightRules = ApexHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* caption: Apex; extensions: apex,cls,trigger,tgr */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("../mode/text").Mode; +var ApexHighlightRules = require("./apex_highlight_rules").ApexHighlightRules; +var FoldMode = require("../mode/folding/cstyle").FoldMode; +function ApexMode() { + TextMode.call(this); + this.HighlightRules = ApexHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +} +oop.inherits(ApexMode, TextMode); +ApexMode.prototype.lineCommentStart = "//"; +ApexMode.prototype.blockComment = { + start: "/*", + end: "*/" +}; +exports.Mode = ApexMode; + +}); (function() { + window.require(["ace/mode/apex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-applescript.js b/ui/base1/ace/mode-applescript.js new file mode 100644 index 0000000..d1525d4 --- /dev/null +++ b/ui/base1/ace/mode-applescript.js @@ -0,0 +1,232 @@ +define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AppleScriptHighlightRules = function () { + var keywords = ("about|above|after|against|and|around|as|at|back|before|beginning|" + + "behind|below|beneath|beside|between|but|by|considering|" + + "contain|contains|continue|copy|div|does|eighth|else|end|equal|" + + "equals|error|every|exit|fifth|first|for|fourth|from|front|" + + "get|given|global|if|ignoring|in|into|is|it|its|last|local|me|" + + "middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|" + + "reference|repeat|returning|script|second|set|seventh|since|" + + "sixth|some|tell|tenth|that|the|then|third|through|thru|" + + "timeout|times|to|transaction|try|until|where|while|whose|with|without"); + var builtinConstants = ("AppleScript|false|linefeed|return|pi|quote|result|space|tab|true"); + var builtinFunctions = ("activate|beep|count|delay|launch|log|offset|read|round|run|say|" + + "summarize|write"); + var builtinTypes = ("alias|application|boolean|class|constant|date|file|integer|list|" + + "number|real|record|string|text|character|characters|contents|day|" + + "frontmost|id|item|length|month|name|paragraph|paragraphs|rest|" + + "reverse|running|time|version|weekday|word|words|year"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "support.type": builtinTypes, + "keyword": keywords + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "--.*$" + }, + { + token: "comment", // multi line comment + regex: "\\(\\*", + next: "comment" + }, + { + token: "string", // " string + regex: '".*?"' + }, + { + token: "support.type", + regex: '\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b' + }, + { + token: "support.function", + regex: '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' + + 'mount volume|path to|(close|open for) access|(get|set) eof|' + + 'current date|do shell script|get volume settings|random number|' + + 'set volume|system attribute|system info|time to GMT|' + + '(load|run|store) script|scripting components|' + + 'ASCII (character|number)|localized string|' + + 'choose (application|color|file|file name|' + + 'folder|from list|remote application|URL)|' + + 'display (alert|dialog))\\b|^\\s*return\\b' + }, + { + token: "constant.language", + regex: '\\b(text item delimiters|current application|missing value)\\b' + }, + { + token: "keyword", + regex: '\\b(apart from|aside from|instead of|out of|greater than|' + + "isn't|(doesn't|does not) (equal|come before|come after|contain)|" + + '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' + + 'contained by|comes (before|after)|a (ref|reference))\\b' + }, + { + token: keywordMapper, + regex: "[a-zA-Z][a-zA-Z0-9_]*\\b" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\)", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(AppleScriptHighlightRules, TextHighlightRules); +exports.AppleScriptHighlightRules = AppleScriptHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AppleScriptHighlightRules = require("./applescript_highlight_rules").AppleScriptHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = AppleScriptHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "(*", end: "*)" }; + this.$id = "ace/mode/applescript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/applescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-aql.js b/ui/base1/ace/mode-aql.js new file mode 100644 index 0000000..5de8d00 --- /dev/null +++ b/ui/base1/ace/mode-aql.js @@ -0,0 +1,92 @@ +define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AqlHighlightRules = function () { + var keywords = ("for|return|filter|search|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|shortest_path|outbound|inbound|any|all|none|at least|aggregate|like|k_shortest_paths|k_paths|all_shortest_paths|prune|window"); + var builtinConstants = ("true|false"); + var builtinFunctions = ("to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|" + + "typename|json_stringify|json_parse|concat|concat_separator|char_length|lower|upper|substring|left|right|trim|reverse|contains|" + + "log|log2|log10|exp|exp2|sin|cos|tan|asin|acos|atan|atan2|radians|degrees|pi|regex_test|regex_replace|" + + "like|floor|ceil|round|abs|rand|sqrt|pow|length|count|min|max|average|avg|sum|product|median|variance_population|variance_sample|variance|percentile|" + + "bit_and|bit_or|bit_xor|bit_negate|bit_test|bit_popcount|bit_shift_left|bit_shift_right|bit_construct|bit_deconstruct|bit_to_string|bit_from_string|" + + "first|last|unique|outersection|interleave|in_range|jaccard|matches|merge|merge_recursive|has|attributes|keys|values|unset|unset_recursive|keep|keep_recursive|" + + "near|within|within_rectangle|is_in_polygon|distance|fulltext|stddev_sample|stddev_population|stddev|" + + "slice|nth|position|contains_array|translate|zip|call|apply|push|append|pop|shift|unshift|remove_value|remove_values|" + + "remove_nth|replace_nth|date_now|date_timestamp|date_iso8601|date_dayofweek|date_year|date_month|date_day|date_hour|" + + "date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_isoweekyear|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_round|" + + "date_add|date_subtract|date_diff|date_compare|date_format|date_utctolocal|date_localtoutc|date_timezone|date_timezones|" + + "fail|passthru|v8|sleep|schema_get|schema_validate|shard_id|call_greenspun|version|noopt|noeval|not_null|" + + "first_list|first_document|parse_identifier|current_user|current_database|collection_count|pregel_result|" + + "collections|document|decode_rev|range|union|union_distinct|minus|intersection|flatten|is_same_collection|check_document|" + + "ltrim|rtrim|find_first|find_last|split|substitute|ipv4_to_number|ipv4_from_number|is_ipv4|md5|sha1|sha512|crc32|fnv64|hash|random_token|to_base64|" + + "to_hex|encode_uri_component|soundex|assert|warn|is_key|sorted|sorted_unique|count_distinct|count_unique|" + + "levenshtein_distance|levenshtein_match|regex_matches|regex_split|ngram_match|ngram_similarity|ngram_positional_similarity|uuid|" + + "tokens|exists|starts_with|phrase|min_match|bm25|tfidf|boost|analyzer|" + + "cosine_similarity|decay_exp|decay_gauss|decay_linear|l1_distance|l2_distance|minhash|minhash_count|minhash_error|minhash_match|" + + "geo_point|geo_multipoint|geo_polygon|geo_multipolygon|geo_linestring|geo_multilinestring|geo_contains|geo_intersects|" + + "geo_equals|geo_distance|geo_area|geo_in_range"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "//.*$" + }, { + token: "string", // " string + regex: '".*?"' + }, { + token: "string", // ' string + regex: "'.*?'" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(AqlHighlightRules, TextHighlightRules); +exports.AqlHighlightRules = AqlHighlightRules; + +}); + +define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AqlHighlightRules = require("./aql_highlight_rules").AqlHighlightRules; +var Mode = function () { + this.HighlightRules = AqlHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/aql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/aql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-asciidoc.js b/ui/base1/ace/mode-asciidoc.js new file mode 100644 index 0000000..18574fe --- /dev/null +++ b/ui/base1/ace/mode-asciidoc.js @@ -0,0 +1,311 @@ +define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AsciidocHighlightRules = function () { + var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b"; + this.$rules = { + "start": [ + { token: "empty", regex: /$/ }, + { token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock" }, + { token: "literal", regex: /^-{4,}\s*$/, next: "literalBlock" }, + { token: "string", regex: /^\+{4,}\s*$/, next: "passthroughBlock" }, + { token: "keyword", regex: /^={4,}\s*$/ }, + { token: "text", regex: /^\s*$/ }, + { token: "empty", regex: "", next: "dissallowDelimitedBlock" } + ], + "dissallowDelimitedBlock": [ + { include: "paragraphEnd" }, + { token: "comment", regex: '^//.+$' }, + { token: "keyword", regex: "^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):" }, + { include: "listStart" }, + { token: "literal", regex: /^\s+.+$/, next: "indentedBlock" }, + { token: "empty", regex: "", next: "text" } + ], + "paragraphEnd": [ + { token: "doc.comment", regex: /^\/{4,}\s*$/, next: "commentBlock" }, + { token: "tableBlock", regex: /^\s*[|!]=+\s*$/, next: "tableBlock" }, + { token: "keyword", regex: /^(?:--|''')\s*$/, next: "start" }, + { token: "option", regex: /^\[.*\]\s*$/, next: "start" }, + { token: "pageBreak", regex: /^>{3,}$/, next: "start" }, + { token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock" }, + { token: "titleUnderline", regex: /^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/, next: "start" }, + { token: "singleLineTitle", regex: /^={1,5}\s+\S.*$/, next: "start" }, + { token: "otherBlock", regex: /^(?:\*{2,}|_{2,})\s*$/, next: "start" }, + { token: "optionalTitle", regex: /^\.[^.\s].+$/, next: "start" } + ], + "listStart": [ + { token: "keyword", regex: /^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/, next: "listText" }, + { token: "meta.tag", regex: /^.+(?::{2,4}|;;)(?: |$)/, next: "listText" }, + { token: "support.function.list.callout", regex: /^(?:<\d+>|\d+>|>) /, next: "text" }, + { token: "keyword", regex: /^\+\s*$/, next: "start" } + ], + "text": [ + { token: ["link", "variable.language"], regex: /((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/ }, + { token: "link", regex: /(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/ }, + { token: "link", regex: /\b[\w\.\/\-]+@[\w\.\/\-]+\b/ }, + { include: "macros" }, + { include: "paragraphEnd" }, + { token: "literal", regex: /\+{3,}/, next: "smallPassthrough" }, + { token: "escape", regex: /\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/ }, + { token: "escape", regex: /\\[_*'`+#]|\\{2}[_*'`+#]{2}/ }, + { token: "keyword", regex: /\s\+$/ }, + { token: "text", regex: identifierRe }, + { token: ["keyword", "string", "keyword"], + regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/ }, + { token: "keyword", regex: /<<[\w\d\-$]+,?|>>/ }, + { token: "constant.character", regex: /\({2,3}.*?\){2,3}/ }, + { token: "keyword", regex: /\[\[.+?\]\]/ }, + { token: "support", regex: /^\[{3}[\w\d =\-]+\]{3}/ }, + { include: "quotes" }, + { token: "empty", regex: /^\s*$/, next: "start" } + ], + "listText": [ + { include: "listStart" }, + { include: "text" } + ], + "indentedBlock": [ + { token: "literal", regex: /^[\s\w].+$/, next: "indentedBlock" }, + { token: "literal", regex: "", next: "start" } + ], + "listingBlock": [ + { token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock" }, + { token: "constant.numeric", regex: '<\\d+>' }, + { token: "literal", regex: '[^<]+' }, + { token: "literal", regex: '<' } + ], + "literalBlock": [ + { token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock" }, + { token: "constant.numeric", regex: '<\\d+>' }, + { token: "literal", regex: '[^<]+' }, + { token: "literal", regex: '<' } + ], + "passthroughBlock": [ + { token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock" }, + { token: "literal", regex: identifierRe + "|\\d+" }, + { include: "macros" }, + { token: "literal", regex: "." } + ], + "smallPassthrough": [ + { token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock" }, + { token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock" }, + { token: "literal", regex: identifierRe + "|\\d+" }, + { include: "macros" } + ], + "commentBlock": [ + { token: "doc.comment", regex: /^\/{4,}\s*$/, next: "dissallowDelimitedBlock" }, + { token: "doc.comment", regex: '^.*$' } + ], + "tableBlock": [ + { token: "tableBlock", regex: /^\s*\|={3,}\s*$/, next: "dissallowDelimitedBlock" }, + { token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "innerTableBlock" }, + { token: "tableBlock", regex: /\|/ }, + { include: "text", noEscape: true } + ], + "innerTableBlock": [ + { token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "tableBlock" }, + { token: "tableBlock", regex: /^\s*|={3,}\s*$/, next: "dissallowDelimitedBlock" }, + { token: "tableBlock", regex: /!/ } + ], + "macros": [ + { token: "macro", regex: /{[\w\-$]+}/ }, + { token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/ }, + { token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/ }, + { token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/ }, + { token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/ }, + { token: "keyword", regex: /^:.+?:(?= |$)/ } + ], + "quotes": [ + { token: "string.italic", regex: /__[^_\s].*?__/ }, + { token: "string.italic", regex: quoteRule("_") }, + { token: "keyword.bold", regex: /\*\*[^*\s].*?\*\*/ }, + { token: "keyword.bold", regex: quoteRule("\\*") }, + { token: "literal", regex: quoteRule("\\+") }, + { token: "literal", regex: /\+\+[^+\s].*?\+\+/ }, + { token: "literal", regex: /\$\$.+?\$\$/ }, + { token: "literal", regex: quoteRule("`") }, + { token: "keyword", regex: quoteRule("^") }, + { token: "keyword", regex: quoteRule("~") }, + { token: "keyword", regex: /##?/ }, + { token: "keyword", regex: /(?:\B|^)``|\b''/ } + ] + }; + function quoteRule(ch) { + var prefix = /\w/.test(ch) ? "\\b" : "(?:\\B|^)"; + return prefix + ch + "[^" + ch + "].*?" + ch + "(?![\\w*])"; + } + var tokenMap = { + macro: "constant.character", + tableBlock: "doc.comment", + titleUnderline: "markup.heading", + singleLineTitle: "markup.heading", + pageBreak: "string", + option: "string.regexp", + otherBlock: "markup.list", + literal: "support.function", + optionalTitle: "constant.numeric", + escape: "constant.language.escape", + link: "markup.underline.list" + }; + for (var state in this.$rules) { + var stateRules = this.$rules[state]; + for (var i = stateRules.length; i--;) { + var rule = stateRules[i]; + if (rule.include || typeof rule == "string") { + var args = [i, 1].concat(this.$rules[rule.include || rule]); + if (rule.noEscape) { + args = args.filter(function (x) { + return !x.next; + }); + } + stateRules.splice.apply(stateRules, args); + } + else if (rule.token in tokenMap) { + rule.token = tokenMap[rule.token]; + } + } + } +}; +oop.inherits(AsciidocHighlightRules, TextHighlightRules); +exports.AsciidocHighlightRules = AsciidocHighlightRules; + +}); + +define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/; + this.singleLineHeadingRe = /^={1,5}(?=\s+\S)/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (!this.foldingStartMarker.test(line)) + return ""; + if (line[0] == "=") { + if (this.singleLineHeadingRe.test(line)) + return "start"; + if (session.getLine(row - 1).length != session.getLine(row).length) + return ""; + return "start"; + } + if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock") + return "end"; + return "start"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (!line.match(this.foldingStartMarker)) + return; + var token; + function getTokenType(row) { + token = session.getTokens(row)[0]; + return token && token.type; + } + var levels = ["=", "-", "~", "^", "+"]; + var heading = "markup.heading"; + var singleLineHeadingRe = this.singleLineHeadingRe; + function getLevel() { + var match = token.value.match(singleLineHeadingRe); + if (match) + return match[0].length; + var level = levels.indexOf(token.value[0]) + 1; + if (level == 1) { + if (session.getLine(row - 1).length != session.getLine(row).length) + return Infinity; + } + return level; + } + if (getTokenType(row) == heading) { + var startHeadingLevel = getLevel(); + while (++row < maxRow) { + if (getTokenType(row) != heading) + continue; + var level = getLevel(); + if (level <= startHeadingLevel) + break; + } + var isSingleLineHeading = token && token.value.match(this.singleLineHeadingRe); + endRow = isSingleLineHeading ? row - 1 : row - 2; + if (endRow > startRow) { + while (endRow > startRow && (!getTokenType(endRow) || token.value[0] == "[")) + endRow--; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + } + else { + var state = session.bgTokenizer.getState(row); + if (state == "dissallowDelimitedBlock") { + while (row-- > 0) { + if (session.bgTokenizer.getState(row).lastIndexOf("Block") == -1) + break; + } + endRow = row + 1; + if (endRow < startRow) { + var endColumn = session.getLine(row).length; + return new Range(endRow, 5, startRow, startColumn - 5); + } + } + else { + while (++row < maxRow) { + if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock") + break; + } + endRow = row; + if (endRow > startRow) { + var endColumn = session.getLine(row).length; + return new Range(startRow, 5, endRow, endColumn - 5); + } + } + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules; +var AsciidocFoldMode = require("./folding/asciidoc").FoldMode; +var Mode = function () { + this.HighlightRules = AsciidocHighlightRules; + this.foldingRules = new AsciidocFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.getNextLineIndent = function (state, line, tab) { + if (state == "listblock") { + var match = /^((?:.+)?)([-+*][ ]+)/.exec(line); + if (match) { + return new Array(match[1].length + 1).join(" ") + match[2]; + } + else { + return ""; + } + } + else { + return this.$getIndent(line); + } + }; + this.$id = "ace/mode/asciidoc"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/asciidoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-asl.js b/ui/base1/ace/mode-asl.js new file mode 100644 index 0000000..faa16c5 --- /dev/null +++ b/ui/base1/ace/mode-asl.js @@ -0,0 +1,357 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ASLHighlightRules = function () { + var keywords = ("Default|DefinitionBlock|Device|Method|Else|ElseIf|For|Function|If|Include|Method|Return|" + + "Scope|Switch|Case|While|Break|BreakPoint|Continue|NoOp|Wait|True|False|" + + "AccessAs|Acquire|Alias|BankField|Buffer|Concatenate|ConcatenateResTemplate|" + + "CondRefOf|Connection|CopyObject|CreateBitField|CreateByteField|CreateDWordField|" + + "CreateField|CreateQWordField|CreateWordField|DataTableRegion|Debug|" + + "DMA|DWordIO|DWordMemory|DWordSpace|EisaId|EISAID|EndDependentFn|Event|ExtendedIO|" + + "ExtendedMemory|ExtendedSpace|External|Fatal|Field|FindSetLeftBit|FindSetRightBit|" + + "FixedDMA|FixedIO|Fprintf|FromBCD|GpioInt|GpioIo|I2CSerialBusV2|IndexField|" + + "Interrupt|IO|IRQ|IRQNoFlags|Load|LoadTable|Match|Memory32|Memory32Fixed|" + + "Mid|Mutex|Name|Notify|Offset|ObjectType|OperationRegion|Package|PowerResource|Printf|" + + "QWordIO|QWordMemory|QWordSpace|RawDataBuffer|Register|Release|Reset|ResourceTemplate|" + + "Signal|SizeOf|Sleep|SPISerialBusV2|Stall|StartDependentFn|StartDependentFnNoPri|" + + "Store|ThermalZone|Timer|ToBCD|ToBuffer|ToDecimalString|ToInteger|ToPLD|ToString|" + + "ToUUID|UARTSerialBusV2|Unicode|Unload|VendorLong|VendorShort|WordBusNumber|WordIO|" + + "WordSpace"); + var keywordOperators = ("Add|And|Decrement|Divide|Increment|Index|LAnd|LEqual|LGreater|LGreaterEqual|" + + "LLess|LLessEqual|LNot|LNotEqual|LOr|Mod|Multiply|NAnd|NOr|Not|Or|RefOf|Revision|" + + "ShiftLeft|ShiftRight|Subtract|XOr|DerefOf"); + var flags = ("AttribQuick|AttribSendReceive|AttribByte|AttribBytes|AttribRawBytes|" + + "AttribRawProcessBytes|AttribWord|AttribBlock|AttribProcessCall|AttribBlockProcessCall|" + + "AnyAcc|ByteAcc|WordAcc|DWordAcc|QWordAcc|BufferAcc|" + + "AddressRangeMemory|AddressRangeReserved|AddressRangeNVS|AddressRangeACPI|" + + "RegionSpaceKeyword|FFixedHW|PCC|" + + "AddressingMode7Bit|AddressingMode10Bit|" + + "DataBitsFive|DataBitsSix|DataBitsSeven|DataBitsEight|DataBitsNine|" + + "BusMaster|NotBusMaster|" + + "ClockPhaseFirst|ClockPhaseSecond|ClockPolarityLow|ClockPolarityHigh|" + + "SubDecode|PosDecode|" + + "BigEndianing|LittleEndian|" + + "FlowControlNone|FlowControlXon|FlowControlHardware|" + + "Edge|Level|ActiveHigh|ActiveLow|ActiveBoth|Decode16|Decode10|" + + "IoRestrictionNone|IoRestrictionInputOnly|IoRestrictionOutputOnly|" + + "IoRestrictionNoneAndPreserve|Lock|NoLock|MTR|MEQ|MLE|MLT|MGE|MGT|" + + "MaxFixed|MaxNotFixed|Cacheable|WriteCombining|Prefetchable|NonCacheable|" + + "MinFixed|MinNotFixed|" + + "ParityTypeNone|ParityTypeSpace|ParityTypeMark|ParityTypeOdd|ParityTypeEven|" + + "PullDefault|PullUp|PullDown|PullNone|PolarityHigh|PolarityLow|" + + "ISAOnlyRanges|NonISAOnlyRanges|EntireRange|ReadWrite|ReadOnly|" + + "UserDefRegionSpace|SystemIO|SystemMemory|PCI_Config|EmbeddedControl|" + + "SMBus|SystemCMOS|PciBarTarget|IPMI|GeneralPurposeIO|GenericSerialBus|" + + "ResourceConsumer|ResourceProducer|Serialized|NotSerialized|" + + "Shared|Exclusive|SharedAndWake|ExclusiveAndWake|ControllerInitiated|DeviceInitiated|" + + "StopBitsZero|StopBitsOne|StopBitsOnePlusHalf|StopBitsTwo|" + + "Width8Bit|Width16Bit|Width32Bit|Width64Bit|Width128Bit|Width256Bit|" + + "SparseTranslation|DenseTranslation|TypeTranslation|TypeStatic|" + + "Preserve|WriteAsOnes|WriteAsZeros|Transfer8|Transfer16|Transfer8_16|" + + "ThreeWireMode|FourWireMode"); + var storageTypes = ("UnknownObj|IntObj|StrObj|BuffObj|PkgObj|FieldUnitObj|DeviceObj|" + + "EventObj|MethodObj|MutexObj|OpRegionObj|PowerResObj|ProcessorObj|" + + "ThermalZoneObj|BuffFieldObj|DDBHandleObj"); + var builtinConstants = ("__FILE__|__PATH__|__LINE__|__DATE__|__IASL__"); + var strNumbers = ("One|Ones|Zero"); + var deprecated = ("Memory24|Processor"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.numeric": strNumbers, + "keyword.operator": keywordOperators, + "constant.language": builtinConstants, + "storage.type": storageTypes, + "constant.library": flags, + "invalid.deprecated": deprecated + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // ignored fields / comments + regex: "\\\[", + next: "ignoredfield" + }, { + token: "variable", + regex: "\\Local[0-7]|\\Arg[0-6]" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:define|elif|else|endif|error|if|ifdef|ifndef|include|includebuffer|line|pragma|undef|warning)\\b", + next: "directive" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "constant.character", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: /0[xX][0-9a-fA-F]+\b/ + }, { + token: "constant.numeric", + regex: /[0-9]+\b/ + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: /[!\~\*\/%+-<>\^|=&]/ + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "ignoredfield": [ + { + token: "comment", // closing ignored fields / comments + regex: "\\\]", + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>*s", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]*s', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(ASLHighlightRules, TextHighlightRules); +exports.ASLHighlightRules = ASLHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/asl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asl_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ASLHighlightRules = require("./asl_highlight_rules").ASLHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ASLHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/asl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/asl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-assembly_arm32.js b/ui/base1/ace/mode-assembly_arm32.js new file mode 100644 index 0000000..c18e068 --- /dev/null +++ b/ui/base1/ace/mode-assembly_arm32.js @@ -0,0 +1,185 @@ +define("ace/mode/assembly_arm32_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AssemblyARM32HighlightRules = function () { + this.$rules = { + start: [ + { + token: 'keyword.control.assembly', + regex: '\\b(?:cpsid|cpsie|cps|setend|(?:srs|rfe)(?:ia|ib|da|db|fd|ed|fa|ea)|bkpt|nop|pld|cdp2|mrc2|mrrc2|mcr2|mcrr2|ldc2|stc2|(?:add|adc|sub|sbc|rsb|rsc|mul|mla|umull|umlal|smull|smlal|mvn|and|eor|orr|bic)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?s?|(?:(?:q|qd)?(?:add|sub)|umaal|smul(?:b|t)(?:b|t)|smulw(?:b|t)|smla(?:b|t)(?:b|t)|smlaw(?:b|t)|smlal(?:b|t)(?:b|t)|smuadx?|smladx?|smlaldx?|smusdx?|smlsdx?|smlsldx?|smmulr?|smmlar?|smmlsr?|mia|miaph|mia(?:b|t)(?:b|t)|clz|(?:s|q|sh|u|uq|uh)(?:add16|sub16|add8|sub8|addsubx|subaddx)|usad8|usada8|mrs|msr|mra|mar|cpy|tst|teq|cmp|cmn|ssat|ssat16|usat|usat16|pkhbt|pkhtb|sxth|sxtb16|sxtb|uxth|uxtb16|uxtb|sxtah|sxtab16|sxtab|uxtah|uxtab16|uxtab|rev|rev16|revsh|sel|b|bl|bx|blx|bxj|swi|svc|ldrex|strex|cdp|mrc|mrrc|mcr|mcrr|ldc|stc)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?|ldr(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|sb|h|sh|d)?|str(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|h|d)?|(?:ldm|stm)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:ia|ib|da|db|fd|ed|fa|ea)|swp(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?b?|mov(?:t|w)?)\\b', + caseInsensitive: true + }, + { + token: 'variable.parameter.register.assembly', + regex: '\\b(?:r0|r1|r2|r3|r4|r5|r6|r7|r8|r9|r10|r11|r12|r13|r14|r15|fp|ip|sp|lr|pc|cpsr|spsr|c|f|s|x|lsl|lsr|asr|ror|rrx)\\b', + caseInsensitive: true + }, + { + token: 'constant.character.hexadecimal.assembly', + regex: '#0x[A-F0-9]+', + caseInsensitive: true + }, + { + token: 'constant.character.decimal.assembly', + regex: '#[0-9]+' + }, + { + token: 'string.assembly', + regex: /'([^\\']|\\.)*'/ + }, + { + token: 'string.assembly', + regex: /"([^\\"]|\\.)*"/ + }, + { + token: 'support.function.directive.assembly', + regex: '(?:\.section|\.global|\.text|\.asciz|\.asciiz|\.ascii|\.align|\.byte|\.end|\.data|\.equ|\.extern|\.include)' + }, + { + token: 'entity.name.function.assembly', + regex: '^\\s*%%[\\w.]+?:$' + }, + { + token: 'entity.name.function.assembly', + regex: '^\\s*%\\$[\\w.]+?:$' + }, + { + token: 'entity.name.function.assembly', + regex: '^[\\w.]+?:' + }, + { + token: 'entity.name.function.assembly', + regex: '^[\\w.]+?\\b' + }, + { + token: 'comment.assembly', + regex: '\\/\\*', next: 'comment' + }, + { + token: 'comment.assembly', + regex: '(?:;|//|@).*$' + } + ], + comment: [ + { + token: 'comment.assembly', + regex: '\\*\\/', next: 'start' + }, + { + defaultToken: 'comment' + } + ] + }; + this.normalizeRules(); +}; +AssemblyARM32HighlightRules.metaData = { fileTypes: ['s'], + name: 'Assembly ARM32', + scopeName: 'source.assembly' }; +oop.inherits(AssemblyARM32HighlightRules, TextHighlightRules); +exports.AssemblyARM32HighlightRules = AssemblyARM32HighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/assembly_arm32",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_arm32_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AssemblyARM32HighlightRules = require("./assembly_arm32_highlight_rules").AssemblyARM32HighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = AssemblyARM32HighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = [";"]; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/assembly_arm32"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/assembly_arm32"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-assembly_x86.js b/ui/base1/ace/mode-assembly_x86.js new file mode 100644 index 0000000..41e27df --- /dev/null +++ b/ui/base1/ace/mode-assembly_x86.js @@ -0,0 +1,170 @@ +define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from Assembly x86.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AssemblyX86HighlightRules = function () { + this.$rules = { start: [{ token: 'keyword.control.assembly', + regex: '\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b', + caseInsensitive: true }, + { token: 'variable.parameter.register.assembly', + regex: '\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:Y|X)MM(?:[0-9]|10|11|12|13|14|15)|(?:A|B|C|D)(?:X|H|L)|CR(?:[0-4]|DR(?:[0-7]|TR6|TR7|EFER)))\\b', + caseInsensitive: true }, + { token: 'constant.character.decimal.assembly', + regex: '\\b[0-9]+\\b' }, + { token: 'constant.character.hexadecimal.assembly', + regex: '\\b0x[A-F0-9]+\\b', + caseInsensitive: true }, + { token: 'constant.character.hexadecimal.assembly', + regex: '\\b[A-F0-9]+h\\b', + caseInsensitive: true }, + { token: 'string.assembly', regex: /'([^\\']|\\.)*'/ }, + { token: 'string.assembly', regex: /"([^\\"]|\\.)*"/ }, + { token: 'support.function.directive.assembly', + regex: '^\\[', + push: [{ token: 'support.function.directive.assembly', + regex: '\\]$', + next: 'pop' }, + { defaultToken: 'support.function.directive.assembly' }] }, + { token: ['support.function.directive.assembly', + 'support.function.directive.assembly', + 'entity.name.function.assembly'], + regex: '(^struc)( )([_a-zA-Z][_a-zA-Z0-9]*)' }, + { token: 'support.function.directive.assembly', + regex: '^endstruc\\b' }, + { token: ['support.function.directive.assembly', + 'entity.name.function.assembly', + 'support.function.directive.assembly', + 'constant.character.assembly'], + regex: '^(%macro )([_a-zA-Z][_a-zA-Z0-9]*)( )([0-9]+)' }, + { token: 'support.function.directive.assembly', + regex: '^%endmacro' }, + { token: ['text', + 'support.function.directive.assembly', + 'text', + 'entity.name.function.assembly'], + regex: '(\\s*)(%define|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(?:el)?ifdef|%(?:el)?ifmacro|%(?:el)?ifctx|%(?:el)?ifidn|%(?:el)?ifidni|%(?:el)?ifid|%(?:el)?ifnum|%(?:el)?ifstr|%(?:el)?iftoken|%(?:el)?ifempty|%(?:el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b( ?)((?:[_a-zA-Z][_a-zA-Z0-9]*)?)', + caseInsensitive: true }, + { token: 'support.function.directive.assembly', + regex: '\\b(?:d[bwdqtoy]|res[bwdqto]|equ|times|align|alignb|sectalign|section|ptr|byte|word|dword|qword|incbin)\\b', + caseInsensitive: true }, + { token: 'entity.name.function.assembly', regex: '^\\s*%%[\\w.]+?:$' }, + { token: 'entity.name.function.assembly', regex: '^\\s*%\\$[\\w.]+?:$' }, + { token: 'entity.name.function.assembly', regex: '^[\\w.]+?:' }, + { token: 'entity.name.function.assembly', regex: '^[\\w.]+?\\b' }, + { token: 'comment.assembly', regex: ';.*$' }] + }; + this.normalizeRules(); +}; +AssemblyX86HighlightRules.metaData = { fileTypes: ['asm'], + name: 'Assembly x86', + scopeName: 'source.assembly' }; +oop.inherits(AssemblyX86HighlightRules, TextHighlightRules); +exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = AssemblyX86HighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = [";"]; + this.$id = "ace/mode/assembly_x86"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/assembly_x86"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-astro.js b/ui/base1/ace/mode-astro.js new file mode 100644 index 0000000..0d0d58e --- /dev/null +++ b/ui/base1/ace/mode-astro.js @@ -0,0 +1,2474 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/astro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var JavascriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var AstroHighlightRules = function () { + HtmlHighlightRules.call(this); + var astro = { + token: "paren.quasi.start", + regex: /{/, + next: function (state, stack) { + if (state !== "start") { + if (state.indexOf("attribute-equals") !== -1) { + stack.splice(0); + stack.unshift("tag_stuff"); + } + else { + stack.unshift(state); + } + } + return "inline-js-start"; + } + }; + for (var key in this.$rules) { + if (key.startsWith("js") || + key.startsWith("css") || + key.startsWith("comment")) + continue; + this.$rules[key].unshift(astro); + } + this.$rules.start.unshift({ + token: "comment", + regex: /^---$/, + onMatch: function (value, state, stack) { + stack.splice(0); + return this.token; + }, + next: "javascript-start" + }); + this.embedRules(JavascriptHighlightRules, "javascript-", [ + { + regex: /^---$/, + token: "comment", + next: "start", + onMatch: function (value, state, stack) { + stack.splice(0); + return this.token; + } + } + ]); + this.embedRules(JavascriptHighlightRules, "inline-js-"); + var astroRules = [ + { + regex: /}/, + token: "paren.quasi.end", + onMatch: function (value, state, stack) { + if (stack[0] === "inline-js-start") { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") !== -1) + return "paren.quasi.end"; + return "paren.rparen"; + } + else { + this.next = stack.shift() || "start"; + return this.token; + } + } + }, + { + regex: /{/, + token: "paren.lparen", + push: "inline-js-start" + } + ]; + this.$rules["inline-js-start"].unshift(astroRules); + this.$rules["inline-js-no_regex"].unshift(astroRules); + function overwriteJSXendRule(prefix) { + for (var index in this.$rules[prefix + "jsxAttributes"]) { + if (this.$rules[prefix + "jsxAttributes"][index].token === + "meta.tag.punctuation.tag-close.xml") { + this.$rules[prefix + "jsxAttributes"][index].onMatch = function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || prefix + "start"; + return [{ type: this.token, value: value }]; + }; + break; + } + } + } + overwriteJSXendRule.call(this, "javascript-"); + overwriteJSXendRule.call(this, "inline-js-"); + this.normalizeRules(); +}; +oop.inherits(AstroHighlightRules, HtmlHighlightRules); +exports.AstroHighlightRules = AstroHighlightRules; + +}); + +define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlBehaviour = require("../behaviour/xml").XmlBehaviour; +var HtmlBehaviour = function () { + XmlBehaviour.call(this); +}; +oop.inherits(HtmlBehaviour, XmlBehaviour); +exports.HtmlBehaviour = HtmlBehaviour; + +}); + +define("ace/mode/astro",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/astro_highlight_rules","ace/mode/behaviour/html"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var AstroHighlightRules = require("./astro_highlight_rules").AstroHighlightRules; +var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = AstroHighlightRules; + this.$behaviour = new HtmlBehaviour(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/astro"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/astro"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-autohotkey.js b/ui/base1/ace/mode-autohotkey.js new file mode 100644 index 0000000..f941a12 --- /dev/null +++ b/ui/base1/ace/mode-autohotkey.js @@ -0,0 +1,208 @@ +define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from C:\Users\LED\Desktop\AutoHotKey.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var AutoHotKeyHighlightRules = function () { + var autoItKeywords = 'And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|' + + 'Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|' + + 'ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|' + + 'ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|' + + 'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters'; + var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR'; + this.$rules = { start: [{ token: 'comment.line.ahk', regex: '(?:^| );.*$' }, + { token: 'comment.block.ahk', + regex: '/\\*', push: [{ token: 'comment.block.ahk', regex: '\\*/', next: 'pop' }, + { defaultToken: 'comment.block.ahk' }] }, + { token: 'doc.comment.ahk', + regex: '#cs', push: [{ token: 'doc.comment.ahk', regex: '#ce', next: 'pop' }, + { defaultToken: 'doc.comment.ahk' }] }, + { token: 'keyword.command.ahk', + regex: '(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b', + caseInsensitive: true }, + { token: 'keyword.control.ahk', + regex: '(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b', + caseInsensitive: true }, + { token: 'support.function.ahk', + regex: '(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b', + caseInsensitive: true }, + { token: 'variable.predefined.ahk', + regex: '(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\\b', + caseInsensitive: true }, + { token: 'support.constant.ahk', + regex: '(?:\\b|^)(?:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\\b', + caseInsensitive: true }, + { token: 'variable.parameter', + regex: '(?:\\b|^)(?:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian)\\b', + caseInsensitive: true }, + { keywordMap: { "constant.language": autoItKeywords }, regex: '\\w+\\b' }, + { keywordMap: { "variable.function": atKeywords }, regex: '@\\w+\\b' }, + { token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, + { token: 'keyword.operator.ahk', + regex: '=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' }, + { token: 'punctuation.ahk', + regex: /#|`|::|,|%/ }, + { token: 'paren', + regex: /[{}()]/ }, + { token: ['punctuation.quote.double', + 'string.quoted.ahk', + 'punctuation.quote.double'], + regex: '(")((?:[^"]|"")*)(")' }, + { token: ['label.ahk', 'punctuation.definition.label.ahk'], + regex: '^([^: ]+)(:)(?!:)' }] }; + this.normalizeRules(); +}; +AutoHotKeyHighlightRules.metaData = { name: 'AutoHotKey', + scopeName: 'source.ahk', + fileTypes: ['ahk'], + foldingStartMarker: '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))', + foldingStopMarker: '^\\s*\\*/|^\\s*\\}' }; +oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules); +exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = AutoHotKeyHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/autohotkey"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/autohotkey"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-batchfile.js b/ui/base1/ace/mode-batchfile.js new file mode 100644 index 0000000..ff98b44 --- /dev/null +++ b/ui/base1/ace/mode-batchfile.js @@ -0,0 +1,199 @@ +define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from C:\Users\LED\AppData\Roaming\Sublime Text 2\Packages\Batch File\Batch File.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var BatchFileHighlightRules = function () { + this.$rules = { start: [{ token: 'keyword.command.dosbatch', + regex: '\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b', + caseInsensitive: true }, + { token: 'keyword.control.statement.dosbatch', + regex: '\\b(?:goto|call|exit)\\b', + caseInsensitive: true }, + { token: 'keyword.control.conditional.if.dosbatch', + regex: '\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b', + caseInsensitive: true }, + { token: 'keyword.control.conditional.dosbatch', + regex: '\\b(?:if|else)\\b', + caseInsensitive: true }, + { token: 'keyword.control.repeat.dosbatch', + regex: '\\bfor\\b', + caseInsensitive: true }, + { token: 'keyword.operator.dosbatch', + regex: '\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b' }, + { token: ['doc.comment', 'comment'], + regex: '(?:^|\\b)(rem)($|\\s.*$)', + caseInsensitive: true }, + { token: 'comment.line.colons.dosbatch', + regex: '::.*$' }, + { include: 'variable' }, + { token: 'punctuation.definition.string.begin.shell', + regex: '"', + push: [ + { token: 'punctuation.definition.string.end.shell', regex: '"', next: 'pop' }, + { include: 'variable' }, + { defaultToken: 'string.quoted.double.dosbatch' } + ] }, + { token: 'keyword.operator.pipe.dosbatch', regex: '[|]' }, + { token: 'keyword.operator.redirect.shell', + regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' }], + variable: [ + { token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%' }, + { token: 'constant.numeric', regex: '%~\\d+' }, + { token: ['markup.list', 'constant.other', 'markup.list'], + regex: '(%)(\\w+)(%?)' } + ] }; + this.normalizeRules(); +}; +BatchFileHighlightRules.metaData = { name: 'Batch File', + scopeName: 'source.dosbatch', + fileTypes: ['bat'] }; +oop.inherits(BatchFileHighlightRules, TextHighlightRules); +exports.BatchFileHighlightRules = BatchFileHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = BatchFileHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "::"; + this.blockComment = ""; + this.$id = "ace/mode/batchfile"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/batchfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-bibtex.js b/ui/base1/ace/mode-bibtex.js new file mode 100644 index 0000000..535000a --- /dev/null +++ b/ui/base1/ace/mode-bibtex.js @@ -0,0 +1,318 @@ +define("ace/mode/bibtex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var BibTeXHighlightRules = function () { + this.$rules = { + start: [ + { + token: "comment", + regex: /@Comment\{/, + stateName: "bibtexComment", + push: [ + { + token: "comment", + regex: /}/, + next: "pop" + }, { + token: "comment", + regex: /\{/, + push: "bibtexComment" + }, { + defaultToken: "comment" + } + ] + }, { + token: [ + "keyword", "text", "paren.lparen", "text", "variable", "text", "keyword.operator" + ], + regex: /(@String)(\s*)(\{)(\s*)([a-zA-Z]*)(\s*)(=)/, + push: [ + { + token: "paren.rparen", + regex: /\}/, + next: "pop" + }, { + include: "#misc" + }, { + defaultToken: "text" + } + ] + }, { + token: [ + "keyword", "text", "paren.lparen", "text", "variable", "text", "keyword.operator" + ], + regex: /(@String)(\s*)(\()(\s*)([a-zA-Z]*)(\s*)(=)/, + push: [ + { + token: "paren.rparen", + regex: /\)/, + next: "pop" + }, { + include: "#misc" + }, { + defaultToken: "text" + } + ] + }, { + token: [ + "keyword", "text", "paren.lparen" + ], + regex: /(@preamble)(\s*)(\()/, + push: [ + { + token: "paren.rparen", + regex: /\)/, + next: "pop" + }, { + include: "#misc" + }, { + defaultToken: "text" + } + ] + }, { + token: [ + "keyword", "text", "paren.lparen" + ], + regex: /(@preamble)(\s*)(\{)/, + push: [ + { + token: "paren.rparen", + regex: /\}/, + next: "pop" + }, { + include: "#misc" + }, { + defaultToken: "text" + } + ] + }, { + token: [ + "keyword", "text", "paren.lparen", "text", "support.class" + ], + regex: /(@[a-zA-Z]+)(\s*)(\{)(\s*)([\w-]+)/, + push: [ + { + token: "paren.rparen", + regex: /\}/, + next: "pop" + }, { + token: [ + "variable", "text", "keyword.operator" + ], + regex: /([a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+)(\s*)(=)/, + push: [ + { + token: "text", + regex: /(?=[,}])/, + next: "pop" + }, { + include: "#misc" + }, { + include: "#integer" + }, { + defaultToken: "text" + } + ] + }, { + token: "punctuation", + regex: /,/ + }, { + defaultToken: "text" + } + ] + }, { + defaultToken: "comment" + } + ], + "#integer": [ + { + token: "constant.numeric.bibtex", + regex: /\d+/ + } + ], + "#misc": [ + { + token: "string", + regex: /"/, + push: "#string_quotes" + }, { + token: "paren.lparen", + regex: /\{/, + push: "#string_braces" + }, { + token: "keyword.operator", + regex: /#/ + } + ], + "#string_braces": [ + { + token: "paren.rparen", + regex: /\}/, + next: "pop" + }, { + token: "invalid.illegal", + regex: /@/ + }, { + include: "#misc" + }, { + defaultToken: "string" + } + ], + "#string_quotes": [ + { + token: "string", + regex: /"/, + next: "pop" + }, { + include: "#misc" + }, { + defaultToken: "string" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(BibTeXHighlightRules, TextHighlightRules); +exports.BibTeXHighlightRules = BibTeXHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/bibtex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bibtex_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var BibTeXHighlightRules = require("./bibtex_highlight_rules").BibTeXHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = BibTeXHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/bibtex"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/bibtex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-c9search.js b/ui/base1/ace/mode-c9search.js new file mode 100644 index 0000000..cd963ae --- /dev/null +++ b/ui/base1/ace/mode-c9search.js @@ -0,0 +1,250 @@ +define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +function safeCreateRegexp(source, flag) { + try { + return new RegExp(source, flag); + } + catch (e) { } +} +var C9SearchHighlightRules = function () { + this.$rules = { + "start": [ + { + tokenNames: ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text", "c9searchresults.keyword"], + regex: /(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/, + onMatch: function (val, state, stack) { + var values = this.splitRegex.exec(val); + var types = this.tokenNames; + var tokens = [{ + type: types[0], + value: values[1] + }, { + type: types[1], + value: values[2] + }]; + if (values[3]) { + if (values[3] == " ") + tokens[1] = { type: types[1], value: values[2] + " " }; + else + tokens.push({ type: types[1], value: values[3] }); + } + var regex = stack[1]; + var str = values[4]; + var m; + var last = 0; + if (regex && regex.exec) { + regex.lastIndex = 0; + while (m = regex.exec(str)) { + var skipped = str.substring(last, m.index); + last = regex.lastIndex; + if (skipped) + tokens.push({ type: types[2], value: skipped }); + if (m[0]) + tokens.push({ type: types[3], value: m[0] }); + else if (!skipped) + break; + } + } + if (last < str.length) + tokens.push({ type: types[2], value: str.substr(last) }); + return tokens; + } + }, + { + regex: "^Searching for [^\\r\\n]*$", + onMatch: function (val, state, stack) { + var parts = val.split("\x01"); + if (parts.length < 3) + return "text"; + var options, search; + var i = 0; + var tokens = [{ + value: parts[i++] + "'", + type: "text" + }, { + value: search = parts[i++], + type: "text" // "c9searchresults.keyword" + }, { + value: "'" + parts[i++], + type: "text" + }]; + if (parts[2] !== " in") { + tokens.push({ + value: "'" + parts[i++] + "'", + type: "text" + }, { + value: parts[i++], + type: "text" + }); + } + tokens.push({ + value: " " + parts[i++] + " ", + type: "text" + }); + if (parts[i + 1]) { + options = parts[i + 1]; + tokens.push({ + value: "(" + parts[i + 1] + ")", + type: "text" + }); + i += 1; + } + else { + i -= 1; + } + while (i++ < parts.length) { + parts[i] && tokens.push({ + value: parts[i], + type: "text" + }); + } + if (search) { + if (!/regex/.test(options)) + search = lang.escapeRegExp(search); + if (/whole/.test(options)) + search = "\\b" + search + "\\b"; + } + var regex = search && safeCreateRegexp("(" + search + ")", / sensitive/.test(options) ? "g" : "ig"); + if (regex) { + stack[0] = state; + stack[1] = regex; + } + return tokens; + } + }, + { + regex: "^(?=Found \\d+ matches)", + token: "text", + next: "numbers" + }, + { + token: "string", // single line + regex: "^\\S:?[^:]+", + next: "numbers" + } + ], + numbers: [{ + regex: "\\d+", + token: "constant.numeric" + }, { + regex: "$", + token: "text", + next: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(C9SearchHighlightRules, TextHighlightRules); +exports.C9SearchHighlightRules = C9SearchHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^(\S.*:|Searching for.*)$/; + this.foldingStopMarker = /^(\s+|Found.*)$/; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var lines = session.doc.getAllLines(row); + var line = lines[row]; + var level1 = /^(Found.*|Searching for.*)$/; + var level2 = /^(\S.*:|\s*)$/; + var re = level1.test(line) ? level1 : level2; + var startRow = row; + var endRow = row; + if (this.foldingStartMarker.test(line)) { + for (var i = row + 1, l = session.getLength(); i < l; i++) { + if (re.test(lines[i])) + break; + } + endRow = i; + } + else if (this.foldingStopMarker.test(line)) { + for (var i = row - 1; i >= 0; i--) { + line = lines[i]; + if (re.test(line)) + break; + } + startRow = i; + } + if (startRow != endRow) { + var col = line.length; + if (re === level1) + col = line.search(/\(Found[^)]+\)$|$/); + return new Range(startRow, col, endRow, 0); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var C9StyleFoldMode = require("./folding/c9search").FoldMode; +var Mode = function () { + this.HighlightRules = C9SearchHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new C9StyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/c9search"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/c9search"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-c_cpp.js b/ui/base1/ace/mode-c_cpp.js new file mode 100644 index 0000000..f2435de --- /dev/null +++ b/ui/base1/ace/mode-c_cpp.js @@ -0,0 +1,417 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen"; +var c_cppHighlightRules = function (extraKeywords) { + var keywordControls = ("break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using"); + var storageType = ("asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" + + "class|wchar_t|template|char16_t|char32_t"); + var storageModifiers = ("const|extern|register|restrict|static|volatile|inline|private|" + + "protected|public|friend|explicit|virtual|export|mutable|typename|" + + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"); + var keywordOperators = ("and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"); + var builtinConstants = ("NULL|true|false|TRUE|FALSE|nullptr"); + var keywordMapper = this.$keywords = this.createKeywordMapper(Object.assign({ + "keyword.control": keywordControls, + "storage.type": storageType, + "storage.modifier": storageModifiers, + "keyword.operator": keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants, + "support.function.C99.c": cFunctions + }, extraKeywords), "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type + this.$rules = { + "start": [ + { + token: "comment", + regex: "//$", + next: "start" + }, { + token: "comment", + regex: "//", + next: "singleLineComment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: "'(?:" + escapeRe + "|.)?'" + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "constant.language.escape", regex: formatRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: 'R"\\(', + stateName: "rawString", + next: [ + { token: "string.end", regex: '\\)"', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b", + next: "directive" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }, { + token: "keyword.operator", + regex: /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(c_cppHighlightRules, TextHighlightRules); +exports.c_cppHighlightRules = c_cppHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = c_cppHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/c_cpp"; + this.snippetFileId = "ace/snippets/c_cpp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/c_cpp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-cirru.js b/ui/base1/ace/mode-cirru.js new file mode 100644 index 0000000..918928d --- /dev/null +++ b/ui/base1/ace/mode-cirru.js @@ -0,0 +1,192 @@ +define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CirruHighlightRules = function () { + this.$rules = { + start: [{ + token: 'constant.numeric', + regex: /[\d\.]+/ + }, { + token: 'comment.line.double-dash', + regex: /--/, + next: 'comment' + }, { + token: 'storage.modifier', + regex: /\(/ + }, { + token: 'storage.modifier', + regex: /,/, + next: 'line' + }, { + token: 'support.function', + regex: /[^\(\)"\s{}\[\]]+/, + next: 'line' + }, { + token: 'string.quoted.double', + regex: /"/, + next: 'string' + }, { + token: 'storage.modifier', + regex: /\)/ + }], + comment: [{ + token: 'comment.line.double-dash', + regex: / +[^\n]+/, + next: 'start' + }], + string: [{ + token: 'string.quoted.double', + regex: /"/, + next: 'line' + }, { + token: 'constant.character.escape', + regex: /\\/, + next: 'escape' + }, { + token: 'string.quoted.double', + regex: /[^\\"]+/ + }], + escape: [{ + token: 'constant.character.escape', + regex: /./, + next: 'string' + }], + line: [{ + token: 'constant.numeric', + regex: /[\d\.]+/ + }, { + token: 'markup.raw', + regex: /^\s*/, + next: 'start' + }, { + token: 'storage.modifier', + regex: /\$/, + next: 'start' + }, { + token: 'variable.parameter', + regex: /[^\(\)"\s{}\[\]]+/ + }, { + token: 'storage.modifier', + regex: /\(/, + next: 'start' + }, { + token: 'storage.modifier', + regex: /\)/ + }, { + token: 'markup.raw', + regex: /^ */, + next: 'start' + }, { + token: 'string.quoted.double', + regex: /"/, + next: 'string' + }] + }; +}; +oop.inherits(CirruHighlightRules, TextHighlightRules); +exports.CirruHighlightRules = CirruHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules; +var CoffeeFoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = CirruHighlightRules; + this.foldingRules = new CoffeeFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.$id = "ace/mode/cirru"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/cirru"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-clojure.js b/ui/base1/ace/mode-clojure.js new file mode 100644 index 0000000..7418a47 --- /dev/null +++ b/ui/base1/ace/mode-clojure.js @@ -0,0 +1,322 @@ +define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ClojureHighlightRules = function () { + var builtinFunctions = ('* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' + + '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' + + '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' + + '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' + + '*read-eval* *source-path* *use-context-classloader* ' + + '*warn-on-reflection* + - -> ->> .. / < <= = ' + + '== > > >= >= accessor aclone ' + + 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' + + 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' + + 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' + + 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' + + 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' + + 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' + + 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' + + 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' + + 'char-escape-string char-name-string char? chars chunk chunk-append ' + + 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' + + 'class class? clear-agent-errors clojure-version coll? comment commute ' + + 'comp comparator compare compare-and-set! compile complement concat cond ' + + 'condp conj conj! cons constantly construct-proxy contains? count ' + + 'counted? create-ns create-struct cycle dec decimal? declare definline ' + + 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' + + 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' + + 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' + + 'double-array doubles drop drop-last drop-while empty empty? ensure ' + + 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' + + 'find-doc find-ns find-var first float float-array float? floats flush ' + + 'fn fn? fnext for force format future future-call future-cancel ' + + 'future-cancelled? future-done? future? gen-class gen-interface gensym ' + + 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' + + 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' + + 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' + + 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' + + 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' + + 'list* list? load load-file load-reader load-string loaded-libs locking ' + + 'long long-array longs loop macroexpand macroexpand-1 make-array ' + + 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' + + 'merge-with meta method-sig methods min min-key mod name namespace neg? ' + + 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' + + 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' + + 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' + + 'or parents partial partition pcalls peek persistent! pmap pop pop! ' + + 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' + + 'primitives-classnames print print-ctor print-doc print-dup print-method ' + + 'print-namespace-doc print-simple print-special-doc print-str printf ' + + 'println println-str prn prn-str promise proxy proxy-call-with-super ' + + 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' + + 'rand rand-int range ratio? rational? rationalize re-find re-groups ' + + 're-matcher re-matches re-pattern re-seq read read-line read-string ' + + 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' + + 'refer refer-clojure release-pending-sends rem remove remove-method ' + + 'remove-ns remove-watch repeat repeatedly replace replicate require ' + + 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' + + 'rsubseq second select-keys send send-off seq seq? seque sequence ' + + 'sequential? set set-validator! set? short short-array shorts ' + + 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' + + 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' + + 'split-at split-with str stream? string? struct struct-map subs subseq ' + + 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' + + 'take-last take-nth take-while test the-ns time to-array to-array-2d ' + + 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' + + 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' + + 'unchecked-remainder unchecked-subtract underive unquote ' + + 'unquote-splicing update-in update-proxy use val vals var-get var-set ' + + 'var? vary-meta vec vector vector? when when-first when-let when-not ' + + 'while with-bindings with-bindings* with-in-str with-loading-context ' + + 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' + + 'zero? zipmap'); + var keywords = ('throw try var ' + + 'def do fn if let loop monitor-enter monitor-exit new quote recur set!'); + var buildinConstants = ("true false nil"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": builtinFunctions + }, "identifier", false, " "); + this.$rules = { + "start": [ + { + token: "comment", + regex: ";.*$" + }, { + token: "keyword", //parens + regex: "[\\(|\\)]" + }, { + token: "keyword", //lists + regex: "[\\'\\(]" + }, { + token: "keyword", //vectors + regex: "[\\[|\\]]" + }, { + token: "string.regexp", //Regular Expressions + regex: '#"', + next: "regex" + }, { + token: "keyword", //sets and maps + regex: "[\\{|\\}|\\#\\{|\\#\\}]" + }, { + token: "keyword", // ampersands + regex: '[\\&]' + }, { + token: "keyword", // metadata + regex: '[\\#\\^\\{]' + }, { + token: "keyword", // anonymous fn syntactic sugar + regex: '[\\%]' + }, { + token: "keyword", // deref reader macro + regex: '[@]' + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language", + regex: '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]' + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" + }, { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant", // symbol + regex: /:[^()\[\]{}'"\^%`,;\s]+/ + } + ], + "string": [ + { + token: "constant.language.escape", + regex: "\\\\.|\\\\$" + }, { + token: "string", + regex: '"', + next: "start" + }, { + defaultToken: "string" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: '"', + next: "start" + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + defaultToken: "string.regexp.charachterclass" + } + ] + }; +}; +oop.inherits(ClojureHighlightRules, TextHighlightRules); +exports.ClojureHighlightRules = ClojureHighlightRules; + +}); + +define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingParensOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\)/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\))/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + var match = line.match(/^(\s+)/); + if (match) { + return match[1]; + } + return ""; + }; +}).call(MatchingParensOutdent.prototype); +exports.MatchingParensOutdent = MatchingParensOutdent; + +}); + +define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules; +var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent; +var Mode = function () { + this.HighlightRules = ClojureHighlightRules; + this.$outdent = new MatchingParensOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.minorIndentFunctions = ["defn", "defn-", "defmacro", "def", "deftest", "testing"]; + this.$toIndent = function (str) { + return str.split('').map(function (ch) { + if (/\s/.exec(ch)) { + return ch; + } + else { + return ' '; + } + }).join(''); + }; + this.$calculateIndent = function (line, tab) { + var baseIndent = this.$getIndent(line); + var delta = 0; + var isParen, ch; + for (var i = line.length - 1; i >= 0; i--) { + ch = line[i]; + if (ch === '(') { + delta--; + isParen = true; + } + else if (ch === '(' || ch === '[' || ch === '{') { + delta--; + isParen = false; + } + else if (ch === ')' || ch === ']' || ch === '}') { + delta++; + } + if (delta < 0) { + break; + } + } + if (delta < 0 && isParen) { + i += 1; + var iBefore = i; + var fn = ''; + while (true) { + ch = line[i]; + if (ch === ' ' || ch === '\t') { + if (this.minorIndentFunctions.indexOf(fn) !== -1) { + return this.$toIndent(line.substring(0, iBefore - 1) + tab); + } + else { + return this.$toIndent(line.substring(0, i + 1)); + } + } + else if (ch === undefined) { + return this.$toIndent(line.substring(0, iBefore - 1) + tab); + } + fn += line[i]; + i++; + } + } + else if (delta < 0 && !isParen) { + return this.$toIndent(line.substring(0, i + 1)); + } + else if (delta > 0) { + baseIndent = baseIndent.substring(0, baseIndent.length - tab.length); + return baseIndent; + } + else { + return baseIndent; + } + }; + this.getNextLineIndent = function (state, line, tab) { + return this.$calculateIndent(line, tab); + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/clojure"; + this.snippetFileId = "ace/snippets/clojure"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/clojure"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-cobol.js b/ui/base1/ace/mode-cobol.js new file mode 100644 index 0000000..fca5f36 --- /dev/null +++ b/ui/base1/ace/mode-cobol.js @@ -0,0 +1,82 @@ +define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CobolHighlightRules = function () { + var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" + + "AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" + + "ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" + + "TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" + + "UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" + + "PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" + + "CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" + + "COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" + + "RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" + + "DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" + + "ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" + + "EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT"; + var builtinConstants = ("true|false|null"); + var builtinFunctions = ("count|min|max|avg|sum|rank|now|coalesce|main"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "\\*.*$" + }, { + token: "string", // " string + regex: '".*?"' + }, { + token: "string", // ' string + regex: "'.*?'" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }] + }; +}; +oop.inherits(CobolHighlightRules, TextHighlightRules); +exports.CobolHighlightRules = CobolHighlightRules; + +}); + +define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules; +var Mode = function () { + this.HighlightRules = CobolHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "*"; + this.$id = "ace/mode/cobol"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/cobol"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-coffee.js b/ui/base1/ace/mode-coffee.js new file mode 100644 index 0000000..4322f07 --- /dev/null +++ b/ui/base1/ace/mode-coffee.js @@ -0,0 +1,335 @@ +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +oop.inherits(CoffeeHighlightRules, TextHighlightRules); +function CoffeeHighlightRules() { + var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + var keywords = ("this|throw|then|try|typeof|super|switch|return|break|by|continue|" + + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + + "or|on|unless|until|and|yes|yield|export|import|default"); + var langConstant = ("true|false|null|undefined|NaN|Infinity"); + var illegal = ("case|const|function|var|void|with|enum|implements|" + + "interface|let|package|private|protected|public|static"); + var supportClass = ("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + + "SyntaxError|TypeError|URIError|" + + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"); + var supportFunction = ("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + + "encodeURIComponent|decodeURI|decodeURIComponent|String|"); + var variableLanguage = ("window|arguments|prototype|document"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": langConstant, + "invalid.illegal": illegal, + "language.support.class": supportClass, + "language.support.function": supportFunction, + "variable.language": variableLanguage + }, "identifier"); + var functionRule = { + token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], + regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source + }; + var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; + this.$rules = { + start: [ + { + token: "constant.numeric", + regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" + }, { + stateName: "qdoc", + token: "string", regex: "'''", next: [ + { token: "string", regex: "'''", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqdoc", + token: "string", + regex: '"""', + next: [ + { token: "string", regex: '"""', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qstring", + token: "string", regex: "'", next: [ + { token: "string", regex: "'", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqstring", + token: "string.start", regex: '"', next: [ + { token: "string.end", regex: '"', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "js", + token: "string", regex: "`", next: [ + { token: "string", regex: "`", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift() || ""; + if (this.next.indexOf("string") != -1) + return "paren.string"; + } + return "paren"; + } + }, { + token: "string.regex", + regex: "///", + next: "heregex" + }, { + token: "string.regex", + regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ + }, { + token: "comment", + regex: "###(?!#)", + next: "comment" + }, { + token: "comment", + regex: "#.*" + }, { + token: ["punctuation.operator", "text", "identifier"], + regex: "(\\.)(\\s*)(" + illegal + ")" + }, { + token: "punctuation.operator", + regex: "\\.{1,3}" + }, { + token: ["keyword", "text", "language.support.class", + "text", "keyword", "text", "language.support.class"], + regex: "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" + }, { + token: ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), + regex: "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex + }, + functionRule, + { + token: "variable", + regex: "@(?:" + identifier + ")?" + }, { + token: keywordMapper, + regex: identifier + }, { + token: "punctuation.operator", + regex: "\\,|\\." + }, { + token: "storage.type", + regex: "[\\-=]>" + }, { + token: "keyword.operator", + regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" + }, { + token: "paren.lparen", + regex: "[({[]" + }, { + token: "paren.rparen", + regex: "[\\]})]" + }, { + token: "text", + regex: "\\s+" + } + ], + heregex: [{ + token: "string.regex", + regex: '.*?///[imgy]{0,4}', + next: "start" + }, { + token: "comment.regex", + regex: "\\s+(?:#.*)?" + }, { + token: "string.regex", + regex: "\\S+" + }], + comment: [{ + token: "comment", + regex: '###', + next: "start" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +} +exports.CoffeeHighlightRules = CoffeeHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module){"use strict"; +var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; +var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var FoldMode = require("./folding/coffee").FoldMode; +var Range = require("../range").Range; +var TextMode = require("./text").Mode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var oop = require("../lib/oop"); +function Mode() { + this.HighlightRules = Rules; + this.$outdent = new Outdent(); + this.foldingRules = new FoldMode(); +} +oop.inherits(Mode, TextMode); +(function () { + var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; + this.lineCommentStart = "#"; + this.blockComment = { start: "###", end: "###" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && + state === 'start' && indenter.test(line)) + indent += tab; + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/coffee"; + this.snippetFileId = "ace/snippets/coffee"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/coffee"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-coldfusion.js b/ui/base1/ace/mode-coldfusion.js new file mode 100644 index 0000000..d41855f --- /dev/null +++ b/ui/base1/ace/mode-coldfusion.js @@ -0,0 +1,2409 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var ColdfusionHighlightRules = function () { + HtmlHighlightRules.call(this); + this.$rules.tag[2].token = function (start, tag) { + var group = tag.slice(0, 2) == "cf" ? "keyword" : "meta.tag"; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + group + ".tag-name.xml"]; + }; + var jsAndCss = Object.keys(this.$rules).filter(function (x) { + return /^(js|css)-/.test(x); + }); + this.embedRules({ + cfmlComment: [ + { regex: "", token: "comment.end", next: "pop" }, + { defaultToken: "comment" } + ] + }, "", [ + { regex: "", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/csound_document_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_orchestra_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var CsoundOrchestraHighlightRules = require("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CsoundDocumentHighlightRules = function () { + var orchestraHighlightRules = new CsoundOrchestraHighlightRules("csound-"); + var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-"); + this.$rules = { + "start": [ + { + token: ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: /(<)(CsoundSynthesi[sz]er)(>)/, + next: "synthesizer" + }, + { defaultToken: "text.csound-document" } + ], + "synthesizer": [ + { + token: ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "()", + next: "start" + }, { + token: ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "(<)(CsInstruments)(>)", + next: orchestraHighlightRules.embeddedRulePrefix + "start" + }, { + token: ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "(<)(CsScore)(>)", + next: scoreHighlightRules.embeddedRulePrefix + "start" + }, { + token: ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "(<)([Hh][Tt][Mm][Ll])(>)", + next: "html-start" + } + ] + }; + this.embedRules(orchestraHighlightRules.getRules(), orchestraHighlightRules.embeddedRulePrefix, [{ + token: ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "()", + next: "synthesizer" + }]); + this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, [{ + token: ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "()", + next: "synthesizer" + }]); + this.embedRules(HtmlHighlightRules, "html-", [{ + token: ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex: "()", + next: "synthesizer" + }]); + this.normalizeRules(); +}; +oop.inherits(CsoundDocumentHighlightRules, TextHighlightRules); +exports.CsoundDocumentHighlightRules = CsoundDocumentHighlightRules; + +}); + +define("ace/mode/csound_document",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_document_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CsoundDocumentHighlightRules = require("./csound_document_highlight_rules").CsoundDocumentHighlightRules; +var Mode = function () { + this.HighlightRules = CsoundDocumentHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/csound_document"; + this.snippetFileId = "ace/snippets/csound_document"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/csound_document"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-csound_orchestra.js b/ui/base1/ace/mode-csound_orchestra.js new file mode 100644 index 0000000..6ab700e --- /dev/null +++ b/ui/base1/ace/mode-csound_orchestra.js @@ -0,0 +1,2923 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CsoundPreprocessorHighlightRules = function (embeddedRulePrefix) { + this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix; + this.semicolonComments = { + token: "comment.line.semicolon.csound", + regex: ";.*$" + }; + this.comments = [ + { + token: "punctuation.definition.comment.begin.csound", + regex: "/\\*", + push: [ + { + token: "punctuation.definition.comment.end.csound", + regex: "\\*/", + next: "pop" + }, { + defaultToken: "comment.block.csound" + } + ] + }, { + token: "comment.line.double-slash.csound", + regex: "//.*$" + }, + this.semicolonComments + ]; + this.macroUses = [ + { + token: ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"], + regex: /(\$[A-Z_a-z]\w*\.?)(\()/, + next: "macro parameter value list" + }, { + token: "entity.name.function.preprocessor.csound", + regex: /\$[A-Z_a-z]\w*(?:\.|\b)/ + } + ]; + this.numbers = [ + { + token: "constant.numeric.float.csound", + regex: /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/ + }, { + token: ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"], + regex: /(0[Xx])([0-9A-Fa-f]+)/ + }, { + token: "constant.numeric.integer.decimal.csound", + regex: /\d+/ + } + ]; + this.bracedStringContents = [ + { + token: "constant.character.escape.csound", + regex: /\\(?:[\\abnrt"]|[0-7]{1,3})/ + }, + { + token: "constant.character.placeholder.csound", + regex: /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/ + }, { + token: "constant.character.escape.csound", + regex: /%%/ + } + ]; + this.quotedStringContents = [ + this.macroUses, + this.bracedStringContents + ]; + var start = [ + this.comments, + { + token: "keyword.preprocessor.csound", + regex: /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/ + }, { + token: "keyword.preprocessor.csound", + regex: /#include/, + push: [ + this.comments, + { + token: "string.csound", + regex: /([^ \t])(?:.*?\1)/, + next: "pop" + } + ] + }, { + token: "keyword.preprocessor.csound", + regex: /#includestr/, + push: [ + this.comments, + { + token: "string.csound", + regex: /([^ \t])(?:.*?\1)/, + next: "pop" + } + ] + }, { + token: "keyword.preprocessor.csound", + regex: /#[ \t]*define/, + next: "define directive" + }, { + token: "keyword.preprocessor.csound", + regex: /#(?:ifn?def|undef)\b/, + next: "macro directive" + }, + this.macroUses + ]; + this.$rules = { + "start": start, + "define directive": [ + this.comments, + { + token: "entity.name.function.preprocessor.csound", + regex: /[A-Z_a-z]\w*/ + }, { + token: "punctuation.definition.macro-parameter-name-list.begin.csound", + regex: /\(/, + next: "macro parameter name list" + }, { + token: "punctuation.definition.macro.begin.csound", + regex: /#/, + next: "macro body" + } + ], + "macro parameter name list": [ + { + token: "variable.parameter.preprocessor.csound", + regex: /[A-Z_a-z]\w*/ + }, { + token: "punctuation.definition.macro-parameter-name-list.end.csound", + regex: /\)/, + next: "define directive" + } + ], + "macro body": [ + { + token: "constant.character.escape.csound", + regex: /\\#/ + }, { + token: "punctuation.definition.macro.end.csound", + regex: /#/, + next: "start" + }, + start + ], + "macro directive": [ + this.comments, + { + token: "entity.name.function.preprocessor.csound", + regex: /[A-Z_a-z]\w*/, + next: "start" + } + ], + "macro parameter value list": [ + { + token: "punctuation.definition.macro-parameter-value-list.end.csound", + regex: /\)/, + next: "start" + }, { + token: "punctuation.definition.string.begin.csound", + regex: /"/, + next: "macro parameter value quoted string" + }, this.pushRule({ + token: "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex: /\(/, + next: "macro parameter value parenthetical" + }), { + token: "punctuation.macro-parameter-value-separator.csound", + regex: "[#']" + } + ], + "macro parameter value quoted string": [ + { + token: "constant.character.escape.csound", + regex: /\\[#'()]/ + }, { + token: "invalid.illegal.csound", + regex: /[#'()]/ + }, { + token: "punctuation.definition.string.end.csound", + regex: /"/, + next: "macro parameter value list" + }, + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "macro parameter value parenthetical": [ + { + token: "constant.character.escape.csound", + regex: /\\\)/ + }, this.popRule({ + token: "punctuation.macro-parameter-value-parenthetical.end.csound", + regex: /\)/ + }), this.pushRule({ + token: "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex: /\(/, + next: "macro parameter value parenthetical" + }), + start + ] + }; +}; +oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules); +(function () { + this.pushRule = function (params) { + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + params.next[i] = this.embeddedRulePrefix + params.next[i]; + } + } + return { + regex: params.regex, onMatch: function (value, currentState, stack, line) { + if (stack.length === 0) + stack.push(currentState); + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + stack.push(params.next[i]); + } + } + else { + stack.push(params.next); + } + this.next = stack[stack.length - 1]; + return params.token; + }, + get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; }, + set next(next) { + if (!Array.isArray(params.next)) { + params.next = next; + } + }, + get token() { return params.token; } + }; + }; + this.popRule = function (params) { + if (params.next) { + params.next = this.embeddedRulePrefix + params.next; + } + return { + regex: params.regex, onMatch: function (value, currentState, stack, line) { + stack.pop(); + if (params.next) { + stack.push(params.next); + this.next = stack[stack.length - 1]; + } + else { + this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop(); + } + return params.token; + } + }; + }; +}).call(CsoundPreprocessorHighlightRules.prototype); +exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules; + +}); + +define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; +var CsoundScoreHighlightRules = function (embeddedRulePrefix) { + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + this.quotedStringContents.push({ + token: "invalid.illegal.csound-score", + regex: /[^"]*$/ + }); + var start = this.$rules.start; + start.push({ + token: "keyword.control.csound-score", + regex: /[aBbCdefiqstvxy]/ + }, { + token: "invalid.illegal.csound-score", + regex: /w/ + }, { + token: "constant.numeric.language.csound-score", + regex: /z/ + }, { + token: ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"], + regex: /([nNpP][pP])(\d+)/ + }, { + token: "keyword.other.csound-score", + regex: /[mn]/, + push: [ + { + token: "empty", + regex: /$/, + next: "pop" + }, + this.comments, + { + token: "entity.name.label.csound-score", + regex: /[A-Z_a-z]\w*/ + } + ] + }, { + token: "keyword.preprocessor.csound-score", + regex: /r\b/, + next: "repeat section" + }, this.numbers, { + token: "keyword.operator.csound-score", + regex: "[!+\\-*/^%&|<>#~.]" + }, this.pushRule({ + token: "punctuation.definition.string.begin.csound-score", + regex: /"/, + next: "quoted string" + }), this.pushRule({ + token: "punctuation.braced-loop.begin.csound-score", + regex: /{/, + next: "loop after left brace" + })); + this.addRules({ + "repeat section": [ + { + token: "empty", + regex: /$/, + next: "start" + }, + this.comments, + { + token: "constant.numeric.integer.decimal.csound-score", + regex: /\d+/, + next: "repeat section before label" + } + ], + "repeat section before label": [ + { + token: "empty", + regex: /$/, + next: "start" + }, + this.comments, + { + token: "entity.name.label.csound-score", + regex: /[A-Z_a-z]\w*/, + next: "start" + } + ], + "quoted string": [ + this.popRule({ + token: "punctuation.definition.string.end.csound-score", + regex: /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound-score" + } + ], + "loop after left brace": [ + this.popRule({ + token: "constant.numeric.integer.decimal.csound-score", + regex: /\d+/, + next: "loop after repeat count" + }), + this.comments, + { + token: "invalid.illegal.csound", + regex: /\S.*/ + } + ], + "loop after repeat count": [ + this.popRule({ + token: "entity.name.function.preprocessor.csound-score", + regex: /[A-Z_a-z]\w*\b/, + next: "loop after macro name" + }), + this.comments, + { + token: "invalid.illegal.csound", + regex: /\S.*/ + } + ], + "loop after macro name": [ + start, + this.popRule({ + token: "punctuation.braced-loop.end.csound-score", + regex: /}/ + }) + ] + }); + this.normalizeRules(); +}; +oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules); +exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules; + +}); + +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LuaHighlightRules = function () { + var keywords = ("break|do|else|elseif|end|for|function|if|in|local|repeat|" + + "return|then|until|while|or|and|not"); + var builtinConstants = ("true|false|nil|_G|_VERSION"); + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|require|" + + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|" + + "collectgarbage|getmetatable|module|rawset|math|debug|" + + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|" + + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|" + + "load|error|loadfile|" + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|" + + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|" + + "loaders|cpath|config|path|seeall|exit|setlocale|date|" + + "getenv|difftime|remove|time|clock|tmpname|rename|execute|" + + "lines|write|close|flush|open|output|type|read|stderr|" + + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|" + + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|" + + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|" + + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|" + + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|" + + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|" + + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|" + + "status|wrap|create|running|" + + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|" + + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"); + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "keyword.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "variable.language": "self" + }, "identifier"); + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + this.$rules = { + "start": [{ + stateName: "bracketedComment", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex: /\-\-\[=*\[/, + next: [ + { + onMatch: function (value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return "comment"; + }, + regex: /\]=*\]/, + next: "start" + }, { + defaultToken: "comment.body" + } + ] + }, + { + token: "comment", + regex: "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length, currentState); + return "string.start"; + }, + regex: /\[=*\[/, + next: [ + { + onMatch: function (value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return "string.end"; + }, + regex: /\]=*\]/, + next: "start" + }, { + defaultToken: "string" + } + ] + }, + { + token: "string", // " string + regex: '"(?:[^\\\\]|\\\\.)*?"' + }, { + token: "string", // ' string + regex: "'(?:[^\\\\]|\\\\.)*?'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+|\\w+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(LuaHighlightRules, TextHighlightRules); +exports.LuaHighlightRules = LuaHighlightRules; + +}); + +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * TODO: python delimiters + */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PythonHighlightRules = function () { + var keywords = ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield|async|await|nonlocal"); + var builtinConstants = ("True|False|None|NotImplemented|Ellipsis|__debug__"); + var builtinFunctions = ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes"); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "variable.language": "self|cls", + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + this.$rules = { + "start": [{ + token: "comment", + regex: "#.*$" + }, { + token: "string", // multi line """ string start + regex: strPre + '"{3}', + next: "qqstring3" + }, { + token: "string", // " string + regex: strPre + '"(?=.)', + next: "qqstring" + }, { + token: "string", // multi line ''' string start + regex: strPre + "'{3}", + next: "qstring3" + }, { + token: "string", // ' string + regex: strPre + "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" + }, { + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" + }, { + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" + }, { + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" + }, { + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" + }, { + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" + }, { + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" + }, { + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + }, { + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" + }, { + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" + }, { + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" + }, { + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: ["keyword", "text", "entity.name.function"], + regex: "(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{ + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'[^']*'" + }, { + token: "string", + regex: '"[^"]*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + }, { + token: 'paren.rparen', + regex: "}", + next: 'pop' + }, { + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"], // method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; +oop.inherits(PythonHighlightRules, TextHighlightRules); +exports.PythonHighlightRules = PythonHighlightRules; + +}); + +define("ace/mode/csound_orchestra_highlight_rules",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/lua_highlight_rules","ace/mode/python_highlight_rules"], function(require, exports, module){"use strict"; +var lang = require("../lib/lang"); +var oop = require("../lib/oop"); +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; +var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; +var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; +var CsoundOrchestraHighlightRules = function (embeddedRulePrefix) { + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + var opcodes = [ + "ATSadd", + "ATSaddnz", + "ATSbufread", + "ATScross", + "ATSinfo", + "ATSinterpread", + "ATSpartialtap", + "ATSread", + "ATSreadnz", + "ATSsinnoi", + "FLbox", + "FLbutBank", + "FLbutton", + "FLcloseButton", + "FLcolor", + "FLcolor2", + "FLcount", + "FLexecButton", + "FLgetsnap", + "FLgroup", + "FLgroupEnd", + "FLgroup_end", + "FLhide", + "FLhvsBox", + "FLhvsBoxSetValue", + "FLjoy", + "FLkeyIn", + "FLknob", + "FLlabel", + "FLloadsnap", + "FLmouse", + "FLpack", + "FLpackEnd", + "FLpack_end", + "FLpanel", + "FLpanelEnd", + "FLpanel_end", + "FLprintk", + "FLprintk2", + "FLroller", + "FLrun", + "FLsavesnap", + "FLscroll", + "FLscrollEnd", + "FLscroll_end", + "FLsetAlign", + "FLsetBox", + "FLsetColor", + "FLsetColor2", + "FLsetFont", + "FLsetPosition", + "FLsetSize", + "FLsetSnapGroup", + "FLsetText", + "FLsetTextColor", + "FLsetTextSize", + "FLsetTextType", + "FLsetVal", + "FLsetVal_i", + "FLsetVali", + "FLsetsnap", + "FLshow", + "FLslidBnk", + "FLslidBnk2", + "FLslidBnk2Set", + "FLslidBnk2Setk", + "FLslidBnkGetHandle", + "FLslidBnkSet", + "FLslidBnkSetk", + "FLslider", + "FLtabs", + "FLtabsEnd", + "FLtabs_end", + "FLtext", + "FLupdate", + "FLvalue", + "FLvkeybd", + "FLvslidBnk", + "FLvslidBnk2", + "FLxyin", + "JackoAudioIn", + "JackoAudioInConnect", + "JackoAudioOut", + "JackoAudioOutConnect", + "JackoFreewheel", + "JackoInfo", + "JackoInit", + "JackoMidiInConnect", + "JackoMidiOut", + "JackoMidiOutConnect", + "JackoNoteOut", + "JackoOn", + "JackoTransport", + "K35_hpf", + "K35_lpf", + "MixerClear", + "MixerGetLevel", + "MixerReceive", + "MixerSend", + "MixerSetLevel", + "MixerSetLevel_i", + "OSCbundle", + "OSCcount", + "OSCinit", + "OSCinitM", + "OSClisten", + "OSCraw", + "OSCsend", + "OSCsend_lo", + "S", + "STKBandedWG", + "STKBeeThree", + "STKBlowBotl", + "STKBlowHole", + "STKBowed", + "STKBrass", + "STKClarinet", + "STKDrummer", + "STKFMVoices", + "STKFlute", + "STKHevyMetl", + "STKMandolin", + "STKModalBar", + "STKMoog", + "STKPercFlut", + "STKPlucked", + "STKResonate", + "STKRhodey", + "STKSaxofony", + "STKShakers", + "STKSimple", + "STKSitar", + "STKStifKarp", + "STKTubeBell", + "STKVoicForm", + "STKWhistle", + "STKWurley", + "a", + "abs", + "active", + "adsr", + "adsyn", + "adsynt", + "adsynt2", + "aftouch", + "allpole", + "alpass", + "alwayson", + "ampdb", + "ampdbfs", + "ampmidi", + "ampmidicurve", + "ampmidid", + "apoleparams", + "arduinoRead", + "arduinoReadF", + "arduinoStart", + "arduinoStop", + "areson", + "aresonk", + "atone", + "atonek", + "atonex", + "autocorr", + "babo", + "balance", + "balance2", + "bamboo", + "barmodel", + "bbcutm", + "bbcuts", + "betarand", + "bexprnd", + "bformdec1", + "bformdec2", + "bformenc1", + "binit", + "biquad", + "biquada", + "birnd", + "bob", + "bpf", + "bpfcos", + "bqrez", + "butbp", + "butbr", + "buthp", + "butlp", + "butterbp", + "butterbr", + "butterhp", + "butterlp", + "button", + "buzz", + "c2r", + "cabasa", + "cauchy", + "cauchyi", + "cbrt", + "ceil", + "cell", + "cent", + "centroid", + "ceps", + "cepsinv", + "chanctrl", + "changed", + "changed2", + "chani", + "chano", + "chebyshevpoly", + "checkbox", + "chn_S", + "chn_a", + "chn_k", + "chnclear", + "chnexport", + "chnget", + "chngeta", + "chngeti", + "chngetk", + "chngetks", + "chngets", + "chnmix", + "chnparams", + "chnset", + "chnseta", + "chnseti", + "chnsetk", + "chnsetks", + "chnsets", + "chuap", + "clear", + "clfilt", + "clip", + "clockoff", + "clockon", + "cmp", + "cmplxprod", + "cntCreate", + "cntCycles", + "cntDelete", + "cntDelete_i", + "cntRead", + "cntReset", + "cntState", + "comb", + "combinv", + "compilecsd", + "compileorc", + "compilestr", + "compress", + "compress2", + "connect", + "control", + "convle", + "convolve", + "copya2ftab", + "copyf2array", + "cos", + "cosh", + "cosinv", + "cosseg", + "cossegb", + "cossegr", + "count", + "count_i", + "cps2pch", + "cpsmidi", + "cpsmidib", + "cpsmidinn", + "cpsoct", + "cpspch", + "cpstmid", + "cpstun", + "cpstuni", + "cpsxpch", + "cpumeter", + "cpuprc", + "cross2", + "crossfm", + "crossfmi", + "crossfmpm", + "crossfmpmi", + "crosspm", + "crosspmi", + "crunch", + "ctlchn", + "ctrl14", + "ctrl21", + "ctrl7", + "ctrlinit", + "ctrlpreset", + "ctrlprint", + "ctrlprintpresets", + "ctrlsave", + "ctrlselect", + "cuserrnd", + "dam", + "date", + "dates", + "db", + "dbamp", + "dbfsamp", + "dcblock", + "dcblock2", + "dconv", + "dct", + "dctinv", + "deinterleave", + "delay", + "delay1", + "delayk", + "delayr", + "delayw", + "deltap", + "deltap3", + "deltapi", + "deltapn", + "deltapx", + "deltapxw", + "denorm", + "diff", + "diode_ladder", + "directory", + "diskgrain", + "diskin", + "diskin2", + "dispfft", + "display", + "distort", + "distort1", + "divz", + "doppler", + "dot", + "downsamp", + "dripwater", + "dssiactivate", + "dssiaudio", + "dssictls", + "dssiinit", + "dssilist", + "dumpk", + "dumpk2", + "dumpk3", + "dumpk4", + "duserrnd", + "dust", + "dust2", + "elapsedcycles", + "elapsedtime", + "envlpx", + "envlpxr", + "ephasor", + "eqfil", + "evalstr", + "event", + "event_i", + "eventcycles", + "eventtime", + "exciter", + "exitnow", + "exp", + "expcurve", + "expon", + "exprand", + "exprandi", + "expseg", + "expsega", + "expsegb", + "expsegba", + "expsegr", + "fareylen", + "fareyleni", + "faustaudio", + "faustcompile", + "faustctl", + "faustdsp", + "faustgen", + "faustplay", + "fft", + "fftinv", + "ficlose", + "filebit", + "filelen", + "filenchnls", + "filepeak", + "filescal", + "filesr", + "filevalid", + "fillarray", + "filter2", + "fin", + "fini", + "fink", + "fiopen", + "flanger", + "flashtxt", + "flooper", + "flooper2", + "floor", + "fluidAllOut", + "fluidCCi", + "fluidCCk", + "fluidControl", + "fluidEngine", + "fluidInfo", + "fluidLoad", + "fluidNote", + "fluidOut", + "fluidProgramSelect", + "fluidSetInterpMethod", + "fmanal", + "fmax", + "fmb3", + "fmbell", + "fmin", + "fmmetal", + "fmod", + "fmpercfl", + "fmrhode", + "fmvoice", + "fmwurlie", + "fof", + "fof2", + "fofilter", + "fog", + "fold", + "follow", + "follow2", + "foscil", + "foscili", + "fout", + "fouti", + "foutir", + "foutk", + "fprintks", + "fprints", + "frac", + "fractalnoise", + "framebuffer", + "freeverb", + "ftaudio", + "ftchnls", + "ftconv", + "ftcps", + "ftexists", + "ftfree", + "ftgen", + "ftgenonce", + "ftgentmp", + "ftlen", + "ftload", + "ftloadk", + "ftlptim", + "ftmorf", + "ftom", + "ftprint", + "ftresize", + "ftresizei", + "ftsamplebank", + "ftsave", + "ftsavek", + "ftset", + "ftslice", + "ftslicei", + "ftsr", + "gain", + "gainslider", + "gauss", + "gaussi", + "gausstrig", + "gbuzz", + "genarray", + "genarray_i", + "gendy", + "gendyc", + "gendyx", + "getcfg", + "getcol", + "getftargs", + "getrow", + "getseed", + "gogobel", + "grain", + "grain2", + "grain3", + "granule", + "gtadsr", + "gtf", + "guiro", + "harmon", + "harmon2", + "harmon3", + "harmon4", + "hdf5read", + "hdf5write", + "hilbert", + "hilbert2", + "hrtfearly", + "hrtfmove", + "hrtfmove2", + "hrtfreverb", + "hrtfstat", + "hsboscil", + "hvs1", + "hvs2", + "hvs3", + "hypot", + "i", + "ihold", + "imagecreate", + "imagefree", + "imagegetpixel", + "imageload", + "imagesave", + "imagesetpixel", + "imagesize", + "in", + "in32", + "inch", + "inh", + "init", + "initc14", + "initc21", + "initc7", + "inleta", + "inletf", + "inletk", + "inletkid", + "inletv", + "ino", + "inq", + "inrg", + "ins", + "insglobal", + "insremot", + "int", + "integ", + "interleave", + "interp", + "invalue", + "inx", + "inz", + "jacktransport", + "jitter", + "jitter2", + "joystick", + "jspline", + "k", + "la_i_add_mc", + "la_i_add_mr", + "la_i_add_vc", + "la_i_add_vr", + "la_i_assign_mc", + "la_i_assign_mr", + "la_i_assign_t", + "la_i_assign_vc", + "la_i_assign_vr", + "la_i_conjugate_mc", + "la_i_conjugate_mr", + "la_i_conjugate_vc", + "la_i_conjugate_vr", + "la_i_distance_vc", + "la_i_distance_vr", + "la_i_divide_mc", + "la_i_divide_mr", + "la_i_divide_vc", + "la_i_divide_vr", + "la_i_dot_mc", + "la_i_dot_mc_vc", + "la_i_dot_mr", + "la_i_dot_mr_vr", + "la_i_dot_vc", + "la_i_dot_vr", + "la_i_get_mc", + "la_i_get_mr", + "la_i_get_vc", + "la_i_get_vr", + "la_i_invert_mc", + "la_i_invert_mr", + "la_i_lower_solve_mc", + "la_i_lower_solve_mr", + "la_i_lu_det_mc", + "la_i_lu_det_mr", + "la_i_lu_factor_mc", + "la_i_lu_factor_mr", + "la_i_lu_solve_mc", + "la_i_lu_solve_mr", + "la_i_mc_create", + "la_i_mc_set", + "la_i_mr_create", + "la_i_mr_set", + "la_i_multiply_mc", + "la_i_multiply_mr", + "la_i_multiply_vc", + "la_i_multiply_vr", + "la_i_norm1_mc", + "la_i_norm1_mr", + "la_i_norm1_vc", + "la_i_norm1_vr", + "la_i_norm_euclid_mc", + "la_i_norm_euclid_mr", + "la_i_norm_euclid_vc", + "la_i_norm_euclid_vr", + "la_i_norm_inf_mc", + "la_i_norm_inf_mr", + "la_i_norm_inf_vc", + "la_i_norm_inf_vr", + "la_i_norm_max_mc", + "la_i_norm_max_mr", + "la_i_print_mc", + "la_i_print_mr", + "la_i_print_vc", + "la_i_print_vr", + "la_i_qr_eigen_mc", + "la_i_qr_eigen_mr", + "la_i_qr_factor_mc", + "la_i_qr_factor_mr", + "la_i_qr_sym_eigen_mc", + "la_i_qr_sym_eigen_mr", + "la_i_random_mc", + "la_i_random_mr", + "la_i_random_vc", + "la_i_random_vr", + "la_i_size_mc", + "la_i_size_mr", + "la_i_size_vc", + "la_i_size_vr", + "la_i_subtract_mc", + "la_i_subtract_mr", + "la_i_subtract_vc", + "la_i_subtract_vr", + "la_i_t_assign", + "la_i_trace_mc", + "la_i_trace_mr", + "la_i_transpose_mc", + "la_i_transpose_mr", + "la_i_upper_solve_mc", + "la_i_upper_solve_mr", + "la_i_vc_create", + "la_i_vc_set", + "la_i_vr_create", + "la_i_vr_set", + "la_k_a_assign", + "la_k_add_mc", + "la_k_add_mr", + "la_k_add_vc", + "la_k_add_vr", + "la_k_assign_a", + "la_k_assign_f", + "la_k_assign_mc", + "la_k_assign_mr", + "la_k_assign_t", + "la_k_assign_vc", + "la_k_assign_vr", + "la_k_conjugate_mc", + "la_k_conjugate_mr", + "la_k_conjugate_vc", + "la_k_conjugate_vr", + "la_k_current_f", + "la_k_current_vr", + "la_k_distance_vc", + "la_k_distance_vr", + "la_k_divide_mc", + "la_k_divide_mr", + "la_k_divide_vc", + "la_k_divide_vr", + "la_k_dot_mc", + "la_k_dot_mc_vc", + "la_k_dot_mr", + "la_k_dot_mr_vr", + "la_k_dot_vc", + "la_k_dot_vr", + "la_k_f_assign", + "la_k_get_mc", + "la_k_get_mr", + "la_k_get_vc", + "la_k_get_vr", + "la_k_invert_mc", + "la_k_invert_mr", + "la_k_lower_solve_mc", + "la_k_lower_solve_mr", + "la_k_lu_det_mc", + "la_k_lu_det_mr", + "la_k_lu_factor_mc", + "la_k_lu_factor_mr", + "la_k_lu_solve_mc", + "la_k_lu_solve_mr", + "la_k_mc_set", + "la_k_mr_set", + "la_k_multiply_mc", + "la_k_multiply_mr", + "la_k_multiply_vc", + "la_k_multiply_vr", + "la_k_norm1_mc", + "la_k_norm1_mr", + "la_k_norm1_vc", + "la_k_norm1_vr", + "la_k_norm_euclid_mc", + "la_k_norm_euclid_mr", + "la_k_norm_euclid_vc", + "la_k_norm_euclid_vr", + "la_k_norm_inf_mc", + "la_k_norm_inf_mr", + "la_k_norm_inf_vc", + "la_k_norm_inf_vr", + "la_k_norm_max_mc", + "la_k_norm_max_mr", + "la_k_qr_eigen_mc", + "la_k_qr_eigen_mr", + "la_k_qr_factor_mc", + "la_k_qr_factor_mr", + "la_k_qr_sym_eigen_mc", + "la_k_qr_sym_eigen_mr", + "la_k_random_mc", + "la_k_random_mr", + "la_k_random_vc", + "la_k_random_vr", + "la_k_subtract_mc", + "la_k_subtract_mr", + "la_k_subtract_vc", + "la_k_subtract_vr", + "la_k_t_assign", + "la_k_trace_mc", + "la_k_trace_mr", + "la_k_upper_solve_mc", + "la_k_upper_solve_mr", + "la_k_vc_set", + "la_k_vr_set", + "lag", + "lagud", + "lastcycle", + "lenarray", + "lfo", + "lfsr", + "limit", + "limit1", + "lincos", + "line", + "linen", + "linenr", + "lineto", + "link_beat_force", + "link_beat_get", + "link_beat_request", + "link_create", + "link_enable", + "link_is_enabled", + "link_metro", + "link_peers", + "link_tempo_get", + "link_tempo_set", + "linlin", + "linrand", + "linseg", + "linsegb", + "linsegr", + "liveconv", + "locsend", + "locsig", + "log", + "log10", + "log2", + "logbtwo", + "logcurve", + "loopseg", + "loopsegp", + "looptseg", + "loopxseg", + "lorenz", + "loscil", + "loscil3", + "loscil3phs", + "loscilphs", + "loscilx", + "lowpass2", + "lowres", + "lowresx", + "lpcanal", + "lpcfilter", + "lpf18", + "lpform", + "lpfreson", + "lphasor", + "lpinterp", + "lposcil", + "lposcil3", + "lposcila", + "lposcilsa", + "lposcilsa2", + "lpread", + "lpreson", + "lpshold", + "lpsholdp", + "lpslot", + "lufs", + "mac", + "maca", + "madsr", + "mags", + "mandel", + "mandol", + "maparray", + "maparray_i", + "marimba", + "massign", + "max", + "max_k", + "maxabs", + "maxabsaccum", + "maxaccum", + "maxalloc", + "maxarray", + "mclock", + "mdelay", + "median", + "mediank", + "metro", + "metro2", + "metrobpm", + "mfb", + "midglobal", + "midiarp", + "midic14", + "midic21", + "midic7", + "midichannelaftertouch", + "midichn", + "midicontrolchange", + "midictrl", + "mididefault", + "midifilestatus", + "midiin", + "midinoteoff", + "midinoteoncps", + "midinoteonkey", + "midinoteonoct", + "midinoteonpch", + "midion", + "midion2", + "midiout", + "midiout_i", + "midipgm", + "midipitchbend", + "midipolyaftertouch", + "midiprogramchange", + "miditempo", + "midremot", + "min", + "minabs", + "minabsaccum", + "minaccum", + "minarray", + "mincer", + "mirror", + "mode", + "modmatrix", + "monitor", + "moog", + "moogladder", + "moogladder2", + "moogvcf", + "moogvcf2", + "moscil", + "mp3bitrate", + "mp3in", + "mp3len", + "mp3nchnls", + "mp3out", + "mp3scal", + "mp3sr", + "mpulse", + "mrtmsg", + "ms2st", + "mtof", + "mton", + "multitap", + "mute", + "mvchpf", + "mvclpf1", + "mvclpf2", + "mvclpf3", + "mvclpf4", + "mvmfilter", + "mxadsr", + "nchnls_hw", + "nestedap", + "nlalp", + "nlfilt", + "nlfilt2", + "noise", + "noteoff", + "noteon", + "noteondur", + "noteondur2", + "notnum", + "nreverb", + "nrpn", + "nsamp", + "nstance", + "nstrnum", + "nstrstr", + "ntof", + "ntom", + "ntrpol", + "nxtpow2", + "octave", + "octcps", + "octmidi", + "octmidib", + "octmidinn", + "octpch", + "olabuffer", + "oscbnk", + "oscil", + "oscil1", + "oscil1i", + "oscil3", + "oscili", + "oscilikt", + "osciliktp", + "oscilikts", + "osciln", + "oscils", + "oscilx", + "out", + "out32", + "outall", + "outc", + "outch", + "outh", + "outiat", + "outic", + "outic14", + "outipat", + "outipb", + "outipc", + "outkat", + "outkc", + "outkc14", + "outkpat", + "outkpb", + "outkpc", + "outleta", + "outletf", + "outletk", + "outletkid", + "outletv", + "outo", + "outq", + "outq1", + "outq2", + "outq3", + "outq4", + "outrg", + "outs", + "outs1", + "outs2", + "outvalue", + "outx", + "outz", + "p", + "p5gconnect", + "p5gdata", + "pan", + "pan2", + "pareq", + "part2txt", + "partials", + "partikkel", + "partikkelget", + "partikkelset", + "partikkelsync", + "passign", + "paulstretch", + "pcauchy", + "pchbend", + "pchmidi", + "pchmidib", + "pchmidinn", + "pchoct", + "pchtom", + "pconvolve", + "pcount", + "pdclip", + "pdhalf", + "pdhalfy", + "peak", + "pgmassign", + "pgmchn", + "phaser1", + "phaser2", + "phasor", + "phasorbnk", + "phs", + "pindex", + "pinker", + "pinkish", + "pitch", + "pitchac", + "pitchamdf", + "planet", + "platerev", + "plltrack", + "pluck", + "poisson", + "pol2rect", + "polyaft", + "polynomial", + "port", + "portk", + "poscil", + "poscil3", + "pow", + "powershape", + "powoftwo", + "pows", + "prealloc", + "prepiano", + "print", + "print_type", + "printarray", + "printf", + "printf_i", + "printk", + "printk2", + "printks", + "printks2", + "println", + "prints", + "printsk", + "product", + "pset", + "ptablew", + "ptrack", + "puts", + "pvadd", + "pvbufread", + "pvcross", + "pvinterp", + "pvoc", + "pvread", + "pvs2array", + "pvs2tab", + "pvsadsyn", + "pvsanal", + "pvsarp", + "pvsbandp", + "pvsbandr", + "pvsbandwidth", + "pvsbin", + "pvsblur", + "pvsbuffer", + "pvsbufread", + "pvsbufread2", + "pvscale", + "pvscent", + "pvsceps", + "pvscfs", + "pvscross", + "pvsdemix", + "pvsdiskin", + "pvsdisp", + "pvsenvftw", + "pvsfilter", + "pvsfread", + "pvsfreeze", + "pvsfromarray", + "pvsftr", + "pvsftw", + "pvsfwrite", + "pvsgain", + "pvsgendy", + "pvshift", + "pvsifd", + "pvsin", + "pvsinfo", + "pvsinit", + "pvslock", + "pvslpc", + "pvsmaska", + "pvsmix", + "pvsmooth", + "pvsmorph", + "pvsosc", + "pvsout", + "pvspitch", + "pvstanal", + "pvstencil", + "pvstrace", + "pvsvoc", + "pvswarp", + "pvsynth", + "pwd", + "pyassign", + "pyassigni", + "pyassignt", + "pycall", + "pycall1", + "pycall1i", + "pycall1t", + "pycall2", + "pycall2i", + "pycall2t", + "pycall3", + "pycall3i", + "pycall3t", + "pycall4", + "pycall4i", + "pycall4t", + "pycall5", + "pycall5i", + "pycall5t", + "pycall6", + "pycall6i", + "pycall6t", + "pycall7", + "pycall7i", + "pycall7t", + "pycall8", + "pycall8i", + "pycall8t", + "pycalli", + "pycalln", + "pycallni", + "pycallt", + "pyeval", + "pyevali", + "pyevalt", + "pyexec", + "pyexeci", + "pyexect", + "pyinit", + "pylassign", + "pylassigni", + "pylassignt", + "pylcall", + "pylcall1", + "pylcall1i", + "pylcall1t", + "pylcall2", + "pylcall2i", + "pylcall2t", + "pylcall3", + "pylcall3i", + "pylcall3t", + "pylcall4", + "pylcall4i", + "pylcall4t", + "pylcall5", + "pylcall5i", + "pylcall5t", + "pylcall6", + "pylcall6i", + "pylcall6t", + "pylcall7", + "pylcall7i", + "pylcall7t", + "pylcall8", + "pylcall8i", + "pylcall8t", + "pylcalli", + "pylcalln", + "pylcallni", + "pylcallt", + "pyleval", + "pylevali", + "pylevalt", + "pylexec", + "pylexeci", + "pylexect", + "pylrun", + "pylruni", + "pylrunt", + "pyrun", + "pyruni", + "pyrunt", + "qinf", + "qnan", + "r2c", + "rand", + "randc", + "randh", + "randi", + "random", + "randomh", + "randomi", + "rbjeq", + "readclock", + "readf", + "readfi", + "readk", + "readk2", + "readk3", + "readk4", + "readks", + "readscore", + "readscratch", + "rect2pol", + "release", + "remoteport", + "remove", + "repluck", + "reshapearray", + "reson", + "resonbnk", + "resonk", + "resonr", + "resonx", + "resonxk", + "resony", + "resonz", + "resyn", + "reverb", + "reverb2", + "reverbsc", + "rewindscore", + "rezzy", + "rfft", + "rifft", + "rms", + "rnd", + "rnd31", + "rndseed", + "round", + "rspline", + "rtclock", + "s16b14", + "s32b14", + "samphold", + "sandpaper", + "sc_lag", + "sc_lagud", + "sc_phasor", + "sc_trig", + "scale", + "scale2", + "scalearray", + "scanhammer", + "scanmap", + "scans", + "scansmap", + "scantable", + "scanu", + "scanu2", + "schedkwhen", + "schedkwhennamed", + "schedule", + "schedulek", + "schedwhen", + "scoreline", + "scoreline_i", + "seed", + "sekere", + "select", + "semitone", + "sense", + "sensekey", + "seqtime", + "seqtime2", + "sequ", + "sequstate", + "serialBegin", + "serialEnd", + "serialFlush", + "serialPrint", + "serialRead", + "serialWrite", + "serialWrite_i", + "setcol", + "setctrl", + "setksmps", + "setrow", + "setscorepos", + "sfilist", + "sfinstr", + "sfinstr3", + "sfinstr3m", + "sfinstrm", + "sfload", + "sflooper", + "sfpassign", + "sfplay", + "sfplay3", + "sfplay3m", + "sfplaym", + "sfplist", + "sfpreset", + "shaker", + "shiftin", + "shiftout", + "signum", + "sin", + "sinh", + "sininv", + "sinsyn", + "skf", + "sleighbells", + "slicearray", + "slicearray_i", + "slider16", + "slider16f", + "slider16table", + "slider16tablef", + "slider32", + "slider32f", + "slider32table", + "slider32tablef", + "slider64", + "slider64f", + "slider64table", + "slider64tablef", + "slider8", + "slider8f", + "slider8table", + "slider8tablef", + "sliderKawai", + "sndloop", + "sndwarp", + "sndwarpst", + "sockrecv", + "sockrecvs", + "socksend", + "socksends", + "sorta", + "sortd", + "soundin", + "space", + "spat3d", + "spat3di", + "spat3dt", + "spdist", + "spf", + "splitrig", + "sprintf", + "sprintfk", + "spsend", + "sqrt", + "squinewave", + "st2ms", + "statevar", + "sterrain", + "stix", + "strcat", + "strcatk", + "strchar", + "strchark", + "strcmp", + "strcmpk", + "strcpy", + "strcpyk", + "strecv", + "streson", + "strfromurl", + "strget", + "strindex", + "strindexk", + "string2array", + "strlen", + "strlenk", + "strlower", + "strlowerk", + "strrindex", + "strrindexk", + "strset", + "strstrip", + "strsub", + "strsubk", + "strtod", + "strtodk", + "strtol", + "strtolk", + "strupper", + "strupperk", + "stsend", + "subinstr", + "subinstrinit", + "sum", + "sumarray", + "svfilter", + "svn", + "syncgrain", + "syncloop", + "syncphasor", + "system", + "system_i", + "tab", + "tab2array", + "tab2pvs", + "tab_i", + "tabifd", + "table", + "table3", + "table3kt", + "tablecopy", + "tablefilter", + "tablefilteri", + "tablegpw", + "tablei", + "tableicopy", + "tableigpw", + "tableikt", + "tableimix", + "tablekt", + "tablemix", + "tableng", + "tablera", + "tableseg", + "tableshuffle", + "tableshufflei", + "tablew", + "tablewa", + "tablewkt", + "tablexkt", + "tablexseg", + "tabmorph", + "tabmorpha", + "tabmorphak", + "tabmorphi", + "tabplay", + "tabrec", + "tabsum", + "tabw", + "tabw_i", + "tambourine", + "tan", + "tanh", + "taninv", + "taninv2", + "tbvcf", + "tempest", + "tempo", + "temposcal", + "tempoval", + "timedseq", + "timeinstk", + "timeinsts", + "timek", + "times", + "tival", + "tlineto", + "tone", + "tonek", + "tonex", + "tradsyn", + "trandom", + "transeg", + "transegb", + "transegr", + "trcross", + "trfilter", + "trhighest", + "trigExpseg", + "trigLinseg", + "trigexpseg", + "trigger", + "trighold", + "triglinseg", + "trigphasor", + "trigseq", + "trim", + "trim_i", + "trirand", + "trlowest", + "trmix", + "trscale", + "trshift", + "trsplit", + "turnoff", + "turnoff2", + "turnoff2_i", + "turnoff3", + "turnon", + "tvconv", + "unirand", + "unwrap", + "upsamp", + "urandom", + "urd", + "vactrol", + "vadd", + "vadd_i", + "vaddv", + "vaddv_i", + "vaget", + "valpass", + "vaset", + "vbap", + "vbapg", + "vbapgmove", + "vbaplsinit", + "vbapmove", + "vbapz", + "vbapzmove", + "vcella", + "vclpf", + "vco", + "vco2", + "vco2ft", + "vco2ift", + "vco2init", + "vcomb", + "vcopy", + "vcopy_i", + "vdel_k", + "vdelay", + "vdelay3", + "vdelayk", + "vdelayx", + "vdelayxq", + "vdelayxs", + "vdelayxw", + "vdelayxwq", + "vdelayxws", + "vdivv", + "vdivv_i", + "vecdelay", + "veloc", + "vexp", + "vexp_i", + "vexpseg", + "vexpv", + "vexpv_i", + "vibes", + "vibr", + "vibrato", + "vincr", + "vlimit", + "vlinseg", + "vlowres", + "vmap", + "vmirror", + "vmult", + "vmult_i", + "vmultv", + "vmultv_i", + "voice", + "vosim", + "vphaseseg", + "vport", + "vpow", + "vpow_i", + "vpowv", + "vpowv_i", + "vps", + "vpvoc", + "vrandh", + "vrandi", + "vsubv", + "vsubv_i", + "vtaba", + "vtabi", + "vtabk", + "vtable1k", + "vtablea", + "vtablei", + "vtablek", + "vtablewa", + "vtablewi", + "vtablewk", + "vtabwa", + "vtabwi", + "vtabwk", + "vwrap", + "waveset", + "websocket", + "weibull", + "wgbow", + "wgbowedbar", + "wgbrass", + "wgclar", + "wgflute", + "wgpluck", + "wgpluck2", + "wguide1", + "wguide2", + "wiiconnect", + "wiidata", + "wiirange", + "wiisend", + "window", + "wrap", + "writescratch", + "wterrain", + "wterrain2", + "xadsr", + "xin", + "xout", + "xtratim", + "xyscale", + "zacl", + "zakinit", + "zamod", + "zar", + "zarg", + "zaw", + "zawm", + "zdf_1pole", + "zdf_1pole_mode", + "zdf_2pole", + "zdf_2pole_mode", + "zdf_ladder", + "zfilter2", + "zir", + "ziw", + "ziwm", + "zkcl", + "zkmod", + "zkr", + "zkw", + "zkwm" + ]; + var deprecatedOpcodes = [ + "OSCsendA", + "array", + "beadsynt", + "beosc", + "bformdec", + "bformenc", + "buchla", + "copy2ftab", + "copy2ttab", + "getrowlin", + "hrtfer", + "ktableseg", + "lentab", + "lua_exec", + "lua_iaopcall", + "lua_iaopcall_off", + "lua_ikopcall", + "lua_ikopcall_off", + "lua_iopcall", + "lua_iopcall_off", + "lua_opdef", + "maxtab", + "mintab", + "mp3scal_check", + "mp3scal_load", + "mp3scal_load2", + "mp3scal_play", + "mp3scal_play2", + "pop", + "pop_f", + "ptable", + "ptable3", + "ptablei", + "ptableiw", + "push", + "push_f", + "pvsgendy", + "scalet", + "signalflowgraph", + "sndload", + "socksend_k", + "soundout", + "soundouts", + "specaddm", + "specdiff", + "specdisp", + "specfilt", + "spechist", + "specptrk", + "specscal", + "specsum", + "spectrum", + "stack", + "sumTableFilter", + "sumtab", + "systime", + "tabgen", + "tableiw", + "tabmap", + "tabmap_i", + "tabrowlin", + "tabslice", + "tb0", + "tb0_init", + "tb1", + "tb10", + "tb10_init", + "tb11", + "tb11_init", + "tb12", + "tb12_init", + "tb13", + "tb13_init", + "tb14", + "tb14_init", + "tb15", + "tb15_init", + "tb1_init", + "tb2", + "tb2_init", + "tb3", + "tb3_init", + "tb4", + "tb4_init", + "tb5", + "tb5_init", + "tb6", + "tb6_init", + "tb7", + "tb7_init", + "tb8", + "tb8_init", + "tb9", + "tb9_init", + "vbap16", + "vbap1move", + "vbap4", + "vbap4move", + "vbap8", + "vbap8move", + "xscanmap", + "xscans", + "xscansmap", + "xscanu", + "xyin" + ]; + opcodes = lang.arrayToMap(opcodes); + deprecatedOpcodes = lang.arrayToMap(deprecatedOpcodes); + this.lineContinuations = [ + { + token: "constant.character.escape.line-continuation.csound", + regex: /\\$/ + }, this.pushRule({ + token: "constant.character.escape.line-continuation.csound", + regex: /\\/, + next: "line continuation" + }) + ]; + this.comments.push(this.lineContinuations); + this.quotedStringContents.push(this.lineContinuations, { + token: "invalid.illegal", + regex: /[^"\\]*$/ + }); + var start = this.$rules.start; + start.splice(1, 0, { + token: ["text.csound", "entity.name.label.csound", "entity.punctuation.label.csound", "text.csound"], + regex: /^([ \t]*)(\w+)(:)([ \t]+|$)/ + }); + start.push(this.pushRule({ + token: "keyword.function.csound", + regex: /\binstr\b/, + next: "instrument numbers and identifiers" + }), this.pushRule({ + token: "keyword.function.csound", + regex: /\bopcode\b/, + next: "after opcode keyword" + }), { + token: "keyword.other.csound", + regex: /\bend(?:in|op)\b/ + }, { + token: "variable.language.csound", + regex: /\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b/ + }, this.numbers, { + token: "keyword.operator.csound", + regex: "\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~¬]|[=!+\\-*/^%&|<>#?:]" + }, this.pushRule({ + token: "punctuation.definition.string.begin.csound", + regex: /"/, + next: "quoted string" + }), this.pushRule({ + token: "punctuation.definition.string.begin.csound", + regex: /{{/, + next: "braced string" + }), { + token: "keyword.control.csound", + regex: /\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\b/ + }, this.pushRule({ + token: "keyword.control.csound", + regex: /\b[ik]?goto\b/, + next: "goto before label" + }), this.pushRule({ + token: "keyword.control.csound", + regex: /\b(?:r(?:einit|igoto)|tigoto)\b/, + next: "goto before label" + }), this.pushRule({ + token: "keyword.control.csound", + regex: /\bc(?:g|in?|k|nk?)goto\b/, + next: ["goto before label", "goto before argument"] + }), this.pushRule({ + token: "keyword.control.csound", + regex: /\btimout\b/, + next: ["goto before label", "goto before argument", "goto before argument"] + }), this.pushRule({ + token: "keyword.control.csound", + regex: /\bloop_[gl][et]\b/, + next: ["goto before label", "goto before argument", "goto before argument", "goto before argument"] + }), this.pushRule({ + token: "support.function.csound", + regex: /\b(?:readscore|scoreline(?:_i)?)\b/, + next: "Csound score opcode" + }), this.pushRule({ + token: "support.function.csound", + regex: /\bpyl?run[it]?\b(?!$)/, + next: "Python opcode" + }), this.pushRule({ + token: "support.function.csound", + regex: /\blua_(?:exec|opdef)\b(?!$)/, + next: "Lua opcode" + }), { + token: "support.variable.csound", + regex: /\bp\d+\b/ + }, { + regex: /\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b/, onMatch: function (value, currentState, stack, line) { + var tokens = value.split(this.splitRegex); + var name = tokens[1]; + var type; + if (opcodes.hasOwnProperty(name)) + type = "support.function.csound"; + else if (deprecatedOpcodes.hasOwnProperty(name)) + type = "invalid.deprecated.csound"; + if (type) { + if (tokens[2]) { + return [ + { type: type, value: name }, + { type: "punctuation.type-annotation.csound", value: tokens[2] }, + { type: "type-annotation.storage.type.csound", value: tokens[3] } + ]; + } + return type; + } + return "text.csound"; + } + }); + this.$rules["macro parameter value list"].splice(2, 0, { + token: "punctuation.definition.string.begin.csound", + regex: /{{/, + next: "macro parameter value braced string" + }); + var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-"); + this.addRules({ + "macro parameter value braced string": [ + { + token: "constant.character.escape.csound", + regex: /\\[#'()]/ + }, { + token: "invalid.illegal.csound.csound", + regex: /[#'()]/ + }, { + token: "punctuation.definition.string.end.csound", + regex: /}}/, + next: "macro parameter value list" + }, { + defaultToken: "string.braced.csound" + } + ], + "instrument numbers and identifiers": [ + this.comments, + { + token: "entity.name.function.csound", + regex: /\d+|[A-Z_a-z]\w*/ + }, this.popRule({ + token: "empty", + regex: /$/ + }) + ], + "after opcode keyword": [ + this.comments, + this.popRule({ + token: "empty", + regex: /$/ + }), this.popRule({ + token: "entity.name.function.opcode.csound", + regex: /[A-Z_a-z]\w*/, + next: "opcode type signatures" + }) + ], + "opcode type signatures": [ + this.comments, + this.popRule({ + token: "empty", + regex: /$/ + }), { + token: "storage.type.csound", + regex: /\b(?:0|[afijkKoOpPStV\[\]]+)/ + } + ], + "quoted string": [ + this.popRule({ + token: "punctuation.definition.string.end.csound", + regex: /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "braced string": [ + this.popRule({ + token: "punctuation.definition.string.end.csound", + regex: /}}/ + }), + this.bracedStringContents, + { + defaultToken: "string.braced.csound" + } + ], + "goto before argument": [ + this.popRule({ + token: "text.csound", + regex: /,/ + }), + start + ], + "goto before label": [ + { + token: "text.csound", + regex: /\s+/ + }, + this.comments, + this.popRule({ + token: "entity.name.label.csound", + regex: /\w+/ + }), this.popRule({ + token: "empty", + regex: /(?!\w)/ + }) + ], + "Csound score opcode": [ + this.comments, + { + token: "punctuation.definition.string.begin.csound", + regex: /{{/, + next: scoreHighlightRules.embeddedRulePrefix + "start" + }, this.popRule({ + token: "empty", + regex: /$/ + }) + ], + "Python opcode": [ + this.comments, + { + token: "punctuation.definition.string.begin.csound", + regex: /{{/, + next: "python-start" + }, this.popRule({ + token: "empty", + regex: /$/ + }) + ], + "Lua opcode": [ + this.comments, + { + token: "punctuation.definition.string.begin.csound", + regex: /{{/, + next: "lua-start" + }, this.popRule({ + token: "empty", + regex: /$/ + }) + ], + "line continuation": [ + this.popRule({ + token: "empty", + regex: /$/ + }), + this.semicolonComments, + { + token: "invalid.illegal.csound", + regex: /\S.*/ + } + ] + }); + var rules = [ + this.popRule({ + token: "punctuation.definition.string.end.csound", + regex: /}}/ + }) + ]; + this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, rules); + this.embedRules(PythonHighlightRules, "python-", rules); + this.embedRules(LuaHighlightRules, "lua-", rules); + this.normalizeRules(); +}; +oop.inherits(CsoundOrchestraHighlightRules, CsoundPreprocessorHighlightRules); +exports.CsoundOrchestraHighlightRules = CsoundOrchestraHighlightRules; + +}); + +define("ace/mode/csound_orchestra",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_orchestra_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CsoundOrchestraHighlightRules = require("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules; +var Mode = function () { + this.HighlightRules = CsoundOrchestraHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/csound_orchestra"; + this.snippetFileId = "ace/snippets/csound_orchestra"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/csound_orchestra"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-csound_score.js b/ui/base1/ace/mode-csound_score.js new file mode 100644 index 0000000..661a304 --- /dev/null +++ b/ui/base1/ace/mode-csound_score.js @@ -0,0 +1,409 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CsoundPreprocessorHighlightRules = function (embeddedRulePrefix) { + this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix; + this.semicolonComments = { + token: "comment.line.semicolon.csound", + regex: ";.*$" + }; + this.comments = [ + { + token: "punctuation.definition.comment.begin.csound", + regex: "/\\*", + push: [ + { + token: "punctuation.definition.comment.end.csound", + regex: "\\*/", + next: "pop" + }, { + defaultToken: "comment.block.csound" + } + ] + }, { + token: "comment.line.double-slash.csound", + regex: "//.*$" + }, + this.semicolonComments + ]; + this.macroUses = [ + { + token: ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"], + regex: /(\$[A-Z_a-z]\w*\.?)(\()/, + next: "macro parameter value list" + }, { + token: "entity.name.function.preprocessor.csound", + regex: /\$[A-Z_a-z]\w*(?:\.|\b)/ + } + ]; + this.numbers = [ + { + token: "constant.numeric.float.csound", + regex: /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/ + }, { + token: ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"], + regex: /(0[Xx])([0-9A-Fa-f]+)/ + }, { + token: "constant.numeric.integer.decimal.csound", + regex: /\d+/ + } + ]; + this.bracedStringContents = [ + { + token: "constant.character.escape.csound", + regex: /\\(?:[\\abnrt"]|[0-7]{1,3})/ + }, + { + token: "constant.character.placeholder.csound", + regex: /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/ + }, { + token: "constant.character.escape.csound", + regex: /%%/ + } + ]; + this.quotedStringContents = [ + this.macroUses, + this.bracedStringContents + ]; + var start = [ + this.comments, + { + token: "keyword.preprocessor.csound", + regex: /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/ + }, { + token: "keyword.preprocessor.csound", + regex: /#include/, + push: [ + this.comments, + { + token: "string.csound", + regex: /([^ \t])(?:.*?\1)/, + next: "pop" + } + ] + }, { + token: "keyword.preprocessor.csound", + regex: /#includestr/, + push: [ + this.comments, + { + token: "string.csound", + regex: /([^ \t])(?:.*?\1)/, + next: "pop" + } + ] + }, { + token: "keyword.preprocessor.csound", + regex: /#[ \t]*define/, + next: "define directive" + }, { + token: "keyword.preprocessor.csound", + regex: /#(?:ifn?def|undef)\b/, + next: "macro directive" + }, + this.macroUses + ]; + this.$rules = { + "start": start, + "define directive": [ + this.comments, + { + token: "entity.name.function.preprocessor.csound", + regex: /[A-Z_a-z]\w*/ + }, { + token: "punctuation.definition.macro-parameter-name-list.begin.csound", + regex: /\(/, + next: "macro parameter name list" + }, { + token: "punctuation.definition.macro.begin.csound", + regex: /#/, + next: "macro body" + } + ], + "macro parameter name list": [ + { + token: "variable.parameter.preprocessor.csound", + regex: /[A-Z_a-z]\w*/ + }, { + token: "punctuation.definition.macro-parameter-name-list.end.csound", + regex: /\)/, + next: "define directive" + } + ], + "macro body": [ + { + token: "constant.character.escape.csound", + regex: /\\#/ + }, { + token: "punctuation.definition.macro.end.csound", + regex: /#/, + next: "start" + }, + start + ], + "macro directive": [ + this.comments, + { + token: "entity.name.function.preprocessor.csound", + regex: /[A-Z_a-z]\w*/, + next: "start" + } + ], + "macro parameter value list": [ + { + token: "punctuation.definition.macro-parameter-value-list.end.csound", + regex: /\)/, + next: "start" + }, { + token: "punctuation.definition.string.begin.csound", + regex: /"/, + next: "macro parameter value quoted string" + }, this.pushRule({ + token: "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex: /\(/, + next: "macro parameter value parenthetical" + }), { + token: "punctuation.macro-parameter-value-separator.csound", + regex: "[#']" + } + ], + "macro parameter value quoted string": [ + { + token: "constant.character.escape.csound", + regex: /\\[#'()]/ + }, { + token: "invalid.illegal.csound", + regex: /[#'()]/ + }, { + token: "punctuation.definition.string.end.csound", + regex: /"/, + next: "macro parameter value list" + }, + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "macro parameter value parenthetical": [ + { + token: "constant.character.escape.csound", + regex: /\\\)/ + }, this.popRule({ + token: "punctuation.macro-parameter-value-parenthetical.end.csound", + regex: /\)/ + }), this.pushRule({ + token: "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex: /\(/, + next: "macro parameter value parenthetical" + }), + start + ] + }; +}; +oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules); +(function () { + this.pushRule = function (params) { + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + params.next[i] = this.embeddedRulePrefix + params.next[i]; + } + } + return { + regex: params.regex, onMatch: function (value, currentState, stack, line) { + if (stack.length === 0) + stack.push(currentState); + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + stack.push(params.next[i]); + } + } + else { + stack.push(params.next); + } + this.next = stack[stack.length - 1]; + return params.token; + }, + get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; }, + set next(next) { + if (!Array.isArray(params.next)) { + params.next = next; + } + }, + get token() { return params.token; } + }; + }; + this.popRule = function (params) { + if (params.next) { + params.next = this.embeddedRulePrefix + params.next; + } + return { + regex: params.regex, onMatch: function (value, currentState, stack, line) { + stack.pop(); + if (params.next) { + stack.push(params.next); + this.next = stack[stack.length - 1]; + } + else { + this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop(); + } + return params.token; + } + }; + }; +}).call(CsoundPreprocessorHighlightRules.prototype); +exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules; + +}); + +define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; +var CsoundScoreHighlightRules = function (embeddedRulePrefix) { + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + this.quotedStringContents.push({ + token: "invalid.illegal.csound-score", + regex: /[^"]*$/ + }); + var start = this.$rules.start; + start.push({ + token: "keyword.control.csound-score", + regex: /[aBbCdefiqstvxy]/ + }, { + token: "invalid.illegal.csound-score", + regex: /w/ + }, { + token: "constant.numeric.language.csound-score", + regex: /z/ + }, { + token: ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"], + regex: /([nNpP][pP])(\d+)/ + }, { + token: "keyword.other.csound-score", + regex: /[mn]/, + push: [ + { + token: "empty", + regex: /$/, + next: "pop" + }, + this.comments, + { + token: "entity.name.label.csound-score", + regex: /[A-Z_a-z]\w*/ + } + ] + }, { + token: "keyword.preprocessor.csound-score", + regex: /r\b/, + next: "repeat section" + }, this.numbers, { + token: "keyword.operator.csound-score", + regex: "[!+\\-*/^%&|<>#~.]" + }, this.pushRule({ + token: "punctuation.definition.string.begin.csound-score", + regex: /"/, + next: "quoted string" + }), this.pushRule({ + token: "punctuation.braced-loop.begin.csound-score", + regex: /{/, + next: "loop after left brace" + })); + this.addRules({ + "repeat section": [ + { + token: "empty", + regex: /$/, + next: "start" + }, + this.comments, + { + token: "constant.numeric.integer.decimal.csound-score", + regex: /\d+/, + next: "repeat section before label" + } + ], + "repeat section before label": [ + { + token: "empty", + regex: /$/, + next: "start" + }, + this.comments, + { + token: "entity.name.label.csound-score", + regex: /[A-Z_a-z]\w*/, + next: "start" + } + ], + "quoted string": [ + this.popRule({ + token: "punctuation.definition.string.end.csound-score", + regex: /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound-score" + } + ], + "loop after left brace": [ + this.popRule({ + token: "constant.numeric.integer.decimal.csound-score", + regex: /\d+/, + next: "loop after repeat count" + }), + this.comments, + { + token: "invalid.illegal.csound", + regex: /\S.*/ + } + ], + "loop after repeat count": [ + this.popRule({ + token: "entity.name.function.preprocessor.csound-score", + regex: /[A-Z_a-z]\w*\b/, + next: "loop after macro name" + }), + this.comments, + { + token: "invalid.illegal.csound", + regex: /\S.*/ + } + ], + "loop after macro name": [ + start, + this.popRule({ + token: "punctuation.braced-loop.end.csound-score", + regex: /}/ + }) + ] + }); + this.normalizeRules(); +}; +oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules); +exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules; + +}); + +define("ace/mode/csound_score",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_score_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; +var Mode = function () { + this.HighlightRules = CsoundScoreHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/csound_score"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/csound_score"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-csp.js b/ui/base1/ace/mode-csp.js new file mode 100644 index 0000000..3a326e1 --- /dev/null +++ b/ui/base1/ace/mode-csp.js @@ -0,0 +1,59 @@ +define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + EXPLANATION + + This highlight rules were created to help developer spot typos when working + with Content-Security-Policy (CSP). See: + https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/ + */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CspHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "constant.language": "child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src" + + "|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri" + + "|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri", + "variable": "'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'" + }, "identifier", true); + this.$rules = { + start: [{ + token: "string.link", + regex: /https?:[^;\s]*/ + }, { + token: "operator.punctuation", + regex: /;/ + }, { + token: keywordMapper, + regex: /[^\s;]+/ + }] + }; +}; +oop.inherits(CspHighlightRules, TextHighlightRules); +exports.CspHighlightRules = CspHighlightRules; + +}); + +define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var TextMode = require("./text").Mode; +var CspHighlightRules = require("./csp_highlight_rules").CspHighlightRules; +var oop = require("../lib/oop"); +var Mode = function () { + this.HighlightRules = CspHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/csp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/csp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-css.js b/ui/base1/ace/mode-css.js new file mode 100644 index 0000000..e38e97d --- /dev/null +++ b/ui/base1/ace/mode-css.js @@ -0,0 +1,632 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/css"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-curly.js b/ui/base1/ace/mode-curly.js new file mode 100644 index 0000000..6091fe9 --- /dev/null +++ b/ui/base1/ace/mode-curly.js @@ -0,0 +1,2381 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var CurlyHighlightRules = function () { + HtmlHighlightRules.call(this); + this.$rules["start"].unshift({ + token: "variable", + regex: "{{", + push: "curly-start" + }); + this.$rules["curly-start"] = [{ + token: "variable", + regex: "}}", + next: "pop" + }]; + this.normalizeRules(); +}; +oop.inherits(CurlyHighlightRules, HtmlHighlightRules); +exports.CurlyHighlightRules = CurlyHighlightRules; + +}); + +define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/folding/html","ace/mode/curly_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var HtmlFoldMode = require("./folding/html").FoldMode; +var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = CurlyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/curly"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/curly"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-cuttlefish.js b/ui/base1/ace/mode-cuttlefish.js new file mode 100644 index 0000000..67e5516 --- /dev/null +++ b/ui/base1/ace/mode-cuttlefish.js @@ -0,0 +1,56 @@ +define("ace/mode/cuttlefish_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CuttlefishHighlightRules = function () { + this.$rules = { + start: [{ + token: ['text', 'comment'], + regex: /^([ \t]*)(#.*)$/ + }, { + token: ['text', 'keyword', 'text', 'string', 'text', 'comment'], + regex: /^([ \t]*)(include)([ \t]*)([A-Za-z0-9-\_\.\*\/]+)([ \t]*)(#.*)?$/ + }, { + token: ['text', 'keyword', 'text', 'operator', 'text', 'string', 'text', 'comment'], + regex: /^([ \t]*)([A-Za-z0-9-_]+(?:\.[A-Za-z0-9-_]+)*)([ \t]*)(=)([ \t]*)([^ \t#][^#]*?)([ \t]*)(#.*)?$/ + }, { + defaultToken: 'invalid' + }] + }; + this.normalizeRules(); +}; +CuttlefishHighlightRules.metaData = { + fileTypes: ['conf'], + keyEquivalent: '^~C', + name: 'Cuttlefish', + scopeName: 'source.conf' +}; +oop.inherits(CuttlefishHighlightRules, TextHighlightRules); +exports.CuttlefishHighlightRules = CuttlefishHighlightRules; + +}); + +define("ace/mode/cuttlefish",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cuttlefish_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CuttlefishHighlightRules = require("./cuttlefish_highlight_rules").CuttlefishHighlightRules; +var Mode = function () { + this.HighlightRules = CuttlefishHighlightRules; + this.foldingRules = null; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = null; + this.$id = "ace/mode/cuttlefish"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/cuttlefish"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-d.js b/ui/base1/ace/mode-d.js new file mode 100644 index 0000000..50da130 --- /dev/null +++ b/ui/base1/ace/mode-d.js @@ -0,0 +1,450 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DHighlightRules = function () { + var keywords = ("this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|" + + "typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters"); + var keywordControls = ("break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|" + + "return|switch|while|catch|try|throw|finally|version|assert|unittest|with"); + var types = ("auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|" + + "cfloat|creal|cdouble|cent|ifloat|ireal|idouble|" + + "int|long|short|void|uint|ulong|ushort|ucent|" + + "function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object"); + var modifiers = ("abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|" + + "ref|immutable|lazy|nothrow|override|package|pragma|private|protected|" + + "public|pure|scope|shared|__gshared|synchronized|static|volatile"); + var storages = ("class|struct|union|template|interface|enum|macro"); + var stringEscapesSeq = { + token: "constant.language.escape", + regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|" + + "(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))" + }; + var builtinConstants = ("null|true|false|" + + "__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|" + + "__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__"); + var operators = ("/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|" + + "\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|" + + "\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|" + + "\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|" + + "\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.modifier": modifiers, + "keyword.control": keywordControls, + "keyword.type": types, + "keyword": keywords, + "keyword.storage": storages, + "punctation": "\\.|\\,|;|\\.\\.|\\.\\.\\.", + "keyword.operator": operators, + "constant.language": builtinConstants + }, "identifier"); + var identifierRe = "[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "star-comment" + }, { + token: "comment.shebang", + regex: "^\\s*#!.*" + }, { + token: "comment", + regex: "\\/\\+", + next: "plus-comment" + }, { + onMatch: function (value, currentState, state) { + state.unshift(this.next, value.substr(2)); + return "string"; + }, + regex: 'q"(?:[\\[\\(\\{\\<]+)', + next: 'operator-heredoc-string' + }, { + onMatch: function (value, currentState, state) { + state.unshift(this.next, value.substr(2)); + return "string"; + }, + regex: 'q"(?:[a-zA-Z_]+)$', + next: 'identifier-heredoc-string' + }, { + token: "string", // multi line string start + regex: '[xr]?"', + next: "quote-string" + }, { + token: "string", // multi line string start + regex: '[xr]?`', + next: "backtick-string" + }, { + token: "string", // single line + regex: "[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?" + }, { + token: ["keyword", "text", "paren.lparen"], + regex: /(asm)(\s*)({)/, + next: "d-asm" + }, { + token: ["keyword", "text", "paren.lparen", "constant.language"], + regex: "(__traits)(\\s*)(\\()(" + identifierRe + ")" + }, { + token: ["keyword", "text", "variable.module"], + regex: "(import|module)(\\s+)((?:" + identifierRe + "\\.?)*)" + }, { + token: ["keyword.storage", "text", "entity.name.type"], + regex: "(" + storages + ")(\\s*)(" + identifierRe + ")" + }, { + token: ["keyword", "text", "variable.storage", "text"], + regex: "(alias|typedef)(\\s*)(" + identifierRe + ")(\\s*)" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b" + }, { + token: "entity.other.attribute-name", + regex: "@" + identifierRe + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: operators + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\.|\\:" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "star-comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: 'comment' + } + ], + "plus-comment": [ + { + token: "comment", // closing comment + regex: "\\+\\/", + next: "start" + }, { + defaultToken: 'comment' + } + ], + "quote-string": [ + stringEscapesSeq, + { + token: "string", + regex: '"[cdw]?', + next: "start" + }, { + defaultToken: 'string' + } + ], + "backtick-string": [ + stringEscapesSeq, + { + token: "string", + regex: '`[cdw]?', + next: "start" + }, { + defaultToken: 'string' + } + ], + "operator-heredoc-string": [ + { + onMatch: function (value, currentState, state) { + value = value.substring(value.length - 2, value.length - 1); + var map = { '>': '<', ']': '[', ')': '(', '}': '{' }; + if (Object.keys(map).indexOf(value) != -1) + value = map[value]; + if (value != state[1]) + return "string"; + state.shift(); + state.shift(); + return "string"; + }, + regex: '(?:[\\]\\)}>]+)"', + next: 'start' + }, { + token: 'string', + regex: '[^\\]\\)}>]+' + } + ], + "identifier-heredoc-string": [ + { + onMatch: function (value, currentState, state) { + value = value.substring(0, value.length - 1); + if (value != state[1]) + return "string"; + state.shift(); + state.shift(); + return "string"; + }, + regex: '^(?:[A-Za-z_][a-zA-Z0-9]+)"', + next: 'start' + }, { + token: 'string', + regex: '[^\\]\\)}>]+' + } + ], + "d-asm": [ + { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: 'keyword.instruction', + regex: '[a-zA-Z]+', + next: 'd-asm-instruction' + }, { + token: "text", + regex: "\\s+" + } + ], + 'd-asm-instruction': [ + { + token: 'constant.language', + regex: /AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i + }, { + token: 'identifier', + regex: '[a-zA-Z]+' + }, { + token: 'string', + regex: '"[^"]*"' + }, { + token: 'comment', + regex: '//.*$' + }, { + token: 'constant.numeric', + regex: '[0-9.xA-F]+' + }, { + token: 'punctuation.operator', + regex: '\\,' + }, { + token: 'punctuation.operator', + regex: ';', + next: 'd-asm' + }, { + token: 'text', + regex: '\\s+' + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +DHighlightRules.metaData = { + comment: 'D language', + fileTypes: ['d', 'di'], + firstLineMatch: '^#!.*\\b[glr]?dmd\\b.', + foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))', + foldingStopMarker: '(? indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var DHighlightRules = require("./d_highlight_rules").DHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = DHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/d"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/d"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-dart.js b/ui/base1/ace/mode-dart.js new file mode 100644 index 0000000..275cfa5 --- /dev/null +++ b/ui/base1/ace/mode-dart.js @@ -0,0 +1,618 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen"; +var c_cppHighlightRules = function (extraKeywords) { + var keywordControls = ("break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using"); + var storageType = ("asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" + + "class|wchar_t|template|char16_t|char32_t"); + var storageModifiers = ("const|extern|register|restrict|static|volatile|inline|private|" + + "protected|public|friend|explicit|virtual|export|mutable|typename|" + + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"); + var keywordOperators = ("and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"); + var builtinConstants = ("NULL|true|false|TRUE|FALSE|nullptr"); + var keywordMapper = this.$keywords = this.createKeywordMapper(Object.assign({ + "keyword.control": keywordControls, + "storage.type": storageType, + "storage.modifier": storageModifiers, + "keyword.operator": keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants, + "support.function.C99.c": cFunctions + }, extraKeywords), "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type + this.$rules = { + "start": [ + { + token: "comment", + regex: "//$", + next: "start" + }, { + token: "comment", + regex: "//", + next: "singleLineComment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: "'(?:" + escapeRe + "|.)?'" + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "constant.language.escape", regex: formatRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: 'R"\\(', + stateName: "rawString", + next: [ + { token: "string.end", regex: '\\)"', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b", + next: "directive" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }, { + token: "keyword.operator", + regex: /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(c_cppHighlightRules, TextHighlightRules); +exports.c_cppHighlightRules = c_cppHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = c_cppHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/c_cpp"; + this.snippetFileId = "ace/snippets/c_cpp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 958518BC-799F-477A-99F9-5B28EBF230F6) */ +"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DartHighlightRules = function () { + var constantLanguage = "true|false|null"; + var variableLanguage = "this|super"; + var keywordControl = "try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await"; + var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum"; + var storageModifier = "static|final|const"; + var storageType = "void|bool|num|int|double|dynamic|var|String"; + var keywordMapper = this.createKeywordMapper({ + "constant.language.dart": constantLanguage, + "variable.language.dart": variableLanguage, + "keyword.control.dart": keywordControl, + "keyword.declaration.dart": keywordDeclaration, + "storage.modifier.dart": storageModifier, + "storage.type.primitive.dart": storageType + }, "identifier"); + var stringfill = [{ + token: "constant.language.escape", + regex: /\\./ + }, { + token: "text", + regex: /\$(?:\w+|{[^"'}]+})?/ + }, { + defaultToken: "string" + }]; + this.$rules = { + "start": [ + { + token: "comment", + regex: /\/\/.*$/ + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: /\/\*/, + next: "comment" + }, + { + token: ["meta.preprocessor.script.dart"], + regex: "^(#!.*)$" + }, + { + token: "keyword.other.import.dart", + regex: "(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)" + }, + { + token: ["keyword.other.import.dart", "text"], + regex: "(?:\\b)(prefix)(\\s*:)" + }, + { + regex: "\\bas\\b", + token: "keyword.cast.dart" + }, + { + regex: "\\?|:", + token: "keyword.control.ternary.dart" + }, + { + regex: "(?:\\b)(is\\!?)(?:\\b)", + token: ["keyword.operator.dart"] + }, + { + regex: "(<<|>>>?|~|\\^|\\||&)", + token: ["keyword.operator.bitwise.dart"] + }, + { + regex: "((?:&|\\^|\\||<<|>>>?)=)", + token: ["keyword.operator.assignment.bitwise.dart"] + }, + { + regex: "(===?|!==?|<=?|>=?)", + token: ["keyword.operator.comparison.dart"] + }, + { + regex: "((?:[+*/%-]|\\~)=)", + token: ["keyword.operator.assignment.arithmetic.dart"] + }, + { + regex: "=", + token: "keyword.operator.assignment.dart" + }, + { + token: "string", + regex: "'''", + next: "qdoc" + }, + { + token: "string", + regex: '"""', + next: "qqdoc" + }, + { + token: "string", + regex: "'", + next: "qstring" + }, + { + token: "string", + regex: '"', + next: "qqstring" + }, + { + regex: "(\\-\\-|\\+\\+)", + token: ["keyword.operator.increment-decrement.dart"] + }, + { + regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)", + token: ["keyword.operator.arithmetic.dart"] + }, + { + regex: "(!|&&|\\|\\|)", + token: ["keyword.operator.logical.dart"] + }, + { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, + { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qdoc": [ + { + token: "string", + regex: "'''", + next: "start" + } + ].concat(stringfill), + "qqdoc": [ + { + token: "string", + regex: '"""', + next: "start" + } + ].concat(stringfill), + "qstring": [ + { + token: "string", + regex: "'|$", + next: "start" + } + ].concat(stringfill), + "qqstring": [ + { + token: "string", + regex: '"|$', + next: "start" + } + ].concat(stringfill) + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(DartHighlightRules, TextHighlightRules); +exports.DartHighlightRules = DartHighlightRules; + +}); + +define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var CMode = require("./c_cpp").Mode; +var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + CMode.call(this); + this.HighlightRules = DartHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, CMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/dart"; + this.snippetFileId = "ace/snippets/dart"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/dart"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-diff.js b/ui/base1/ace/mode-diff.js new file mode 100644 index 0000000..ea60cee --- /dev/null +++ b/ui/base1/ace/mode-diff.js @@ -0,0 +1,129 @@ +define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DiffHighlightRules = function () { + this.$rules = { + "start": [{ + regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$", + token: "punctuation.definition.separator.diff", + "name": "keyword" + }, { + regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$", + token: [ + "constant", + "constant.numeric", + "constant", + "comment.doc.tag" + ] + }, { + regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$", + token: [ + "constant.numeric", + "punctuation.definition.range.diff", + "constant.function", + "constant.numeric", + "punctuation.definition.range.diff", + "invalid" + ], + "name": "meta." + }, { + regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$", + token: [ + "constant.numeric", + "meta.tag" + ] + }, { + regex: "^([!+>])(.*?)(\\s*)$", + token: [ + "support.constant", + "text", + "invalid" + ] + }, { + regex: "^([<\\-])(.*?)(\\s*)$", + token: [ + "support.function", + "string", + "invalid" + ] + }, { + regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", + token: ["variable", "variable", "keyword", "variable"] + }, { + regex: "^Index.+$", + token: "variable" + }, { + regex: "^\\s+$", + token: "text" + }, { + regex: "\\s*$", + token: "invalid" + }, { + defaultToken: "invisible", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DiffHighlightRules, TextHighlightRules); +exports.DiffHighlightRules = DiffHighlightRules; + +}); + +define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function (levels, flag) { + this.regExpList = levels; + this.flag = flag; + this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag); +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var start = { row: row, column: line.length }; + var regList = this.regExpList; + for (var i = 1; i <= regList.length; i++) { + var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag); + if (re.test(line)) + break; + } + for (var l = session.getLength(); ++row < l;) { + line = session.getLine(row); + if (re.test(line)) + break; + } + if (row == start.row + 1) + return; + return new Range(start.row, start.column, row - 1, line.length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules; +var FoldMode = require("./folding/diff").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.foldingRules = new FoldMode(["diff", "@@|\\*{5}"], "i"); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/diff"; + this.snippetFileId = "ace/snippets/diff"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/diff"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-django.js b/ui/base1/ace/mode-django.js new file mode 100644 index 0000000..e3c1100 --- /dev/null +++ b/ui/base1/ace/mode-django.js @@ -0,0 +1,2416 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DjangoHighlightRules = function () { + this.$rules = { + 'start': [{ + token: "string", + regex: '".*?"' + }, { + token: "string", + regex: "'.*?'" + }, { + token: "constant", + regex: '[0-9]+' + }, { + token: "variable", + regex: "[-_a-zA-Z0-9:]+" + }], + 'tag': [{ + token: "entity.name.function", + regex: "[a-zA-Z][_a-zA-Z0-9]*", + next: "start" + }] + }; +}; +oop.inherits(DjangoHighlightRules, TextHighlightRules); +var DjangoHtmlHighlightRules = function () { + this.$rules = new HtmlHighlightRules().getRules(); + for (var i in this.$rules) { + this.$rules[i].unshift({ + token: "comment.line", + regex: "\\{#.*?#\\}" + }, { + token: "comment.block", + regex: "\\{\\%\\s*comment\\s*\\%\\}", + merge: true, + next: "django-comment" + }, { + token: "constant.language", + regex: "\\{\\{", + next: "django-start" + }, { + token: "constant.language", + regex: "\\{\\%", + next: "django-tag" + }); + this.embedRules(DjangoHighlightRules, "django-", [{ + token: "comment.block", + regex: "\\{\\%\\s*endcomment\\s*\\%\\}", + merge: true, + next: "start" + }, { + token: "constant.language", + regex: "\\%\\}", + next: "start" + }, { + token: "constant.language", + regex: "\\}\\}", + next: "start" + }]); + } +}; +oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules); +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = DjangoHtmlHighlightRules; +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/django"; + this.snippetFileId = "ace/snippets/django"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/django"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-dockerfile.js b/ui/base1/ace/mode-dockerfile.js new file mode 100644 index 0000000..dc2eb40 --- /dev/null +++ b/ui/base1/ace/mode-dockerfile.js @@ -0,0 +1,427 @@ +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var reservedKeywords = exports.reservedKeywords = ('!|{|}|case|do|done|elif|else|' + + 'esac|fi|for|if|in|then|until|while|' + + '&|;|export|local|read|typeset|unset|' + + 'elif|select|set|function|declare|readonly'); +var languageConstructs = exports.languageConstructs = ('[|]|alias|bg|bind|break|builtin|' + + 'cd|command|compgen|complete|continue|' + + 'dirs|disown|echo|enable|eval|exec|' + + 'exit|fc|fg|getopts|hash|help|history|' + + 'jobs|kill|let|logout|popd|printf|pushd|' + + 'pwd|return|set|shift|shopt|source|' + + 'suspend|test|times|trap|type|ulimit|' + + 'umask|unalias|wait'); +var ShHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + var func = "(?:" + variableName + "\\s*\\(\\))"; + this.$rules = { + "start": [{ + token: "constant", + regex: /\\./ + }, { + token: ["text", "comment"], + regex: /(^|\s)(#.*)$/ + }, { + token: "string.start", + regex: '"', + push: [{ + token: "constant.language.escape", + regex: /\\(?:[$`"\\]|$)/ + }, { + include: "variables" + }, { + token: "keyword.operator", + regex: /`/ // TODO highlight ` + }, { + token: "string.end", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\$'", + push: [{ + token: "constant.language.escape", + regex: /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex: "<<<", + token: "keyword.operator" + }, { + stateName: "heredoc", + regex: "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch: function (value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + { type: "constant", value: tokens[1] }, + { type: "text", value: tokens[2] }, + { type: "string", value: tokens[3] }, + { type: "support.class", value: tokens[4] }, + { type: "string", value: tokens[5] } + ]; + }, + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: ["keyword", "text", "text", "text", "variable"], + regex: /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token: "variable.language", + regex: builtinVariable + }, { + token: "variable", + regex: variable + }, { + include: "variables" + }, { + token: "support.function", + regex: func + }, { + token: "support.function", + regex: fileDescriptor + }, { + token: "string", // ' string + start: "'", end: "'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token: "punctuation.operator", + regex: ";" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]]" + }, { + token: "paren.rparen", + regex: "[\\)\\}]", + next: "pop" + }], + variables: [{ + token: "variable", + regex: /(\$)(\w+)/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\()/, + push: "start" + }, { + token: ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex: /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push: "start" + }, { + token: "variable", + regex: /\$[*@#?\-$!0_]/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\{)/, + push: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ShHighlightRules, TextHighlightRules); +exports.ShHighlightRules = ShHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var Range = require("../range").Range; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/sh"; + this.snippetFileId = "ace/snippets/sh"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var DockerfileHighlightRules = function () { + ShHighlightRules.call(this); + var startRules = this.$rules.start; + for (var i = 0; i < startRules.length; i++) { + if (startRules[i].token == "variable.language") { + startRules.splice(i, 0, { + token: "constant.language", + regex: "(?:^(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|COPY|LABEL)\\b)", + caseInsensitive: true + }); + break; + } + } +}; +oop.inherits(DockerfileHighlightRules, ShHighlightRules); +exports.DockerfileHighlightRules = DockerfileHighlightRules; + +}); + +define("ace/mode/dockerfile",["require","exports","module","ace/lib/oop","ace/mode/sh","ace/mode/dockerfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var ShMode = require("./sh").Mode; +var DockerfileHighlightRules = require("./dockerfile_highlight_rules").DockerfileHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + ShMode.call(this); + this.HighlightRules = DockerfileHighlightRules; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, ShMode); +(function () { + this.$id = "ace/mode/dockerfile"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/dockerfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-dot.js b/ui/base1/ace/mode-dot.js new file mode 100644 index 0000000..fcf9856 --- /dev/null +++ b/ui/base1/ace/mode-dot.js @@ -0,0 +1,348 @@ +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var DotHighlightRules = function () { + var keywords = lang.arrayToMap(("strict|node|edge|graph|digraph|subgraph").split("|")); + var attributes = lang.arrayToMap(("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z").split("|")); + this.$rules = { + "start": [ + { + token: "comment", + regex: /\/\/.*$/ + }, { + token: "comment", + regex: /#.*$/ + }, { + token: "comment", // multi line comment + merge: true, + regex: /\/\*/, + next: "comment" + }, { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", + regex: /[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/ + }, { + token: "keyword.operator", + regex: /\+|=|\->/ + }, { + token: "punctuation.operator", + regex: /,|;/ + }, { + token: "paren.lparen", + regex: /[\[{]/ + }, { + token: "paren.rparen", + regex: /[\]}]/ + }, { + token: "comment", + regex: /^#!.*$/ + }, { + token: function (value) { + if (keywords.hasOwnProperty(value.toLowerCase())) { + return "keyword"; + } + else if (attributes.hasOwnProperty(value.toLowerCase())) { + return "variable"; + } + else { + return "text"; + } + }, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '[^"\\\\]+', + merge: true + }, { + token: "string", + regex: "\\\\$", + next: "qqstring", + merge: true + }, { + token: "string", + regex: '"|$', + next: "start", + merge: true + } + ], + "qstring": [ + { + token: "string", + regex: "[^'\\\\]+", + merge: true + }, { + token: "string", + regex: "\\\\$", + next: "qstring", + merge: true + }, { + token: "string", + regex: "'|$", + next: "start", + merge: true + } + ] + }; +}; +oop.inherits(DotHighlightRules, TextHighlightRules); +exports.DotHighlightRules = DotHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules; +var DotFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = DotHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new DotFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["//", "#"]; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/dot"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/dot"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-drools.js b/ui/base1/ace/mode-drools.js new file mode 100644 index 0000000..96feef3 --- /dev/null +++ b/ui/base1/ace/mode-drools.js @@ -0,0 +1,557 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JavaHighlightRules = function () { + var identifierRe = "[a-zA-Z_$][a-zA-Z0-9_$]*"; + var keywords = ("abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "const|float|native|super|while|" + + "var|exports|opens|requires|uses|yield|" + + "module|permits|(?:non\\-)?sealed|var|" + + "provides|to|when|" + + "open|record|transitive|with"); + var buildinConstants = ("null|Infinity|NaN|undefined"); + var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" + + "ClassFormatError|Deprecated|EnumConstantNotPresentException|" + + "ExceptionInInitializerError|IllegalAccessError|" + + "IllegalThreadStateException|InstantiationError|InternalError|" + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|" + + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" + + "SuppressWarnings|TypeNotPresentException|UnknownError|" + + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" + + "InstantiationException|IndexOutOfBoundsException|" + + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" + + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" + + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" + + "InterruptedException|NoSuchMethodException|IllegalAccessException|" + + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" + + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" + + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" + + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" + + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" + + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" + + "StackOverflowError|OutOfMemoryError|VirtualMachineError|" + + "ArrayStoreException|ClassCastException|LinkageError|" + + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" + + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" + + "Cloneable|Class|CharSequence|Comparable|String|Object"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, + { include: "multiline-strings" }, + { include: "strings" }, + { include: "constants" }, + { + regex: "(open(?:\\s+))?module(?=\\s*\\w)", + token: "keyword", + next: [{ + regex: "{", + token: "paren.lparen", + next: [{ + regex: "}", + token: "paren.rparen", + next: "start" + }, { + regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b", + token: "keyword" + }] + }, { + token: "text", + regex: "\\s+" + }, { + token: "identifier", + regex: "\\w+" + }, { + token: "punctuation.operator", + regex: "." + }, { + token: "text", + regex: "\\s+" + }, { + regex: "", // exit if there is anything else + next: "start" + }] + }, + { include: "statements" } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "strings": [ + { + token: ["punctuation", "string"], + regex: /(\.)(")/, + push: [ + { + token: "lparen", + regex: /\\\{/, + push: [ + { + token: "text", + regex: /$/, + next: "start" + }, { + token: "rparen", + regex: /}/, + next: "pop" + }, { + include: "strings" + }, { + include: "constants" + }, { + include: "statements" + } + ] + }, { + token: "string", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + } + ] + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + } + ], + "multiline-strings": [ + { + token: ["punctuation", "string"], + regex: /(\.)(""")/, + push: [ + { + token: "string", + regex: '"""', + next: "pop" + }, { + token: "lparen", + regex: /\\\{/, + push: [ + { + token: "text", + regex: /$/, + next: "start" + }, { + token: "rparen", + regex: /}/, + next: "pop" + }, { + include: "multiline-strings" + }, { + include: "strings" + }, { + include: "constants" + }, { + include: "statements" + } + ] + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + defaultToken: "string" + } + ] + }, + { + token: "string", + regex: '"""', + push: [ + { + token: "string", + regex: '"""', + next: "pop" + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + defaultToken: "string" + } + ] + } + ], + "constants": [ + { + token: "constant.numeric", // hex + regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ + }, { + token: "constant.numeric", // float + regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + } + ], + "statements": [ + { + token: ["keyword", "text", "identifier"], + regex: "(record)(\\s+)(" + identifierRe + ")\\b" + }, + { + token: "keyword", + regex: "(?:" + keywords + ")\\b" + }, { + token: "storage.type.annotation", + regex: "@" + identifierRe + "\\b" + }, { + token: "entity.name.function", + regex: identifierRe + "(?=\\()" + }, { + token: keywordMapper, // TODO: Unicode escape sequences + regex: identifierRe + "\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(JavaHighlightRules, TextHighlightRules); +exports.JavaHighlightRules = JavaHighlightRules; + +}); + +define("ace/mode/drools_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/java_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var packageIdentifierRe = "[a-zA-Z\\$_\u00a1-\uffff][\\.a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var DroolsHighlightRules = function () { + var keywords = ("date|effective|expires|lock|on|active|no|loop|auto|focus" + + "|activation|group|agenda|ruleflow|duration|timer|calendars|refract|direct" + + "|dialect|salience|enabled|attributes|extends|template" + + "|function|contains|matches|eval|excludes|soundslike" + + "|memberof|not|in|or|and|exists|forall|over|from|entry|point|accumulate|acc|collect" + + "|action|reverse|result|end|init|instanceof|extends|super|boolean|char|byte|short" + + "|int|long|float|double|this|void|class|new|case|final|if|else|for|while|do" + + "|default|try|catch|finally|switch|synchronized|return|throw|break|continue|assert" + + "|modify|static|public|protected|private|abstract|native|transient|volatile" + + "|strictfp|throws|interface|enum|implements|type|window|trait|no-loop|str"); + var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" + + "ClassFormatError|Deprecated|EnumConstantNotPresentException|" + + "ExceptionInInitializerError|IllegalAccessError|" + + "IllegalThreadStateException|InstantiationError|InternalError|" + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|" + + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" + + "SuppressWarnings|TypeNotPresentException|UnknownError|" + + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" + + "InstantiationException|IndexOutOfBoundsException|" + + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" + + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" + + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" + + "InterruptedException|NoSuchMethodException|IllegalAccessException|" + + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" + + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" + + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" + + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" + + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" + + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" + + "StackOverflowError|OutOfMemoryError|VirtualMachineError|" + + "ArrayStoreException|ClassCastException|LinkageError|" + + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" + + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" + + "Cloneable|Class|CharSequence|Comparable|String|Object"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": "null", + "support.class": langClasses, + "support.function": "retract|update|modify|insert" + }, "identifier"); + var stringRules = function () { + return [{ + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }]; + }; + var basicPreRules = function (blockCommentRules) { + return [{ + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: blockCommentRules + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }]; + }; + var blockCommentRules = function (returnRule) { + return [ + { + token: "comment.block", // closing comment + regex: "\\*\\/", + next: returnRule + }, { + defaultToken: "comment.block" + } + ]; + }; + var basicPostRules = function () { + return [{ + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }]; + }; + this.$rules = { + "start": [].concat(basicPreRules("block.comment"), [ + { + token: "entity.name.type", + regex: "@[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: ["keyword", "text", "entity.name.type"], + regex: "(package)(\\s+)(" + packageIdentifierRe + ")" + }, { + token: ["keyword", "text", "keyword", "text", "entity.name.type"], + regex: "(import)(\\s+)(function)(\\s+)(" + packageIdentifierRe + ")" + }, { + token: ["keyword", "text", "entity.name.type"], + regex: "(import)(\\s+)(" + packageIdentifierRe + ")" + }, { + token: ["keyword", "text", "entity.name.type", "text", "variable"], + regex: "(global)(\\s+)(" + packageIdentifierRe + ")(\\s+)(" + identifierRe + ")" + }, { + token: ["keyword", "text", "keyword", "text", "entity.name.type"], + regex: "(declare)(\\s+)(trait)(\\s+)(" + identifierRe + ")" + }, { + token: ["keyword", "text", "entity.name.type"], + regex: "(declare)(\\s+)(" + identifierRe + ")" + }, { + token: ["keyword", "text", "entity.name.type"], + regex: "(extends)(\\s+)(" + packageIdentifierRe + ")" + }, { + token: ["keyword", "text"], + regex: "(rule)(\\s+)", + next: "asset.name" + } + ], stringRules(), [{ + token: ["variable.other", "text", "text"], + regex: "(" + identifierRe + ")(\\s*)(:)" + }, { + token: ["keyword", "text"], + regex: "(query)(\\s+)", + next: "asset.name" + }, { + token: ["keyword", "text"], + regex: "(when)(\\s*)" + }, { + token: ["keyword", "text"], + regex: "(then)(\\s*)", + next: "java-start" + }, { + token: "paren.lparen", + regex: /[\[({]/ + }, { + token: "paren.rparen", + regex: /[\])}]/ + }], basicPostRules()), + "block.comment": blockCommentRules("start"), + "asset.name": [ + { + token: "entity.name", + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "entity.name", + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "entity.name", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.embedRules(JavaHighlightRules, "java-", [ + { + token: "support.function", + regex: "\\b(insert|modify|retract|update)\\b" + }, { + token: "keyword", + regex: "\\bend\\b", + next: "start" + } + ]); +}; +oop.inherits(DroolsHighlightRules, TextHighlightRules); +exports.DroolsHighlightRules = DroolsHighlightRules; + +}); + +define("ace/mode/folding/drools",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /\b(rule|declare|query|when|then)\b/; + this.foldingStopMarker = /\bend\b/; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) { + var position = { row: row, column: line.length }; + var iterator = new TokenIterator(session, position.row, position.column); + var seek = "end"; + var token = iterator.getCurrentToken(); + if (token.value == "when") { + seek = "then"; + } + while (token) { + if (token.value == seek) { + return Range.fromPoints(position, { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }); + } + token = iterator.stepForward(); + } + } + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/drools",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/drools_highlight_rules","ace/mode/folding/drools"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var DroolsHighlightRules = require("./drools_highlight_rules").DroolsHighlightRules; +var DroolsFoldMode = require("./folding/drools").FoldMode; +var Mode = function () { + this.HighlightRules = DroolsHighlightRules; + this.foldingRules = new DroolsFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/drools"; + this.snippetFileId = "ace/snippets/drools"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/drools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-edifact.js b/ui/base1/ace/mode-edifact.js new file mode 100644 index 0000000..8fe6159 --- /dev/null +++ b/ui/base1/ace/mode-edifact.js @@ -0,0 +1,130 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/edifact_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var EdifactHighlightRules = function () { + var header = ("UNH"); + var segment = ("ADR|AGR|AJT|ALC|ALI|APP|APR|ARD|ARR|ASI|ATT|AUT|" + + "BAS|BGM|BII|BUS|" + + "CAV|CCD|CCI|CDI|CDS|CDV|CED|CIN|CLA|CLI|CMP|CNI|CNT|COD|COM|COT|CPI|CPS|CPT|CST|CTA|CUX|" + + "DAM|DFN|DGS|DII|DIM|DLI|DLM|DMS|DOC|DRD|DSG|DSI|DTM|" + + "EDT|EFI|ELM|ELU|ELV|EMP|EQA|EQD|EQN|ERC|ERP|EVE|FCA|FII|FNS|FNT|FOR|FSQ|FTX|" + + "GDS|GEI|GID|GIN|GIR|GOR|GPO|GRU|HAN|HYN|ICD|IDE|IFD|IHC|IMD|IND|INP|INV|IRQ|" + + "LAN|LIN|LOC|MEA|MEM|MKS|MOA|MSG|MTD|NAD|NAT|" + + "PAC|PAI|PAS|PCC|PCD|PCI|PDI|PER|PGI|PIA|PNA|POC|PRC|PRI|PRV|PSD|PTY|PYT|" + + "QRS|QTY|QUA|QVR|" + + "RCS|REL|RFF|RJL|RNG|ROD|RSL|RTE|" + + "SAL|SCC|SCD|SEG|SEL|SEQ|SFI|SGP|SGU|SPR|SPS|STA|STC|STG|STS|" + + "TAX|TCC|TDT|TEM|TMD|TMP|TOD|TPL|TRU|TSR|" + + "UNB|UNZ|UNT|UGH|UGT|UNS|" + + "VLI"); + var header = ("UNH"); + var buildinConstants = ("null|Infinity|NaN|undefined"); + var langClasses = (""); + var keywords = ("BY|SE|ON|INV|JP|UNOA"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "entity.name.segment": segment, + "entity.name.header": header, + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + this.$rules = { + "start": [ + { + token: "punctuation.operator", + regex: "\\+.\\+" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+" + }, { + token: "punctuation.operator", + regex: "\\:|'" + }, { + token: "identifier", + regex: "\\:D\\:" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +EdifactHighlightRules.metaData = { fileTypes: ['edi'], + keyEquivalent: '^~E', + name: 'Edifact', + scopeName: 'source.edifact' }; +oop.inherits(EdifactHighlightRules, TextHighlightRules); +exports.EdifactHighlightRules = EdifactHighlightRules; + +}); + +define("ace/mode/edifact",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/edifact_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var EdifactHighlightRules = require("./edifact_highlight_rules").EdifactHighlightRules; +var Mode = function () { + this.HighlightRules = EdifactHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/edifact"; + this.snippetFileId = "ace/snippets/edifact"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/edifact"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-eiffel.js b/ui/base1/ace/mode-eiffel.js new file mode 100644 index 0000000..2591458 --- /dev/null +++ b/ui/base1/ace/mode-eiffel.js @@ -0,0 +1,120 @@ +define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var EiffelHighlightRules = function () { + var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" + + "class|convert|create|debug|deferred|detachable|do|else|elseif|end|" + + "ensure|expanded|export|external|feature|from|frozen|if|inherit|" + + "inspect|invariant|like|local|loop|not|note|obsolete|old|once|" + + "Precursor|redefine|rename|require|rescue|retry|select|separate|" + + "some|then|undefine|until|variant|when"; + var operatorKeywords = "and|implies|or|xor"; + var languageConstants = "Void"; + var booleanConstants = "True|False"; + var languageVariables = "Current|Result"; + var keywordMapper = this.createKeywordMapper({ + "constant.language": languageConstants, + "constant.language.boolean": booleanConstants, + "variable.language": languageVariables, + "keyword.operator": operatorKeywords, + "keyword": keywords + }, "identifier", true); + var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/; + this.$rules = { + "start": [{ + token: "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported) + regex: /"\[/, + next: "aligned_verbatim_string" + }, { + token: "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported) + regex: /"\{/, + next: "non-aligned_verbatim_string" + }, { + token: "string.quoted.double", + regex: /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/ + }, { + token: "comment.line.double-dash", + regex: /--.*/ + }, { + token: "constant.character", + regex: /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/ + }, { + token: "constant.numeric", // hexa | octal | bin + regex: /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/ + }, { + token: "constant.numeric", + regex: /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/ + }, { + token: "paren.lparen", + regex: /[\[({]|<<|\|\(/ + }, { + token: "paren.rparen", + regex: /[\])}]|>>|\|\)/ + }, { + token: "keyword.operator", // punctuation + regex: /:=|->|\.(?=\w)|[;,:?]/ + }, { + token: "keyword.operator", + regex: /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/ + }, { + token: function (v) { + var result = keywordMapper(v); + if (result === "identifier" && v === v.toUpperCase()) { + result = "entity.name.type"; + } + return result; + }, + regex: /[a-zA-Z][a-zA-Z\d_]*\b/ + }, { + token: "text", + regex: /\s+/ + } + ], + "aligned_verbatim_string": [{ + token: "string", + regex: /]"/, + next: "start" + }, { + token: "string", + regex: simpleString + } + ], + "non-aligned_verbatim_string": [{ + token: "string.quoted.other", + regex: /}"/, + next: "start" + }, { + token: "string.quoted.other", + regex: simpleString + } + ] + }; +}; +oop.inherits(EiffelHighlightRules, TextHighlightRules); +exports.EiffelHighlightRules = EiffelHighlightRules; + +}); + +define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules; +var Mode = function () { + this.HighlightRules = EiffelHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.$id = "ace/mode/eiffel"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/eiffel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ejs.js b/ui/base1/ace/mode-ejs.js new file mode 100644 index 0000000..a07224b --- /dev/null +++ b/ui/base1/ace/mode-ejs.js @@ -0,0 +1,3277 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token: "constant.other.symbol.ruby", // symbol + regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; +exports.qString = { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; +exports.qqString = { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; +exports.tString = { + token: "string", // backtick string + regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; +var constantNumericHex = exports.constantNumericHex = { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; +var constantNumericBinary = exports.constantNumericBinary = { + token: "constant.numeric", + regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/ +}; +var constantNumericDecimal = exports.constantNumericDecimal = { + token: "constant.numeric", + regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/ +}; +var constantNumericOctal = exports.constantNumericOctal = { + token: "constant.numeric", + regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/ +}; +var constantNumericRational = exports.constantNumericRational = { + token: "constant.numeric", //rational + complex + regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/ +}; +var constantNumericComplex = exports.constantNumericComplex = { + token: "constant.numeric", //simple complex numbers + regex: /\b([\d]i)\b/ +}; +var constantNumericFloat = exports.constantNumericFloat = { + token: "constant.numeric", // float + complex + regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b" +}; +var instanceVariable = exports.instanceVariable = { + token: "variable.instance", // instance variable + regex: "@{1,2}[a-zA-Z_\\d]+" +}; +var RubyHighlightRules = function () { + var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" + + "private_class_method|remove_method|undef_method"); + var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"); + var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"); + var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})"; + var closeParen = { + "(": ")", + "[": "]", + "{": "}", + "<": ">", + "^": "^", + "|": "|", + "%": "%" + }; + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "comment.multiline", // multi line comment + regex: "^=begin(?=$|\\s.*$)", + next: "comment" + }, { + token: "string.regexp", + regex: /[/](?=.*\/)/, + next: "regex" + }, + [{ + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(")/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(')/, + push: [{ + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "string.end", + regex: /'/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithoutInterpolation"; + return this.token; + } + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithoutInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithInterpolation"; + return this.token; + } + }, { + token: "string.regexp", + regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "rState"; + return this.token; + } + }], + { + token: "punctuation", // namespaces aren't symbols + regex: "::" + }, + instanceVariable, + { + token: "variable.global", // global variable + regex: "[$][a-zA-Z_\\d]+" + }, { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]*" + }, { + token: ["punctuation.operator", "support.function"], + regex: /(\.)([a-zA-Z_\d]+)(?=\()/ + }, { + token: ["punctuation.operator", "identifier"], + regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/ + }, { + token: "string.character", + regex: "\\B\\?(?:" + escapedChars + "|\\S)" + }, { + token: "punctuation.operator", + regex: /\?(?=.+:)/ + }, + constantNumericRational, + constantNumericComplex, + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + constantNumericBinary, + constantNumericDecimal, + constantNumericOctal, + { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "punctuation.separator.key-value", + regex: "=>" + }, { + stateName: "heredoc", + onMatch: function (value, currentState, stack) { + var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + { type: "constant", value: tokens[1] }, + { type: "string", value: tokens[2] }, + { type: "support.class", value: tokens[3] }, + { type: "string", value: tokens[4] } + ]; + }, + regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]", + onMatch: function (value, currentState, stack) { + this.next = ''; + if (value == "}" && stack.length > 1 && stack[1] != "start") { + stack.shift(); + this.next = stack.shift(); + } + return this.token; + } + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + } + ], + "comment": [ + { + token: "comment.multiline", // closing comment + regex: "^=end(?=$|\\s.*$)", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "qStateWithInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "qStateWithoutInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "sStateWithoutInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "sStateWithInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "rState": [{ + token: "string.regexp", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.language.escape"; + } + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.regexp", + regex: /\// + }, { + token: "string.regexp", + regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) { + if (stack.length && val[0] === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.language.escape"; + } + }, + { include: "regex" }, + { + defaultToken: "string.regexp" + }], + "regex": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "constant.language.escape", + regex: /\\[AGbBzZ]/ + }, { + token: "constant.language.escape", + regex: /\\g<[a-zA-Z0-9]*>/ + }, { + token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"], + regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/ + }, { + token: ["constant.language.escape", "invalid", "constant.language.escape"], + regex: /(\\p{\^?)([^/]*)(})/ + }, { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: /[/][imxouesn]*/, + next: "start" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "regexp.keyword", + regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + push: "regex_character_class" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: /&?&?\[\^?/, + push: "regex_character_class" + }, { + token: "constant.language.escape", + regex: "]", + next: "pop" + }, { + token: "constant.language.escape", + regex: "-" + }, { + defaultToken: "string.regexp.characterclass" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(RubyHighlightRules, TextHighlightRules); +exports.RubyHighlightRules = RubyHighlightRules; + +}); + +define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.indentKeywords = { + "class": 1, + "def": 1, + "module": 1, + "do": 1, + "unless": 1, + "if": 1, + "while": 1, + "for": 1, + "until": 1, + "begin": 1, + "else": 0, + "elsif": 0, + "rescue": 0, + "ensure": 0, + "when": 0, + "end": -1, + "case": 1, + "=begin": 1, + "=end": -1 + }; + this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/; + this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1]) { + if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") { + if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) { + return; + } + if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) { + return; + } + } + if (match[1] == "when") { + if (/\sthen\s/.test(line) === true) { + return; + } + } + if (session.getTokenAt(row, match.index + 2).type === "keyword") + return "start"; + } + else if (match[3]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "start"; + } + else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + var match = line.match(this.foldingStopMarker); + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } + else if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "end"; + } + else + return "end"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1] || match[3]) + return this.rubyBlock(session, row, match.index + 2); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.rubyBlock(session, row, match.index + 1); + } + if (match[1] === "=end") { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return this.rubyBlock(session, row, match.index + 1); + } + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.rubyBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || (token.type != "keyword" && token.type != "comment.multiline")) + return; + var val = token.value; + var line = session.getLine(row); + switch (token.value) { + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + return; + } + var dir = this.indentKeywords[val]; + break; + case "when": + if (/\sthen\s/.test(line)) { + return; + } + case "elsif": + case "rescue": + case "ensure": + var dir = 1; + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line)) { + return; + } + var dir = 1; + break; + default: + var dir = this.indentKeywords[val]; + break; + } + var stack = [val]; + if (!dir) + return; + var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length; + var startRow = row; + var ranges = []; + ranges.push(stream.getCurrentTokenRange()); + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + if (token.type == "comment.multiline") { + while (token = stream.step()) { + if (token.type !== "comment.multiline") + continue; + if (dir == 1) { + startColumn = 6; + if (token.value == "=end") { + break; + } + } + else { + if (token.value == "=begin") { + break; + } + } + } + } + else { + while (token = stream.step()) { + var ignore = false; + if (token.type !== "keyword") + continue; + var level = dir * this.indentKeywords[token.value]; + line = session.getLine(stream.getCurrentTokenRow()); + switch (token.value) { + case "do": + for (var i = stream.$tokenIndex - 1; i >= 0; i--) { + var prevToken = stream.$rowTokens[i]; + if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) { + level = 0; + break; + } + } + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + level = 0; + ignore = true; + } + break; + case "when": + if (/\sthen\s/.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + } + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0 && ignore === false) { + stack.shift(); + if (!stack.length) { + if ((val == "while" || val == "until" || val == "for") && token.value != "do") { + break; + } + if (token.value == "do" && dir == -1 && level != 0) + break; + if (token.value != "do") + break; + } + if (level === 0) { + stack.unshift(token.value); + } + } + } + } + if (!token) + return null; + if (tokenRange) { + ranges.push(stream.getCurrentTokenRange()); + return ranges; + } + var row = stream.getCurrentTokenRow(); + if (dir === -1) { + if (token.type === "comment.multiline") { + var endColumn = 6; + } + else { + var endColumn = session.getLine(row).length; + } + return new Range(row, endColumn, startRow - 1, startColumn); + } + else + return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var FoldMode = require("./folding/ruby").FoldMode; +var Mode = function () { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new FoldMode(); + this.indentKeywords = this.foldingRules.indentKeywords; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/); + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + if (/}/.test(line)) + return this.$outdent.autoOutdent(session, row); + var indent = this.$getIndent(line); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine); + var tab = session.getTabString(); + if (prevIndent.length <= indent.length) { + if (indent.slice(-tab.length) == tab) + session.remove(new Range(row, indent.length - tab.length, row, indent.length)); + } + }; + this.getMatching = function (session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in this.indentKeywords) + return this.foldingRules.rubyBlock(session, row, column, true); + }; + this.$id = "ace/mode/ruby"; + this.snippetFileId = "ace/snippets/ruby"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var EjsHighlightRules = function (start, end) { + HtmlHighlightRules.call(this); + if (!start) + start = "(?:<%|<\\?|{{)"; + if (!end) + end = "(?:%>|\\?>|}})"; + for (var i in this.$rules) { + this.$rules[i].unshift({ + token: "markup.list.meta.tag", + regex: start + "(?![>}])[-=]?", + push: "ejs-start" + }); + } + this.embedRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "ejs-", [{ + token: "markup.list.meta.tag", + regex: "-?" + end, + next: "pop" + }, { + token: "comment", + regex: "//.*?" + end, + next: "pop" + }]); + this.normalizeRules(); +}; +oop.inherits(EjsHighlightRules, HtmlHighlightRules); +exports.EjsHighlightRules = EjsHighlightRules; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var RubyMode = require("./ruby").Mode; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = EjsHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "ejs-": JavaScriptMode + }); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/ejs"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ejs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-elixir.js b/ui/base1/ace/mode-elixir.js new file mode 100644 index 0000000..6a8b377 --- /dev/null +++ b/ui/base1/ace/mode-elixir.js @@ -0,0 +1,443 @@ +define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.githubusercontent.com/elixir-lang/elixir-tmbundle/master/Syntaxes/Elixir.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ElixirHighlightRules = function () { + this.$rules = { start: [{ token: ['meta.module.elixir', + 'keyword.control.module.elixir', + 'meta.module.elixir', + 'entity.name.type.module.elixir'], + regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc (?:~[a-z])?"""', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*"""', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc ~[A-Z]"""', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*"""', + next: 'pop' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*\'\'\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc ~[A-Z]\'\'\'', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*\'\'\'', + next: 'pop' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.false', + regex: '@(?:module|type)?doc false', + comment: '@doc false is treated as documentation' }, + { token: 'comment.documentation.string', + regex: '@(?:module|type)?doc "', + push: [{ token: 'comment.documentation.string', + regex: '"', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'comment.documentation.string' }], + comment: '@doc with string is treated as documentation' }, + { token: 'keyword.control.elixir', + regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' }, + { token: 'punctuation.definition.constant.elixir', + regex: ':\'', + push: [{ token: 'punctuation.definition.constant.elixir', + regex: '\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'constant.other.symbol.single-quoted.elixir' }] }, + { token: 'punctuation.definition.constant.elixir', + regex: ':"', + push: [{ token: 'punctuation.definition.constant.elixir', + regex: '"', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'constant.other.symbol.double-quoted.elixir' }] }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '(?:\'\'\')', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?>\'\'\')', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*\'\'\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' }], + comment: 'Single-quoted heredocs' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'support.function.variable.quoted.single.elixir' }], + comment: 'single quoted string (allows for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '(?:""")', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?>""")', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*"""', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.quoted.double.heredoc.elixir' }], + comment: 'Double-quoted heredocs' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '"', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.quoted.double.elixir' }], + comment: 'double quoted string (allows for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z](?:""")', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '~[a-z](?>""")', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*"""', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.quoted.double.heredoc.elixir' }], + comment: 'Double-quoted heredocs sigils' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\{', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\}[a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\[', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\][a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\<', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\>[a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\(', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\)[a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z][^\\w]', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '[^\\w][a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z](?:""")', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '~[A-Z](?>""")', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*"""', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'Double-quoted heredocs sigils' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\{', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\}[a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\[', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\][a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\<', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\>[a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\(', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\)[a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z][^\\w]', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '[^\\w][a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'], + regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)', + comment: 'symbols' }, + { token: 'punctuation.definition.constant.elixir', + regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)', + comment: 'symbols' }, + { token: ['punctuation.definition.comment.elixir', + 'comment.line.number-sign.elixir'], + regex: '(#)(.*)' }, + { token: 'constant.numeric.elixir', + regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?=?' }, + { token: 'keyword.operator.bitwise.elixir', + regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' }, + { token: 'keyword.operator.logical.elixir', + regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b', + originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' }, + { token: 'keyword.operator.arithmetic.elixir', + regex: '\\*|\\+|\\-|/' }, + { token: 'keyword.operator.other.elixir', + regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' }, + { token: 'keyword.operator.assignment.elixir', regex: '=' }, + { token: 'punctuation.separator.other.elixir', regex: ':' }, + { token: 'punctuation.separator.statement.elixir', + regex: '\\;' }, + { token: 'punctuation.separator.object.elixir', regex: ',' }, + { token: 'punctuation.separator.method.elixir', regex: '\\.' }, + { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' }, + { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' }, + { token: 'punctuation.section.function.elixir', + regex: '\\(|\\)' }], + '#escaped_char': [{ token: 'constant.character.escape.elixir', + regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' }], + '#interpolated_elixir': [{ token: ['source.elixir.embedded.source', + 'source.elixir.embedded.source.empty'], + regex: '(#\\{)(\\})' }, + { todo: { token: 'punctuation.section.embedded.elixir', + regex: '#\\{', + push: [{ token: 'punctuation.section.embedded.elixir', + regex: '\\}', + next: 'pop' }, + { include: '#nest_curly_and_self' }, + { include: '$self' }, + { defaultToken: 'source.elixir.embedded.source' }] } }], + '#nest_curly_and_self': [{ token: 'punctuation.section.scope.elixir', + regex: '\\{', + push: [{ token: 'punctuation.section.scope.elixir', + regex: '\\}', + next: 'pop' }, + { include: '#nest_curly_and_self' }] }, + { include: '$self' }], + '#regex_sub': [{ include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { token: ['punctuation.definition.arbitrary-repitition.elixir', + 'string.regexp.arbitrary-repitition.elixir', + 'string.regexp.arbitrary-repitition.elixir', + 'punctuation.definition.arbitrary-repitition.elixir'], + regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' }, + { token: 'punctuation.definition.character-class.elixir', + regex: '\\[(?:\\^?\\])?', + push: [{ token: 'punctuation.definition.character-class.elixir', + regex: '\\]', + next: 'pop' }, + { include: '#escaped_char' }, + { defaultToken: 'string.regexp.character-class.elixir' }] }, + { token: 'punctuation.definition.group.elixir', + regex: '\\(', + push: [{ token: 'punctuation.definition.group.elixir', + regex: '\\)', + next: 'pop' }, + { include: '#regex_sub' }, + { defaultToken: 'string.regexp.group.elixir' }] }, + { token: ['punctuation.definition.comment.elixir', + 'comment.line.number-sign.elixir'], + regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)', + originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$', + comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' }] }; + this.normalizeRules(); +}; +ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.', + fileTypes: ['ex', 'exs'], + firstLineMatch: '^#!/.*\\belixir', + foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$', + foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)', + keyEquivalent: '^~E', + name: 'Elixir', + scopeName: 'source.elixir' }; +oop.inherits(ElixirHighlightRules, TextHighlightRules); +exports.ElixirHighlightRules = ElixirHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = ElixirHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/elixir"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/elixir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-elm.js b/ui/base1/ace/mode-elm.js new file mode 100644 index 0000000..d8a11cb --- /dev/null +++ b/ui/base1/ace/mode-elm.js @@ -0,0 +1,274 @@ +define("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){// TODO check with https://github.com/deadfoxygrandpa/Elm.tmLanguage +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ElmHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": "as|case|class|data|default|deriving|do|else|export|foreign|" + + "hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|" + + "module|newtype|of|open|then|type|where|_|port|\u03BB" + }, "identifier"); + var escapeRe = /\\(\d+|['"\\&trnbvf])/; + var smallRe = /[a-z_]/.source; + var largeRe = /[A-Z]/.source; + var idRe = /[a-z_A-Z0-9']/.source; + this.$rules = { + start: [{ + token: "string.start", + regex: '"', + next: "string" + }, { + token: "string.character", + regex: "'(?:" + escapeRe.source + "|.)'?" + }, { + regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/, + token: "constant.numeric" + }, { + token: "comment", + regex: "--.*" + }, { + token: "keyword", + regex: /\.\.|\||:|=|\\|"|->|<-|\u2192/ + }, { + token: "keyword.operator", + regex: /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/ + }, { + token: "operator.punctuation", + regex: /[,;`]/ + }, { + regex: largeRe + idRe + "+\\.?", + token: function (value) { + if (value[value.length - 1] == ".") + return "entity.name.function"; + return "constant.language"; + } + }, { + regex: "^" + smallRe + idRe + "+", + token: function (value) { + return "constant.language"; + } + }, { + token: keywordMapper, + regex: "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b" + }, { + regex: "{-#?", + token: "comment.start", + onMatch: function (value, currentState, stack) { + this.next = value.length == 2 ? "blockComment" : "docComment"; + return this.token; + } + }, { + token: "variable.language", + regex: /\[markdown\|/, + next: "markdown" + }, { + token: "paren.lparen", + regex: /[\[({]/ + }, { + token: "paren.rparen", + regex: /[\])}]/ + }], + markdown: [{ + regex: /\|\]/, + next: "start" + }, { + defaultToken: "string" + }], + blockComment: [{ + regex: "{-", + token: "comment.start", + push: "blockComment" + }, { + regex: "-}", + token: "comment.end", + next: "pop" + }, { + defaultToken: "comment" + }], + docComment: [{ + regex: "{-", + token: "comment.start", + push: "docComment" + }, { + regex: "-}", + token: "comment.end", + next: "pop" + }, { + defaultToken: "doc.comment" + }], + string: [{ + token: "constant.language.escape", + regex: escapeRe + }, { + token: "text", + regex: /\\(\s|$)/, + next: "stringGap" + }, { + token: "string.end", + regex: '"', + next: "start" + }, { + defaultToken: "string" + }], + stringGap: [{ + token: "text", + regex: /\\/, + next: "string" + }, { + token: "error", + regex: "", + next: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ElmHighlightRules, TextHighlightRules); +exports.ElmHighlightRules = ElmHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "{-", end: "-}", nestable: true }; + this.$id = "ace/mode/elm"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/elm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-erlang.js b/ui/base1/ace/mode-erlang.js new file mode 100644 index 0000000..04c715a --- /dev/null +++ b/ui/base1/ace/mode-erlang.js @@ -0,0 +1,836 @@ +define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from tm bundles\erlang.tmbundle\Syntaxes\Erlang.plist (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ErlangHighlightRules = function () { + this.$rules = { start: [{ include: '#module-directive' }, + { include: '#import-export-directive' }, + { include: '#behaviour-directive' }, + { include: '#record-directive' }, + { include: '#define-directive' }, + { include: '#macro-directive' }, + { include: '#directive' }, + { include: '#function' }, + { include: '#everything-else' }], + '#atom': [{ token: 'punctuation.definition.symbol.begin.erlang', + regex: '\'', + push: [{ token: 'punctuation.definition.symbol.end.erlang', + regex: '\'', + next: 'pop' }, + { token: ['punctuation.definition.escape.erlang', + 'constant.other.symbol.escape.erlang', + 'punctuation.definition.escape.erlang', + 'constant.other.symbol.escape.erlang', + 'constant.other.symbol.escape.erlang'], + regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, + { token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' }, + { defaultToken: 'constant.other.symbol.quoted.single.erlang' }] }, + { token: 'constant.other.symbol.unquoted.erlang', + regex: '[a-z][a-zA-Z\\d@_]*' }], + '#behaviour-directive': [{ token: ['meta.directive.behaviour.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.behaviour.erlang', + 'keyword.control.directive.behaviour.erlang', + 'meta.directive.behaviour.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.behaviour.erlang', + 'entity.name.type.class.behaviour.definition.erlang', + 'meta.directive.behaviour.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.behaviour.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' }], + '#binary': [{ token: 'punctuation.definition.binary.begin.erlang', + regex: '<<', + push: [{ token: 'punctuation.definition.binary.end.erlang', + regex: '>>', + next: 'pop' }, + { token: ['punctuation.separator.binary.erlang', + 'punctuation.separator.value-size.erlang'], + regex: '(,)|(:)' }, + { include: '#internal-type-specifiers' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.binary.erlang' }] }], + '#character': [{ token: ['punctuation.definition.character.erlang', + 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'constant.character.escape.erlang'], + regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, + { token: 'invalid.illegal.character.erlang', + regex: '\\$\\\\\\^?.?' }, + { token: ['punctuation.definition.character.erlang', + 'constant.character.erlang'], + regex: '(\\$)(\\S)' }, + { token: 'invalid.illegal.character.erlang', regex: '\\$.?' }], + '#comment': [{ token: 'punctuation.definition.comment.erlang', + regex: '%.*$', + push_: [{ token: 'comment.line.percentage.erlang', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.percentage.erlang' }] }], + '#define-directive': [{ token: ['meta.directive.define.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.define.erlang', + 'keyword.control.directive.define.erlang', + 'meta.directive.define.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.define.erlang', + 'entity.name.function.macro.definition.erlang', + 'meta.directive.define.erlang', + 'punctuation.separator.parameters.erlang'], + regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)', + push: [{ token: ['punctuation.definition.parameters.end.erlang', + 'meta.directive.define.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.directive.define.erlang' }] }, + { token: 'meta.directive.define.erlang', + regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()', + push: [{ token: ['punctuation.definition.parameters.end.erlang', + 'meta.directive.define.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { token: ['text', + 'punctuation.section.directive.begin.erlang', + 'text', + 'keyword.control.directive.define.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang', + 'text', + 'entity.name.function.macro.definition.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang'], + regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()', + push: [{ token: ['punctuation.definition.parameters.end.erlang', + 'text', + 'punctuation.separator.parameters.erlang'], + regex: '(\\))(\\s*)(,)', + next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' }] }, + { token: 'punctuation.separator.define.erlang', + regex: '\\|\\||\\||:|;|,|\\.|->' }, + { include: '#everything-else' }, + { defaultToken: 'meta.directive.define.erlang' }] }], + '#directive': [{ token: ['meta.directive.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.erlang', + 'keyword.control.directive.erlang', + 'meta.directive.erlang', + 'punctuation.definition.parameters.begin.erlang'], + regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)', + push: [{ token: ['punctuation.definition.parameters.end.erlang', + 'meta.directive.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '(\\)?)(\\s*)(\\.)', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.directive.erlang' }] }, + { token: ['meta.directive.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.erlang', + 'keyword.control.directive.erlang', + 'meta.directive.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' }], + '#everything-else': [{ include: '#comment' }, + { include: '#record-usage' }, + { include: '#macro-usage' }, + { include: '#expression' }, + { include: '#keyword' }, + { include: '#textual-operator' }, + { include: '#function-call' }, + { include: '#tuple' }, + { include: '#list' }, + { include: '#binary' }, + { include: '#parenthesized-expression' }, + { include: '#character' }, + { include: '#number' }, + { include: '#atom' }, + { include: '#string' }, + { include: '#symbolic-operator' }, + { include: '#variable' }], + '#expression': [{ token: 'keyword.control.if.erlang', + regex: '\\bif\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.if.erlang' }] }, + { token: 'keyword.control.case.erlang', + regex: '\\bcase\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.case.erlang' }] }, + { token: 'keyword.control.receive.erlang', + regex: '\\breceive\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.receive.erlang' }] }, + { token: ['keyword.control.fun.erlang', + 'text', + 'entity.name.type.class.module.erlang', + 'text', + 'punctuation.separator.module-function.erlang', + 'text', + 'entity.name.function.erlang', + 'text', + 'punctuation.separator.function-arity.erlang'], + regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' }, + { token: 'keyword.control.fun.erlang', + regex: '\\bfun\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { token: 'text', + regex: '(?=\\()', + push: [{ token: 'punctuation.separator.clauses.erlang', + regex: ';|(?=\\bend\\b)', + next: 'pop' }, + { include: '#internal-function-parts' }] }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.fun.erlang' }] }, + { token: 'keyword.control.try.erlang', + regex: '\\btry\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.try.erlang' }] }, + { token: 'keyword.control.begin.erlang', + regex: '\\bbegin\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.begin.erlang' }] }, + { token: 'keyword.control.query.erlang', + regex: '\\bquery\\b', + push: [{ token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.query.erlang' }] }], + '#function': [{ token: ['meta.function.erlang', + 'entity.name.function.definition.erlang', + 'meta.function.erlang'], + regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()', + push: [{ token: 'punctuation.terminator.function.erlang', + regex: '\\.', + next: 'pop' }, + { token: ['text', 'entity.name.function.erlang', 'text'], + regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' }, + { token: 'text', + regex: '(?=\\()', + push: [{ token: 'punctuation.separator.clauses.erlang', + regex: ';|(?=\\.)', + next: 'pop' }, + { include: '#parenthesized-expression' }, + { include: '#internal-function-parts' }] }, + { include: '#everything-else' }, + { defaultToken: 'meta.function.erlang' }] }], + '#function-call': [{ token: 'meta.function-call.erlang', + regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())', + push: [{ token: 'punctuation.definition.parameters.end.erlang', + regex: '\\)', + next: 'pop' }, + { token: ['entity.name.type.class.module.erlang', + 'text', + 'punctuation.separator.module-function.erlang', + 'text', + 'entity.name.function.guard.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang'], + regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()', + push: [{ token: 'text', regex: '(?=\\))', next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' }] }, + { token: ['entity.name.type.class.module.erlang', + 'text', + 'punctuation.separator.module-function.erlang', + 'text', + 'entity.name.function.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang'], + regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()', + push: [{ token: 'text', regex: '(?=\\))', next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' }] }, + { defaultToken: 'meta.function-call.erlang' }] }], + '#import-export-directive': [{ token: ['meta.directive.import.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.import.erlang', + 'keyword.control.directive.import.erlang', + 'meta.directive.import.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.import.erlang', + 'entity.name.type.class.module.erlang', + 'meta.directive.import.erlang', + 'punctuation.separator.parameters.erlang'], + regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', + push: [{ token: ['punctuation.definition.parameters.end.erlang', + 'meta.directive.import.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#internal-function-list' }, + { defaultToken: 'meta.directive.import.erlang' }] }, + { token: ['meta.directive.export.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.export.erlang', + 'keyword.control.directive.export.erlang', + 'meta.directive.export.erlang', + 'punctuation.definition.parameters.begin.erlang'], + regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()', + push: [{ token: ['punctuation.definition.parameters.end.erlang', + 'meta.directive.export.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#internal-function-list' }, + { defaultToken: 'meta.directive.export.erlang' }] }], + '#internal-expression-punctuation': [{ token: ['punctuation.separator.clause-head-body.erlang', + 'punctuation.separator.clauses.erlang', + 'punctuation.separator.expressions.erlang'], + regex: '(->)|(;)|(,)' }], + '#internal-function-list': [{ token: 'punctuation.definition.list.begin.erlang', + regex: '\\[', + push: [{ token: 'punctuation.definition.list.end.erlang', + regex: '\\]', + next: 'pop' }, + { token: ['entity.name.function.erlang', + 'text', + 'punctuation.separator.function-arity.erlang'], + regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)', + push: [{ token: 'punctuation.separator.list.erlang', + regex: ',|(?=\\])', + next: 'pop' }, + { include: '#everything-else' }] }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.list.function.erlang' }] }], + '#internal-function-parts': [{ token: 'text', + regex: '(?=\\()', + push: [{ token: 'punctuation.separator.clause-head-body.erlang', + regex: '->', + next: 'pop' }, + { token: 'punctuation.definition.parameters.begin.erlang', + regex: '\\(', + push: [{ token: 'punctuation.definition.parameters.end.erlang', + regex: '\\)', + next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' }] }, + { token: 'punctuation.separator.guards.erlang', regex: ',|;' }, + { include: '#everything-else' }] }, + { token: 'punctuation.separator.expressions.erlang', + regex: ',' }, + { include: '#everything-else' }], + '#internal-record-body': [{ token: 'punctuation.definition.class.record.begin.erlang', + regex: '\\{', + push: [{ token: 'meta.structure.record.erlang', + regex: '(?=\\})', + next: 'pop' }, + { token: ['variable.other.field.erlang', + 'variable.language.omitted.field.erlang', + 'text', + 'keyword.operator.assignment.erlang'], + regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)', + push: [{ token: 'punctuation.separator.class.record.erlang', + regex: ',|(?=\\})', + next: 'pop' }, + { include: '#everything-else' }] }, + { token: ['variable.other.field.erlang', + 'text', + 'punctuation.separator.class.record.erlang'], + regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.record.erlang' }] }], + '#internal-type-specifiers': [{ token: 'punctuation.separator.value-type.erlang', + regex: '/', + push: [{ token: 'text', regex: '(?=,|:|>>)', next: 'pop' }, + { token: ['storage.type.erlang', + 'storage.modifier.signedness.erlang', + 'storage.modifier.endianness.erlang', + 'storage.modifier.unit.erlang', + 'punctuation.separator.type-specifiers.erlang'], + regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' }] }], + '#keyword': [{ token: 'keyword.control.erlang', + regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' }], + '#list': [{ token: 'punctuation.definition.list.begin.erlang', + regex: '\\[', + push: [{ token: 'punctuation.definition.list.end.erlang', + regex: '\\]', + next: 'pop' }, + { token: 'punctuation.separator.list.erlang', + regex: '\\||\\|\\||,' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.list.erlang' }] }], + '#macro-directive': [{ token: ['meta.directive.ifdef.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.ifdef.erlang', + 'keyword.control.directive.ifdef.erlang', + 'meta.directive.ifdef.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.ifdef.erlang', + 'entity.name.function.macro.erlang', + 'meta.directive.ifdef.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.ifdef.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, + { token: ['meta.directive.ifndef.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.ifndef.erlang', + 'keyword.control.directive.ifndef.erlang', + 'meta.directive.ifndef.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.ifndef.erlang', + 'entity.name.function.macro.erlang', + 'meta.directive.ifndef.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.ifndef.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, + { token: ['meta.directive.undef.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.undef.erlang', + 'keyword.control.directive.undef.erlang', + 'meta.directive.undef.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.undef.erlang', + 'entity.name.function.macro.erlang', + 'meta.directive.undef.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.undef.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }], + '#macro-usage': [{ token: ['keyword.operator.macro.erlang', + 'meta.macro-usage.erlang', + 'entity.name.function.macro.erlang'], + regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' }], + '#module-directive': [{ token: ['meta.directive.module.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.module.erlang', + 'keyword.control.directive.module.erlang', + 'meta.directive.module.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.module.erlang', + 'entity.name.type.class.module.definition.erlang', + 'meta.directive.module.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.module.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' }], + '#number': [{ token: 'text', + regex: '(?=\\d)', + push: [{ token: 'text', regex: '(?!\\d)', next: 'pop' }, + { token: ['constant.numeric.float.erlang', + 'punctuation.separator.integer-float.erlang', + 'constant.numeric.float.erlang', + 'punctuation.separator.float-exponent.erlang'], + regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' }, + { token: ['constant.numeric.integer.binary.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.binary.erlang'], + regex: '(2)(#)([0-1]+)' }, + { token: ['constant.numeric.integer.base-3.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-3.erlang'], + regex: '(3)(#)([0-2]+)' }, + { token: ['constant.numeric.integer.base-4.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-4.erlang'], + regex: '(4)(#)([0-3]+)' }, + { token: ['constant.numeric.integer.base-5.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-5.erlang'], + regex: '(5)(#)([0-4]+)' }, + { token: ['constant.numeric.integer.base-6.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-6.erlang'], + regex: '(6)(#)([0-5]+)' }, + { token: ['constant.numeric.integer.base-7.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-7.erlang'], + regex: '(7)(#)([0-6]+)' }, + { token: ['constant.numeric.integer.octal.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.octal.erlang'], + regex: '(8)(#)([0-7]+)' }, + { token: ['constant.numeric.integer.base-9.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-9.erlang'], + regex: '(9)(#)([0-8]+)' }, + { token: ['constant.numeric.integer.decimal.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.decimal.erlang'], + regex: '(10)(#)(\\d+)' }, + { token: ['constant.numeric.integer.base-11.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-11.erlang'], + regex: '(11)(#)([\\daA]+)' }, + { token: ['constant.numeric.integer.base-12.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-12.erlang'], + regex: '(12)(#)([\\da-bA-B]+)' }, + { token: ['constant.numeric.integer.base-13.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-13.erlang'], + regex: '(13)(#)([\\da-cA-C]+)' }, + { token: ['constant.numeric.integer.base-14.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-14.erlang'], + regex: '(14)(#)([\\da-dA-D]+)' }, + { token: ['constant.numeric.integer.base-15.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-15.erlang'], + regex: '(15)(#)([\\da-eA-E]+)' }, + { token: ['constant.numeric.integer.hexadecimal.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.hexadecimal.erlang'], + regex: '(16)(#)([\\da-fA-F]+)' }, + { token: ['constant.numeric.integer.base-17.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-17.erlang'], + regex: '(17)(#)([\\da-gA-G]+)' }, + { token: ['constant.numeric.integer.base-18.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-18.erlang'], + regex: '(18)(#)([\\da-hA-H]+)' }, + { token: ['constant.numeric.integer.base-19.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-19.erlang'], + regex: '(19)(#)([\\da-iA-I]+)' }, + { token: ['constant.numeric.integer.base-20.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-20.erlang'], + regex: '(20)(#)([\\da-jA-J]+)' }, + { token: ['constant.numeric.integer.base-21.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-21.erlang'], + regex: '(21)(#)([\\da-kA-K]+)' }, + { token: ['constant.numeric.integer.base-22.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-22.erlang'], + regex: '(22)(#)([\\da-lA-L]+)' }, + { token: ['constant.numeric.integer.base-23.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-23.erlang'], + regex: '(23)(#)([\\da-mA-M]+)' }, + { token: ['constant.numeric.integer.base-24.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-24.erlang'], + regex: '(24)(#)([\\da-nA-N]+)' }, + { token: ['constant.numeric.integer.base-25.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-25.erlang'], + regex: '(25)(#)([\\da-oA-O]+)' }, + { token: ['constant.numeric.integer.base-26.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-26.erlang'], + regex: '(26)(#)([\\da-pA-P]+)' }, + { token: ['constant.numeric.integer.base-27.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-27.erlang'], + regex: '(27)(#)([\\da-qA-Q]+)' }, + { token: ['constant.numeric.integer.base-28.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-28.erlang'], + regex: '(28)(#)([\\da-rA-R]+)' }, + { token: ['constant.numeric.integer.base-29.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-29.erlang'], + regex: '(29)(#)([\\da-sA-S]+)' }, + { token: ['constant.numeric.integer.base-30.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-30.erlang'], + regex: '(30)(#)([\\da-tA-T]+)' }, + { token: ['constant.numeric.integer.base-31.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-31.erlang'], + regex: '(31)(#)([\\da-uA-U]+)' }, + { token: ['constant.numeric.integer.base-32.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-32.erlang'], + regex: '(32)(#)([\\da-vA-V]+)' }, + { token: ['constant.numeric.integer.base-33.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-33.erlang'], + regex: '(33)(#)([\\da-wA-W]+)' }, + { token: ['constant.numeric.integer.base-34.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-34.erlang'], + regex: '(34)(#)([\\da-xA-X]+)' }, + { token: ['constant.numeric.integer.base-35.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-35.erlang'], + regex: '(35)(#)([\\da-yA-Y]+)' }, + { token: ['constant.numeric.integer.base-36.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-36.erlang'], + regex: '(36)(#)([\\da-zA-Z]+)' }, + { token: 'invalid.illegal.integer.erlang', + regex: '\\d+#[\\da-zA-Z]+' }, + { token: 'constant.numeric.integer.decimal.erlang', + regex: '\\d+' }] }], + '#parenthesized-expression': [{ token: 'punctuation.section.expression.begin.erlang', + regex: '\\(', + push: [{ token: 'punctuation.section.expression.end.erlang', + regex: '\\)', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.parenthesized' }] }], + '#record-directive': [{ token: ['meta.directive.record.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.record.erlang', + 'keyword.control.directive.import.erlang', + 'meta.directive.record.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.record.erlang', + 'entity.name.type.class.record.definition.erlang', + 'meta.directive.record.erlang', + 'punctuation.separator.parameters.erlang'], + regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', + push: [{ token: ['punctuation.definition.class.record.end.erlang', + 'meta.directive.record.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.record.erlang', + 'punctuation.section.directive.end.erlang'], + regex: '(\\})(\\s*)(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#internal-record-body' }, + { defaultToken: 'meta.directive.record.erlang' }] }], + '#record-usage': [{ token: ['keyword.operator.record.erlang', + 'meta.record-usage.erlang', + 'entity.name.type.class.record.erlang', + 'meta.record-usage.erlang', + 'punctuation.separator.record-field.erlang', + 'meta.record-usage.erlang', + 'variable.other.field.erlang'], + regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' }, + { token: ['keyword.operator.record.erlang', + 'meta.record-usage.erlang', + 'entity.name.type.class.record.erlang'], + regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')', + push: [{ token: 'punctuation.definition.class.record.end.erlang', + regex: '\\}', + next: 'pop' }, + { include: '#internal-record-body' }, + { defaultToken: 'meta.record-usage.erlang' }] }], + '#string': [{ token: 'punctuation.definition.string.begin.erlang', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.erlang', + regex: '"', + next: 'pop' }, + { token: ['punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'constant.character.escape.erlang'], + regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, + { token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' }, + { token: ['punctuation.definition.erlang', + 'punctuation.separator.erlang', + 'constant.other.erlang', + 'punctuation.separator.erlang', + 'punctuation.separator.erlang', + 'constant.other.erlang', + 'punctuation.separator.erlang', + 'punctuation.separator.erlang', + 'punctuation.separator.erlang', + 'constant.other.erlang', + 'constant.other.erlang'], + regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' }, + { token: ['punctuation.definition.erlang', + 'punctuation.separator.erlang', + 'constant.other.erlang', + 'constant.other.erlang'], + regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' }, + { token: 'invalid.illegal.string.erlang', regex: '~.?' }, + { defaultToken: 'string.quoted.double.erlang' }] }], + '#symbolic-operator': [{ token: 'keyword.operator.symbolic.erlang', + regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' }], + '#textual-operator': [{ token: 'keyword.operator.textual.erlang', + regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' }], + '#tuple': [{ token: 'punctuation.definition.tuple.begin.erlang', + regex: '\\{', + push: [{ token: 'punctuation.definition.tuple.end.erlang', + regex: '\\}', + next: 'pop' }, + { token: 'punctuation.separator.tuple.erlang', regex: ',' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.tuple.erlang' }] }], + '#variable': [{ token: ['variable.other.erlang', 'variable.language.omitted.erlang'], + regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' }] }; + this.normalizeRules(); +}; +ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp', + fileTypes: ['erl', 'hrl'], + keyEquivalent: '^~E', + name: 'Erlang', + scopeName: 'source.erlang' }; +oop.inherits(ErlangHighlightRules, TextHighlightRules); +exports.ErlangHighlightRules = ErlangHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ErlangHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "%"; + this.blockComment = null; + this.$id = "ace/mode/erlang"; + this.snippetFileId = "ace/snippets/erlang"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/erlang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-flix.js b/ui/base1/ace/mode-flix.js new file mode 100644 index 0000000..62836f1 --- /dev/null +++ b/ui/base1/ace/mode-flix.js @@ -0,0 +1,164 @@ +define("ace/mode/flix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var FlixHighlightRules = function () { + var keywords = ("use|checked_cast|checked_ecast|unchecked_cast|masked_cast|as|discard|from|" + + "into|inject|project|solve|query|where|select|force|import|region|red|deref"); + var controlKeywords = ("choose|debug|do|for|forA|forM|foreach|yield|if|else|case|" + + "match|typematch|try|catch|resume|spawn|par|branch|jumpto"); + var operators = "not|and|or|fix"; + var declarations = "eff|def|law|enum|case|type|alias|class|instance|mod|let"; + var modifiers = "with|without|opaque|lazy|lawful|pub|override|sealed|static"; + var primitives = "Unit|Bool|Char|Float32|Float64|Int8|Int16|Int32|Int64|BigInt|String"; + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "keyword.control": controlKeywords, + "keyword.operator": operators, + "storage.type": declarations, + "storage.modifier": modifiers, + "support.type": primitives + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment.line", + regex: "\\/\\/.*$" + }, { + token: "comment.block", + regex: "\\/\\*", + next: "comment" + }, { + token: "string", + regex: '"', + next: "string" + }, { + token: "string.regexp", + regex: 'regex"', + next: "regex" + }, { + token: "constant.character", + regex: "'", + next: "char" + }, { + token: "constant.numeric", // hex + regex: "0x[a-fA-F0-9](_*[a-fA-F0-9])*(i8|i16|i32|i64|ii)?\\b" + }, { + token: "constant.numeric", // float + regex: "[0-9](_*[0-9])*\\.[0-9](_*[0-9])*(f32|f64)?\\b" + }, { + token: "constant.numeric", // integer + regex: "[0-9](_*[0-9])*(i8|i16|i32|i64|ii)?\\b" + }, { + token: "constant.language.boolean", + regex: "(true|false)\\b" + }, { + token: "constant.language", + regex: "null\\b" + }, { + token: "keyword.operator", + regex: "\\->|~>|<\\-|=>" + }, { + token: "storage.modifier", + regex: "@(Deprecated|Experimental|Internal|ParallelWhenPure|Parallel|LazyWhenPure|Lazy|Skip|Test)\\b" + }, { + token: "keyword", // hole + regex: "(\\?\\?\\?|\\?[a-zA-Z0-9]+)" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment.block", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment.block" + } + ], + "string": [ + { + token: "constant.character.escape", // unicode + regex: "\\\\(u[0-9a-fA-F]{4})" + }, { + token: "constant.character.escape", + regex: '\\\\.' + }, { + token: "string", + regex: '"', + next: "start" + }, { + token: "string", + regex: '[^"\\\\]+' + } + ], + "regex": [ + { + token: "constant.character.escape", // unicode + regex: "\\\\(u[0-9a-fA-F]{4})" + }, { + token: "constant.character.escape", + regex: '\\\\.' + }, { + token: "string.regexp", + regex: '"', + next: "start" + }, { + token: "string.regexp", + regex: '[^"\\\\]+' + } + ], + "char": [ + { + token: "constant.character.escape", // unicode + regex: "\\\\(u[0-9a-fA-F]{4})" + }, { + token: "constant.character.escape", + regex: '\\\\.' + }, { + token: "constant.character", + regex: "'", + next: "start" + }, { + token: "constant.character", + regex: "[^'\\\\]+" + } + ] + }; +}; +oop.inherits(FlixHighlightRules, TextHighlightRules); +exports.FlixHighlightRules = FlixHighlightRules; + +}); + +define("ace/mode/flix",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/flix_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var FlixHighlightRules = require("./flix_highlight_rules").FlixHighlightRules; +var Mode = function () { + this.HighlightRules = FlixHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/flix"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/flix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-forth.js b/ui/base1/ace/mode-forth.js new file mode 100644 index 0000000..f4c447e --- /dev/null +++ b/ui/base1/ace/mode-forth.js @@ -0,0 +1,253 @@ +define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.github.com/vze26m98/Forth.tmbundle/master/Syntaxes/Forth.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ForthHighlightRules = function () { + this.$rules = { start: [{ include: '#forth' }], + '#comment': [{ token: 'comment.line.double-dash.forth', + regex: '(?:^|\\s)--\\s.*$', + comment: 'line comments for iForth' }, + { token: 'comment.line.backslash.forth', + regex: '(?:^|\\s)\\\\[\\s\\S]*$', + comment: 'ANSI line comment' }, + { token: 'comment.line.backslash-g.forth', + regex: '(?:^|\\s)\\\\[Gg] .*$', + comment: 'gForth line comment' }, + { token: 'comment.block.forth', + regex: '(?:^|\\s)\\(\\*(?=\\s|$)', + push: [{ token: 'comment.block.forth', + regex: '(?:^|\\s)\\*\\)(?=\\s|$)', + next: 'pop' }, + { defaultToken: 'comment.block.forth' }], + comment: 'multiline comments for iForth' }, + { token: 'comment.block.documentation.forth', + regex: '\\bDOC\\b', + caseInsensitive: true, + push: [{ token: 'comment.block.documentation.forth', + regex: '\\bENDDOC\\b', + caseInsensitive: true, + next: 'pop' }, + { defaultToken: 'comment.block.documentation.forth' }], + comment: 'documentation comments for iForth' }, + { token: 'comment.line.parentheses.forth', + regex: '(?:^|\\s)\\.?\\( [^)]*\\)', + comment: 'ANSI line comment' }], + '#constant': [{ token: 'constant.language.forth', + regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)', + caseInsensitive: true }, + { token: 'constant.numeric.forth', + regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)' }, + { token: 'constant.character.forth', + regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)' }], + '#forth': [{ include: '#constant' }, + { include: '#comment' }, + { include: '#string' }, + { include: '#word' }, + { include: '#variable' }, + { include: '#storage' }, + { include: '#word-def' }], + '#storage': [{ token: 'storage.type.forth', + regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)', + caseInsensitive: true }], + '#string': [{ token: 'string.quoted.double.forth', + regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")', + caseInsensitive: true }, + { token: 'string.unquoted.forth', + regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)', + caseInsensitive: true }], + '#variable': [{ token: 'variable.language.forth', + regex: '\\b(?:I|J)\\b', + caseInsensitive: true }], + '#word': [{ token: 'keyword.control.immediate.forth', + regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)', + caseInsensitive: true }, + { token: 'keyword.other.immediate.forth', + regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)', + caseInsensitive: true }, + { token: 'keyword.control.compile-only.forth', + regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)', + caseInsensitive: true }, + { token: 'keyword.other.compile-only.forth', + regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]||DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)', + caseInsensitive: true }, + { token: 'keyword.other.non-immediate.forth', + regex: '(?:^|\\s)(?:\'|||CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)', + caseInsensitive: true }, + { token: 'keyword.other.warning.forth', + regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)', + caseInsensitive: true }], + '#word-def': [{ token: ['keyword.other.compile-only.forth', + 'keyword.other.compile-only.forth', + 'meta.block.forth', + 'entity.name.function.forth'], + regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)', + caseInsensitive: true, + push: [{ token: 'keyword.other.compile-only.forth', + regex: ';(?:CODE)?', + caseInsensitive: true, + next: 'pop' }, + { include: '#constant' }, + { include: '#comment' }, + { include: '#string' }, + { include: '#word' }, + { include: '#variable' }, + { include: '#storage' }, + { defaultToken: 'meta.block.forth' }] }] }; + this.normalizeRules(); +}; +ForthHighlightRules.metaData = { fileTypes: ['frt', 'fs', 'ldr', 'fth', '4th'], + foldingStartMarker: '/\\*\\*|\\{\\s*$', + foldingStopMarker: '\\*\\*/|^\\s*\\}', + keyEquivalent: '^~F', + name: 'Forth', + scopeName: 'source.forth' }; +oop.inherits(ForthHighlightRules, TextHighlightRules); +exports.ForthHighlightRules = ForthHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ForthHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = null; + this.$id = "ace/mode/forth"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/forth"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-fortran.js b/ui/base1/ace/mode-fortran.js new file mode 100644 index 0000000..eaf7b91 --- /dev/null +++ b/ui/base1/ace/mode-fortran.js @@ -0,0 +1,361 @@ +define("ace/mode/fortran_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* Derived from Python highlighing rules */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var FortranHighlightRules = function () { + var keywords = ("call|case|contains|continue|cycle|do|else|elseif|end|enddo|endif|function|" + + "if|implicit|in|include|inout|intent|module|none|only|out|print|program|return|" + + "select|status|stop|subroutine|" + + "return|then|use|while|write|" + + "CALL|CASE|CONTAINS|CONTINUE|CYCLE|DO|ELSE|ELSEIF|END|ENDDO|ENDIF|FUNCTION|" + + "IF|IMPLICIT|IN|INCLUDE|INOUT|INTENT|MODULE|NONE|ONLY|OUT|PRINT|PROGRAM|RETURN|" + + "SELECT|STATUS|STOP|SUBROUTINE|" + + "RETURN|THEN|USE|WHILE|WRITE"); + var keywordOperators = ("and|or|not|eq|ne|gt|ge|lt|le|" + + "AND|OR|NOT|EQ|NE|GT|GE|LT|LE"); + var builtinConstants = ("true|false|TRUE|FALSE"); + var builtinFunctions = ("abs|achar|acos|acosh|adjustl|adjustr|aimag|aint|all|allocate|" + + "anint|any|asin|asinh|associated|atan|atan2|atanh|" + + "bessel_j0|bessel_j1|bessel_jn|bessel_y0|bessel_y1|bessel_yn|" + + "bge|bgt|bit_size|ble|blt|btest|ceiling|char|cmplx|conjg|cos|cosh|" + + "count|cpu_time|cshift|date_and_time|dble|deallocate|digits|dim|dot_product|dprod|" + + "dshiftl|dshiftr|dsqrt|eoshift|epsilon|erf|erfc|erfc_scaled|exp|float|floor|" + + "format|fraction|gamma|input|len|lge|lgt|lle|llt|log|log10|maskl|maskr|matmul|max|maxloc|maxval|" + + "merge|min|minloc|minval|mod|modulo|nint|not|norm2|null|nullify|pack|parity|popcnt|poppar|" + + "precision|present|product|radix|random_number|random_seed|range|repeat|reshape|round|" + + "rrspacing|same_type_as|scale|scan|selected_char_kind|selected_int_kind|selected_real_kind|" + + "set_exponent|shape|shifta|shiftl|shiftr|sign|sin|sinh|size|sngl|spacing|spread|" + + "sqrt|sum|system_clock|tan|tanh|tiny|trailz|transfer|transpose|trim|ubound|unpack|verify|" + + "ABS|ACHAR|ACOS|ACOSH|ADJUSTL|ADJUSTR|AIMAG|AINT|ALL|ALLOCATE|" + + "ANINT|ANY|ASIN|ASINH|ASSOCIATED|ATAN|ATAN2|ATANH|" + + "BESSEL_J0|BESSEL_J1|BESSEL_JN|BESSEL_Y0|BESSEL_Y1|BESSEL_YN|" + + "BGE|BGT|BIT_SIZE|BLE|BLT|BTEST|CEILING|CHAR|CMPLX|CONJG|COS|COSH|" + + "COUNT|CPU_TIME|CSHIFT|DATE_AND_TIME|DBLE|DEALLOCATE|DIGITS|DIM|DOT_PRODUCT|DPROD|" + + "DSHIFTL|DSHIFTR|DSQRT|EOSHIFT|EPSILON|ERF|ERFC|ERFC_SCALED|EXP|FLOAT|FLOOR|" + + "FORMAT|FRACTION|GAMMA|INPUT|LEN|LGE|LGT|LLE|LLT|LOG|LOG10|MASKL|MASKR|MATMUL|MAX|MAXLOC|MAXVAL|" + + "MERGE|MIN|MINLOC|MINVAL|MOD|MODULO|NINT|NOT|NORM2|NULL|NULLIFY|PACK|PARITY|POPCNT|POPPAR|" + + "PRECISION|PRESENT|PRODUCT|RADIX|RANDOM_NUMBER|RANDOM_SEED|RANGE|REPEAT|RESHAPE|ROUND|" + + "RRSPACING|SAME_TYPE_AS|SCALE|SCAN|SELECTED_CHAR_KIND|SELECTED_INT_KIND|SELECTED_REAL_KIND|" + + "SET_EXPONENT|SHAPE|SHIFTA|SHIFTL|SHIFTR|SIGN|SIN|SINH|SIZE|SNGL|SPACING|SPREAD|" + + "SQRT|SUM|SYSTEM_CLOCK|TAN|TANH|TINY|TRAILZ|TRANSFER|TRANSPOSE|TRIM|UBOUND|UNPACK|VERIFY"); + var storageType = ("logical|character|integer|real|type|" + + "LOGICAL|CHARACTER|INTEGER|REAL|TYPE"); + var storageModifiers = ("allocatable|dimension|intent|parameter|pointer|target|private|public|" + + "ALLOCATABLE|DIMENSION|INTENT|PARAMETER|POINTER|TARGET|PRIVATE|PUBLIC"); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords, + "keyword.operator": keywordOperators, + "storage.type": storageType, + "storage.modifier": storageModifiers + }, "identifier"); + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + this.$rules = { + "start": [{ + token: "comment", + regex: "!.*$" + }, { + token: "string", // multi line """ string start + regex: strPre + '"{3}', + next: "qqstring3" + }, { + token: "string", // " string + regex: strPre + '"(?=.)', + next: "qqstring" + }, { + token: "string", // multi line ''' string start + regex: strPre + "'{3}", + next: "qstring3" + }, { + token: "string", // ' string + regex: strPre + "'(?=.)", + next: "qstring" + }, { + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|define|undef|INCLUDE|IMPORT|DEFINE|UNDEF)\\b" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|ifdef|else|elseif|ifndef|ENDIF|IFDEF|ELSE|ELSEIF|IFNDEF)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }] + }; +}; +oop.inherits(FortranHighlightRules, TextHighlightRules); +exports.FortranHighlightRules = FortranHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/fortran",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fortran_highlight_rules","ace/mode/folding/cstyle","ace/range"], function(require, exports, module){/* Derived from Python rules */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var FortranHighlightRules = require("./fortran_highlight_rules").FortranHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = FortranHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "!"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "return": 1, + "break": 1, + "continue": 1, + "RETURN": 1, + "BREAK": 1, + "CONTINUE": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/fortran"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/fortran"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-fsharp.js b/ui/base1/ace/mode-fsharp.js new file mode 100644 index 0000000..de705f4 --- /dev/null +++ b/ui/base1/ace/mode-fsharp.js @@ -0,0 +1,277 @@ +define("ace/mode/fsharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var FSharpHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable": "this", + "keyword": 'abstract|assert|base|begin|class|default|delegate|done|downcast|downto|elif\ +|else|exception|extern|false|finally|function|global|inherit|inline|interface|internal|lazy|match\ +|member|module|mutable|namespace|open|or|override|private|public|rec|return|return!|select|static\ +|struct|then|to|true|try|typeof|upcast|use|use!|val|void|when|while|with|yield|yield!|__SOURCE_DIRECTORY__\ +|as|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue\ +|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall\ +|trait|virtual|volatile|and|do|end|for|fun|if|in|let|let!|new|not|null|of|endif', + "constant": "true|false" + }, "identifier"); + var floatNumber = "(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))"; + this.$rules = { + "start": [ + { + token: "variable.classes", + regex: '\\[\\<[.]*\\>\\]' + }, + { + token: "comment", + regex: '//.*$' + }, + { + token: "comment.start", + regex: /\(\*(?!\))/, + push: "blockComment" + }, + { + token: "string", + regex: "'.'" + }, + { + token: "string", + regex: '"""', + next: [{ + token: "constant.language.escape", + regex: /\\./, + next: "qqstring" + }, { + token: "string", + regex: '"""', + next: "start" + }, { + defaultToken: "string" + }] + }, + { + token: "string", + regex: '"', + next: [{ + token: "constant.language.escape", + regex: /\\./, + next: "qqstring" + }, { + token: "string", + regex: '"', + next: "start" + }, { + defaultToken: "string" + }] + }, + { + token: ["verbatim.string", "string"], + regex: '(@?)(")', + stateName: "qqstring", + next: [{ + token: "constant.language.escape", + regex: '""' + }, { + token: "string", + regex: '"', + next: "start" + }, { + defaultToken: "string" + }] + }, + { + token: "constant.float", + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, + { + token: "constant.float", + regex: floatNumber + }, + { + token: "constant.integer", + regex: "(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b" + }, + { + token: ["keyword.type", "variable"], + regex: "(type\\s)([a-zA-Z0-9_$\-]*\\b)" + }, + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "keyword.operator", + regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|\\(\\*\\)" + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + } + ], + blockComment: [{ + regex: /\(\*\)/, + token: "comment" + }, { + regex: /\(\*(?!\))/, + token: "comment.start", + push: "blockComment" + }, { + regex: /\*\)/, + token: "comment.end", + next: "pop" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +}; +oop.inherits(FSharpHighlightRules, TextHighlightRules); +exports.FSharpHighlightRules = FSharpHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/fsharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsharp_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var FSharpHighlightRules = require("./fsharp_highlight_rules").FSharpHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + TextMode.call(this); + this.HighlightRules = FSharpHighlightRules; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "(*", end: "*)", nestable: true }; + this.$id = "ace/mode/fsharp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/fsharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-fsl.js b/ui/base1/ace/mode-fsl.js new file mode 100644 index 0000000..9e31401 --- /dev/null +++ b/ui/base1/ace/mode-fsl.js @@ -0,0 +1,226 @@ +define("ace/mode/fsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var FSLHighlightRules = function () { + this.$rules = { + start: [{ + token: "punctuation.definition.comment.mn", + regex: /\/\*/, + push: [{ + token: "punctuation.definition.comment.mn", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment.block.fsl" + }] + }, { + token: "comment.line.fsl", + regex: /\/\//, + push: [{ + token: "comment.line.fsl", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.line.fsl" + }] + }, { + token: "entity.name.function", + regex: /\${/, + push: [{ + token: "entity.name.function", + regex: /}/, + next: "pop" + }, { + defaultToken: "keyword.other" + }], + comment: "js outcalls" + }, { + token: "constant.numeric", + regex: /[0-9]*\.[0-9]*\.[0-9]*/, + comment: "semver" + }, { + token: "constant.language.fslLanguage", + regex: "(?:" + + "graph_layout|machine_name|machine_author|machine_license|machine_comment|machine_language" + + "|machine_version|machine_reference|npm_name|graph_layout|on_init|on_halt|on_end|on_terminate|on_finalize|on_transition" + + "|on_action|on_stochastic_action|on_legal|on_main|on_forced|on_validation|on_validation_failure|on_transition_refused|on_forced_transition_refused" + + "|on_action_refused|on_enter|on_exit|start_states|end_states|terminal_states|final_states|fsl_version" + + ")\\s*:" + }, { + token: "keyword.control.transition.fslArrow", + regex: /<->|<-|->|<=>|=>|<=|<~>|~>|<~|<-=>|<=->|<-~>|<~->|<=~>|<~=>/ + }, { + token: "constant.numeric.fslProbability", + regex: /[0-9]+%/, + comment: "edge probability annotation" + }, { + token: "constant.character.fslAction", + regex: /\'[^']*\'/, + comment: "action annotation" + }, { + token: "string.quoted.double.fslLabel.doublequoted", + regex: /\"[^"]*\"/, + comment: "fsl label annotation" + }, { + token: "entity.name.tag.fslLabel.atom", + regex: /[a-zA-Z0-9_.+&()#@!?,]/, + comment: "fsl label annotation" + }] + }; + this.normalizeRules(); +}; +FSLHighlightRules.metaData = { + fileTypes: ["fsl", "fsl_state"], + name: "FSL", + scopeName: "source.fsl" +}; +oop.inherits(FSLHighlightRules, TextHighlightRules); +exports.FSLHighlightRules = FSLHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/fsl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsl_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var FSLHighlightRules = require("./fsl_highlight_rules").FSLHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = FSLHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/fsl"; + this.snippetFileId = "ace/snippets/fsl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/fsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ftl.js b/ui/base1/ace/mode-ftl.js new file mode 100644 index 0000000..e9e73b4 --- /dev/null +++ b/ui/base1/ace/mode-ftl.js @@ -0,0 +1,1255 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var FtlLangHighlightRules = function () { + var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|" + + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|" + + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|" + + "upper_case|word_list|xhtml|xml"; + var numberBuiltIns = "c|round|floor|ceiling"; + var dateBuiltIns = "iso_[a-z_]+"; + var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk"; + var hashBuiltIns = "keys|values"; + var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace"; + var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|" + + "eval|has_content|interpret|is_[a-z_]+|namespacenew"; + var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns + + xmlBuiltIns + expertBuiltIns; + var deprecatedBuiltIns = "default|exists|if_exists|web_safe"; + var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|" + + "now|output_encoding|template_name|url_escaping_charset|vars|version"; + var operators = "gt|gte|lt|lte|as|in|using"; + var reserved = "true|false"; + var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|" + + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|" + + "attributes"; + this.$rules = { + "start": [{ + token: "constant.character.entity", + regex: /&[^;]+;/ + }, { + token: "support.function", + regex: "\\?(" + allBuiltIns + ")" + }, { + token: "support.function.deprecated", + regex: "\\?(" + deprecatedBuiltIns + ")" + }, { + token: "language.variable", + regex: "\\.(?:" + variables + ")" + }, { + token: "constant.language", + regex: "\\b(" + reserved + ")\\b" + }, { + token: "keyword.operator", + regex: "\\b(?:" + operators + ")\\b" + }, { + token: "entity.other.attribute-name", + regex: attributes + }, { + token: "string", // + regex: /['"]/, + next: "qstring" + }, { + token: function (value) { + if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) { + return "constant.numeric"; + } + else { + return "variable"; + } + }, + regex: /[\w.+\-]+/ + }, { + token: "keyword.operator", + regex: "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }], + "qstring": [{ + token: "constant.character.escape", + regex: '\\\\[nrtvef\\\\"$]' + }, { + token: "string", + regex: /['"]/, + next: "start" + }, { + defaultToken: "string" + }] + }; +}; +oop.inherits(FtlLangHighlightRules, TextHighlightRules); +var FtlHighlightRules = function () { + HtmlHighlightRules.call(this); + var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|" + + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|" + + "setting|stop|switch|t|visit"; + var startRules = [ + { + token: "comment", + regex: "<#--", + next: "ftl-dcomment" + }, { + token: "string.interpolated", + regex: "\\${", + push: "ftl-start" + }, { + token: "keyword.function", + regex: "", + next: "pop" + }, { + token: "string.interpolated", + regex: "}", + next: "pop" + } + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]); + this.addRules({ + "ftl-dcomment": [{ + token: "comment", + regex: "-->", + next: "pop" + }, { + defaultToken: "comment" + }] + }); + this.normalizeRules(); +}; +oop.inherits(FtlHighlightRules, HtmlHighlightRules); +exports.FtlHighlightRules = FtlHighlightRules; + +}); + +define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules; +var Mode = function () { + this.HighlightRules = FtlHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/ftl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ftl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-gcode.js b/ui/base1/ace/mode-gcode.js new file mode 100644 index 0000000..0a54df0 --- /dev/null +++ b/ui/base1/ace/mode-gcode.js @@ -0,0 +1,74 @@ +define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var GcodeHighlightRules = function () { + var keywords = ("IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL"); + var builtinConstants = ("PI"); + var builtinFunctions = ("ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "\\(.*\\)" + }, { + token: "comment", // block number + regex: "([N])([0-9]+)" + }, { + token: "string", // " string + regex: "([G])([0-9]+\\.?[0-9]?)" + }, { + token: "string", // ' string + regex: "([M])([0-9]+\\.?[0-9]?)" + }, { + token: "constant.numeric", // float + regex: "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)" + }, { + token: keywordMapper, + regex: "[A-Z]" + }, { + token: "keyword.operator", + regex: "EQ|LT|GT|NE|GE|LE|OR|XOR" + }, { + token: "paren.lparen", + regex: "[\\[]" + }, { + token: "paren.rparen", + regex: "[\\]]" + }, { + token: "text", + regex: "\\s+" + }] + }; +}; +oop.inherits(GcodeHighlightRules, TextHighlightRules); +exports.GcodeHighlightRules = GcodeHighlightRules; + +}); + +define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = GcodeHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/gcode"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/gcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-gherkin.js b/ui/base1/ace/mode-gherkin.js new file mode 100644 index 0000000..f127c6d --- /dev/null +++ b/ui/base1/ace/mode-gherkin.js @@ -0,0 +1,154 @@ +define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; +var GherkinHighlightRules = function () { + var languages = [{ + name: "en", + labels: "Feature|Background|Scenario(?: Outline)?|Examples", + keywords: "Given|When|Then|And|But" + } + ]; + var labels = languages.map(function (l) { + return l.labels; + }).join("|"); + var keywords = languages.map(function (l) { + return l.keywords; + }).join("|"); + this.$rules = { + start: [{ + token: "constant.numeric", + regex: "(?:(?:[1-9]\\d*)|(?:0))" + }, { + token: "comment", + regex: "#.*$" + }, { + token: "keyword", + regex: "(?:" + labels + "):|(?:" + keywords + ")\\b" + }, { + token: "keyword", + regex: "\\*" + }, { + token: "string", // multi line """ string start + regex: '"{3}', + next: "qqstring3" + }, { + token: "string", // " string + regex: '"', + next: "qqstring" + }, { + token: "text", + regex: "^\\s*(?=@[\\w])", + next: [{ + token: "text", + regex: "\\s+" + }, { + token: "variable.parameter", + regex: "@[\\w]+" + }, { + token: "empty", + regex: "", + next: "start" + }] + }, { + token: "comment", + regex: "<[^>]+>" + }, { + token: "comment", + regex: "\\|(?=.)", + next: "table-item" + }, { + token: "comment", + regex: "\\|$", + next: "start" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "table-item": [{ + token: "comment", + regex: /$/, + next: "start" + }, { + token: "comment", + regex: /\|/ + }, { + token: "string", + regex: /\\./ + }, { + defaultToken: "string" + }] + }; + this.normalizeRules(); +}; +oop.inherits(GherkinHighlightRules, TextHighlightRules); +exports.GherkinHighlightRules = GherkinHighlightRules; + +}); + +define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules; +var Mode = function () { + this.HighlightRules = GherkinHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/gherkin"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var space2 = " "; + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (line.match("[ ]*\\|")) { + indent += "| "; + } + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + if (line.match("Scenario:|Feature:|Scenario Outline:|Background:")) { + indent += space2; + } + else if (line.match("(Given|Then).+(:)$|Examples:")) { + indent += space2; + } + else if (line.match("\\*.+")) { + indent += "* "; + } + } + return indent; + }; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/gherkin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-gitignore.js b/ui/base1/ace/mode-gitignore.js new file mode 100644 index 0000000..48c1923 --- /dev/null +++ b/ui/base1/ace/mode-gitignore.js @@ -0,0 +1,49 @@ +define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var GitignoreHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment", + regex: /^\s*#.*$/ + }, { + token: "keyword", // negated patterns + regex: /^\s*!.*$/ + } + ] + }; + this.normalizeRules(); +}; +GitignoreHighlightRules.metaData = { + fileTypes: ['gitignore'], + name: 'Gitignore' +}; +oop.inherits(GitignoreHighlightRules, TextHighlightRules); +exports.GitignoreHighlightRules = GitignoreHighlightRules; + +}); + +define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules; +var Mode = function () { + this.HighlightRules = GitignoreHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/gitignore"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/gitignore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-glsl.js b/ui/base1/ace/mode-glsl.js new file mode 100644 index 0000000..f99743b --- /dev/null +++ b/ui/base1/ace/mode-glsl.js @@ -0,0 +1,475 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen"; +var c_cppHighlightRules = function (extraKeywords) { + var keywordControls = ("break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using"); + var storageType = ("asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" + + "class|wchar_t|template|char16_t|char32_t"); + var storageModifiers = ("const|extern|register|restrict|static|volatile|inline|private|" + + "protected|public|friend|explicit|virtual|export|mutable|typename|" + + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"); + var keywordOperators = ("and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"); + var builtinConstants = ("NULL|true|false|TRUE|FALSE|nullptr"); + var keywordMapper = this.$keywords = this.createKeywordMapper(Object.assign({ + "keyword.control": keywordControls, + "storage.type": storageType, + "storage.modifier": storageModifiers, + "keyword.operator": keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants, + "support.function.C99.c": cFunctions + }, extraKeywords), "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type + this.$rules = { + "start": [ + { + token: "comment", + regex: "//$", + next: "start" + }, { + token: "comment", + regex: "//", + next: "singleLineComment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: "'(?:" + escapeRe + "|.)?'" + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "constant.language.escape", regex: formatRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: 'R"\\(', + stateName: "rawString", + next: [ + { token: "string.end", regex: '\\)"', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b", + next: "directive" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }, { + token: "keyword.operator", + regex: /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(c_cppHighlightRules, TextHighlightRules); +exports.c_cppHighlightRules = c_cppHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = c_cppHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/c_cpp"; + this.snippetFileId = "ace/snippets/c_cpp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var glslHighlightRules = function () { + var keywords = ("attribute|const|uniform|varying|break|continue|do|for|while|" + + "if|else|in|out|inout|float|int|void|bool|true|false|" + + "lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|" + + "mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|" + + "samplerCube|struct"); + var buildinConstants = ("radians|degrees|sin|cos|tan|asin|acos|atan|pow|" + + "exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|" + + "min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|" + + "normalize|faceforward|reflect|refract|matrixCompMult|lessThan|" + + "lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|" + + "not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|" + + "texture2DProjLod|textureCube|textureCubeLod|" + + "gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|" + + "gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|" + + "gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|" + + "gl_DepthRangeParameters|gl_DepthRange|" + + "gl_Position|gl_PointSize|" + + "gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants + }, "identifier"); + this.$rules = new c_cppHighlightRules().$rules; + this.$rules.start.forEach(function (rule) { + if (typeof rule.token == "function") + rule.token = keywordMapper; + }); +}; +oop.inherits(glslHighlightRules, c_cppHighlightRules); +exports.glslHighlightRules = glslHighlightRules; + +}); + +define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var CMode = require("./c_cpp").Mode; +var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = glslHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, CMode); +(function () { + this.$id = "ace/mode/glsl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/glsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-gobstones.js b/ui/base1/ace/mode-gobstones.js new file mode 100644 index 0000000..009a066 --- /dev/null +++ b/ui/base1/ace/mode-gobstones.js @@ -0,0 +1,1459 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var GobstonesHighlightRules = function () { + var definitions = { + standard: "program|procedure|function|interactive|return|let", + type: "type|is|variant|record|field|case" + }; + var control = { + commands: { + repetitions: "repeat|while|foreach|in", + alternatives: "if|elseif|else|switch" + }, + expressions: { + alternatives: "choose|when|otherwise|matching|select|on" + } + }; + var values = { + colors: "Verde|Rojo|Azul|Negro", + cardinals: "Norte|Sur|Este|Oeste", + booleans: "True|False", + numbers: /([-]?)([0-9]+)\b/, + strings: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }; + var primitives = { + commands: "Poner|Sacar|Mover|IrAlBorde|VaciarTablero|BOOM", + expressions: "nroBolitas|hayBolitas|puedeMover|" + + "siguiente|previo|opuesto|" + + "minBool|maxBool|minDir|maxDir|minColor|maxColor|" + + "primero|sinElPrimero|esVacía|" + + "boom", + keys: "K_A|K_B|K_C|K_D|K_E|K_F|K_G|K_G|K_H|K_I|K_J|K_K|K_L|K_M|K_N|K_Ñ|" + + "K_O|K_P|K_Q|K_R|K_S|K_T|K_U|K_V|K_W|K_X|K_Y|K_Z|" + + "K_0|K_1|K_2|K_3|K_4|K_5|K_6|K_7|K_8|K_9|" + + "K_F1|K_F2|K_F3|K_F4|K_F5|K_F6|K_F7|K_F8|K_F9|K_F10|K_F11|K_12|" + + "K_UP|K_DOWN|K_LEFT|K_RIGHT|K_RETURN|K_BACKSPACE|K_TAB|K_SPACE|K_ESCAPE" + + "K_CTRL_A|K_CTRL_B|K_CTRL_C|K_CTRL_D|K_CTRL_E|K_CTRL_F|K_CTRL_G|K_CTRL_G|" + + "K_CTRL_H|K_CTRL_I|K_CTRL_J|K_CTRL_K|K_CTRL_L|K_CTRL_M|K_CTRL_N|K_CTRL_Ñ|" + + "K_CTRL_O|K_CTRL_P|K_CTRL_Q|K_CTRL_R|K_CTRL_S|K_CTRL_T|K_CTRL_U|K_CTRL_V|" + + "K_CTRL_W|K_CTRL_X|K_CTRL_Y|K_CTRL_Z|" + + "K_CTRL_0|K_CTRL_1|K_CTRL_2|K_CTRL_3|K_CTRL_4|K_CTRL_5|K_CTRL_6|K_CTRL_7|K_CTRL_8|K_CTRL_9|" + + "K_CTRL_F1|K_CTRL_F2|K_CTRL_F3|K_CTRL_F4|K_CTRL_F5|K_CTRL_F6|K_CTRL_F7|" + + "K_CTRL_F8|K_CTRL_F9|K_CTRL_F10|K_CTRL_F11|K_CTRL_F12|" + + "K_CTRL_UP|K_CTRL_DOWN|K_CTRL_LEFT|K_CTRL_RIGHT|K_CTRL_RETURN|" + + "K_CTRL_BACKSPACE|K_CTRL_TAB|K_CTRL_SPACE|K_CTRL_ESCAPE" + + "K_ALT_A|K_ALT_B|K_ALT_C|K_ALT_D|K_ALT_E|K_ALT_F|K_ALT_G|K_ALT_G|K_ALT_H|" + + "K_ALT_I|K_ALT_J|K_ALT_K|K_ALT_L|K_ALT_M|K_ALT_N|K_ALT_Ñ|K_ALT_O|K_ALT_P|" + + "K_ALT_Q|K_ALT_R|K_ALT_S|K_ALT_T|K_ALT_U|K_ALT_V|K_ALT_W|K_ALT_X|K_ALT_Y|K_ALT_Z|" + + "K_ALT_0|K_ALT_1|K_ALT_2|K_ALT_3|K_ALT_4|K_ALT_5|K_ALT_6|K_ALT_7|K_ALT_8|K_ALT_9|" + + "K_ALT_F1|K_ALT_F2|K_ALT_F3|K_ALT_F4|K_ALT_F5|K_ALT_F6|K_ALT_F7|K_ALT_F8|" + + "K_ALT_F9|K_ALT_F10|K_ALT_F11|K_ALT_F12|" + + "K_ALT_UP|K_ALT_DOWN|K_ALT_LEFT|K_ALT_RIGHT|K_ALT_RETURN|K_ALT_BACKSPACE|" + + "K_ALT_TAB|K_ALT_SPACE|K_ALT_ESCAPE" + + "K_SHIFT_A|K_SHIFT_B|K_SHIFT_C|K_SHIFT_D|K_SHIFT_E|K_SHIFT_F|K_SHIFT_G|" + + "K_SHIFT_G|K_SHIFT_H|K_SHIFT_I|K_SHIFT_J|K_SHIFT_K|K_SHIFT_L|K_SHIFT_M|" + + "K_SHIFT_N|K_SHIFT_Ñ|K_SHIFT_O|K_SHIFT_P|K_SHIFT_Q|K_SHIFT_R|K_SHIFT_S|" + + "K_SHIFT_T|K_SHIFT_U|K_SHIFT_V|K_SHIFT_W|K_SHIFT_X|K_SHIFT_Y|K_SHIFT_Z|" + + "K_SHIFT_0|K_SHIFT_1|K_SHIFT_2|K_SHIFT_3|K_SHIFT_4|K_SHIFT_5|K_SHIFT_6|" + + "K_SHIFT_7|K_SHIFT_8|K_SHIFT_9|" + + "K_SHIFT_F1|K_SHIFT_F2|K_SHIFT_F3|K_SHIFT_F4|K_SHIFT_F5|K_SHIFT_F6|" + + "K_SHIFT_F7|K_SHIFT_F8|K_SHIFT_F9|K_SHIFT_F10|K_SHIFT_F11|K_SHIFT_F12|" + + "K_SHIFT_UP|K_SHIFT_DOWN|K_SHIFT_LEFT|K_SHIFT_RIGHT|K_SHIFT_RETURN|" + + "K_SHIFT_BACKSPACE|K_SHIFT_TAB|K_SHIFT_SPACE|K_SHIFT_ESCAPE" + + "K_CTRL_ALT_A|K_CTRL_ALT_B|K_CTRL_ALT_C|K_CTRL_ALT_D|K_CTRL_ALT_E|" + + "K_CTRL_ALT_F|K_CTRL_ALT_G|K_CTRL_ALT_G|K_CTRL_ALT_H|K_CTRL_ALT_I|" + + "K_CTRL_ALT_J|K_CTRL_ALT_K|K_CTRL_ALT_L|K_CTRL_ALT_M|K_CTRL_ALT_N|" + + "K_CTRL_ALT_Ñ|K_CTRL_ALT_O|K_CTRL_ALT_P|K_CTRL_ALT_Q|K_CTRL_ALT_R|" + + "K_CTRL_ALT_S|K_CTRL_ALT_T|K_CTRL_ALT_U|K_CTRL_ALT_V|K_CTRL_ALT_W|" + + "K_CTRL_ALT_X|K_CTRL_ALT_Y|K_CTRL_ALT_Z|" + + "K_CTRL_ALT_0|K_CTRL_ALT_1|K_CTRL_ALT_2|K_CTRL_ALT_3|K_CTRL_ALT_4|" + + "K_CTRL_ALT_5|K_CTRL_ALT_6|K_CTRL_ALT_7|K_CTRL_ALT_8|K_CTRL_ALT_9|" + + "K_CTRL_ALT_F1|K_CTRL_ALT_F2|K_CTRL_ALT_F3|K_CTRL_ALT_F4|K_CTRL_ALT_F5|" + + "K_CTRL_ALT_F6|K_CTRL_ALT_F7|K_CTRL_ALT_F8|K_CTRL_ALT_F9|K_CTRL_ALT_F10|" + + "K_CTRL_ALT_F11|K_CTRL_ALT_F12|" + + "K_CTRL_ALT_UP|K_CTRL_ALT_DOWN|K_CTRL_ALT_LEFT|K_CTRL_ALT_RIGHT|" + + "K_CTRL_ALT_RETURN|K_CTRL_ALT_BACKSPACE|K_CTRL_ALT_TAB|K_CTRL_ALT_SPACE|K_CTRL_ALT_ESCAPE" + + "K_CTRL_SHIFT_A|K_CTRL_SHIFT_B|K_CTRL_SHIFT_C|K_CTRL_SHIFT_D|K_CTRL_SHIFT_E|" + + "K_CTRL_SHIFT_F|K_CTRL_SHIFT_G|K_CTRL_SHIFT_G|K_CTRL_SHIFT_H|K_CTRL_SHIFT_I|" + + "K_CTRL_SHIFT_J|K_CTRL_SHIFT_K|K_CTRL_SHIFT_L|K_CTRL_SHIFT_M|K_CTRL_SHIFT_N|" + + "K_CTRL_SHIFT_Ñ|K_CTRL_SHIFT_O|K_CTRL_SHIFT_P|K_CTRL_SHIFT_Q|K_CTRL_SHIFT_R|" + + "K_CTRL_SHIFT_S|K_CTRL_SHIFT_T|K_CTRL_SHIFT_U|K_CTRL_SHIFT_V|K_CTRL_SHIFT_W|" + + "K_CTRL_SHIFT_X|K_CTRL_SHIFT_Y|K_CTRL_SHIFT_Z|" + + "K_CTRL_SHIFT_0|K_CTRL_SHIFT_1|K_CTRL_SHIFT_2|K_CTRL_SHIFT_3|K_CTRL_SHIFT_4|" + + "K_CTRL_SHIFT_5|K_CTRL_SHIFT_6|K_CTRL_SHIFT_7|K_CTRL_SHIFT_8|K_CTRL_SHIFT_9|" + + "K_CTRL_SHIFT_F1|K_CTRL_SHIFT_F2|K_CTRL_SHIFT_F3|K_CTRL_SHIFT_F4|" + + "K_CTRL_SHIFT_F5|K_CTRL_SHIFT_F6|K_CTRL_SHIFT_F7|K_CTRL_SHIFT_F8|" + + "K_CTRL_SHIFT_9|K_CTRL_SHIFT_10|K_CTRL_SHIFT_11|K_CTRL_SHIFT_12|" + + "K_CTRL_SHIFT_UP|K_CTRL_SHIFT_DOWN|K_CTRL_SHIFT_LEFT|K_CTRL_SHIFT_RIGHT|" + + "K_CTRL_SHIFT_RETURN|K_CTRL_SHIFT_BACKSPACE|K_CTRL_SHIFT_TAB|" + + "K_CTRL_SHIFT_SPACE|K_CTRL_SHIFT_ESCAPE" + + "K_ALT_SHIFT_A|K_ALT_SHIFT_B|K_ALT_SHIFT_C|K_ALT_SHIFT_D|K_ALT_SHIFT_E|" + + "K_ALT_SHIFT_F|K_ALT_SHIFT_G|K_ALT_SHIFT_G|K_ALT_SHIFT_H|K_ALT_SHIFT_I|" + + "K_ALT_SHIFT_J|K_ALT_SHIFT_K|K_ALT_SHIFT_L|K_ALT_SHIFT_M|K_ALT_SHIFT_N|" + + "K_ALT_SHIFT_Ñ|K_ALT_SHIFT_O|K_ALT_SHIFT_P|K_ALT_SHIFT_Q|K_ALT_SHIFT_R|" + + "K_ALT_SHIFT_S|K_ALT_SHIFT_T|K_ALT_SHIFT_U|K_ALT_SHIFT_V|K_ALT_SHIFT_W|" + + "K_ALT_SHIFT_X|K_ALT_SHIFT_Y|K_ALT_SHIFT_Z|" + + "K_ALT_SHIFT_0|K_ALT_SHIFT_1|K_ALT_SHIFT_2|K_ALT_SHIFT_3|K_ALT_SHIFT_4|" + + "K_ALT_SHIFT_5|K_ALT_SHIFT_6|K_ALT_SHIFT_7|K_ALT_SHIFT_8|K_ALT_SHIFT_9|" + + "K_ALT_SHIFT_F1|K_ALT_SHIFT_F2|K_ALT_SHIFT_F3|K_ALT_SHIFT_F4|" + + "K_ALT_SHIFT_F5|K_ALT_SHIFT_F6|K_ALT_SHIFT_F7|K_ALT_SHIFT_F8|" + + "K_ALT_SHIFT_9|K_ALT_SHIFT_10|K_ALT_SHIFT_11|K_ALT_SHIFT_12|" + + "K_ALT_SHIFT_UP|K_ALT_SHIFT_DOWN|K_ALT_SHIFT_LEFT|K_ALT_SHIFT_RIGHT|" + + "K_ALT_SHIFT_RETURN|K_ALT_SHIFT_BACKSPACE|K_ALT_SHIFT_TAB|K_ALT_SHIFT_SPACE|" + + "K_ALT_SHIFT_ESCAPE" + + "K_CTRL_ALT_SHIFT_A|K_CTRL_ALT_SHIFT_B|K_CTRL_ALT_SHIFT_C|K_CTRL_ALT_SHIFT_D|" + + "K_CTRL_ALT_SHIFT_E|K_CTRL_ALT_SHIFT_F|K_CTRL_ALT_SHIFT_G|K_CTRL_ALT_SHIFT_G|" + + "K_CTRL_ALT_SHIFT_H|K_CTRL_ALT_SHIFT_I|K_CTRL_ALT_SHIFT_J|K_CTRL_ALT_SHIFT_K|" + + "K_CTRL_ALT_SHIFT_L|K_CTRL_ALT_SHIFT_M|K_CTRL_ALT_SHIFT_N|K_CTRL_ALT_SHIFT_Ñ|" + + "K_CTRL_ALT_SHIFT_O|K_CTRL_ALT_SHIFT_P|K_CTRL_ALT_SHIFT_Q|K_CTRL_ALT_SHIFT_R|" + + "K_CTRL_ALT_SHIFT_S|K_CTRL_ALT_SHIFT_T|K_CTRL_ALT_SHIFT_U|K_CTRL_ALT_SHIFT_V|" + + "K_CTRL_ALT_SHIFT_W|K_CTRL_ALT_SHIFT_X|K_CTRL_ALT_SHIFT_Y|K_CTRL_ALT_SHIFT_Z|" + + "K_CTRL_ALT_SHIFT_0|K_CTRL_ALT_SHIFT_1|K_CTRL_ALT_SHIFT_2|K_CTRL_ALT_SHIFT_3|" + + "K_CTRL_ALT_SHIFT_4|K_CTRL_ALT_SHIFT_5|K_CTRL_ALT_SHIFT_6|K_CTRL_ALT_SHIFT_7|" + + "K_CTRL_ALT_SHIFT_8|K_CTRL_ALT_SHIFT_9|" + + "K_CTRL_ALT_SHIFT_F1|K_CTRL_ALT_SHIFT_F2|K_CTRL_ALT_SHIFT_F3|K_CTRL_ALT_SHIFT_F4|" + + "K_CTRL_ALT_SHIFT_F5|K_CTRL_ALT_SHIFT_F6|K_CTRL_ALT_SHIFT_F7|K_CTRL_ALT_SHIFT_F8|" + + "K_CTRL_ALT_SHIFT_F9|K_CTRL_ALT_SHIFT_F10|K_CTRL_ALT_SHIFT_F11|K_CTRL_ALT_SHIFT_F12|" + + "K_CTRL_ALT_SHIFT_UP|K_CTRL_ALT_SHIFT_DOWN|K_CTRL_ALT_SHIFT_LEFT|K_CTRL_ALT_SHIFT_RIGHT|" + + "K_CTRL_ALT_SHIFT_RETURN|K_CTRL_ALT_SHIFT_BACKSPACE|K_CTRL_ALT_SHIFT_TAB|" + + "K_CTRL_ALT_SHIFT_SPACE|K_CTRL_ALT_SHIFT_ESCAPE" + }; + var operations = { + commands: ":=", + expressions: { + numeric: "\\+|\\-|\\*|\\^|div|mod", + comparison: ">=|<=|==|\\/=|>|<", + boolean: "\\|\\||&&|not", + other: "\\+\\+|<\\-|\\[|\\]|\\_|\\->" + } + }; + var comments = { + line: { + double_slash: "\\/\\/.*$", + double_dash: "\\-\\-.*$", + number_sign: "#.*$" + }, + block: { start: "\\/\\*", end: "\\*\\/" }, + block_alt: { start: "\\{\\-", end: "\\-\\}" } + }; + this.$rules = { + "start": [ + { + token: "comment.line.double-slash.gobstones", + regex: comments.line.double_slash + }, + { + token: "comment.line.double-dash.gobstones", + regex: comments.line.double_dash + }, + { + token: "comment.line.number-sign.gobstones", + regex: comments.line.number_sign + }, + { + token: "comment.block.dash-asterisc.gobstones", + regex: comments.block.start, + next: "block_comment_end" + }, + { + token: "comment.block.brace-dash.gobstones", + regex: comments.block_alt.start, + next: "block_comment_alt_end" + }, + { + token: "constant.numeric.gobstones", + regex: values.numbers + }, + { + token: "string.quoted.double.gobstones", + regex: values.strings + }, + { + token: "keyword.operator.other.gobstones", + regex: operations.expressions.other + }, + { + token: "keyword.operator.numeric.gobstones", + regex: operations.expressions.numeric + }, + { + token: "keyword.operator.compare.gobstones", + regex: operations.expressions.comparison + }, + { + token: "keyword.operator.boolean.gobstones", + regex: operations.expressions.boolean + }, + { + token: this.createKeywordMapper({ + "storage.type.definitions.gobstones": definitions.standard, + "storage.type.types.gobstones": definitions.type, + "keyword.control.commands.repetitions.gobstones": control.commands.repetitions, + "keyword.control.commands.alternatives.gobstones": control.commands.alternatives, + "keyword.control.expressions.alternatives.gobstones": control.expressions.alternatives, + "constant.language.colors.gobstones": values.colors, + "constant.language.cardinals.gobstones": values.cardinals, + "constant.language.boolean.gobstones": values.booleans, + "support.function.gobstones": primitives.commands, + "support.variable.gobstones": primitives.expressions, + "variable.language.gobstones": primitives.keys + }, "identifier.gobstones"), + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "comma.gobstones", + regex: "," + }, + { + token: "semicolon.gobstones", + regex: ";" + }, + { + token: "lparen", + regex: "[[({]" + }, + { + token: "rparen", + regex: "[\\])}]" + }, + { + token: "text", + regex: "\\s+" + } + ], + "block_comment_end": [{ + token: "comment.block.dash-asterisc.gobstones", + regex: comments.block.end, + next: "start" + }, { + defaultToken: "comment.block.dash-asterisc.gobstones" + } + ], + "block_comment_alt_end": [{ + token: "comment.block.brace-dash.gobstones", + regex: comments.block_alt.end, + next: "start" + }, { + defaultToken: "comment.block.brace-dash.gobstones" + } + ] + }; +}; +oop.inherits(GobstonesHighlightRules, TextHighlightRules); +exports.GobstonesHighlightRules = GobstonesHighlightRules; + +}); + +define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptMode = require("./javascript").Mode; +var GobstonesHighlightRules = require("./gobstones_highlight_rules").GobstonesHighlightRules; +var Mode = function () { + JavaScriptMode.call(this); + this.HighlightRules = GobstonesHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, JavaScriptMode); +(function () { + this.createWorker = function () { + return null; + }; + this.$id = "ace/mode/gobstones"; + this.snippetFileId = "ace/snippets/gobstones"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/gobstones"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-golang.js b/ui/base1/ace/mode-golang.js new file mode 100644 index 0000000..f050f50 --- /dev/null +++ b/ui/base1/ace/mode-golang.js @@ -0,0 +1,341 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var GolangHighlightRules = function () { + var keywords = ("else|break|case|return|goto|if|const|select|" + + "continue|struct|default|switch|for|range|" + + "func|import|package|chan|defer|fallthrough|go|interface|map|range|" + + "select|type|var"); + var builtinTypes = ("string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" + + "float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error"); + var builtinFunctions = ("new|close|cap|copy|panic|panicln|print|println|len|make|delete|real|recover|imag|append"); + var builtinConstants = ("nil|true|false|iota"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": builtinConstants, + "support.function": builtinFunctions, + "support.type": builtinTypes + }, ""); + var stringEscapeRe = "\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(/\\h/g, "[a-fA-F\\d]"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment.start", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: /"(?:[^"\\]|\\.)*?"/ + }, { + token: "string", // raw + regex: '`', + next: "bqstring" + }, { + token: "constant.numeric", // rune + regex: "'(?:[^\\'\uD800-\uDBFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|" + stringEscapeRe.replace('"', '') + ")'" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: ["keyword", "text", "entity.name.function"], + regex: "(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b" + }, { + token: function (val) { + if (val[val.length - 1] == "(") { + return [{ + type: keywordMapper(val.slice(0, -1)) || "support.function", + value: val.slice(0, -1) + }, { + type: "paren.lparen", + value: val.slice(-1) + }]; + } + return keywordMapper(val) || "identifier"; + }, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment.end", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "bqstring": [ + { + token: "string", + regex: '`', + next: "start" + }, { + defaultToken: "string" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(GolangHighlightRules, TextHighlightRules); +exports.GolangHighlightRules = GolangHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = GolangHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; //end getNextLineIndent + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/golang"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/golang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-graphqlschema.js b/ui/base1/ace/mode-graphqlschema.js new file mode 100644 index 0000000..6d3bdd6 --- /dev/null +++ b/ui/base1/ace/mode-graphqlschema.js @@ -0,0 +1,174 @@ +define("ace/mode/graphqlschema_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var GraphQLSchemaHighlightRules = function () { + var keywords = ("type|interface|union|enum|schema|input|implements|extends|scalar"); + var dataTypes = ("Int|Float|String|ID|Boolean"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "storage.type": dataTypes + }, "identifier"); + this.$rules = { + "start": [{ + token: "comment", + regex: "#.*$" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; +oop.inherits(GraphQLSchemaHighlightRules, TextHighlightRules); +exports.GraphQLSchemaHighlightRules = GraphQLSchemaHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/graphqlschema",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/graphqlschema_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var GraphQLSchemaHighlightRules = require("./graphqlschema_highlight_rules").GraphQLSchemaHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = GraphQLSchemaHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/graphqlschema"; + this.snippetFileId = "ace/snippets/graphqlschema"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/graphqlschema"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-groovy.js b/ui/base1/ace/mode-groovy.js new file mode 100644 index 0000000..6bbf403 --- /dev/null +++ b/ui/base1/ace/mode-groovy.js @@ -0,0 +1,1401 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var GroovyHighlightRules = function () { + var keywords = ("assert|with|abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "def|float|native|super|while"); + var buildinConstants = ("null|Infinity|NaN|undefined"); + var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" + + "ClassFormatError|Deprecated|EnumConstantNotPresentException|" + + "ExceptionInInitializerError|IllegalAccessError|" + + "IllegalThreadStateException|InstantiationError|InternalError|" + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|" + + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" + + "SuppressWarnings|TypeNotPresentException|UnknownError|" + + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" + + "InstantiationException|IndexOutOfBoundsException|" + + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" + + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" + + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" + + "InterruptedException|NoSuchMethodException|IllegalAccessException|" + + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" + + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" + + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" + + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" + + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" + + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" + + "StackOverflowError|OutOfMemoryError|VirtualMachineError|" + + "ArrayStoreException|ClassCastException|LinkageError|" + + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" + + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" + + "Cloneable|Class|CharSequence|Comparable|String|Object"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "support.function": langClasses, + "constant.language": buildinConstants + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", + regex: '"""', + next: "qqstring" + }, { + token: "string", + regex: "'''", + next: "qstring" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: /\\(?:u[0-9A-Fa-f]{4}|.|$)/ + }, { + token: "constant.language.escape", + regex: /\$[\w\d]+/ + }, { + token: "constant.language.escape", + regex: /\$\{[^"\}]+\}?/ + }, { + token: "string", + regex: '"{3,5}', + next: "start" + }, { + token: "string", + regex: '.+?' + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: /\\(?:u[0-9A-Fa-f]{4}|.|$)/ + }, { + token: "string", + regex: "'{3,5}", + next: "start" + }, { + token: "string", + regex: ".+?" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(GroovyHighlightRules, TextHighlightRules); +exports.GroovyHighlightRules = GroovyHighlightRules; + +}); + +define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptMode = require("./javascript").Mode; +var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules; +var Mode = function () { + JavaScriptMode.call(this); + this.HighlightRules = GroovyHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, JavaScriptMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/groovy"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/groovy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-haml.js b/ui/base1/ace/mode-haml.js new file mode 100644 index 0000000..cfe5c76 --- /dev/null +++ b/ui/base1/ace/mode-haml.js @@ -0,0 +1,1906 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token: "constant.other.symbol.ruby", // symbol + regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; +exports.qString = { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; +exports.qqString = { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; +exports.tString = { + token: "string", // backtick string + regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; +var constantNumericHex = exports.constantNumericHex = { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; +var constantNumericBinary = exports.constantNumericBinary = { + token: "constant.numeric", + regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/ +}; +var constantNumericDecimal = exports.constantNumericDecimal = { + token: "constant.numeric", + regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/ +}; +var constantNumericOctal = exports.constantNumericOctal = { + token: "constant.numeric", + regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/ +}; +var constantNumericRational = exports.constantNumericRational = { + token: "constant.numeric", //rational + complex + regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/ +}; +var constantNumericComplex = exports.constantNumericComplex = { + token: "constant.numeric", //simple complex numbers + regex: /\b([\d]i)\b/ +}; +var constantNumericFloat = exports.constantNumericFloat = { + token: "constant.numeric", // float + complex + regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b" +}; +var instanceVariable = exports.instanceVariable = { + token: "variable.instance", // instance variable + regex: "@{1,2}[a-zA-Z_\\d]+" +}; +var RubyHighlightRules = function () { + var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" + + "private_class_method|remove_method|undef_method"); + var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"); + var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"); + var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})"; + var closeParen = { + "(": ")", + "[": "]", + "{": "}", + "<": ">", + "^": "^", + "|": "|", + "%": "%" + }; + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "comment.multiline", // multi line comment + regex: "^=begin(?=$|\\s.*$)", + next: "comment" + }, { + token: "string.regexp", + regex: /[/](?=.*\/)/, + next: "regex" + }, + [{ + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(")/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(')/, + push: [{ + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "string.end", + regex: /'/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithoutInterpolation"; + return this.token; + } + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithoutInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithInterpolation"; + return this.token; + } + }, { + token: "string.regexp", + regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "rState"; + return this.token; + } + }], + { + token: "punctuation", // namespaces aren't symbols + regex: "::" + }, + instanceVariable, + { + token: "variable.global", // global variable + regex: "[$][a-zA-Z_\\d]+" + }, { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]*" + }, { + token: ["punctuation.operator", "support.function"], + regex: /(\.)([a-zA-Z_\d]+)(?=\()/ + }, { + token: ["punctuation.operator", "identifier"], + regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/ + }, { + token: "string.character", + regex: "\\B\\?(?:" + escapedChars + "|\\S)" + }, { + token: "punctuation.operator", + regex: /\?(?=.+:)/ + }, + constantNumericRational, + constantNumericComplex, + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + constantNumericBinary, + constantNumericDecimal, + constantNumericOctal, + { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "punctuation.separator.key-value", + regex: "=>" + }, { + stateName: "heredoc", + onMatch: function (value, currentState, stack) { + var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + { type: "constant", value: tokens[1] }, + { type: "string", value: tokens[2] }, + { type: "support.class", value: tokens[3] }, + { type: "string", value: tokens[4] } + ]; + }, + regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]", + onMatch: function (value, currentState, stack) { + this.next = ''; + if (value == "}" && stack.length > 1 && stack[1] != "start") { + stack.shift(); + this.next = stack.shift(); + } + return this.token; + } + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + } + ], + "comment": [ + { + token: "comment.multiline", // closing comment + regex: "^=end(?=$|\\s.*$)", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "qStateWithInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "qStateWithoutInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "sStateWithoutInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "sStateWithInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "rState": [{ + token: "string.regexp", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.language.escape"; + } + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.regexp", + regex: /\// + }, { + token: "string.regexp", + regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) { + if (stack.length && val[0] === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.language.escape"; + } + }, + { include: "regex" }, + { + defaultToken: "string.regexp" + }], + "regex": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "constant.language.escape", + regex: /\\[AGbBzZ]/ + }, { + token: "constant.language.escape", + regex: /\\g<[a-zA-Z0-9]*>/ + }, { + token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"], + regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/ + }, { + token: ["constant.language.escape", "invalid", "constant.language.escape"], + regex: /(\\p{\^?)([^/]*)(})/ + }, { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: /[/][imxouesn]*/, + next: "start" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "regexp.keyword", + regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + push: "regex_character_class" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: /&?&?\[\^?/, + push: "regex_character_class" + }, { + token: "constant.language.escape", + regex: "]", + next: "pop" + }, { + token: "constant.language.escape", + regex: "-" + }, { + defaultToken: "string.regexp.characterclass" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(RubyHighlightRules, TextHighlightRules); +exports.RubyHighlightRules = RubyHighlightRules; + +}); + +define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var RubyExports = require("./ruby_highlight_rules"); +var RubyHighlightRules = RubyExports.RubyHighlightRules; +var HamlHighlightRules = function () { + HtmlHighlightRules.call(this); + this.$rules = { + "start": [ + { + token: "comment.block", // multiline HTML comment + regex: /^\/$/, + next: "comment" + }, + { + token: "comment.block", // multiline HAML comment + regex: /^\-#$/, + next: "comment" + }, + { + token: "comment.line", // HTML comment + regex: /\/\s*.*/ + }, + { + token: "comment.line", // HAML comment + regex: /-#\s*.*/ + }, + { + token: "keyword.other.doctype", + regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" + }, + RubyExports.qString, + RubyExports.qqString, + RubyExports.tString, + { + token: "meta.tag.haml", + regex: /(%[\w:\-]+)/ + }, + { + token: "keyword.attribute-name.class.haml", + regex: /\.[\w-]+/ + }, + { + token: "keyword.attribute-name.id.haml", + regex: /#[\w-]+/, + next: "element_class" + }, + RubyExports.constantNumericHex, + RubyExports.constantNumericFloat, + RubyExports.constantOtherSymbol, + { + token: "text", + regex: /=|-|~/, + next: "embedded_ruby" + } + ], + "element_class": [ + { + token: "keyword.attribute-name.class.haml", + regex: /\.[\w-]+/ + }, + { + token: "punctuation.section", + regex: /\{/, + next: "element_attributes" + }, + RubyExports.constantOtherSymbol, + { + token: "empty", + regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/])", + next: "start" + } + ], + "element_attributes": [ + RubyExports.constantOtherSymbol, + RubyExports.qString, + RubyExports.qqString, + RubyExports.tString, + RubyExports.constantNumericHex, + RubyExports.constantNumericFloat, + { + token: "punctuation.section", + regex: /$|\}/, + next: "start" + } + ], + "embedded_ruby": [ + RubyExports.constantNumericHex, + RubyExports.constantNumericFloat, + RubyExports.instanceVariable, + RubyExports.qString, + RubyExports.qqString, + RubyExports.tString, + { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]+" + }, + { + token: new RubyHighlightRules().getKeywords(), + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: ["keyword", "text", "text"], + regex: "(?:do|\\{)(?: \\|[^|]+\\|)?$", + next: "start" + }, + { + token: ["text"], + regex: "^$", + next: "start" + }, + { + token: ["text"], + regex: "^(?!.*\\|\\s*$)", + next: "start" + } + ], + "comment": [ + { + token: "comment.block", + regex: /^$/, + next: "start" + }, + { + token: "comment.block", // comment spanning the whole line + regex: /\s+.*/ + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(HamlHighlightRules, HtmlHighlightRules); +exports.HamlHighlightRules = HamlHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = HamlHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/haml"; + this.snippetFileId = "ace/snippets/haml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/haml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-handlebars.js b/ui/base1/ace/mode-handlebars.js new file mode 100644 index 0000000..f55ab59 --- /dev/null +++ b/ui/base1/ace/mode-handlebars.js @@ -0,0 +1,2438 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module){/* global define */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +function pop2(currentState, stack) { + stack.splice(0, 3); + return stack.shift() || "start"; +} +var HandlebarsHighlightRules = function () { + HtmlHighlightRules.call(this); + var hbs = { + regex: "(?={{)", + push: "handlebars" + }; + for (var key in this.$rules) { + this.$rules[key].unshift(hbs); + } + this.$rules.handlebars = [{ + token: "comment.start", + regex: "{{!--", + push: [{ + token: "comment.end", + regex: "--}}", + next: pop2 + }, { + defaultToken: "comment" + }] + }, { + token: "comment.start", + regex: "{{!", + push: [{ + token: "comment.end", + regex: "}}", + next: pop2 + }, { + defaultToken: "comment" + }] + }, { + token: "support.function", // unescaped variable + regex: "{{{", + push: [{ + token: "support.function", + regex: "}}}", + next: pop2 + }, { + token: "variable.parameter", + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }] + }, { + token: "storage.type.start", // begin section + regex: "{{[#\\^/&]?", + push: [{ + token: "storage.type.end", + regex: "}}", + next: pop2 + }, { + token: "variable.parameter", + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }] + }]; + this.normalizeRules(); +}; +oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules); +exports.HandlebarsHighlightRules = HandlebarsHighlightRules; + +}); + +define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlBehaviour = require("../behaviour/xml").XmlBehaviour; +var HtmlBehaviour = function () { + XmlBehaviour.call(this); +}; +oop.inherits(HtmlBehaviour, XmlBehaviour); +exports.HtmlBehaviour = HtmlBehaviour; + +}); + +define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"], function(require, exports, module){/* global define */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules; +var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = HandlebarsHighlightRules; + this.$behaviour = new HtmlBehaviour(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.blockComment = { start: "{{!--", end: "--}}" }; + this.$id = "ace/mode/handlebars"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/handlebars"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-haskell.js b/ui/base1/ace/mode-haskell.js new file mode 100644 index 0000000..749f891 --- /dev/null +++ b/ui/base1/ace/mode-haskell.js @@ -0,0 +1,324 @@ +define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from tm bundles\haskell.tmbundle\Syntaxes\Haskell.plist (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HaskellHighlightRules = function () { + this.$rules = { start: [{ token: ['punctuation.definition.entity.haskell', + 'keyword.operator.function.infix.haskell', + 'punctuation.definition.entity.haskell'], + regex: '(`)([a-zA-Z_\']*?)(`)', + comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' }, + { token: 'constant.language.unit.haskell', regex: '\\(\\)' }, + { token: 'constant.language.empty-list.haskell', + regex: '\\[\\]' }, + { token: 'keyword.other.haskell', + regex: '\\b(module|signature)\\b', + push: [{ token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' }, + { include: '#module_name' }, + { include: '#module_exports' }, + { token: 'invalid', regex: '[a-z]+' }, + { defaultToken: 'meta.declaration.module.haskell' }] }, + { token: 'keyword.other.haskell', + regex: '\\bclass\\b', + push: [{ token: 'keyword.other.haskell', + regex: '\\bwhere\\b', + next: 'pop' }, + { token: 'support.class.prelude.haskell', + regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' }, + { token: 'entity.other.inherited-class.haskell', + regex: '[A-Z][A-Za-z_\']*' }, + { token: 'variable.other.generic-type.haskell', + regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, + { defaultToken: 'meta.declaration.class.haskell' }] }, + { token: 'keyword.other.haskell', + regex: '\\binstance\\b', + push: [{ token: 'keyword.other.haskell', + regex: '\\bwhere\\b|$', + next: 'pop' }, + { include: '#type_signature' }, + { defaultToken: 'meta.declaration.instance.haskell' }] }, + { token: 'keyword.other.haskell', + regex: 'import', + push: [{ token: 'meta.import.haskell', regex: '$|;|^', next: 'pop' }, + { token: 'keyword.other.haskell', regex: 'qualified|as|hiding' }, + { include: '#module_name' }, + { include: '#module_exports' }, + { defaultToken: 'meta.import.haskell' }] }, + { token: ['keyword.other.haskell', 'meta.deriving.haskell'], + regex: '(deriving)(\\s*\\()', + push: [{ token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' }, + { token: 'entity.other.inherited-class.haskell', + regex: '\\b[A-Z][a-zA-Z_\']*' }, + { defaultToken: 'meta.deriving.haskell' }] }, + { token: 'keyword.other.haskell', + regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' }, + { token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' }, + { token: 'keyword.control.haskell', + regex: '\\b(?:do|if|then|else)\\b' }, + { token: 'constant.numeric.float.haskell', + regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b', + comment: 'Floats are always decimal' }, + { token: 'constant.numeric.haskell', + regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' }, + { token: ['meta.preprocessor.c', + 'punctuation.definition.preprocessor.c', + 'meta.preprocessor.c'], + regex: '^(\\s*)(#)(\\s*\\w+)', + comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' }, + { include: '#pragma' }, + { token: 'punctuation.definition.string.begin.haskell', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.haskell', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.haskell', + regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' }, + { token: 'constant.character.escape.octal.haskell', + regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' }, + { token: 'constant.character.escape.control.haskell', + regex: '\\^[A-Z@\\[\\]\\\\\\^_]' }, + { defaultToken: 'string.quoted.double.haskell' }] }, + { token: ['punctuation.definition.string.begin.haskell', + 'string.quoted.single.haskell', + 'constant.character.escape.haskell', + 'constant.character.escape.octal.haskell', + 'constant.character.escape.hexadecimal.haskell', + 'constant.character.escape.control.haskell', + 'punctuation.definition.string.end.haskell'], + regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' }, + { token: ['meta.function.type-declaration.haskell', + 'entity.name.function.haskell', + 'meta.function.type-declaration.haskell', + 'keyword.other.double-colon.haskell'], + regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=]+\\))(\\s*)(::)', + push: [{ token: 'meta.function.type-declaration.haskell', + regex: '$', + next: 'pop' }, + { include: '#type_signature' }, + { defaultToken: 'meta.function.type-declaration.haskell' }] }, + { token: 'support.constant.haskell', + regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' }, + { token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' }, + { include: '#comments' }, + { token: 'support.function.prelude.haskell', + regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' }, + { include: '#infix_op' }, + { token: 'keyword.operator.haskell', + regex: '[|!%$?~+:\\-.=\\\\]+', + comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' }, + { token: 'punctuation.separator.comma.haskell', regex: ',' }], + '#block_comment': [{ token: 'punctuation.definition.comment.haskell', + regex: '\\{-(?!#)', + push: [{ include: '#block_comment' }, + { token: 'punctuation.definition.comment.haskell', + regex: '-\\}', + next: 'pop' }, + { defaultToken: 'comment.block.haskell' }] }], + '#comments': [{ token: 'punctuation.definition.comment.haskell', + regex: '--.*', + push_: [{ token: 'comment.line.double-dash.haskell', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-dash.haskell' }] }, + { include: '#block_comment' }], + '#infix_op': [{ token: 'entity.name.function.infix.haskell', + regex: '\\([|!%$+:\\-.=]+\\)|\\(,+\\)' }], + '#module_exports': [{ token: 'meta.declaration.exports.haskell', + regex: '\\(', + push: [{ token: 'meta.declaration.exports.haskell.end', + regex: '\\)', + next: 'pop' }, + { token: 'entity.name.function.haskell', + regex: '\\b[a-z][a-zA-Z_\']*' }, + { token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' }, + { token: 'punctuation.separator.comma.haskell', regex: ',' }, + { include: '#infix_op' }, + { token: 'meta.other.unknown.haskell', + regex: '\\(.*?\\)', + comment: 'So named because I don\'t know what to call this.' }, + { defaultToken: 'meta.declaration.exports.haskell.end' }] }], + '#module_name': [{ token: 'support.other.module.haskell', + regex: '[A-Z][A-Za-z._\']*' }], + '#pragma': [{ token: 'meta.preprocessor.haskell', + regex: '\\{-#', + push: [{ token: 'meta.preprocessor.haskell', + regex: '#-\\}', + next: 'pop' }, + { token: 'keyword.other.preprocessor.haskell', + regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' }, + { defaultToken: 'meta.preprocessor.haskell' }] }], + '#type_signature': [{ token: ['meta.class-constraint.haskell', + 'entity.other.inherited-class.haskell', + 'meta.class-constraint.haskell', + 'variable.other.generic-type.haskell', + 'meta.class-constraint.haskell', + 'keyword.other.big-arrow.haskell'], + regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' }, + { include: '#pragma' }, + { token: 'keyword.other.arrow.haskell', regex: '->' }, + { token: 'keyword.other.big-arrow.haskell', regex: '=>' }, + { token: 'support.type.prelude.haskell', + regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' }, + { token: 'variable.other.generic-type.haskell', + regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, + { token: 'storage.type.haskell', + regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' }, + { token: 'support.constant.unit.haskell', regex: '\\(\\)' }, + { include: '#comments' }] }; + this.normalizeRules(); +}; +HaskellHighlightRules.metaData = { fileTypes: ['hs'], + keyEquivalent: '^~H', + name: 'Haskell', + scopeName: 'source.haskell' }; +oop.inherits(HaskellHighlightRules, TextHighlightRules); +exports.HaskellHighlightRules = HaskellHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HaskellHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = null; + this.$id = "ace/mode/haskell"; + this.snippetFileId = "ace/snippets/haskell"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/haskell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-haskell_cabal.js b/ui/base1/ace/mode-haskell_cabal.js new file mode 100644 index 0000000..bac0361 --- /dev/null +++ b/ui/base1/ace/mode-haskell_cabal.js @@ -0,0 +1,135 @@ +define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/** + * Haskell Cabal files highlighter (https://www.haskell.org/cabal/users-guide/developing-packages.html) + **/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CabalHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment", + regex: "^\\s*--.*$" + }, { + token: ["keyword"], + regex: /^(\s*\w.*?)(:(?:\s+|$))/ + }, { + token: "constant.numeric", // float + regex: /[\d_]+(?:(?:[\.\d_]*)?)/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b" + }, { + token: "markup.heading", + regex: /^(\w.*)$/ + } + ] + }; +}; +oop.inherits(CabalHighlightRules, TextHighlightRules); +exports.CabalHighlightRules = CabalHighlightRules; + +}); + +define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){/* +* Folding mode for Cabal files (Haskell): allow folding each seaction, including +* the initial general section. +*/ +"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.isHeading = function (session, row) { + var heading = "markup.heading"; + var token = session.getTokens(row)[0]; + return row == 0 || (token && token.type.lastIndexOf(heading, 0) === 0); + }; + this.getFoldWidget = function (session, foldStyle, row) { + if (this.isHeading(session, row)) { + return "start"; + } + else if (foldStyle === "markbeginend" && !(/^\s*$/.test(session.getLine(row)))) { + var maxRow = session.getLength(); + while (++row < maxRow) { + if (!(/^\s*$/.test(session.getLine(row)))) { + break; + } + } + if (row == maxRow || this.isHeading(session, row)) { + return "end"; + } + } + return ""; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (this.isHeading(session, row)) { + while (++row < maxRow) { + if (this.isHeading(session, row)) { + row--; + break; + } + } + endRow = row; + if (endRow > startRow) { + while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) + endRow--; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + } + else if (this.getFoldWidget(session, foldStyle, row) === "end") { + var endRow = row; + var endColumn = session.getLine(endRow).length; + while (--row >= 0) { + if (this.isHeading(session, row)) { + break; + } + } + var line = session.getLine(row); + var startColumn = line.length; + return new Range(row, startColumn, endRow, endColumn); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"], function(require, exports, module){/** +* Haskell Cabal files mode (https://www.haskell.org/cabal/users-guide/developing-packages.html) +**/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CabalHighlightRules = require("./haskell_cabal_highlight_rules").CabalHighlightRules; +var FoldMode = require("./folding/haskell_cabal").FoldMode; +var Mode = function () { + this.HighlightRules = CabalHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = null; + this.$id = "ace/mode/haskell_cabal"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/haskell_cabal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-haxe.js b/ui/base1/ace/mode-haxe.js new file mode 100644 index 0000000..17c5f96 --- /dev/null +++ b/ui/base1/ace/mode-haxe.js @@ -0,0 +1,313 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HaxeHighlightRules = function () { + var keywords = ("break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std"); + var buildinConstants = ("null|true|false"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({<]" + }, { + token: "paren.rparen", + regex: "[\\])}>]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(HaxeHighlightRules, TextHighlightRules); +exports.HaxeHighlightRules = HaxeHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HaxeHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/haxe"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/haxe"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-hjson.js b/ui/base1/ace/mode-hjson.js new file mode 100644 index 0000000..82ed2d3 --- /dev/null +++ b/ui/base1/ace/mode-hjson.js @@ -0,0 +1,318 @@ +define("ace/mode/hjson_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from Hjson.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HjsonHighlightRules = function () { + this.$rules = { + start: [{ + include: "#comments" + }, { + include: "#rootObject" + }, { + include: "#value" + }], + "#array": [{ + token: "paren.lparen", + regex: /\[/, + push: [{ + token: "paren.rparen", + regex: /\]/, + next: "pop" + }, { + include: "#value" + }, { + include: "#comments" + }, { + token: "text", + regex: /,|$/ + }, { + token: "invalid.illegal", + regex: /[^\s\]]/ + }, { + defaultToken: "array" + }] + }], + "#comments": [{ + token: [ + "comment.punctuation", + "comment.line" + ], + regex: /(#)(.*$)/ + }, { + token: "comment.punctuation", + regex: /\/\*/, + push: [{ + token: "comment.punctuation", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment.block" + }] + }, { + token: [ + "comment.punctuation", + "comment.line" + ], + regex: /(\/\/)(.*$)/ + }], + "#constant": [{ + token: "constant", + regex: /\b(?:true|false|null)\b/ + }], + "#keyname": [{ + token: "keyword", + regex: /(?:[^,\{\[\}\]\s]+|"(?:[^"\\]|\\.)*")\s*(?=:)/ + }], + "#mstring": [{ + token: "string", + regex: /'''/, + push: [{ + token: "string", + regex: /'''/, + next: "pop" + }, { + defaultToken: "string" + }] + }], + "#number": [{ + token: "constant.numeric", + regex: /-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/, + comment: "handles integer and decimal numbers" + }], + "#object": [{ + token: "paren.lparen", + regex: /\{/, + push: [{ + token: "paren.rparen", + regex: /\}/, + next: "pop" + }, { + include: "#keyname" + }, { + include: "#value" + }, { + token: "text", + regex: /:/ + }, { + token: "text", + regex: /,/ + }, { + defaultToken: "paren" + }] + }], + "#rootObject": [{ + token: "paren", + regex: /(?=\s*(?:[^,\{\[\}\]\s]+|"(?:[^"\\]|\\.)*")\s*:)/, + push: [{ + token: "paren.rparen", + regex: /---none---/, + next: "pop" + }, { + include: "#keyname" + }, { + include: "#value" + }, { + token: "text", + regex: /:/ + }, { + token: "text", + regex: /,/ + }, { + defaultToken: "paren" + }] + }], + "#string": [{ + token: "string", + regex: /"/, + push: [{ + token: "string", + regex: /"/, + next: "pop" + }, { + token: "constant.language.escape", + regex: /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/ + }, { + token: "invalid.illegal", + regex: /\\./ + }, { + defaultToken: "string" + }] + }], + "#ustring": [{ + token: "string", + regex: /\b[^:,0-9\-\{\[\}\]\s].*$/ + }], + "#value": [{ + include: "#constant" + }, { + include: "#number" + }, { + include: "#string" + }, { + include: "#array" + }, { + include: "#object" + }, { + include: "#comments" + }, { + include: "#mstring" + }, { + include: "#ustring" + }] + }; + this.normalizeRules(); +}; +HjsonHighlightRules.metaData = { + fileTypes: ["hjson"], + foldingStartMarker: "(?x: # turn on extended mode\n ^ # a line beginning with\n \\s* # some optional space\n [{\\[] # the start of an object or array\n (?! # but not followed by\n .* # whatever\n [}\\]] # and the close of an object or array\n ,? # an optional comma\n \\s* # some optional space\n $ # at the end of the line\n )\n | # ...or...\n [{\\[] # the start of an object or array\n \\s* # some optional space\n $ # at the end of the line\n )", + foldingStopMarker: "(?x: # turn on extended mode\n ^ # a line beginning with\n \\s* # some optional space\n [}\\]] # and the close of an object or array\n )", + keyEquivalent: "^~J", + name: "Hjson", + scopeName: "source.hjson" +}; +oop.inherits(HjsonHighlightRules, TextHighlightRules); +exports.HjsonHighlightRules = HjsonHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/hjson",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/hjson_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HjsonHighlightRules = require("./hjson_highlight_rules").HjsonHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HjsonHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/hjson"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/hjson"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-html.js b/ui/base1/ace/mode-html.js new file mode 100644 index 0000000..c6391c2 --- /dev/null +++ b/ui/base1/ace/mode-html.js @@ -0,0 +1,2339 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/html"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-html_elixir.js b/ui/base1/ace/mode-html_elixir.js new file mode 100644 index 0000000..adb0b72 --- /dev/null +++ b/ui/base1/ace/mode-html_elixir.js @@ -0,0 +1,2845 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.githubusercontent.com/elixir-lang/elixir-tmbundle/master/Syntaxes/Elixir.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ElixirHighlightRules = function () { + this.$rules = { start: [{ token: ['meta.module.elixir', + 'keyword.control.module.elixir', + 'meta.module.elixir', + 'entity.name.type.module.elixir'], + regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc (?:~[a-z])?"""', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*"""', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc ~[A-Z]"""', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*"""', + next: 'pop' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*\'\'\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.heredoc', + regex: '@(?:module|type)?doc ~[A-Z]\'\'\'', + push: [{ token: 'comment.documentation.heredoc', + regex: '\\s*\'\'\'', + next: 'pop' }, + { defaultToken: 'comment.documentation.heredoc' }], + comment: '@doc with heredocs is treated as documentation' }, + { token: 'comment.documentation.false', + regex: '@(?:module|type)?doc false', + comment: '@doc false is treated as documentation' }, + { token: 'comment.documentation.string', + regex: '@(?:module|type)?doc "', + push: [{ token: 'comment.documentation.string', + regex: '"', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'comment.documentation.string' }], + comment: '@doc with string is treated as documentation' }, + { token: 'keyword.control.elixir', + regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' }, + { token: 'punctuation.definition.constant.elixir', + regex: ':\'', + push: [{ token: 'punctuation.definition.constant.elixir', + regex: '\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'constant.other.symbol.single-quoted.elixir' }] }, + { token: 'punctuation.definition.constant.elixir', + regex: ':"', + push: [{ token: 'punctuation.definition.constant.elixir', + regex: '"', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'constant.other.symbol.double-quoted.elixir' }] }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '(?:\'\'\')', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?>\'\'\')', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*\'\'\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' }], + comment: 'Single-quoted heredocs' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\'', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'support.function.variable.quoted.single.elixir' }], + comment: 'single quoted string (allows for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '(?:""")', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?>""")', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*"""', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.quoted.double.heredoc.elixir' }], + comment: 'Double-quoted heredocs' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '"', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.quoted.double.elixir' }], + comment: 'double quoted string (allows for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z](?:""")', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '~[a-z](?>""")', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*"""', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.quoted.double.heredoc.elixir' }], + comment: 'Double-quoted heredocs sigils' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\{', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\}[a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\[', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\][a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\<', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\>[a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z]\\(', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\)[a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[a-z][^\\w]', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '[^\\w][a-z]*', + next: 'pop' }, + { include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { include: '#escaped_char' }, + { defaultToken: 'string.interpolated.elixir' }], + comment: 'sigil (allow for interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z](?:""")', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '~[A-Z](?>""")', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '^\\s*"""', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'Double-quoted heredocs sigils' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\{', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\}[a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\[', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\][a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\<', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\>[a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z]\\(', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '\\)[a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: 'punctuation.definition.string.begin.elixir', + regex: '~[A-Z][^\\w]', + push: [{ token: 'punctuation.definition.string.end.elixir', + regex: '[^\\w][a-z]*', + next: 'pop' }, + { defaultToken: 'string.quoted.other.literal.upper.elixir' }], + comment: 'sigil (without interpolation)' }, + { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'], + regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)', + comment: 'symbols' }, + { token: 'punctuation.definition.constant.elixir', + regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)', + comment: 'symbols' }, + { token: ['punctuation.definition.comment.elixir', + 'comment.line.number-sign.elixir'], + regex: '(#)(.*)' }, + { token: 'constant.numeric.elixir', + regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?=?' }, + { token: 'keyword.operator.bitwise.elixir', + regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' }, + { token: 'keyword.operator.logical.elixir', + regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b', + originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' }, + { token: 'keyword.operator.arithmetic.elixir', + regex: '\\*|\\+|\\-|/' }, + { token: 'keyword.operator.other.elixir', + regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' }, + { token: 'keyword.operator.assignment.elixir', regex: '=' }, + { token: 'punctuation.separator.other.elixir', regex: ':' }, + { token: 'punctuation.separator.statement.elixir', + regex: '\\;' }, + { token: 'punctuation.separator.object.elixir', regex: ',' }, + { token: 'punctuation.separator.method.elixir', regex: '\\.' }, + { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' }, + { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' }, + { token: 'punctuation.section.function.elixir', + regex: '\\(|\\)' }], + '#escaped_char': [{ token: 'constant.character.escape.elixir', + regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' }], + '#interpolated_elixir': [{ token: ['source.elixir.embedded.source', + 'source.elixir.embedded.source.empty'], + regex: '(#\\{)(\\})' }, + { todo: { token: 'punctuation.section.embedded.elixir', + regex: '#\\{', + push: [{ token: 'punctuation.section.embedded.elixir', + regex: '\\}', + next: 'pop' }, + { include: '#nest_curly_and_self' }, + { include: '$self' }, + { defaultToken: 'source.elixir.embedded.source' }] } }], + '#nest_curly_and_self': [{ token: 'punctuation.section.scope.elixir', + regex: '\\{', + push: [{ token: 'punctuation.section.scope.elixir', + regex: '\\}', + next: 'pop' }, + { include: '#nest_curly_and_self' }] }, + { include: '$self' }], + '#regex_sub': [{ include: '#interpolated_elixir' }, + { include: '#escaped_char' }, + { token: ['punctuation.definition.arbitrary-repitition.elixir', + 'string.regexp.arbitrary-repitition.elixir', + 'string.regexp.arbitrary-repitition.elixir', + 'punctuation.definition.arbitrary-repitition.elixir'], + regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' }, + { token: 'punctuation.definition.character-class.elixir', + regex: '\\[(?:\\^?\\])?', + push: [{ token: 'punctuation.definition.character-class.elixir', + regex: '\\]', + next: 'pop' }, + { include: '#escaped_char' }, + { defaultToken: 'string.regexp.character-class.elixir' }] }, + { token: 'punctuation.definition.group.elixir', + regex: '\\(', + push: [{ token: 'punctuation.definition.group.elixir', + regex: '\\)', + next: 'pop' }, + { include: '#regex_sub' }, + { defaultToken: 'string.regexp.group.elixir' }] }, + { token: ['punctuation.definition.comment.elixir', + 'comment.line.number-sign.elixir'], + regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)', + originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$', + comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' }] }; + this.normalizeRules(); +}; +ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.', + fileTypes: ['ex', 'exs'], + firstLineMatch: '^#!/.*\\belixir', + foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$', + foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)', + keyEquivalent: '^~E', + name: 'Elixir', + scopeName: 'source.elixir' }; +oop.inherits(ElixirHighlightRules, TextHighlightRules); +exports.ElixirHighlightRules = ElixirHighlightRules; + +}); + +define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules; +var HtmlElixirHighlightRules = function () { + HtmlHighlightRules.call(this); + var startRules = [ + { + regex: "<%%|%%>", + token: "constant.language.escape" + }, { + token: "comment.start.eex", + regex: "<%#", + push: [{ + token: "comment.end.eex", + regex: "%>", + next: "pop", + defaultToken: "comment" + }] + }, { + token: "support.elixir_tag", + regex: "<%+(?!>)[-=]?", + push: "elixir-start" + } + ]; + var endRules = [ + { + token: "support.elixir_tag", + regex: "%>", + next: "pop" + }, { + token: "comment", + regex: "#(?:[^%]|%[^>])*" + } + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.embedRules(ElixirHighlightRules, "elixir-", endRules, ["start"]); + this.normalizeRules(); +}; +oop.inherits(HtmlElixirHighlightRules, HtmlHighlightRules); +exports.HtmlElixirHighlightRules = HtmlElixirHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = ElixirHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/elixir"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/html_elixir",["require","exports","module","ace/lib/oop","ace/mode/html_elixir_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/elixir"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlElixirHighlightRules = require("./html_elixir_highlight_rules").HtmlElixirHighlightRules; +var HtmlMode = require("./html").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var ElixirMode = require("./elixir").Mode; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = HtmlElixirHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "elixir-": ElixirMode + }); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/html_elixir"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/html_elixir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-html_ruby.js b/ui/base1/ace/mode-html_ruby.js new file mode 100644 index 0000000..3be9b26 --- /dev/null +++ b/ui/base1/ace/mode-html_ruby.js @@ -0,0 +1,3294 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token: "constant.other.symbol.ruby", // symbol + regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; +exports.qString = { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; +exports.qqString = { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; +exports.tString = { + token: "string", // backtick string + regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; +var constantNumericHex = exports.constantNumericHex = { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; +var constantNumericBinary = exports.constantNumericBinary = { + token: "constant.numeric", + regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/ +}; +var constantNumericDecimal = exports.constantNumericDecimal = { + token: "constant.numeric", + regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/ +}; +var constantNumericOctal = exports.constantNumericOctal = { + token: "constant.numeric", + regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/ +}; +var constantNumericRational = exports.constantNumericRational = { + token: "constant.numeric", //rational + complex + regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/ +}; +var constantNumericComplex = exports.constantNumericComplex = { + token: "constant.numeric", //simple complex numbers + regex: /\b([\d]i)\b/ +}; +var constantNumericFloat = exports.constantNumericFloat = { + token: "constant.numeric", // float + complex + regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b" +}; +var instanceVariable = exports.instanceVariable = { + token: "variable.instance", // instance variable + regex: "@{1,2}[a-zA-Z_\\d]+" +}; +var RubyHighlightRules = function () { + var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" + + "private_class_method|remove_method|undef_method"); + var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"); + var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"); + var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})"; + var closeParen = { + "(": ")", + "[": "]", + "{": "}", + "<": ">", + "^": "^", + "|": "|", + "%": "%" + }; + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "comment.multiline", // multi line comment + regex: "^=begin(?=$|\\s.*$)", + next: "comment" + }, { + token: "string.regexp", + regex: /[/](?=.*\/)/, + next: "regex" + }, + [{ + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(")/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(')/, + push: [{ + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "string.end", + regex: /'/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithoutInterpolation"; + return this.token; + } + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithoutInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithInterpolation"; + return this.token; + } + }, { + token: "string.regexp", + regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "rState"; + return this.token; + } + }], + { + token: "punctuation", // namespaces aren't symbols + regex: "::" + }, + instanceVariable, + { + token: "variable.global", // global variable + regex: "[$][a-zA-Z_\\d]+" + }, { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]*" + }, { + token: ["punctuation.operator", "support.function"], + regex: /(\.)([a-zA-Z_\d]+)(?=\()/ + }, { + token: ["punctuation.operator", "identifier"], + regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/ + }, { + token: "string.character", + regex: "\\B\\?(?:" + escapedChars + "|\\S)" + }, { + token: "punctuation.operator", + regex: /\?(?=.+:)/ + }, + constantNumericRational, + constantNumericComplex, + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + constantNumericBinary, + constantNumericDecimal, + constantNumericOctal, + { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "punctuation.separator.key-value", + regex: "=>" + }, { + stateName: "heredoc", + onMatch: function (value, currentState, stack) { + var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + { type: "constant", value: tokens[1] }, + { type: "string", value: tokens[2] }, + { type: "support.class", value: tokens[3] }, + { type: "string", value: tokens[4] } + ]; + }, + regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]", + onMatch: function (value, currentState, stack) { + this.next = ''; + if (value == "}" && stack.length > 1 && stack[1] != "start") { + stack.shift(); + this.next = stack.shift(); + } + return this.token; + } + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + } + ], + "comment": [ + { + token: "comment.multiline", // closing comment + regex: "^=end(?=$|\\s.*$)", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "qStateWithInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "qStateWithoutInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "sStateWithoutInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "sStateWithInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "rState": [{ + token: "string.regexp", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.language.escape"; + } + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.regexp", + regex: /\// + }, { + token: "string.regexp", + regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) { + if (stack.length && val[0] === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.language.escape"; + } + }, + { include: "regex" }, + { + defaultToken: "string.regexp" + }], + "regex": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "constant.language.escape", + regex: /\\[AGbBzZ]/ + }, { + token: "constant.language.escape", + regex: /\\g<[a-zA-Z0-9]*>/ + }, { + token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"], + regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/ + }, { + token: ["constant.language.escape", "invalid", "constant.language.escape"], + regex: /(\\p{\^?)([^/]*)(})/ + }, { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: /[/][imxouesn]*/, + next: "start" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "regexp.keyword", + regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + push: "regex_character_class" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: /&?&?\[\^?/, + push: "regex_character_class" + }, { + token: "constant.language.escape", + regex: "]", + next: "pop" + }, { + token: "constant.language.escape", + regex: "-" + }, { + defaultToken: "string.regexp.characterclass" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(RubyHighlightRules, TextHighlightRules); +exports.RubyHighlightRules = RubyHighlightRules; + +}); + +define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; +var HtmlRubyHighlightRules = function () { + HtmlHighlightRules.call(this); + var startRules = [ + { + regex: "<%%|%%>", + token: "constant.language.escape" + }, { + token: "comment.start.erb", + regex: "<%#", + push: [{ + token: "comment.end.erb", + regex: "%>", + next: "pop", + defaultToken: "comment" + }] + }, { + token: "support.ruby_tag", + regex: "<%+(?!>)[-=]?", + push: "ruby-start" + } + ]; + var endRules = [ + { + token: "support.ruby_tag", + regex: "%>", + next: "pop" + }, { + token: "comment", + regex: "#(?:[^%]|%[^>])*" + } + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]); + this.normalizeRules(); +}; +oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules); +exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.indentKeywords = { + "class": 1, + "def": 1, + "module": 1, + "do": 1, + "unless": 1, + "if": 1, + "while": 1, + "for": 1, + "until": 1, + "begin": 1, + "else": 0, + "elsif": 0, + "rescue": 0, + "ensure": 0, + "when": 0, + "end": -1, + "case": 1, + "=begin": 1, + "=end": -1 + }; + this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/; + this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1]) { + if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") { + if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) { + return; + } + if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) { + return; + } + } + if (match[1] == "when") { + if (/\sthen\s/.test(line) === true) { + return; + } + } + if (session.getTokenAt(row, match.index + 2).type === "keyword") + return "start"; + } + else if (match[3]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "start"; + } + else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + var match = line.match(this.foldingStopMarker); + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } + else if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "end"; + } + else + return "end"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1] || match[3]) + return this.rubyBlock(session, row, match.index + 2); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.rubyBlock(session, row, match.index + 1); + } + if (match[1] === "=end") { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return this.rubyBlock(session, row, match.index + 1); + } + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.rubyBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || (token.type != "keyword" && token.type != "comment.multiline")) + return; + var val = token.value; + var line = session.getLine(row); + switch (token.value) { + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + return; + } + var dir = this.indentKeywords[val]; + break; + case "when": + if (/\sthen\s/.test(line)) { + return; + } + case "elsif": + case "rescue": + case "ensure": + var dir = 1; + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line)) { + return; + } + var dir = 1; + break; + default: + var dir = this.indentKeywords[val]; + break; + } + var stack = [val]; + if (!dir) + return; + var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length; + var startRow = row; + var ranges = []; + ranges.push(stream.getCurrentTokenRange()); + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + if (token.type == "comment.multiline") { + while (token = stream.step()) { + if (token.type !== "comment.multiline") + continue; + if (dir == 1) { + startColumn = 6; + if (token.value == "=end") { + break; + } + } + else { + if (token.value == "=begin") { + break; + } + } + } + } + else { + while (token = stream.step()) { + var ignore = false; + if (token.type !== "keyword") + continue; + var level = dir * this.indentKeywords[token.value]; + line = session.getLine(stream.getCurrentTokenRow()); + switch (token.value) { + case "do": + for (var i = stream.$tokenIndex - 1; i >= 0; i--) { + var prevToken = stream.$rowTokens[i]; + if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) { + level = 0; + break; + } + } + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + level = 0; + ignore = true; + } + break; + case "when": + if (/\sthen\s/.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + } + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0 && ignore === false) { + stack.shift(); + if (!stack.length) { + if ((val == "while" || val == "until" || val == "for") && token.value != "do") { + break; + } + if (token.value == "do" && dir == -1 && level != 0) + break; + if (token.value != "do") + break; + } + if (level === 0) { + stack.unshift(token.value); + } + } + } + } + if (!token) + return null; + if (tokenRange) { + ranges.push(stream.getCurrentTokenRange()); + return ranges; + } + var row = stream.getCurrentTokenRow(); + if (dir === -1) { + if (token.type === "comment.multiline") { + var endColumn = 6; + } + else { + var endColumn = session.getLine(row).length; + } + return new Range(row, endColumn, startRow - 1, startColumn); + } + else + return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var FoldMode = require("./folding/ruby").FoldMode; +var Mode = function () { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new FoldMode(); + this.indentKeywords = this.foldingRules.indentKeywords; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/); + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + if (/}/.test(line)) + return this.$outdent.autoOutdent(session, row); + var indent = this.$getIndent(line); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine); + var tab = session.getTabString(); + if (prevIndent.length <= indent.length) { + if (indent.slice(-tab.length) == tab) + session.remove(new Range(row, indent.length - tab.length, row, indent.length)); + } + }; + this.getMatching = function (session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in this.indentKeywords) + return this.foldingRules.rubyBlock(session, row, column, true); + }; + this.$id = "ace/mode/ruby"; + this.snippetFileId = "ace/snippets/ruby"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/html_ruby",["require","exports","module","ace/lib/oop","ace/mode/html_ruby_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules; +var HtmlMode = require("./html").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var RubyMode = require("./ruby").Mode; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = HtmlRubyHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "ruby-": RubyMode + }); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/html_ruby"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/html_ruby"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ini.js b/ui/base1/ace/mode-ini.js new file mode 100644 index 0000000..54a48e5 --- /dev/null +++ b/ui/base1/ace/mode-ini.js @@ -0,0 +1,138 @@ +define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from tool\tm bundles\ini.tmbundle\Syntaxes\Ini.plist (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var escapeRe = "\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})"; +var IniHighlightRules = function () { + this.$rules = { + start: [{ + token: 'punctuation.definition.comment.ini', + regex: '#.*', + push_: [{ + token: 'comment.line.number-sign.ini', + regex: '$|^', + next: 'pop' + }, { + defaultToken: 'comment.line.number-sign.ini' + }] + }, { + token: 'punctuation.definition.comment.ini', + regex: ';.*', + push_: [{ + token: 'comment.line.semicolon.ini', + regex: '$|^', + next: 'pop' + }, { + defaultToken: 'comment.line.semicolon.ini' + }] + }, { + token: ['keyword.other.definition.ini', 'text', 'punctuation.separator.key-value.ini'], + regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)' + }, { + token: ['punctuation.definition.entity.ini', 'constant.section.group-title.ini', 'punctuation.definition.entity.ini'], + regex: '^(\\[)(.*?)(\\])' + }, { + token: 'punctuation.definition.string.begin.ini', + regex: "'", + push: [{ + token: 'punctuation.definition.string.end.ini', + regex: "'", + next: 'pop' + }, { + token: "constant.language.escape", + regex: escapeRe + }, { + defaultToken: 'string.quoted.single.ini' + }] + }, { + token: 'punctuation.definition.string.begin.ini', + regex: '"', + push: [{ + token: "constant.language.escape", + regex: escapeRe + }, { + token: 'punctuation.definition.string.end.ini', + regex: '"', + next: 'pop' + }, { + defaultToken: 'string.quoted.double.ini' + }] + }] + }; + this.normalizeRules(); +}; +IniHighlightRules.metaData = { + fileTypes: ['ini', 'conf'], + keyEquivalent: '^~I', + name: 'Ini', + scopeName: 'source.ini' +}; +oop.inherits(IniHighlightRules, TextHighlightRules); +exports.IniHighlightRules = IniHighlightRules; + +}); + +define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var re = this.foldingStartMarker; + var line = session.getLine(row); + var m = line.match(re); + if (!m) + return; + var startName = m[1] + "."; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + if (/^\s*$/.test(line)) + continue; + m = line.match(re); + if (m && m[1].lastIndexOf(startName, 0) !== 0) + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules; +var FoldMode = require("./folding/ini").FoldMode; +var Mode = function () { + this.HighlightRules = IniHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.blockComment = null; + this.$id = "ace/mode/ini"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ini"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-io.js b/ui/base1/ace/mode-io.js new file mode 100644 index 0000000..a393a37 --- /dev/null +++ b/ui/base1/ace/mode-io.js @@ -0,0 +1,210 @@ +define("ace/mode/io_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from tm bundles\io.tmbundle/Syntaxes/io.plist (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var IoHighlightRules = function () { + this.$rules = { start: [{ token: 'keyword.control.io', + regex: '\\b(?:if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\\b' }, + { token: 'punctuation.definition.comment.io', + regex: '/\\*', + push: [{ token: 'punctuation.definition.comment.io', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.io' }] }, + { token: 'punctuation.definition.comment.io', + regex: '//', + push: [{ token: 'comment.line.double-slash.io', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-slash.io' }] }, + { token: 'punctuation.definition.comment.io', + regex: '#', + push: [{ token: 'comment.line.number-sign.io', regex: '$', next: 'pop' }, + { defaultToken: 'comment.line.number-sign.io' }] }, + { token: 'variable.language.io', + regex: '\\b(?:self|sender|target|proto|protos|parent)\\b', + comment: 'I wonder if some of this isn\'t variable.other.language? --Allan; scoping this as variable.language to match Objective-C\'s handling of \'self\', which is inconsistent with C++\'s handling of \'this\' but perhaps intentionally so -- Rob' }, + { token: 'keyword.operator.io', + regex: '<=|>=|=|:=|\\*|\\||\\|\\||\\+|-|/|&|&&|>|<|\\?|@|@@|\\b(?:and|or)\\b' }, + { token: 'constant.other.io', regex: '\\bGL[\\w_]+\\b' }, + { token: 'support.class.io', regex: '\\b[A-Z](?:\\w+)?\\b' }, + { token: 'support.function.io', + regex: '\\b(?:clone|call|init|method|list|vector|block|\\w+(?=\\s*\\())\\b' }, + { token: 'support.function.open-gl.io', + regex: '\\bgl(?:u|ut)?[A-Z]\\w+\\b' }, + { token: 'punctuation.definition.string.begin.io', + regex: '"""', + push: [{ token: 'punctuation.definition.string.end.io', + regex: '"""', + next: 'pop' }, + { token: 'constant.character.escape.io', regex: '\\\\.' }, + { defaultToken: 'string.quoted.triple.io' }] }, + { token: 'punctuation.definition.string.begin.io', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.io', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.io', regex: '\\\\.' }, + { defaultToken: 'string.quoted.double.io' }] }, + { token: 'constant.numeric.io', + regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b' }, + { token: 'variable.other.global.io', regex: 'Lobby\\b' }, + { token: 'constant.language.io', + regex: '\\b(?:TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\\b' }] }; + this.normalizeRules(); +}; +IoHighlightRules.metaData = { fileTypes: ['io'], + keyEquivalent: '^~I', + name: 'Io', + scopeName: 'source.io' }; +oop.inherits(IoHighlightRules, TextHighlightRules); +exports.IoHighlightRules = IoHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var IoHighlightRules = require("./io_highlight_rules").IoHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = IoHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/io"; + this.snippetFileId = "ace/snippets/io"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/io"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ion.js b/ui/base1/ace/mode-ion.js new file mode 100644 index 0000000..3072ae1 --- /dev/null +++ b/ui/base1/ace/mode-ion.js @@ -0,0 +1,477 @@ +define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS GENERATED BY 'ligand' USING 'mode_highlight_rules.js' +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var IonHighlightRules = function () { + var k_keywords_bool = "TRUE|FALSE"; + var k_bool = k_keywords_bool; + var k_keywords_null = "NULL.NULL|NULL.BOOL|NULL.INT|NULL.FLOAT|NULL.DECIMAL|NULL.TIMESTAMP|NULL.STRING|NULL.SYMBOL|NULL.BLOB|NULL.CLOB|" + + "NULL.STRUCT|NULL.LIST|NULL.SEXP|NULL"; + var k_null = k_keywords_null; + var keywordMapper = this.createKeywordMapper({ + "constant.language.bool.ion": k_bool, + "constant.language.null.ion": k_null + }, "constant.other.symbol.identifier.ion", true); + var keywordMapperRule = { + token: keywordMapper, + regex: "\\b\\w+(?:\\.\\w+)?\\b" + }; + this.$rules = { + "start": [ + { + "include": "value" + } + ], + "value": [ + { + "include": "whitespace" + }, + { + "include": "comment" + }, + { + "include": "annotation" + }, + { + "include": "string" + }, + { + "include": "number" + }, + { + "include": "keywords" + }, + { + "include": "symbol" + }, + { + "include": "clob" + }, + { + "include": "blob" + }, + { + "include": "struct" + }, + { + "include": "list" + }, + { + "include": "sexp" + } + ], + "sexp": [ + { + "token": "punctuation.definition.sexp.begin.ion", + "regex": "\\(", + "push": [ + { + "token": "punctuation.definition.sexp.end.ion", + "regex": "\\)", + "next": "pop" + }, + { + "include": "comment" + }, + { + "include": "value" + }, + { + "token": "storage.type.symbol.operator.ion", + "regex": "[\\!\\#\\%\\&\\*\\+\\-\\./\\;\\<\\=\\>\\?\\@\\^\\`\\|\\~]+" + } + ] + } + ], + "comment": [ + { + "token": "comment.line.ion", + "regex": "//[^\\n]*" + }, + { + "token": "comment.block.ion", + "regex": "/\\*", + "push": [ + { + "token": "comment.block.ion", + "regex": "[*]/", + "next": "pop" + }, + { + "token": "comment.block.ion", + "regex": "[^*/]+" + }, + { + "token": "comment.block.ion", + "regex": "[*/]+" + } + ] + } + ], + "list": [ + { + "token": "punctuation.definition.list.begin.ion", + "regex": "\\[", + "push": [ + { + "token": "punctuation.definition.list.end.ion", + "regex": "\\]", + "next": "pop" + }, + { + "include": "comment" + }, + { + "include": "value" + }, + { + "token": "punctuation.definition.list.separator.ion", + "regex": "," + } + ] + } + ], + "struct": [ + { + "token": "punctuation.definition.struct.begin.ion", + "regex": "\\{", + "push": [ + { + "token": "punctuation.definition.struct.end.ion", + "regex": "\\}", + "next": "pop" + }, + { + "include": "comment" + }, + { + "include": "value" + }, + { + "token": "punctuation.definition.struct.separator.ion", + "regex": ",|:" + } + ] + } + ], + "blob": [ + { + "token": [ + "punctuation.definition.blob.begin.ion", + "string.other.blob.ion", + "punctuation.definition.blob.end.ion" + ], + "regex": "(\\{\\{)([^\"]*)(\\}\\})" + } + ], + "clob": [ + { + "token": [ + "punctuation.definition.clob.begin.ion", + "string.other.clob.ion", + "punctuation.definition.clob.end.ion" + ], + "regex": "(\\{\\{)(\"[^\"]*\")(\\}\\})" + } + ], + "symbol": [ + { + "token": "storage.type.symbol.quoted.ion", + "regex": "(['])((?:(?:\\\\')|(?:[^']))*?)(['])" + }, + { + "token": "storage.type.symbol.identifier.ion", + "regex": "[\\$_a-zA-Z][\\$_a-zA-Z0-9]*" + } + ], + "number": [ + { + "token": "constant.numeric.timestamp.ion", + "regex": "\\d{4}(?:-\\d{2})?(?:-\\d{2})?T(?:\\d{2}:\\d{2})(?::\\d{2})?(?:\\.\\d+)?(?:Z|[-+]\\d{2}:\\d{2})?" + }, + { + "token": "constant.numeric.timestamp.ion", + "regex": "\\d{4}-\\d{2}-\\d{2}T?" + }, + { + "token": "constant.numeric.integer.binary.ion", + "regex": "-?0[bB][01](?:_?[01])*" + }, + { + "token": "constant.numeric.integer.hex.ion", + "regex": "-?0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*" + }, + { + "token": "constant.numeric.float.ion", + "regex": "-?(?:0|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?(?:[eE][+-]?\\d+)" + }, + { + "token": "constant.numeric.float.ion", + "regex": "(?:[-+]inf)|(?:nan)" + }, + { + "token": "constant.numeric.decimal.ion", + "regex": "-?(?:0|[1-9](?:_?\\d)*)(?:(?:(?:\\.(?:\\d(?:_?\\d)*)?)(?:[dD][+-]?\\d+)|\\.(?:\\d(?:_?\\d)*)?)|(?:[dD][+-]?\\d+))" + }, + { + "token": "constant.numeric.integer.ion", + "regex": "-?(?:0|[1-9](?:_?\\d)*)" + } + ], + "string": [ + { + "token": [ + "punctuation.definition.string.begin.ion", + "string.quoted.double.ion", + "punctuation.definition.string.end.ion" + ], + "regex": "([\"])((?:(?:\\\\\")|(?:[^\"]))*?)([\"])" + }, + { + "token": "punctuation.definition.string.begin.ion", + "regex": "'{3}", + "push": [ + { + "token": "punctuation.definition.string.end.ion", + "regex": "'{3}", + "next": "pop" + }, + { + "token": "string.quoted.triple.ion", + "regex": "(?:\\\\'|[^'])+" + }, + { + "token": "string.quoted.triple.ion", + "regex": "'" + } + ] + } + ], + "annotation": [ + { + "token": [ + "variable.language.annotation.ion", + "punctuation.definition.annotation.ion" + ], + "regex": /('(?:[^'\\]|\\.)*')\s*(::)/ + }, + { + "token": [ + "variable.language.annotation.ion", + "punctuation.definition.annotation.ion" + ], + "regex": "([\\$_a-zA-Z][\\$_a-zA-Z0-9]*)\\s*(::)" + } + ], + "whitespace": [ + { + "token": "text.ion", + "regex": "\\s+" + } + ] + }; + this.$rules["keywords"] = [keywordMapperRule]; + this.normalizeRules(); +}; +oop.inherits(IonHighlightRules, TextHighlightRules); +exports.IonHighlightRules = IonHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/ion",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ion_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS GENERATED BY 'ligand' USING 'mode.js' +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./ion_highlight_rules").IonHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { + start: "/*", + end: "*/" + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/ion"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ion"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jack.js b/ui/base1/ace/mode-jack.js new file mode 100644 index 0000000..9151667 --- /dev/null +++ b/ui/base1/ace/mode-jack.js @@ -0,0 +1,293 @@ +define("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JackHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "string", + regex: '"', + next: "string2" + }, { + token: "string", + regex: "'", + next: "string1" + }, { + token: "constant.numeric", // hex + regex: "-?0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "(?:0|[-+]?[1-9][0-9]*)\\b" + }, { + token: "constant.binary", + regex: "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "constant.language.null", + regex: "null\\b" + }, { + token: "storage.type", + regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b" + }, { + token: "keyword", + regex: "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b" + }, { + token: "language.builtin", + regex: "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b" + }, { + token: "comment", + regex: "--.*$" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "storage.form", + regex: "@[a-z]+" + }, { + token: "constant.other.symbol", + regex: ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' + }, { + token: "variable", + regex: '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' + }, { + token: "keyword.operator", + regex: "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!" + }, { + token: "text", + regex: "\\s+" + } + ], + "string1": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ + }, { + token: "string", + regex: "[^'\\\\]+" + }, { + token: "string", + regex: "'", + next: "start" + }, { + token: "string", + regex: "", + next: "start" + } + ], + "string2": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ + }, { + token: "string", + regex: '[^"\\\\]+' + }, { + token: "string", + regex: '"', + next: "start" + }, { + token: "string", + regex: "", + next: "start" + } + ] + }; +}; +oop.inherits(JackHighlightRules, TextHighlightRules); +exports.JackHighlightRules = JackHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./jack_highlight_rules").JackHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/jack"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/jack"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jade.js b/ui/base1/ace/mode-jade.js new file mode 100644 index 0000000..f013589 --- /dev/null +++ b/ui/base1/ace/mode-jade.js @@ -0,0 +1,2017 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var escaped = function (ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +}; +var MarkdownHighlightRules = function () { + HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token: "support.function", + regex: /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function (value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next: "githubblock" + }; + var codeBlockRules = [{ + token: "support.function", + regex: ".*", + onMatch: function (value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if (m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; + this.$rules["start"].unshift({ + token: "empty_line", + regex: '^$', + next: "allowBlock" + }, { + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token: function (value) { + return "markup.heading." + value.length; + }, + regex: /^#{1,6}(?=\s|$)/, + next: "header" + }, codeBlockStartRule, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + token: "constant", + regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic" + }); + this.addRules({ + "basic": [{ + token: "constant.language.escape", + regex: /\\[\\`*_{}\[\]()#+\-.!]/ + }, { + token: "support.function", + regex: "(`+)(.*?[^`])(\\1)" + }, { + token: ["text", "constant", "text", "url", "string", "text"], + regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { + token: ["text", "string", "text", "constant", "text"], + regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])" + }, { + token: ["text", "string", "text", "markup.underline", "string", "text"], + regex: "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text + ")(\\]\\()" + // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { + token: "string.strong", + regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: "string.emphasis", + regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: ["text", "url", "text"], + regex: "(<)(" + + "(?:https?|ftp|dict):[^'\">\\s]+" + + "|" + + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" + + ")(>)" + }], + "allowBlock": [ + { token: "support.function", regex: "^ {4}.+", next: "allowBlock" }, + { token: "empty_line", regex: '^$', next: "allowBlock" }, + { token: "empty", regex: "", next: "start" } + ], + "header": [{ + regex: "$", + next: "start" + }, { + include: "basic" + }, { + defaultToken: "heading" + }], + "listblock-start": [{ + token: "support.variable", + regex: /(?:\[[ x]\])?/, + next: "listblock" + }], + "listblock": [{ + token: "empty_line", + regex: "^$", + next: "start" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic", noEscape: true + }, + codeBlockStartRule, + { + defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly + }], + "blockquote": [{ + token: "empty_line", + regex: "^\\s*$", + next: "start" + }, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + include: "basic", noEscape: true + }, { + defaultToken: "string.blockquote" + }], + "githubblock": codeBlockRules + }); + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); +exports.MarkdownHighlightRules = MarkdownHighlightRules; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var ScssHighlightRules = function () { + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|")); + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")); + var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", + regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "string", "support.function"], + regex: "(url\\()(.*)(\\))" + }, { + token: function (value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable", + regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; +}; +oop.inherits(ScssHighlightRules, TextHighlightRules); +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require('./css_highlight_rules'); +var LessHighlightRules = function () { + var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" + + "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" + + "or|and|when|not"; + var keywords = keywordList.split('|'); + var properties = CssHighlightRules.supportType.split('|'); + var keywordMapper = this.createKeywordMapper({ + "support.constant": CssHighlightRules.supportConstant, + "keyword": keywordList, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "identifier", true); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "paren.lparen", "string", "paren.rparen"], + regex: "(url)(\\()(.*)(\\))" + }, { + token: ["support.function", "paren.lparen"], + regex: "(:extend|[a-z0-9_\\-]+)(\\()" + }, { + token: function (value) { + if (keywords.indexOf(value.toLowerCase()) > -1) + return "keyword"; + else + return "variable"; + }, + regex: "[@\\$][a-z0-9_\\-@\\$]*\\b" + }, { + token: "variable", + regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}" + }, { + token: function (first, second) { + if (properties.indexOf(first.toLowerCase()) > -1) { + return ["support.type.property", "text"]; + } + else { + return ["support.type.unknownProperty", "text"]; + } + }, + regex: "([a-z0-9-_]+)(\\s*:)" + }, { + token: "keyword", + regex: "&" // special case - always treat as keyword + }, { + token: keywordMapper, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z_][a-z0-9-_]*" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(LessHighlightRules, TextHighlightRules); +exports.LessHighlightRules = LessHighlightRules; + +}); + +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +oop.inherits(CoffeeHighlightRules, TextHighlightRules); +function CoffeeHighlightRules() { + var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + var keywords = ("this|throw|then|try|typeof|super|switch|return|break|by|continue|" + + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + + "or|on|unless|until|and|yes|yield|export|import|default"); + var langConstant = ("true|false|null|undefined|NaN|Infinity"); + var illegal = ("case|const|function|var|void|with|enum|implements|" + + "interface|let|package|private|protected|public|static"); + var supportClass = ("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + + "SyntaxError|TypeError|URIError|" + + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"); + var supportFunction = ("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + + "encodeURIComponent|decodeURI|decodeURIComponent|String|"); + var variableLanguage = ("window|arguments|prototype|document"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": langConstant, + "invalid.illegal": illegal, + "language.support.class": supportClass, + "language.support.function": supportFunction, + "variable.language": variableLanguage + }, "identifier"); + var functionRule = { + token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], + regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source + }; + var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; + this.$rules = { + start: [ + { + token: "constant.numeric", + regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" + }, { + stateName: "qdoc", + token: "string", regex: "'''", next: [ + { token: "string", regex: "'''", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqdoc", + token: "string", + regex: '"""', + next: [ + { token: "string", regex: '"""', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qstring", + token: "string", regex: "'", next: [ + { token: "string", regex: "'", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqstring", + token: "string.start", regex: '"', next: [ + { token: "string.end", regex: '"', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "js", + token: "string", regex: "`", next: [ + { token: "string", regex: "`", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift() || ""; + if (this.next.indexOf("string") != -1) + return "paren.string"; + } + return "paren"; + } + }, { + token: "string.regex", + regex: "///", + next: "heregex" + }, { + token: "string.regex", + regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ + }, { + token: "comment", + regex: "###(?!#)", + next: "comment" + }, { + token: "comment", + regex: "#.*" + }, { + token: ["punctuation.operator", "text", "identifier"], + regex: "(\\.)(\\s*)(" + illegal + ")" + }, { + token: "punctuation.operator", + regex: "\\.{1,3}" + }, { + token: ["keyword", "text", "language.support.class", + "text", "keyword", "text", "language.support.class"], + regex: "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" + }, { + token: ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), + regex: "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex + }, + functionRule, + { + token: "variable", + regex: "@(?:" + identifier + ")?" + }, { + token: keywordMapper, + regex: identifier + }, { + token: "punctuation.operator", + regex: "\\,|\\." + }, { + token: "storage.type", + regex: "[\\-=]>" + }, { + token: "keyword.operator", + regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" + }, { + token: "paren.lparen", + regex: "[({[]" + }, { + token: "paren.rparen", + regex: "[\\]})]" + }, { + token: "text", + regex: "\\s+" + } + ], + heregex: [{ + token: "string.regex", + regex: '.*?///[imgy]{0,4}', + next: "start" + }, { + token: "comment.regex", + regex: "\\s+(?:#.*)?" + }, { + token: "string.regex", + regex: "\\S+" + }], + comment: [{ + token: "comment", + regex: '###', + next: "start" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +} +exports.CoffeeHighlightRules = CoffeeHighlightRules; + +}); + +define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: C5B73B98-5F2A-42E3-9F0E-028A74A9FE4B) +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; +var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; +var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +function mixin_embed(tag, prefix) { + return { + token: "entity.name.function.jade", + regex: "^\\s*\\:" + tag, + next: prefix + "start" + }; +} +var JadeHighlightRules = function () { + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + this.$rules = + { + "start": [ + { + token: "keyword.control.import.include.jade", + regex: "\\s*\\binclude\\b" + }, + { + token: "keyword.other.doctype.jade", + regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" + }, + { + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\//, + next: "comment_block" + }, + mixin_embed("markdown", "markdown-"), + mixin_embed("sass", "sass-"), + mixin_embed("less", "less-"), + mixin_embed("coffee", "coffee-"), + { + token: ["storage.type.function.jade", + "entity.name.function.jade", + "punctuation.definition.parameters.begin.jade", + "variable.parameter.function.jade", + "punctuation.definition.parameters.end.jade" + ], + regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))" + }, + { + token: ["storage.type.function.jade", "entity.name.function.jade"], + regex: "^(\\s*mixin)( [\\w\\-]+)" + }, + { + token: "source.js.embedded.jade", + regex: "^\\s*(?:-|=|!=)", + next: "js-start" + }, + { + token: "string.interpolated.jade", + regex: "[#!]\\{[^\\}]+\\}" + }, + { + token: "meta.tag.any.jade", + regex: /^\s*(?!\w+:)(?:[\w-]+|(?=\.|#)])/, + next: "tag_single" + }, + { + token: "suport.type.attribute.id.jade", + regex: "#\\w+" + }, + { + token: "suport.type.attribute.class.jade", + regex: "\\.\\w+" + }, + { + token: "punctuation", + regex: "\\s*(?:\\()", + next: "tag_attributes" + } + ], + "comment_block": [ + { regex: /^\s*(?:\/\/)?/, onMatch: function (value, currentState, stack) { + if (value.length <= stack[1]) { + if (value.slice(-1) == "/") { + stack[1] = value.length - 2; + this.next = ""; + return "comment"; + } + stack.shift(); + stack.shift(); + this.next = stack.shift(); + return "text"; + } + else { + this.next = ""; + return "comment"; + } + }, next: "start" }, + { defaultToken: "comment" } + ], + "tag_single": [ + { + token: "entity.other.attribute-name.class.jade", + regex: "\\.[\\w-]+" + }, + { + token: "entity.other.attribute-name.id.jade", + regex: "#[\\w-]+" + }, + { + token: ["text", "punctuation"], + regex: "($)|((?!\\.|#|=|-))", + next: "start" + } + ], + "tag_attributes": [ + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, + { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: ["entity.other.attribute-name.jade", "punctuation"], + regex: "([a-zA-Z:\\.-]+)(=)?", + next: "attribute_strings" + }, + { + token: "punctuation", + regex: "\\)", + next: "start" + } + ], + "attribute_strings": [ + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, + { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: "string", + regex: '(?=\\S)', + next: "tag_attributes" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: '[^"\\\\]+' + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "tag_attributes" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "[^'\\\\]+" + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "tag_attributes" + } + ] + }; + this.embedRules(JavaScriptHighlightRules, "js-", [{ + token: "text", + regex: ".$", + next: "start" + }]); +}; +oop.inherits(JadeHighlightRules, TextHighlightRules); +exports.JadeHighlightRules = JadeHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jade",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jade_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = JadeHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/jade"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/jade"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-java.js b/ui/base1/ace/mode-java.js new file mode 100644 index 0000000..a9bd2e5 --- /dev/null +++ b/ui/base1/ace/mode-java.js @@ -0,0 +1,1556 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JavaHighlightRules = function () { + var identifierRe = "[a-zA-Z_$][a-zA-Z0-9_$]*"; + var keywords = ("abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "const|float|native|super|while|" + + "var|exports|opens|requires|uses|yield|" + + "module|permits|(?:non\\-)?sealed|var|" + + "provides|to|when|" + + "open|record|transitive|with"); + var buildinConstants = ("null|Infinity|NaN|undefined"); + var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" + + "ClassFormatError|Deprecated|EnumConstantNotPresentException|" + + "ExceptionInInitializerError|IllegalAccessError|" + + "IllegalThreadStateException|InstantiationError|InternalError|" + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|" + + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" + + "SuppressWarnings|TypeNotPresentException|UnknownError|" + + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" + + "InstantiationException|IndexOutOfBoundsException|" + + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" + + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" + + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" + + "InterruptedException|NoSuchMethodException|IllegalAccessException|" + + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" + + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" + + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" + + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" + + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" + + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" + + "StackOverflowError|OutOfMemoryError|VirtualMachineError|" + + "ArrayStoreException|ClassCastException|LinkageError|" + + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" + + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" + + "Cloneable|Class|CharSequence|Comparable|String|Object"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, + { include: "multiline-strings" }, + { include: "strings" }, + { include: "constants" }, + { + regex: "(open(?:\\s+))?module(?=\\s*\\w)", + token: "keyword", + next: [{ + regex: "{", + token: "paren.lparen", + next: [{ + regex: "}", + token: "paren.rparen", + next: "start" + }, { + regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b", + token: "keyword" + }] + }, { + token: "text", + regex: "\\s+" + }, { + token: "identifier", + regex: "\\w+" + }, { + token: "punctuation.operator", + regex: "." + }, { + token: "text", + regex: "\\s+" + }, { + regex: "", // exit if there is anything else + next: "start" + }] + }, + { include: "statements" } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "strings": [ + { + token: ["punctuation", "string"], + regex: /(\.)(")/, + push: [ + { + token: "lparen", + regex: /\\\{/, + push: [ + { + token: "text", + regex: /$/, + next: "start" + }, { + token: "rparen", + regex: /}/, + next: "pop" + }, { + include: "strings" + }, { + include: "constants" + }, { + include: "statements" + } + ] + }, { + token: "string", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + } + ] + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + } + ], + "multiline-strings": [ + { + token: ["punctuation", "string"], + regex: /(\.)(""")/, + push: [ + { + token: "string", + regex: '"""', + next: "pop" + }, { + token: "lparen", + regex: /\\\{/, + push: [ + { + token: "text", + regex: /$/, + next: "start" + }, { + token: "rparen", + regex: /}/, + next: "pop" + }, { + include: "multiline-strings" + }, { + include: "strings" + }, { + include: "constants" + }, { + include: "statements" + } + ] + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + defaultToken: "string" + } + ] + }, + { + token: "string", + regex: '"""', + push: [ + { + token: "string", + regex: '"""', + next: "pop" + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + defaultToken: "string" + } + ] + } + ], + "constants": [ + { + token: "constant.numeric", // hex + regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ + }, { + token: "constant.numeric", // float + regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + } + ], + "statements": [ + { + token: ["keyword", "text", "identifier"], + regex: "(record)(\\s+)(" + identifierRe + ")\\b" + }, + { + token: "keyword", + regex: "(?:" + keywords + ")\\b" + }, { + token: "storage.type.annotation", + regex: "@" + identifierRe + "\\b" + }, { + token: "entity.name.function", + regex: identifierRe + "(?=\\()" + }, { + token: keywordMapper, // TODO: Unicode escape sequences + regex: identifierRe + "\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(JavaHighlightRules, TextHighlightRules); +exports.JavaHighlightRules = JavaHighlightRules; + +}); + +define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var CStyleFoldMode = require("./cstyle").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, CStyleFoldMode); +(function () { + this.importRegex = /^import /; + this.getCStyleFoldWidget = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + if (foldStyle === "markbegin") { + var line = session.getLine(row); + if (this.importRegex.test(line)) { + if (row == 0 || !this.importRegex.test(session.getLine(row - 1))) + return "start"; + } + } + return this.getCStyleFoldWidget(session, foldStyle, row); + }; + this.getCstyleFoldWidgetRange = this.getFoldWidgetRange; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.importRegex); + if (!match || foldStyle !== "markbegin") + return this.getCstyleFoldWidgetRange(session, foldStyle, row, forceMultiline); + var startColumn = match[0].length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + var line = session.getLine(row); + if (line.match(/^\s*$/)) + continue; + if (!line.match(this.importRegex)) + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptMode = require("./javascript").Mode; +var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; +var JavaFoldMode = require("./folding/java").FoldMode; +var Mode = function () { + JavaScriptMode.call(this); + this.HighlightRules = JavaHighlightRules; + this.foldingRules = new JavaFoldMode(); +}; +oop.inherits(Mode, JavaScriptMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/java"; + this.snippetFileId = "ace/snippets/java"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/java"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-javascript.js b/ui/base1/ace/mode-javascript.js new file mode 100644 index 0000000..e11bd71 --- /dev/null +++ b/ui/base1/ace/mode-javascript.js @@ -0,0 +1,1191 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/javascript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jexl.js b/ui/base1/ace/mode-jexl.js new file mode 100644 index 0000000..2eab86a --- /dev/null +++ b/ui/base1/ace/mode-jexl.js @@ -0,0 +1,270 @@ +define("ace/mode/jexl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JexlHighlightRules = function () { + var keywords = "return|var|function|and|or|not|if|for|while|do|continue|break"; + var buildinConstants = "null"; + var supportFunc = "empty|size|new"; + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": supportFunc + }, "identifier"); + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "|.)"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, { + token: "comment", + regex: "##.*$" + }, { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: ["comment", "text"], + regex: "(#pragma)(\\s.*$)" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string + regex: "`", + push: [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "`", + next: "pop" + }, { + token: "lparen", //interpolation + regex: "\\${", + push: [ + { + token: "rparen", + regex: "}", + next: "pop" + }, { + include: "start" + } + ] + }, { + defaultToken: "string" + } + ] + }, { + token: "constant.numeric", // hex + regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ + }, { + token: "constant.numeric", // float + regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "string.regexp", + regex: "~/", + push: [ + { + token: "constant.language.escape", + regex: "\\\\/" + }, { + token: "string.regexp", + regex: "$|/", + next: "pop" + }, { + defaultToken: "string.regexp" + } + ] + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "&&|\\|\\||!|&|\\||\\^|~|\\?|:|\\?\\?|==|!=|<|<=|>|>=|=~|!~|=\\^|=\\$|!\\$|\\+|\\-|\\*|%|\\/|=" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation", + regex: "[,.]" + }, { + token: "storage.type.annotation", + regex: "@[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + } + ], + "comment": [ + { + token: "comment", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(JexlHighlightRules, TextHighlightRules); +exports.JexlHighlightRules = JexlHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jexl",["require","exports","module","ace/lib/oop","ace/mode/jexl_highlight_rules","ace/mode/text","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JexlHighlightRules = require("./jexl_highlight_rules").JexlHighlightRules; +var TextMode = require("./text").Mode; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = JexlHighlightRules; + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["//", "##"]; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/jexl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/jexl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-json.js b/ui/base1/ace/mode-json.js new file mode 100644 index 0000000..cc78c8d --- /dev/null +++ b/ui/base1/ace/mode-json.js @@ -0,0 +1,275 @@ +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "variable", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "text", // single quoted strings are not allowed + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "comment", // comments are not allowed, but who cares? + regex: "\\/\\/.*$" + }, { + token: "comment.start", // comments are not allowed, but who cares? + regex: "\\/\\*", + next: "comment" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "punctuation.operator", + regex: /[,]/ + }, { + token: "text", + regex: "\\s+" + } + ], + "string": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + } + ], + "comment": [ + { + token: "comment.end", // comments are not allowed, but who cares? + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; +}; +oop.inherits(JsonHighlightRules, TextHighlightRules); +exports.JsonHighlightRules = JsonHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./json_highlight_rules").JsonHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/json"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/json"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-json5.js b/ui/base1/ace/mode-json5.js new file mode 100644 index 0000000..ac95e1c --- /dev/null +++ b/ui/base1/ace/mode-json5.js @@ -0,0 +1,308 @@ +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "variable", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "text", // single quoted strings are not allowed + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "comment", // comments are not allowed, but who cares? + regex: "\\/\\/.*$" + }, { + token: "comment.start", // comments are not allowed, but who cares? + regex: "\\/\\*", + next: "comment" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "punctuation.operator", + regex: /[,]/ + }, { + token: "text", + regex: "\\s+" + } + ], + "string": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + } + ], + "comment": [ + { + token: "comment.end", // comments are not allowed, but who cares? + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; +}; +oop.inherits(JsonHighlightRules, TextHighlightRules); +exports.JsonHighlightRules = JsonHighlightRules; + +}); + +define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules; +var Json5HighlightRules = function () { + JsonHighlightRules.call(this); + var startRules = [{ + token: "variable", + regex: /[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/ + }, { + token: "variable", + regex: /['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/ + }, { + token: "constant.language.boolean", + regex: /(?:null)\b/ + }, { + token: "string", + regex: /'/, + next: [{ + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/, + consumeLineEnd: true + }, { + token: "string", + regex: /'|$/, + next: "start" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: /"(?![^"]*":)/, + next: [{ + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/, + consumeLineEnd: true + }, { + token: "string", + regex: /"|$/, + next: "start" + }, { + defaultToken: "string" + }] + }, { + token: "constant.numeric", + regex: /[+-]?(?:Infinity|NaN)\b/ + }]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.normalizeRules(); +}; +oop.inherits(Json5HighlightRules, JsonHighlightRules); +exports.Json5HighlightRules = Json5HighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/json5",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json5_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./json5_highlight_rules").Json5HighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/json5"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/json5"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jsoniq.js b/ui/base1/ace/mode-jsoniq.js new file mode 100644 index 0000000..24a273e --- /dev/null +++ b/ui/base1/ace/mode-jsoniq.js @@ -0,0 +1,2577 @@ +define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) { +module.exports = (function outer (modules, cache, entry) { + var previousRequire = typeof require == "function" && require; + function newRequire(name, jumped){ + if(!cache[name]) { + if(!modules[name]) { + var currentRequire = typeof require == "function" && require; + if (!jumped && currentRequire) return currentRequire(name, true); + if (previousRequire) return previousRequire(name, true); + var err = new Error('Cannot find module \'' + name + '\''); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + var m = cache[name] = {exports:{}}; + modules[name][0].call(m.exports, function(x){ + var id = modules[name][1][x]; + return newRequire(id ? id : x); + },m,m.exports,outer,modules,cache,entry); + } + return cache[name].exports; + } + for(var i=0;i= 0 ? JSONiqTokenizer.TOKEN[o] : null; + }; + + this.getExpectedTokenSet = function(e) + { + var expected; + if (e.getExpected() < 0) + { + expected = JSONiqTokenizer.getTokenSet(- e.getState()); + } + else + { + expected = [JSONiqTokenizer.TOKEN[e.getExpected()]]; + } + return expected; + }; + + this.getErrorMessage = function(e) + { + var tokenSet = this.getExpectedTokenSet(e); + var found = this.getOffendingToken(e); + var prefix = input.substring(0, e.getBegin()); + var lines = prefix.split("\n"); + var line = lines.length; + var column = lines[line - 1].length + 1; + var size = e.getEnd() - e.getBegin(); + return e.getMessage() + + (found == null ? "" : ", found " + found) + + "\nwhile expecting " + + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + + "\n" + + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + + "at line " + line + ", column " + column + ":\n..." + + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + + "..."; + }; + + this.parse_start = function() + { + eventHandler.startNonterminal("start", e0); + lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | + switch (l1) + { + case 58: // '' | '=' | '>' + switch (l1) + { + case 61: // '>' + shift(61); // '>' + break; + case 53: // '/>' + shift(53); // '/>' + break; + case 29: // QName + shift(29); // QName + break; + case 60: // '=' + shift(60); // '=' + break; + case 37: // '"' + shift(37); // '"' + break; + case 41: // "'" + shift(41); // "'" + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("StartTag", e0); + }; + + this.parse_TagContent = function() + { + eventHandler.startNonterminal("TagContent", e0); + lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | + switch (l1) + { + case 25: // ElementContentChar + shift(25); // ElementContentChar + break; + case 9: // Tag + shift(9); // Tag + break; + case 10: // EndTag + shift(10); // EndTag + break; + case 58: // '' + switch (l1) + { + case 14: // CDataSectionContents + shift(14); // CDataSectionContents + break; + case 67: // ']]>' + shift(67); // ']]>' + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("CData", e0); + }; + + this.parse_XMLComment = function() + { + eventHandler.startNonterminal("XMLComment", e0); + lookahead1(0); // DirCommentContents | EOF | '-->' + switch (l1) + { + case 12: // DirCommentContents + shift(12); // DirCommentContents + break; + case 50: // '-->' + shift(50); // '-->' + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("XMLComment", e0); + }; + + this.parse_PI = function() + { + eventHandler.startNonterminal("PI", e0); + lookahead1(3); // DirPIContents | EOF | '?' | '?>' + switch (l1) + { + case 13: // DirPIContents + shift(13); // DirPIContents + break; + case 62: // '?' + shift(62); // '?' + break; + case 63: // '?>' + shift(63); // '?>' + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("PI", e0); + }; + + this.parse_Pragma = function() + { + eventHandler.startNonterminal("Pragma", e0); + lookahead1(2); // PragmaContents | EOF | '#' | '#)' + switch (l1) + { + case 11: // PragmaContents + shift(11); // PragmaContents + break; + case 38: // '#' + shift(38); // '#' + break; + case 39: // '#)' + shift(39); // '#)' + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("Pragma", e0); + }; + + this.parse_Comment = function() + { + eventHandler.startNonterminal("Comment", e0); + lookahead1(4); // CommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 55: // ':)' + shift(55); // ':)' + break; + case 44: // '(:' + shift(44); // '(:' + break; + case 32: // CommentContents + shift(32); // CommentContents + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("Comment", e0); + }; + + this.parse_CommentDoc = function() + { + eventHandler.startNonterminal("CommentDoc", e0); + lookahead1(6); // DocTag | DocCommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 33: // DocTag + shift(33); // DocTag + break; + case 34: // DocCommentContents + shift(34); // DocCommentContents + break; + case 55: // ':)' + shift(55); // ':)' + break; + case 44: // '(:' + shift(44); // '(:' + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("CommentDoc", e0); + }; + + this.parse_QuotString = function() + { + eventHandler.startNonterminal("QuotString", e0); + lookahead1(5); // JSONChar | JSONCharRef | JSONPredefinedCharRef | EOF | '"' + switch (l1) + { + case 3: // JSONPredefinedCharRef + shift(3); // JSONPredefinedCharRef + break; + case 2: // JSONCharRef + shift(2); // JSONCharRef + break; + case 1: // JSONChar + shift(1); // JSONChar + break; + case 37: // '"' + shift(37); // '"' + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("QuotString", e0); + }; + + this.parse_AposString = function() + { + eventHandler.startNonterminal("AposString", e0); + lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" + switch (l1) + { + case 21: // PredefinedEntityRef + shift(21); // PredefinedEntityRef + break; + case 31: // CharRef + shift(31); // CharRef + break; + case 23: // EscapeApos + shift(23); // EscapeApos + break; + case 24: // AposChar + shift(24); // AposChar + break; + case 41: // "'" + shift(41); // "'" + break; + default: + shift(35); // EOF + } + eventHandler.endNonterminal("AposString", e0); + }; + + this.parse_Prefix = function() + { + eventHandler.startNonterminal("Prefix", e0); + lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_NCName(); + eventHandler.endNonterminal("Prefix", e0); + }; + + this.parse__EQName = function() + { + eventHandler.startNonterminal("_EQName", e0); + lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_EQName(); + eventHandler.endNonterminal("_EQName", e0); + }; + + function parse_EQName() + { + eventHandler.startNonterminal("EQName", e0); + switch (l1) + { + case 80: // 'attribute' + shift(80); // 'attribute' + break; + case 94: // 'comment' + shift(94); // 'comment' + break; + case 118: // 'document-node' + shift(118); // 'document-node' + break; + case 119: // 'element' + shift(119); // 'element' + break; + case 122: // 'empty-sequence' + shift(122); // 'empty-sequence' + break; + case 143: // 'function' + shift(143); // 'function' + break; + case 150: // 'if' + shift(150); // 'if' + break; + case 163: // 'item' + shift(163); // 'item' + break; + case 183: // 'namespace-node' + shift(183); // 'namespace-node' + break; + case 189: // 'node' + shift(189); // 'node' + break; + case 214: // 'processing-instruction' + shift(214); // 'processing-instruction' + break; + case 224: // 'schema-attribute' + shift(224); // 'schema-attribute' + break; + case 225: // 'schema-element' + shift(225); // 'schema-element' + break; + case 241: // 'switch' + shift(241); // 'switch' + break; + case 242: // 'text' + shift(242); // 'text' + break; + case 251: // 'typeswitch' + shift(251); // 'typeswitch' + break; + default: + parse_FunctionName(); + } + eventHandler.endNonterminal("EQName", e0); + } + + function parse_FunctionName() + { + eventHandler.startNonterminal("FunctionName", e0); + switch (l1) + { + case 17: // EQName^Token + shift(17); // EQName^Token + break; + case 68: // 'after' + shift(68); // 'after' + break; + case 71: // 'ancestor' + shift(71); // 'ancestor' + break; + case 72: // 'ancestor-or-self' + shift(72); // 'ancestor-or-self' + break; + case 73: // 'and' + shift(73); // 'and' + break; + case 77: // 'as' + shift(77); // 'as' + break; + case 78: // 'ascending' + shift(78); // 'ascending' + break; + case 82: // 'before' + shift(82); // 'before' + break; + case 86: // 'case' + shift(86); // 'case' + break; + case 87: // 'cast' + shift(87); // 'cast' + break; + case 88: // 'castable' + shift(88); // 'castable' + break; + case 91: // 'child' + shift(91); // 'child' + break; + case 92: // 'collation' + shift(92); // 'collation' + break; + case 101: // 'copy' + shift(101); // 'copy' + break; + case 103: // 'count' + shift(103); // 'count' + break; + case 106: // 'declare' + shift(106); // 'declare' + break; + case 107: // 'default' + shift(107); // 'default' + break; + case 108: // 'delete' + shift(108); // 'delete' + break; + case 109: // 'descendant' + shift(109); // 'descendant' + break; + case 110: // 'descendant-or-self' + shift(110); // 'descendant-or-self' + break; + case 111: // 'descending' + shift(111); // 'descending' + break; + case 116: // 'div' + shift(116); // 'div' + break; + case 117: // 'document' + shift(117); // 'document' + break; + case 120: // 'else' + shift(120); // 'else' + break; + case 121: // 'empty' + shift(121); // 'empty' + break; + case 124: // 'end' + shift(124); // 'end' + break; + case 126: // 'eq' + shift(126); // 'eq' + break; + case 127: // 'every' + shift(127); // 'every' + break; + case 129: // 'except' + shift(129); // 'except' + break; + case 132: // 'first' + shift(132); // 'first' + break; + case 133: // 'following' + shift(133); // 'following' + break; + case 134: // 'following-sibling' + shift(134); // 'following-sibling' + break; + case 135: // 'for' + shift(135); // 'for' + break; + case 144: // 'ge' + shift(144); // 'ge' + break; + case 146: // 'group' + shift(146); // 'group' + break; + case 148: // 'gt' + shift(148); // 'gt' + break; + case 149: // 'idiv' + shift(149); // 'idiv' + break; + case 151: // 'import' + shift(151); // 'import' + break; + case 157: // 'insert' + shift(157); // 'insert' + break; + case 158: // 'instance' + shift(158); // 'instance' + break; + case 160: // 'intersect' + shift(160); // 'intersect' + break; + case 161: // 'into' + shift(161); // 'into' + break; + case 162: // 'is' + shift(162); // 'is' + break; + case 168: // 'last' + shift(168); // 'last' + break; + case 170: // 'le' + shift(170); // 'le' + break; + case 172: // 'let' + shift(172); // 'let' + break; + case 176: // 'lt' + shift(176); // 'lt' + break; + case 178: // 'mod' + shift(178); // 'mod' + break; + case 179: // 'modify' + shift(179); // 'modify' + break; + case 180: // 'module' + shift(180); // 'module' + break; + case 182: // 'namespace' + shift(182); // 'namespace' + break; + case 184: // 'ne' + shift(184); // 'ne' + break; + case 196: // 'only' + shift(196); // 'only' + break; + case 198: // 'or' + shift(198); // 'or' + break; + case 199: // 'order' + shift(199); // 'order' + break; + case 200: // 'ordered' + shift(200); // 'ordered' + break; + case 204: // 'parent' + shift(204); // 'parent' + break; + case 210: // 'preceding' + shift(210); // 'preceding' + break; + case 211: // 'preceding-sibling' + shift(211); // 'preceding-sibling' + break; + case 216: // 'rename' + shift(216); // 'rename' + break; + case 217: // 'replace' + shift(217); // 'replace' + break; + case 218: // 'return' + shift(218); // 'return' + break; + case 222: // 'satisfies' + shift(222); // 'satisfies' + break; + case 227: // 'self' + shift(227); // 'self' + break; + case 233: // 'some' + shift(233); // 'some' + break; + case 234: // 'stable' + shift(234); // 'stable' + break; + case 235: // 'start' + shift(235); // 'start' + break; + case 246: // 'to' + shift(246); // 'to' + break; + case 247: // 'treat' + shift(247); // 'treat' + break; + case 248: // 'try' + shift(248); // 'try' + break; + case 252: // 'union' + shift(252); // 'union' + break; + case 254: // 'unordered' + shift(254); // 'unordered' + break; + case 258: // 'validate' + shift(258); // 'validate' + break; + case 264: // 'where' + shift(264); // 'where' + break; + case 268: // 'with' + shift(268); // 'with' + break; + case 272: // 'xquery' + shift(272); // 'xquery' + break; + case 70: // 'allowing' + shift(70); // 'allowing' + break; + case 79: // 'at' + shift(79); // 'at' + break; + case 81: // 'base-uri' + shift(81); // 'base-uri' + break; + case 83: // 'boundary-space' + shift(83); // 'boundary-space' + break; + case 84: // 'break' + shift(84); // 'break' + break; + case 89: // 'catch' + shift(89); // 'catch' + break; + case 96: // 'construction' + shift(96); // 'construction' + break; + case 99: // 'context' + shift(99); // 'context' + break; + case 100: // 'continue' + shift(100); // 'continue' + break; + case 102: // 'copy-namespaces' + shift(102); // 'copy-namespaces' + break; + case 104: // 'decimal-format' + shift(104); // 'decimal-format' + break; + case 123: // 'encoding' + shift(123); // 'encoding' + break; + case 130: // 'exit' + shift(130); // 'exit' + break; + case 131: // 'external' + shift(131); // 'external' + break; + case 139: // 'ft-option' + shift(139); // 'ft-option' + break; + case 152: // 'in' + shift(152); // 'in' + break; + case 153: // 'index' + shift(153); // 'index' + break; + case 159: // 'integrity' + shift(159); // 'integrity' + break; + case 169: // 'lax' + shift(169); // 'lax' + break; + case 190: // 'nodes' + shift(190); // 'nodes' + break; + case 197: // 'option' + shift(197); // 'option' + break; + case 201: // 'ordering' + shift(201); // 'ordering' + break; + case 220: // 'revalidation' + shift(220); // 'revalidation' + break; + case 223: // 'schema' + shift(223); // 'schema' + break; + case 226: // 'score' + shift(226); // 'score' + break; + case 232: // 'sliding' + shift(232); // 'sliding' + break; + case 238: // 'strict' + shift(238); // 'strict' + break; + case 249: // 'tumbling' + shift(249); // 'tumbling' + break; + case 250: // 'type' + shift(250); // 'type' + break; + case 255: // 'updating' + shift(255); // 'updating' + break; + case 259: // 'value' + shift(259); // 'value' + break; + case 260: // 'variable' + shift(260); // 'variable' + break; + case 261: // 'version' + shift(261); // 'version' + break; + case 265: // 'while' + shift(265); // 'while' + break; + case 95: // 'constraint' + shift(95); // 'constraint' + break; + case 174: // 'loop' + shift(174); // 'loop' + break; + default: + shift(219); // 'returning' + } + eventHandler.endNonterminal("FunctionName", e0); + } + + function parse_NCName() + { + eventHandler.startNonterminal("NCName", e0); + switch (l1) + { + case 28: // NCName^Token + shift(28); // NCName^Token + break; + case 68: // 'after' + shift(68); // 'after' + break; + case 73: // 'and' + shift(73); // 'and' + break; + case 77: // 'as' + shift(77); // 'as' + break; + case 78: // 'ascending' + shift(78); // 'ascending' + break; + case 82: // 'before' + shift(82); // 'before' + break; + case 86: // 'case' + shift(86); // 'case' + break; + case 87: // 'cast' + shift(87); // 'cast' + break; + case 88: // 'castable' + shift(88); // 'castable' + break; + case 92: // 'collation' + shift(92); // 'collation' + break; + case 103: // 'count' + shift(103); // 'count' + break; + case 107: // 'default' + shift(107); // 'default' + break; + case 111: // 'descending' + shift(111); // 'descending' + break; + case 116: // 'div' + shift(116); // 'div' + break; + case 120: // 'else' + shift(120); // 'else' + break; + case 121: // 'empty' + shift(121); // 'empty' + break; + case 124: // 'end' + shift(124); // 'end' + break; + case 126: // 'eq' + shift(126); // 'eq' + break; + case 129: // 'except' + shift(129); // 'except' + break; + case 135: // 'for' + shift(135); // 'for' + break; + case 144: // 'ge' + shift(144); // 'ge' + break; + case 146: // 'group' + shift(146); // 'group' + break; + case 148: // 'gt' + shift(148); // 'gt' + break; + case 149: // 'idiv' + shift(149); // 'idiv' + break; + case 158: // 'instance' + shift(158); // 'instance' + break; + case 160: // 'intersect' + shift(160); // 'intersect' + break; + case 161: // 'into' + shift(161); // 'into' + break; + case 162: // 'is' + shift(162); // 'is' + break; + case 170: // 'le' + shift(170); // 'le' + break; + case 172: // 'let' + shift(172); // 'let' + break; + case 176: // 'lt' + shift(176); // 'lt' + break; + case 178: // 'mod' + shift(178); // 'mod' + break; + case 179: // 'modify' + shift(179); // 'modify' + break; + case 184: // 'ne' + shift(184); // 'ne' + break; + case 196: // 'only' + shift(196); // 'only' + break; + case 198: // 'or' + shift(198); // 'or' + break; + case 199: // 'order' + shift(199); // 'order' + break; + case 218: // 'return' + shift(218); // 'return' + break; + case 222: // 'satisfies' + shift(222); // 'satisfies' + break; + case 234: // 'stable' + shift(234); // 'stable' + break; + case 235: // 'start' + shift(235); // 'start' + break; + case 246: // 'to' + shift(246); // 'to' + break; + case 247: // 'treat' + shift(247); // 'treat' + break; + case 252: // 'union' + shift(252); // 'union' + break; + case 264: // 'where' + shift(264); // 'where' + break; + case 268: // 'with' + shift(268); // 'with' + break; + case 71: // 'ancestor' + shift(71); // 'ancestor' + break; + case 72: // 'ancestor-or-self' + shift(72); // 'ancestor-or-self' + break; + case 80: // 'attribute' + shift(80); // 'attribute' + break; + case 91: // 'child' + shift(91); // 'child' + break; + case 94: // 'comment' + shift(94); // 'comment' + break; + case 101: // 'copy' + shift(101); // 'copy' + break; + case 106: // 'declare' + shift(106); // 'declare' + break; + case 108: // 'delete' + shift(108); // 'delete' + break; + case 109: // 'descendant' + shift(109); // 'descendant' + break; + case 110: // 'descendant-or-self' + shift(110); // 'descendant-or-self' + break; + case 117: // 'document' + shift(117); // 'document' + break; + case 118: // 'document-node' + shift(118); // 'document-node' + break; + case 119: // 'element' + shift(119); // 'element' + break; + case 122: // 'empty-sequence' + shift(122); // 'empty-sequence' + break; + case 127: // 'every' + shift(127); // 'every' + break; + case 132: // 'first' + shift(132); // 'first' + break; + case 133: // 'following' + shift(133); // 'following' + break; + case 134: // 'following-sibling' + shift(134); // 'following-sibling' + break; + case 143: // 'function' + shift(143); // 'function' + break; + case 150: // 'if' + shift(150); // 'if' + break; + case 151: // 'import' + shift(151); // 'import' + break; + case 157: // 'insert' + shift(157); // 'insert' + break; + case 163: // 'item' + shift(163); // 'item' + break; + case 168: // 'last' + shift(168); // 'last' + break; + case 180: // 'module' + shift(180); // 'module' + break; + case 182: // 'namespace' + shift(182); // 'namespace' + break; + case 183: // 'namespace-node' + shift(183); // 'namespace-node' + break; + case 189: // 'node' + shift(189); // 'node' + break; + case 200: // 'ordered' + shift(200); // 'ordered' + break; + case 204: // 'parent' + shift(204); // 'parent' + break; + case 210: // 'preceding' + shift(210); // 'preceding' + break; + case 211: // 'preceding-sibling' + shift(211); // 'preceding-sibling' + break; + case 214: // 'processing-instruction' + shift(214); // 'processing-instruction' + break; + case 216: // 'rename' + shift(216); // 'rename' + break; + case 217: // 'replace' + shift(217); // 'replace' + break; + case 224: // 'schema-attribute' + shift(224); // 'schema-attribute' + break; + case 225: // 'schema-element' + shift(225); // 'schema-element' + break; + case 227: // 'self' + shift(227); // 'self' + break; + case 233: // 'some' + shift(233); // 'some' + break; + case 241: // 'switch' + shift(241); // 'switch' + break; + case 242: // 'text' + shift(242); // 'text' + break; + case 248: // 'try' + shift(248); // 'try' + break; + case 251: // 'typeswitch' + shift(251); // 'typeswitch' + break; + case 254: // 'unordered' + shift(254); // 'unordered' + break; + case 258: // 'validate' + shift(258); // 'validate' + break; + case 260: // 'variable' + shift(260); // 'variable' + break; + case 272: // 'xquery' + shift(272); // 'xquery' + break; + case 70: // 'allowing' + shift(70); // 'allowing' + break; + case 79: // 'at' + shift(79); // 'at' + break; + case 81: // 'base-uri' + shift(81); // 'base-uri' + break; + case 83: // 'boundary-space' + shift(83); // 'boundary-space' + break; + case 84: // 'break' + shift(84); // 'break' + break; + case 89: // 'catch' + shift(89); // 'catch' + break; + case 96: // 'construction' + shift(96); // 'construction' + break; + case 99: // 'context' + shift(99); // 'context' + break; + case 100: // 'continue' + shift(100); // 'continue' + break; + case 102: // 'copy-namespaces' + shift(102); // 'copy-namespaces' + break; + case 104: // 'decimal-format' + shift(104); // 'decimal-format' + break; + case 123: // 'encoding' + shift(123); // 'encoding' + break; + case 130: // 'exit' + shift(130); // 'exit' + break; + case 131: // 'external' + shift(131); // 'external' + break; + case 139: // 'ft-option' + shift(139); // 'ft-option' + break; + case 152: // 'in' + shift(152); // 'in' + break; + case 153: // 'index' + shift(153); // 'index' + break; + case 159: // 'integrity' + shift(159); // 'integrity' + break; + case 169: // 'lax' + shift(169); // 'lax' + break; + case 190: // 'nodes' + shift(190); // 'nodes' + break; + case 197: // 'option' + shift(197); // 'option' + break; + case 201: // 'ordering' + shift(201); // 'ordering' + break; + case 220: // 'revalidation' + shift(220); // 'revalidation' + break; + case 223: // 'schema' + shift(223); // 'schema' + break; + case 226: // 'score' + shift(226); // 'score' + break; + case 232: // 'sliding' + shift(232); // 'sliding' + break; + case 238: // 'strict' + shift(238); // 'strict' + break; + case 249: // 'tumbling' + shift(249); // 'tumbling' + break; + case 250: // 'type' + shift(250); // 'type' + break; + case 255: // 'updating' + shift(255); // 'updating' + break; + case 259: // 'value' + shift(259); // 'value' + break; + case 261: // 'version' + shift(261); // 'version' + break; + case 265: // 'while' + shift(265); // 'while' + break; + case 95: // 'constraint' + shift(95); // 'constraint' + break; + case 174: // 'loop' + shift(174); // 'loop' + break; + default: + shift(219); // 'returning' + } + eventHandler.endNonterminal("NCName", e0); + } + + function shift(t) + { + if (l1 == t) + { + whitespace(); + eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); + b0 = b1; e0 = e1; l1 = 0; + } + else + { + error(b1, e1, 0, l1, t); + } + } + + function whitespace() + { + if (e0 != b1) + { + b0 = e0; + e0 = b1; + eventHandler.whitespace(b0, e0); + } + } + + function matchW(set) + { + var code; + for (;;) + { + code = match(set); + if (code != 30) // S^WS + { + break; + } + } + return code; + } + + function lookahead1W(set) + { + if (l1 == 0) + { + l1 = matchW(set); + b1 = begin; + e1 = end; + } + } + + function lookahead1(set) + { + if (l1 == 0) + { + l1 = match(set); + b1 = begin; + e1 = end; + } + } + + function error(b, e, s, l, t) + { + throw new self.ParseException(b, e, s, l, t); + } + + var lk, b0, e0; + var l1, b1, e1; + var eventHandler; + + var input; + var size; + var begin; + var end; + + function match(tokenSetId) + { + var nonbmp = false; + begin = end; + var current = end; + var result = JSONiqTokenizer.INITIAL[tokenSetId]; + var state = 0; + + for (var code = result & 4095; code != 0; ) + { + var charclass; + var c0 = current < size ? input.charCodeAt(current) : 0; + ++current; + if (c0 < 0x80) + { + charclass = JSONiqTokenizer.MAP0[c0]; + } + else if (c0 < 0xd800) + { + var c1 = c0 >> 4; + charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]]; + } + else + { + if (c0 < 0xdc00) + { + var c1 = current < size ? input.charCodeAt(current) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) + { + ++current; + c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; + nonbmp = true; + } + } + var lo = 0, hi = 5; + for (var m = 3; ; m = (hi + lo) >> 1) + { + if (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1; + else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1; + else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;} + if (lo > hi) {charclass = 0; break;} + } + } + + state = code; + var i0 = (charclass << 12) + code - 1; + code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]]; + + if (code > 4095) + { + result = code; + code &= 4095; + end = current; + } + } + + result >>= 12; + if (result == 0) + { + end = current - 1; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + return error(begin, end, state, -1, -1); + } + + if (nonbmp) + { + for (var i = result >> 9; i > 0; --i) + { + --end; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + } + } + else + { + end -= result >> 9; + } + + return (result & 511) - 1; + } +} + +JSONiqTokenizer.getTokenSet = function(tokenSetId) +{ + var set = []; + var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; + for (var i = 0; i < 279; i += 32) + { + var j = i; + var i0 = (i >> 5) * 2066 + s - 1; + var i1 = i0 >> 2; + var i2 = i1 >> 2; + var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]]; + for ( ; f != 0; f >>>= 1, ++j) + { + if ((f & 1) != 0) + { + set.push(JSONiqTokenizer.TOKEN[j]); + } + } + } + return set; +}; + +JSONiqTokenizer.MAP0 = +[ 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37 +]; + +JSONiqTokenizer.MAP1 = +[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 +]; + +JSONiqTokenizer.MAP2 = +[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 31, 37, 31, 31, 37 +]; + +JSONiqTokenizer.INITIAL = +[ 1, 2, 49155, 57348, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +]; + +JSONiqTokenizer.TRANSITION = +[ 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 17408, 19288, 17439, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19074, 36169, 17439, 36866, 17466, 36890, 36866, 22314, 19105, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22182, 19288, 19121, 36866, 17466, 18345, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19273, 19552, 19304, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19332, 17423, 19363, 36866, 17466, 17537, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 18614, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19391, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19427, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36154, 19288, 19457, 36866, 17466, 17740, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22780, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22375, 22197, 18469, 36866, 17466, 36890, 36866, 21991, 24018, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21331, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 19485, 19501, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19537, 22390, 19568, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19596, 19611, 19457, 36866, 17466, 36890, 36866, 18246, 19627, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22242, 20553, 19457, 36866, 17466, 36890, 36866, 18648, 30477, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36472, 19288, 19457, 36866, 17466, 17809, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21770, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19643, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19672, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20538, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17975, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22345, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19726, 19742, 21529, 24035, 23112, 26225, 23511, 27749, 27397, 24035, 34360, 24035, 24036, 23114, 35166, 23114, 23114, 19758, 23511, 35247, 23511, 23511, 28447, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 19821, 23511, 23511, 23511, 23511, 23512, 19441, 36539, 24035, 24035, 24035, 24035, 19846, 19869, 23114, 23114, 23114, 28618, 32187, 19892, 23511, 23511, 23511, 34585, 20402, 36647, 24035, 24035, 24036, 23114, 33757, 23114, 23114, 23029, 20271, 23511, 27070, 23511, 23511, 30562, 24035, 24035, 29274, 26576, 23114, 23114, 31118, 23036, 29695, 23511, 23511, 32431, 23634, 30821, 24035, 23110, 19913, 23114, 23467, 31261, 23261, 34299, 19932, 24035, 32609, 19965, 35389, 19984, 27689, 19830, 29391, 29337, 20041, 22643, 35619, 33728, 20062, 20121, 20166, 35100, 26145, 20211, 23008, 19876, 20208, 20227, 25670, 20132, 26578, 27685, 20141, 20243, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36094, 19288, 19457, 36866, 17466, 21724, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22735, 19552, 20287, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22750, 19288, 21529, 24035, 23112, 28056, 23511, 29483, 28756, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 20327, 23511, 23511, 23511, 23511, 31156, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 20371, 23511, 23511, 23511, 23511, 27443, 20395, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 29457, 29700, 23511, 23511, 23511, 23511, 33444, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 28350, 20421, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 20447, 20475, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20523, 22257, 20569, 20783, 21715, 17603, 20699, 20837, 20614, 20630, 21149, 20670, 21405, 17486, 17509, 17525, 18373, 19179, 20695, 20716, 20732, 20755, 19194, 18042, 21641, 20592, 20779, 20598, 21412, 17470, 17591, 20896, 17468, 17619, 20799, 20700, 21031, 20744, 20699, 20828, 18075, 21259, 20581, 20853, 18048, 20868, 20884, 17756, 17784, 17800, 17825, 17854, 21171, 21200, 20931, 20947, 21378, 20955, 20971, 18086, 20645, 21002, 20986, 18178, 17960, 18012, 18381, 18064, 29176, 21044, 21438, 21018, 21122, 21393, 21060, 21844, 21094, 20654, 17493, 18150, 18166, 18214, 25967, 20763, 21799, 21110, 21830, 21138, 21246, 21301, 18336, 18361, 21165, 21187, 20812, 21216, 21232, 21287, 21317, 18553, 21347, 21363, 21428, 21454, 21271, 21483, 21499, 21515, 21575, 21467, 18712, 21591, 21633, 21078, 18189, 18198, 20679, 21657, 21701, 21074, 21687, 21740, 21756, 21786, 21815, 21860, 21876, 21892, 21946, 21962, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36457, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 36813, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 21981, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 22151, 22007, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 27898, 17884, 18890, 17906, 17928, 22042, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 22070, 22112, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 22142, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36109, 19288, 18469, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22167, 19288, 19457, 36866, 17466, 17768, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22227, 36487, 22273, 36866, 17466, 36890, 36866, 19316, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18749, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 22304, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19580, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22330, 19089, 19457, 36866, 17466, 18721, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22765, 19347, 19457, 36866, 17466, 36890, 36866, 18114, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34541, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 22540, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29908, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22561, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 23837, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22584, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36442, 19288, 21605, 24035, 23112, 28137, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 31568, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22690, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 27584, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 22659, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22360, 19552, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22675, 22811, 19457, 36866, 17466, 36890, 36866, 19133, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22827, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36064, 19288, 22865, 22881, 32031, 22897, 22913, 22956, 29939, 24035, 24035, 24035, 23003, 23114, 23114, 23114, 23024, 22420, 23511, 23511, 23511, 23052, 29116, 23073, 29268, 24035, 25563, 26915, 23106, 23131, 23114, 23114, 23159, 23181, 23197, 23248, 23511, 23511, 23282, 23305, 22493, 32364, 24035, 33472, 30138, 26325, 31770, 33508, 27345, 33667, 23114, 23321, 23473, 23351, 35793, 36576, 23511, 23375, 22500, 24145, 24035, 29197, 20192, 24533, 23440, 23114, 19017, 23459, 22839, 23489, 23510, 23511, 33563, 23528, 32076, 25389, 24035, 26576, 23561, 23583, 23114, 32683, 22516, 23622, 23655, 23511, 23634, 35456, 37144, 23110, 23683, 34153, 20499, 32513, 25824, 23705, 24035, 24035, 23111, 23114, 19874, 27078, 33263, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 20507, 32241, 20150, 31862, 27464, 35108, 23727, 23007, 35895, 34953, 26578, 27685, 20141, 24569, 31691, 19787, 33967, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36427, 19552, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 27027, 26576, 23114, 23114, 23114, 31471, 23756, 22468, 23511, 23511, 23511, 34687, 23772, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 23788, 24035, 24035, 24035, 21559, 23828, 23114, 23114, 23114, 25086, 22839, 23853, 23511, 23511, 23511, 23876, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 31761, 23909, 23953, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36049, 19288, 21605, 30825, 23112, 23987, 23511, 24003, 31001, 27617, 24034, 24035, 24036, 24052, 24089, 23114, 23114, 22420, 24109, 24168, 23511, 23511, 29116, 24188, 27609, 20017, 29516, 24035, 26576, 24222, 19968, 23114, 24252, 33811, 22468, 24270, 33587, 23511, 24320, 27443, 22493, 24035, 24035, 24035, 24035, 24339, 23113, 23114, 23114, 23114, 28128, 28618, 29700, 23511, 23511, 23511, 28276, 34564, 20402, 24035, 24035, 32929, 24036, 23114, 23114, 23114, 24357, 23029, 22839, 23511, 23511, 23511, 24377, 25645, 24035, 34112, 24035, 26576, 23114, 26643, 23114, 32683, 22516, 23511, 25638, 23511, 23711, 24035, 24395, 27809, 23114, 24414, 20499, 24432, 30917, 23628, 24035, 30680, 23111, 23114, 30233, 27078, 25748, 24452, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 24475, 19829, 26577, 26597, 26154, 24519, 24556, 24596, 23007, 20046, 20132, 26578, 24634, 20141, 24569, 31691, 24679, 24727, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36412, 19288, 21605, 19943, 34861, 32618, 26027, 29483, 32016, 32050, 36233, 24776, 35574, 24801, 24819, 32671, 31289, 22420, 24868, 24886, 20087, 26849, 29116, 19803, 24035, 24035, 24035, 36228, 26576, 23114, 23114, 23114, 24981, 33811, 22468, 23511, 23511, 23511, 29028, 27443, 22493, 24923, 27965, 24035, 24035, 32797, 24946, 23443, 23114, 23114, 29636, 24997, 22849, 28252, 23511, 23511, 23511, 25042, 25110, 24035, 24035, 34085, 24036, 25133, 23114, 23114, 25152, 23029, 22839, 25169, 23511, 36764, 23511, 25645, 30403, 24035, 25186, 26576, 31806, 24093, 25212, 32683, 22516, 32713, 26245, 34293, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 32406, 23111, 23114, 28676, 30944, 27689, 25234, 24035, 23112, 19872, 37063, 23266, 24036, 23114, 30243, 20379, 26100, 29218, 20211, 30105, 25257, 25284, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 24834, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36034, 19288, 21671, 25314, 25072, 25330, 25346, 25362, 29939, 29951, 35288, 29984, 23812, 27216, 25405, 25424, 30456, 22584, 26292, 25461, 25480, 31592, 29116, 25516, 34963, 25545, 27007, 25579, 33937, 25614, 25661, 25686, 34872, 25702, 25718, 25734, 25769, 25795, 25811, 25840, 22493, 26533, 25856, 24035, 25876, 30763, 27481, 25909, 23114, 28987, 25936, 25954, 29700, 25983, 23511, 31412, 26043, 26063, 22568, 29241, 29592, 26116, 31216, 35383, 26170, 34783, 26194, 26221, 22839, 26241, 26261, 22477, 26283, 26308, 27306, 31035, 24655, 26576, 29854, 33386, 26341, 32683, 22516, 32153, 30926, 26361, 19996, 26381, 35463, 26397, 26424, 34646, 26478, 35605, 31386, 26494, 35567, 31964, 22940, 23689, 25218, 30309, 32289, 19830, 33605, 23112, 32109, 27733, 27084, 24496, 35886, 35221, 26525, 36602, 26549, 26558, 26574, 26594, 26613, 26629, 26666, 26700, 26578, 27685, 23740, 24285, 31691, 26733, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36397, 19552, 18991, 25887, 28117, 32618, 26776, 29483, 29939, 26802, 24035, 24035, 24036, 28664, 23114, 23114, 23114, 22420, 30297, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 25559, 26576, 23114, 23114, 23114, 30525, 33811, 22468, 23511, 23511, 23511, 28725, 27443, 22493, 24035, 24035, 27249, 24035, 24035, 23113, 23114, 23114, 26827, 23114, 28618, 29700, 23511, 23511, 26845, 23511, 34564, 20402, 24035, 24035, 26979, 24036, 23114, 23114, 23114, 24974, 23029, 22839, 23511, 23511, 23511, 26865, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 33305, 24035, 25598, 23114, 19874, 34253, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 26886, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 26931, 24569, 26439, 26947, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36019, 19288, 26995, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 27043, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 27061, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 29978, 24035, 24035, 23113, 23114, 33114, 23114, 23114, 30010, 29700, 23511, 35913, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 27155, 26576, 23114, 23114, 30447, 23036, 29695, 23511, 23511, 30935, 20099, 24152, 25529, 27100, 34461, 27121, 22625, 29156, 26009, 27137, 30422, 31903, 31655, 28870, 27171, 32439, 31731, 19830, 27232, 22612, 27265, 26786, 25494, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 20342, 27288, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 27322, 27339, 28020, 27361, 27382, 29939, 24035, 24035, 32581, 24036, 23114, 23114, 23114, 27425, 22420, 23511, 23511, 23511, 27442, 28306, 19803, 24035, 24035, 24035, 24035, 26710, 23114, 23114, 23114, 23114, 32261, 22468, 23511, 23511, 23511, 23511, 35719, 24694, 29510, 24035, 24035, 24035, 24035, 26717, 23114, 23114, 23114, 23114, 28618, 32217, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 27459, 23114, 23114, 23114, 36252, 23029, 20271, 23511, 23511, 23511, 28840, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 27480, 34483, 28401, 29761, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36382, 19288, 21605, 27497, 27517, 28504, 28898, 27569, 29939, 29401, 27600, 27323, 27633, 19025, 27662, 23114, 27705, 22420, 20483, 27721, 23511, 27765, 28306, 19803, 23540, 24035, 24610, 27781, 27805, 26650, 23114, 28573, 32990, 25920, 22468, 26870, 23511, 26684, 34262, 34737, 25057, 34622, 24035, 24035, 23971, 24206, 27825, 27847, 23114, 23114, 27865, 27885, 35766, 27914, 23511, 23511, 32766, 32844, 27934, 28795, 26909, 27955, 26092, 27988, 25445, 28005, 28036, 28052, 21965, 23511, 32196, 19897, 28072, 28102, 36534, 21541, 23801, 28153, 28180, 28197, 28221, 23036, 32695, 28251, 28268, 28292, 23667, 34825, 23930, 24580, 28322, 28344, 31627, 28366, 25996, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 35625, 33477, 33359, 27674, 28393, 33992, 24036, 23114, 30243, 19829, 28417, 28433, 28463, 23008, 19876, 20208, 23007, 20046, 20132, 28489, 28520, 20141, 24569, 31691, 19787, 28550, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 28589, 24035, 24035, 24035, 24035, 28608, 23114, 23114, 23114, 23114, 28618, 20431, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36004, 19288, 28634, 31951, 28565, 28702, 28718, 28741, 32544, 20175, 28792, 32086, 20105, 28811, 29059, 29862, 28856, 22420, 28886, 30354, 23359, 28922, 28306, 28952, 23888, 26320, 36506, 24035, 29331, 28968, 36609, 23114, 29003, 31661, 27061, 30649, 27366, 23511, 29023, 27918, 24694, 24035, 24035, 23893, 33094, 30867, 23113, 23114, 23114, 29044, 34184, 30010, 29700, 23511, 23511, 29081, 29102, 34585, 20402, 27789, 24035, 24035, 24036, 23114, 29132, 23114, 23114, 23029, 20271, 23511, 29153, 23511, 23511, 30562, 30174, 24035, 24035, 27409, 25438, 23114, 23114, 29172, 36668, 31332, 23511, 23511, 29192, 30144, 24035, 23110, 30203, 23114, 23467, 31544, 23261, 23628, 24035, 22545, 23111, 23114, 29213, 27078, 27689, 29234, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 29257, 23008, 19876, 20208, 28768, 29290, 29320, 34776, 29353, 20141, 22435, 29378, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36367, 19288, 21605, 34616, 19006, 32618, 31497, 31507, 36216, 20184, 24035, 34393, 29424, 34668, 23114, 34900, 29447, 22420, 30360, 23511, 37089, 29473, 28306, 19803, 29499, 24398, 24035, 24035, 26576, 31799, 29532, 29550, 23114, 33811, 22468, 32298, 29571, 31184, 23511, 23512, 37127, 36628, 29589, 24035, 24135, 24035, 23113, 29608, 23114, 27831, 29634, 28618, 29652, 30037, 23511, 24172, 29671, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 29555, 29690, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 29719, 24035, 23110, 29738, 23114, 23467, 34035, 29756, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 29777, 34364, 28181, 30243, 29799, 31920, 27272, 27185, 23008, 31126, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29828, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35989, 19552, 19687, 35139, 28649, 29878, 29894, 29924, 29939, 23224, 23085, 31969, 24036, 35173, 24752, 24803, 23114, 22420, 31190, 30318, 24870, 23511, 28306, 29967, 23967, 24035, 24035, 24035, 26576, 30000, 23114, 23114, 23114, 33811, 22468, 30026, 23511, 23511, 23511, 23512, 26078, 24035, 24035, 24035, 30053, 37137, 30071, 23114, 23114, 33368, 25136, 28618, 30723, 23511, 23511, 37096, 31356, 34585, 20402, 30092, 30127, 30160, 24036, 35740, 30219, 24960, 30259, 23029, 20271, 34042, 30285, 30342, 30376, 23289, 30055, 30400, 30419, 30438, 32640, 33532, 33514, 30472, 18792, 26267, 24323, 23057, 30493, 23639, 20008, 30196, 33188, 30517, 20075, 23511, 30541, 23628, 30578, 33928, 28776, 30594, 19874, 30610, 30637, 19830, 30677, 27646, 19872, 25779, 23266, 23232, 35016, 30243, 30696, 29812, 30712, 30746, 27206, 30779, 30807, 23007, 33395, 20132, 26578, 27685, 31703, 22928, 31691, 19787, 31079, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36352, 19288, 23335, 30841, 26131, 30888, 30904, 30986, 29939, 24035, 24704, 31017, 20025, 23114, 26178, 31051, 31095, 22420, 23511, 22524, 31142, 31172, 28534, 31206, 35497, 25196, 24035, 28592, 24503, 23114, 31239, 31285, 23114, 31305, 31321, 31355, 31372, 31407, 23511, 30556, 24694, 24035, 27501, 19805, 24035, 24035, 23113, 23114, 31428, 24066, 23114, 28618, 29700, 23511, 31837, 18809, 23511, 34585, 31448, 24035, 24035, 24035, 23090, 23114, 23114, 23114, 23114, 31619, 35038, 23511, 23511, 23511, 23511, 33714, 24035, 33085, 24035, 29431, 23114, 31467, 23114, 23143, 31487, 23511, 31523, 23511, 35195, 36783, 24035, 30111, 23567, 23114, 23467, 31543, 31560, 23628, 24035, 24035, 23111, 23114, 19874, 30953, 31584, 34508, 24035, 31608, 26345, 37055, 23266, 31643, 31677, 31719, 31747, 31786, 31822, 26898, 23008, 19876, 31859, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 31878, 31936, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35974, 19288, 21605, 27972, 35663, 31985, 29655, 32001, 36715, 24785, 25893, 23545, 31912, 19853, 19916, 25938, 24540, 22420, 31843, 29674, 29573, 32735, 28936, 19803, 24035, 24035, 32047, 24035, 26576, 23114, 23114, 27544, 23114, 33811, 22468, 23511, 23511, 32161, 23511, 23512, 32066, 24035, 33313, 24035, 24035, 24035, 23113, 27426, 32102, 23114, 23114, 28618, 32125, 23511, 32144, 23511, 23511, 33569, 20402, 24035, 27045, 24035, 24036, 23114, 23114, 28328, 23114, 30076, 32177, 23511, 23511, 30384, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23595, 32212, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 22635, 25753, 32233, 32257, 32277, 19829, 26577, 26597, 20211, 23008, 19876, 32322, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 32352, 35285, 32380, 34196, 33016, 30661, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 32404, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 32422, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 30269, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 19949, 24035, 23111, 32455, 19874, 31269, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36337, 19552, 19209, 21617, 26509, 32475, 32491, 32529, 29939, 24035, 32578, 25241, 32597, 23114, 32634, 29007, 32656, 22420, 23511, 32729, 26365, 32751, 28306, 32788, 32882, 24035, 24035, 32813, 36727, 23114, 33182, 23114, 27553, 33235, 32829, 23511, 32706, 23511, 28906, 28377, 26962, 32881, 32904, 32898, 32920, 24035, 32953, 23114, 32977, 26408, 23114, 28164, 33006, 23511, 33039, 35774, 23511, 32306, 20402, 33076, 30872, 24035, 24036, 25408, 33110, 28979, 23114, 23029, 20271, 35835, 33130, 33054, 23511, 30562, 33148, 24035, 24035, 33167, 23114, 23114, 33775, 23036, 20459, 23511, 23511, 25464, 24646, 24035, 24035, 22446, 23114, 23114, 25627, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 31391, 33204, 33220, 33251, 33287, 26577, 26597, 20211, 33329, 19876, 33345, 23007, 20046, 20132, 26578, 27685, 28473, 22599, 31691, 33411, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35959, 19288, 21907, 27243, 29843, 32618, 33427, 31507, 29939, 33460, 34090, 24035, 24036, 33493, 24416, 33530, 23114, 22420, 33548, 24379, 33585, 23511, 28306, 19803, 33603, 24202, 24035, 24035, 25593, 33749, 28205, 23114, 23114, 32388, 22468, 33853, 33060, 23511, 23511, 31339, 33621, 24035, 24035, 34397, 24618, 30757, 33663, 23114, 23114, 33683, 35684, 28618, 26678, 23511, 23511, 32506, 33699, 34585, 20402, 24035, 32562, 26973, 24036, 23114, 23114, 33377, 33773, 23029, 20271, 23511, 23511, 30621, 23511, 23860, 24035, 33791, 21553, 26576, 36558, 23114, 33809, 23036, 32857, 26047, 23511, 33827, 23634, 24035, 24035, 23110, 23114, 23114, 31252, 23511, 33845, 23628, 24035, 24459, 23111, 23114, 33869, 27078, 30791, 29783, 24035, 24742, 19872, 33895, 23266, 26462, 19710, 33879, 33919, 26577, 26597, 24123, 24930, 21930, 20208, 30501, 33953, 25268, 20252, 33983, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36322, 19552, 23390, 33634, 35154, 34008, 34024, 34058, 35544, 34106, 34128, 26811, 33151, 34144, 34169, 34212, 23114, 34228, 34244, 34278, 34315, 23511, 34331, 34347, 34380, 34413, 24035, 24663, 26576, 34429, 34453, 34477, 29534, 33811, 22468, 34499, 34524, 34557, 25170, 34580, 35436, 23937, 34601, 24035, 24341, 26453, 23113, 34638, 34662, 23114, 24236, 28618, 34684, 34703, 34729, 23511, 35352, 34753, 34799, 24035, 34815, 32558, 34848, 34888, 35814, 34923, 23165, 29137, 23606, 30326, 30730, 34939, 33023, 30562, 36848, 34979, 24035, 24847, 34996, 23114, 23114, 35032, 29695, 35054, 23511, 23511, 35091, 33296, 35124, 24296, 28235, 24361, 36276, 32772, 35067, 35189, 27301, 30855, 24852, 22452, 35211, 35237, 35316, 25500, 35270, 23405, 24304, 35304, 29362, 24036, 23114, 35332, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 35368, 28823, 23920, 32336, 35405, 20141, 24569, 31691, 35421, 35479, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35944, 22795, 21605, 33647, 35877, 35513, 30962, 35529, 34073, 35557, 24035, 24035, 20405, 31107, 23114, 23114, 23114, 35590, 34713, 23511, 23511, 23511, 35641, 19803, 29408, 32937, 25298, 24035, 35657, 23115, 27849, 24760, 35679, 26205, 22468, 23511, 35700, 24907, 24901, 35075, 31893, 34980, 24035, 24035, 24035, 24035, 23113, 35009, 23114, 23114, 23114, 28618, 35716, 30970, 23511, 23511, 23511, 34585, 23215, 24035, 24035, 24035, 24036, 35735, 23114, 23114, 23114, 27105, 35756, 35790, 23511, 23511, 23511, 35254, 35446, 24035, 24035, 31223, 35809, 23114, 23114, 23036, 36825, 35830, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 31031, 20355, 19872, 33903, 23266, 24036, 23114, 28686, 19829, 26577, 26597, 20211, 23008, 23424, 20208, 24711, 31065, 24486, 26578, 27685, 20141, 19773, 35851, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36307, 19288, 21605, 35494, 19702, 32618, 33437, 31507, 29939, 25117, 24035, 27939, 24036, 27869, 23114, 26829, 23114, 22420, 23494, 23511, 33132, 23511, 28306, 19803, 24035, 34832, 24035, 24035, 26576, 23114, 25153, 23114, 23114, 33811, 22468, 23511, 23511, 35911, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35929, 19288, 21605, 25860, 23112, 36185, 23511, 36201, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 26748, 24035, 24035, 24035, 24035, 24035, 36249, 23114, 23114, 23114, 23114, 28618, 28835, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 27151, 24035, 26760, 23114, 27989, 23114, 23114, 36268, 20271, 23511, 24436, 23511, 29703, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36292, 19288, 21605, 36503, 21922, 32618, 34534, 31507, 36522, 24035, 33793, 24035, 35864, 23114, 23114, 36555, 23417, 22420, 23511, 23511, 36574, 26020, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 36592, 24035, 24035, 36625, 24035, 24035, 23113, 23114, 32961, 23114, 23114, 29618, 29700, 23511, 29086, 23511, 23511, 34585, 20402, 36644, 24035, 24035, 24036, 29740, 23114, 23114, 23114, 29065, 36663, 31527, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 31451, 23112, 36684, 23511, 36700, 29939, 24035, 24035, 24035, 30185, 23114, 23114, 23114, 27526, 22420, 23511, 23511, 23511, 32865, 28306, 19803, 36743, 24035, 27017, 24035, 26576, 27535, 23114, 31432, 23114, 33811, 22468, 33271, 23511, 32128, 23511, 23512, 24694, 24035, 27196, 24035, 24035, 24035, 23113, 32459, 23114, 23114, 23114, 28618, 29700, 33829, 36762, 23511, 23511, 34585, 20402, 24035, 36746, 24035, 29722, 23114, 23114, 34437, 23114, 34907, 20271, 23511, 23511, 18801, 23511, 23206, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 36837, 24035, 24035, 33739, 23114, 23114, 25094, 23511, 23261, 23628, 24035, 36780, 23111, 24073, 19874, 27078, 35344, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22720, 19288, 36799, 36866, 17466, 36890, 36864, 21991, 22211, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17631, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22705, 19288, 19457, 36866, 17466, 36890, 36866, 19375, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36124, 19288, 36951, 36866, 17466, 36890, 36866, 21991, 22404, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18567, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36979, 36995, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18027, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 21529, 24035, 23112, 23033, 23511, 31507, 25377, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 37040, 23511, 23511, 23511, 23511, 28086, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 37079, 23511, 23511, 23511, 23511, 23512, 34766, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 37112, 37160, 18469, 36866, 17466, 36890, 36866, 17656, 37174, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18537, 22984, 17553, 17572, 22285, 18780, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 0, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 127011, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2576384, 2215936, 2215936, 2215936, 2416640, 2424832, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2543616, 2215936, 2215936, 2215936, 2215936, 2215936, 2629632, 2215936, 2617344, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2691072, 2215936, 2707456, 2215936, 2715648, 2215936, 2723840, 2764800, 2215936, 2215936, 2797568, 2215936, 2822144, 2215936, 2215936, 2854912, 2215936, 2215936, 2215936, 2912256, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 180224, 0, 0, 2174976, 0, 0, 2170880, 2617344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2691072, 2170880, 2707456, 2170880, 2715648, 2170880, 2723840, 2764800, 2170880, 2170880, 2797568, 2170880, 2170880, 2797568, 2170880, 2822144, 2170880, 2170880, 2854912, 2170880, 2170880, 2170880, 2912256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2609152, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2654208, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 184599, 280, 0, 2174976, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 544, 0, 546, 0, 0, 2179072, 0, 0, 0, 552, 0, 0, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2158592, 2158592, 2232320, 2232320, 0, 2240512, 2240512, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 2768896, 2789376, 2813952, 2170880, 2170880, 2170880, 2875392, 2904064, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 167936, 0, 0, 0, 0, 2174976, 0, 0, 2215936, 2215936, 2514944, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2592768, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 32768, 0, 0, 0, 0, 0, 2174976, 32768, 0, 2633728, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2711552, 2215936, 2215936, 2215936, 2215936, 2215936, 2760704, 2768896, 2789376, 2813952, 2215936, 2215936, 2215936, 2875392, 2904064, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 65819, 2215936, 2215936, 3031040, 2215936, 3055616, 2215936, 2215936, 2215936, 2215936, 3092480, 2215936, 2215936, 3125248, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2170880, 2170880, 2494464, 2170880, 2170880, 0, 0, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 2699264, 2170880, 2727936, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3026944, 2170880, 2170880, 3063808, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 2379776, 2215936, 2523136, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2596864, 2215936, 2621440, 2215936, 2215936, 2641920, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 548, 0, 0, 0, 0, 287, 2170880, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2699264, 2215936, 2727936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2879488, 2215936, 2916352, 2215936, 2215936, 0, 0, 0, 0, 188416, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 0, 2171019, 2171019, 2171019, 2400395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3031179, 2171019, 3055755, 2171019, 2171019, 2215936, 3133440, 2215936, 2215936, 2215936, 3162112, 2215936, 2215936, 3182592, 3186688, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2523275, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2597003, 2171019, 2621579, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 4337664, 28, 2170880, 2170880, 2170880, 2629632, 2170880, 2170880, 2170880, 2170880, 2719744, 2744320, 2170880, 2170880, 2170880, 2834432, 2838528, 2170880, 2908160, 2170880, 2170880, 2936832, 2215936, 2215936, 2215936, 2215936, 2719744, 2744320, 2215936, 2215936, 2215936, 2834432, 2838528, 2215936, 2908160, 2215936, 2215936, 2936832, 2215936, 2215936, 2985984, 2215936, 2994176, 2215936, 2215936, 3014656, 2215936, 3059712, 3076096, 3088384, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2445312, 2215936, 2465792, 2473984, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2171019, 2494603, 2171019, 2171019, 2215936, 2215936, 2215936, 3215360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3016168, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 124, 124, 0, 128, 128, 2170880, 2170880, 2170880, 3215360, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2535424, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 0, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2170880, 2170880, 3170304, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 2215936, 2215936, 2215936, 2535424, 2539520, 2215936, 2215936, 2588672, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 136, 0, 2215936, 2215936, 2920448, 2215936, 2215936, 2215936, 2990080, 2215936, 2215936, 2215936, 2215936, 3051520, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3108864, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3026944, 2215936, 2215936, 3063808, 2215936, 2215936, 3112960, 2215936, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2537049, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 1508, 2170880, 2170880, 2170880, 1512, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2686976, 2748416, 2170880, 2170880, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3121152, 2170880, 2170880, 3145728, 3158016, 3166208, 2170880, 2420736, 2428928, 2170880, 2478080, 2170880, 2170880, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 0, 0, 3145728, 3158016, 3166208, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 0, 2170880, 2215936, 2215936, 2580480, 2215936, 2605056, 2637824, 2215936, 2215936, 2686976, 2748416, 2215936, 2215936, 2215936, 2924544, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 286, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 1625, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 647, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2686976, 0, 0, 2748416, 2170880, 2170880, 0, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 0, 0, 28, 28, 2170880, 3141632, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2170880, 2420736, 2428928, 2752512, 2756608, 0, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2170880, 3141632, 2170880, 2170880, 2490368, 2215936, 2490368, 2215936, 2215936, 2215936, 2547712, 2555904, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 245760, 0, 3129344, 2170880, 2170880, 2490368, 2170880, 2170880, 2170880, 0, 0, 2547712, 2555904, 2170880, 2170880, 2170880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 45056, 0, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 97, 97, 97, 97, 97, 97, 97, 1354, 97, 97, 97, 97, 97, 97, 97, 97, 1148, 97, 97, 97, 97, 97, 97, 97, 2584576, 2170880, 2170880, 1512, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2170880, 2850816, 2170880, 2170880, 2170880, 3022848, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 2215936, 3022848, 2170880, 2441216, 2170880, 2527232, 0, 0, 2170880, 2600960, 2170880, 0, 2850816, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2596864, 2170880, 2621440, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 3022848, 2170880, 2519040, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2514944, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2519040, 0, 2024, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 2024, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 2170880, 2215936, 2650112, 2965504, 2215936, 0, 0, 2170880, 2650112, 2965504, 2170880, 2551808, 2170880, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 141, 45, 45, 67, 67, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 0, 2551808, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2977792, 2977792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 29, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 49172, 0, 0, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 4256099, 4256099, 24, 24, 0, 28, 28, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 0, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 2170880, 2547712, 2555904, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2215936, 2215936, 543, 543, 545, 545, 0, 0, 2179072, 0, 550, 551, 551, 0, 287, 2171166, 2171166, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 645, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 149, 2584576, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2519040, 0, 0, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 0, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 53264, 18, 49172, 57366, 24, 155648, 28, 102432, 155648, 155687, 114730, 106539, 0, 0, 155648, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 0, 0, 2220032, 0, 94208, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 208896, 18, 278528, 24, 24, 0, 28, 28, 53264, 18, 159765, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 139394, 28, 28, 102432, 131, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 32768, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 546, 0, 0, 2183168, 0, 0, 552, 832, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2654208, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 1084, 0, 1088, 0, 1092, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 937, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 644, 0, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 826, 0, 828, 0, 0, 2183168, 0, 0, 830, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2170880, 2170880, 2633728, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 53264, 18, 49172, 57366, 24, 8192, 28, 172066, 172032, 110630, 172066, 106539, 0, 0, 172032, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 102432, 0, 98304, 0, 0, 2220032, 110630, 0, 0, 0, 0, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 45056, 0, 0, 0, 53264, 18, 49172, 57366, 25, 8192, 30, 102432, 0, 110630, 114730, 106539, 0, 0, 176219, 53264, 18, 18, 49172, 0, 57366, 0, 124, 124, 124, 0, 128, 128, 128, 128, 102432, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 546, 0, 0, 2183168, 0, 65536, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 143, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1824, 67, 1826, 67, 67, 67, 67, 17, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 120, 121, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 2179072, 548, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2033, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 978, 0, 546, 70179, 0, 2183168, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1013, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 67, 67, 67, 483, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1359, 97, 97, 97, 67, 67, 1584, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 45, 45, 45, 45, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 774, 67, 67, 1713, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1723, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 45, 1559, 45, 45, 1561, 45, 45, 45, 45, 45, 45, 45, 687, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1771, 1772, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 1827, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 1614, 97, 97, 97, 97, 97, 603, 97, 97, 605, 97, 97, 608, 97, 97, 97, 97, 0, 1532, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 450, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 1839, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 1883, 97, 1885, 97, 0, 1888, 0, 97, 97, 0, 97, 97, 1848, 97, 97, 97, 97, 1852, 45, 45, 45, 45, 45, 45, 45, 384, 391, 45, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 45, 45, 45, 45, 1237, 45, 45, 45, 45, 45, 45, 67, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1951, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1963, 97, 2023, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 1994, 67, 1995, 67, 67, 67, 67, 67, 67, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 137, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2793472, 2805760, 2170880, 2830336, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 281, 549, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2031, 2032, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 0, 546, 70179, 549, 549, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1858, 45, 641, 0, 0, 0, 0, 41606, 926, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 456, 67, 0, 0, 0, 1313, 0, 0, 0, 1096, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1110, 97, 97, 97, 97, 67, 67, 67, 67, 1301, 1476, 0, 0, 0, 0, 1307, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1486, 97, 1487, 97, 1313, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 97, 45, 1853, 45, 1855, 45, 45, 45, 45, 53264, 18, 49172, 57366, 26, 8192, 31, 102432, 0, 110630, 114730, 106539, 0, 0, 225368, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 18, 49172, 163840, 57366, 0, 24, 24, 229376, 0, 28, 28, 28, 229376, 102432, 0, 0, 0, 0, 2220167, 110630, 0, 0, 0, 114730, 106539, 0, 2171019, 2171019, 2171019, 2171019, 2592907, 2171019, 2171019, 2171019, 2171019, 2633867, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2654347, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3117195, 2171019, 2171019, 2171019, 2171019, 2240641, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 140, 2171019, 2171019, 2171019, 2416779, 2424971, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2617483, 2171019, 2171019, 2642059, 2171019, 2171019, 2171019, 2699403, 2171019, 2728075, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3215499, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2171019, 2822283, 2171019, 2171019, 2855051, 2171019, 2171019, 2171019, 2912395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3002507, 2171019, 2171019, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2171166, 2171166, 2416926, 2425118, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2576670, 2171166, 2617630, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2691358, 2171166, 2707742, 2171166, 2715934, 2171166, 2724126, 2765086, 2171166, 2171166, 2797854, 2171166, 2822430, 2171166, 2171166, 2855198, 2171166, 2171166, 2171166, 2912542, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2793758, 2806046, 2171166, 2830622, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3109150, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2543902, 2171166, 2171166, 2171166, 2171166, 2171166, 2629918, 2793611, 2805899, 2171019, 2830475, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2171166, 2171166, 2171166, 2400542, 2171166, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 0, 2171166, 2920734, 2171166, 2171166, 2171166, 2990366, 2171166, 2171166, 2171166, 2171166, 3117342, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 53264, 0, 18, 18, 4329472, 2232445, 0, 2240641, 4337664, 2711691, 2171019, 2171019, 2171019, 2171019, 2171019, 2760843, 2769035, 2789515, 2814091, 2171019, 2171019, 2171019, 2875531, 2904203, 2171019, 2171019, 3092619, 2171019, 2171019, 3125387, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3199115, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2793472, 2805760, 2215936, 2830336, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2494464, 2170880, 2170880, 2171166, 2171166, 2634014, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2711838, 2171166, 2171166, 2171166, 2171166, 2171166, 2760990, 2769182, 2789662, 2814238, 2171166, 2171166, 2171166, 2875678, 2904350, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3199262, 2171166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379915, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2445451, 2171019, 2465931, 2474123, 2171019, 2171019, 3113099, 2171019, 2171019, 3133579, 2171019, 2171019, 2171019, 3162251, 2171019, 2171019, 3182731, 3186827, 2171019, 2379776, 2879627, 2171019, 2916491, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3027083, 2171019, 2171019, 3063947, 2699550, 2171166, 2728222, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2879774, 2171166, 2916638, 2171166, 2171166, 2171166, 2171166, 2171166, 2609438, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2654494, 2171166, 2171166, 2171166, 2171166, 2171166, 2445598, 2171166, 2466078, 2474270, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2523422, 2171019, 2437259, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2543755, 2171019, 2171019, 2171019, 2584715, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2908299, 2171019, 2171019, 2936971, 2171019, 2171019, 2986123, 2171019, 2994315, 2171019, 2171019, 3014795, 2171019, 3059851, 3076235, 3088523, 2171166, 2171166, 2986270, 2171166, 2994462, 2171166, 2171166, 3014942, 2171166, 3059998, 3076382, 3088670, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3027230, 2171166, 2171166, 3064094, 2171166, 2171166, 3113246, 2171166, 2171166, 3133726, 2506891, 2171019, 2171019, 2171019, 2535563, 2539659, 2171019, 2171019, 2588811, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2691211, 2171019, 2707595, 2171019, 2715787, 2171019, 2723979, 2764939, 2171019, 2171019, 2797707, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2453790, 2457886, 2171166, 2171166, 2171166, 2486558, 2171166, 2171166, 2507038, 2171166, 2171166, 2171166, 2535710, 2539806, 2171166, 2171166, 2588958, 2171166, 2171166, 2171166, 2171166, 2515230, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2593054, 2171166, 2171166, 2171166, 2171166, 3051806, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3170590, 0, 2388107, 2392203, 2171019, 2171019, 2433163, 2171019, 2461835, 2171019, 2171019, 2171019, 2510987, 2171019, 2171019, 2171019, 2171019, 2580619, 2171019, 2605195, 2637963, 2171019, 2171019, 2171019, 2920587, 2171019, 2171019, 2171019, 2990219, 2171019, 2171019, 2171019, 2171019, 3051659, 2171019, 2171019, 2171019, 2453643, 2457739, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2515083, 2171019, 2171019, 2171019, 2171019, 2646155, 2670731, 2752651, 2756747, 2846859, 2961547, 2171019, 2998411, 2171019, 3010699, 2171019, 2171019, 2687115, 2748555, 2171019, 2171019, 2171019, 2924683, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3121291, 2171019, 2171019, 2171019, 3170443, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 3145867, 3158155, 3166347, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 553, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2388254, 2392350, 2171166, 2171166, 2433310, 2171166, 2461982, 2171166, 2171166, 2171166, 2511134, 2171166, 2171166, 0, 2171166, 2171166, 2580766, 2171166, 2605342, 2638110, 2171166, 2171166, 2171166, 2171166, 3031326, 2171166, 3055902, 2171166, 2171166, 2171166, 2171166, 3092766, 2171166, 2171166, 3125534, 2171166, 2171166, 2171166, 3162398, 2171166, 2171166, 3182878, 3186974, 2171166, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 3109003, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2171166, 2687262, 0, 0, 2748702, 2171166, 2171166, 0, 2171166, 2924830, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2597150, 2171166, 2621726, 2171166, 2171166, 2642206, 2171166, 2171166, 2171166, 2171166, 3121438, 2171166, 2171166, 3146014, 3158302, 3166494, 2171019, 2420875, 2429067, 2171019, 2478219, 2171019, 2171019, 2171019, 2171019, 2547851, 2556043, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3129483, 2215936, 2171019, 3141771, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2171166, 2421022, 2429214, 2171166, 2478366, 2171166, 2171166, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2646302, 2670878, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 0, 45, 45, 45, 45, 45, 1405, 1406, 45, 45, 45, 45, 1409, 45, 45, 45, 45, 45, 1415, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1238, 45, 45, 45, 45, 67, 2752798, 2756894, 0, 2847006, 2961694, 2171166, 2998558, 2171166, 3010846, 2171166, 2171166, 2171166, 3141918, 2171019, 2171019, 2490507, 3129344, 2171166, 2171166, 2490654, 2171166, 2171166, 2171166, 0, 0, 2547998, 2556190, 2171166, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 167, 45, 45, 45, 45, 185, 187, 45, 45, 198, 45, 45, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3129630, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2576523, 2171019, 2171019, 2171019, 2171019, 2171019, 2609291, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2171166, 2171166, 2494750, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 147, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 3002654, 2171166, 2171166, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2175257, 0, 0, 2584862, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2441355, 2171019, 2527371, 2171019, 2601099, 2171019, 2850955, 2171019, 2171019, 2171019, 3022987, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 69632, 287, 2170880, 2215936, 3022848, 2171166, 2441502, 2171166, 2527518, 0, 0, 2171166, 2601246, 2171166, 0, 2851102, 2171166, 2171166, 2171166, 2171166, 2720030, 2744606, 2171166, 2171166, 2171166, 2834718, 2838814, 2171166, 2908446, 2171166, 2171166, 2937118, 3023134, 2171019, 2519179, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 3215646, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2486411, 2171019, 2171019, 2171019, 2629771, 2171019, 2171019, 2171019, 2171019, 2719883, 2744459, 2171019, 2171019, 2171019, 2834571, 2838667, 2171019, 2519326, 0, 0, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 2396299, 2171019, 2171019, 2171019, 2171019, 3018891, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396446, 0, 0, 2171166, 2171166, 2171166, 2171166, 3019038, 2171019, 2650251, 2965643, 2171019, 2215936, 2650112, 2965504, 2215936, 0, 0, 2171166, 2650398, 2965790, 2171166, 2551947, 2171019, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 144, 45, 45, 67, 67, 67, 67, 67, 228, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1929, 97, 97, 97, 97, 0, 0, 0, 2552094, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2977931, 2977792, 2978078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1321, 97, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 140, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2584576, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 140, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3215360, 544, 0, 0, 0, 544, 0, 546, 0, 0, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 0, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 552, 0, 0, 0, 552, 0, 287, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 644, 0, 2215936, 2215936, 3170304, 544, 0, 546, 0, 552, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 140, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 249856, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 151640, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 253952, 110630, 114730, 106539, 0, 0, 32856, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 192512, 53264, 18, 18, 49172, 0, 57366, 0, 2232445, 184320, 2232445, 0, 2240641, 2240641, 184320, 2240641, 102432, 0, 0, 0, 221184, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3108864, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 0, 0, 0, 45056, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 127, 127, 53264, 18, 49172, 258071, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 204800, 53264, 18, 49172, 57366, 24, 27, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 33, 0, 33, 33, 33, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2170880, 2170880, 2170880, 2416640, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2030, 45, 45, 45, 45, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1699, 67, 67, 67, 67, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 1358, 97, 97, 97, 641, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 45, 45, 45, 0, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1680, 45, 45, 45, 641, 0, 924, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 45, 45, 45, 45, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 282, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 2028, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1767, 67, 67, 67, 0, 0, 0, 0, 0, 0, 1612, 97, 97, 97, 97, 97, 97, 0, 1785, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1790, 97, 0, 0, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 241664, 2387968, 2392064, 2170880, 2170880, 2433024, 53264, 19, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 274432, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 270336, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 1134711, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 1126440, 1126440, 1126440, 0, 0, 1126400, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 36, 110630, 114730, 106539, 0, 0, 217088, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 94, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 96, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 24666, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 126, 28, 28, 28, 28, 102432, 53264, 122, 123, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 2170880, 2170880, 4256099, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1109, 97, 97, 97, 97, 1113, 132, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 146, 150, 45, 45, 45, 45, 45, 175, 45, 180, 45, 186, 45, 189, 45, 45, 203, 67, 256, 67, 67, 270, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 293, 297, 97, 97, 97, 97, 97, 322, 97, 327, 97, 333, 97, 0, 0, 97, 2026, 0, 2027, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 336, 97, 97, 350, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 2424832, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2617344, 2170880, 45, 439, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 525, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 622, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 1527, 369, 648, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1239, 45, 45, 45, 67, 729, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 762, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 0, 0, 0, 1477, 0, 1086, 0, 0, 0, 1479, 0, 1090, 67, 67, 796, 67, 67, 799, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 67, 811, 67, 67, 67, 67, 67, 816, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 833, 97, 97, 97, 97, 97, 97, 97, 97, 1380, 0, 0, 0, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 45, 45, 45, 45, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 97, 97, 97, 894, 97, 97, 897, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1382, 45, 45, 45, 97, 909, 97, 97, 97, 97, 97, 914, 97, 97, 97, 97, 97, 97, 97, 923, 67, 67, 1079, 67, 67, 67, 67, 67, 37689, 1085, 25403, 1089, 66365, 1093, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 148, 1114, 97, 97, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 97, 97, 606, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1173, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 145, 45, 45, 67, 67, 67, 67, 67, 1762, 67, 67, 67, 1766, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1934, 67, 67, 1255, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 67, 67, 67, 67, 1297, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 33344, 97, 97, 97, 1335, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1377, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 670, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 67, 67, 1438, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1322, 97, 97, 1491, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 1553, 45, 1504, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 97, 97, 0, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 1540, 45, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1700, 67, 67, 67, 97, 1648, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1541, 0, 97, 97, 97, 97, 0, 1940, 0, 97, 97, 97, 97, 97, 97, 45, 45, 2011, 45, 45, 45, 2015, 67, 67, 2017, 67, 67, 67, 2021, 97, 67, 67, 812, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 97, 97, 910, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 0, 0, 0, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 1188, 45, 45, 45, 45, 1414, 45, 45, 45, 1417, 45, 1419, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 453, 45, 45, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 1324, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 930, 45, 45, 45, 45, 97, 97, 97, 97, 1378, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 45, 67, 67, 1923, 67, 1925, 67, 67, 1927, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1985, 45, 45, 45, 45, 45, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 45, 946, 45, 45, 950, 45, 45, 45, 0, 97, 97, 97, 1939, 0, 0, 0, 97, 1943, 97, 97, 1945, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 990, 45, 45, 45, 67, 257, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 337, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 2170880, 2170880, 2170880, 2416640, 401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 459, 461, 67, 67, 67, 67, 67, 67, 67, 67, 475, 67, 480, 67, 67, 67, 67, 67, 67, 1054, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 484, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 67, 67, 97, 556, 558, 97, 97, 97, 97, 97, 97, 97, 97, 572, 97, 577, 97, 97, 0, 0, 1896, 97, 97, 97, 97, 97, 97, 1903, 45, 45, 45, 45, 983, 45, 45, 45, 45, 988, 45, 45, 45, 45, 45, 45, 1195, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1549, 45, 45, 45, 45, 45, 581, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1004, 45, 45, 45, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 761, 67, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 1071, 67, 67, 67, 67, 1076, 794, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 544, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 859, 97, 0, 0, 2025, 97, 20480, 97, 97, 2029, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1775, 67, 67, 67, 97, 97, 97, 97, 892, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1515, 97, 993, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 992, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1607, 67, 67, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 97, 45, 1556, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 696, 45, 1596, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 67, 97, 97, 97, 1621, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1346, 97, 97, 97, 97, 1740, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 45, 45, 67, 97, 97, 97, 97, 97, 97, 1836, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1984, 97, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 45, 45, 45, 45, 67, 739, 67, 67, 67, 67, 67, 744, 45, 45, 1909, 45, 45, 45, 45, 45, 45, 45, 67, 1917, 67, 1918, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 67, 67, 67, 67, 67, 97, 1930, 97, 1931, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 1580, 67, 67, 0, 97, 97, 1938, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 699, 45, 45, 45, 704, 45, 45, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 2006, 97, 97, 97, 97, 0, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 722, 723, 45, 45, 45, 45, 45, 45, 2045, 67, 67, 67, 2047, 0, 0, 97, 97, 97, 2051, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1957, 45, 67, 67, 67, 67, 67, 1836, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 67, 67, 1761, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 45, 45, 420, 45, 45, 422, 45, 45, 425, 45, 45, 45, 45, 45, 45, 45, 387, 45, 45, 45, 45, 397, 45, 45, 45, 67, 460, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 515, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 97, 0, 2039, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1426, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1689, 67, 67, 67, 97, 557, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 612, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 896, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 97, 45, 939, 45, 45, 45, 45, 943, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1916, 67, 67, 67, 67, 67, 45, 67, 67, 67, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 1019, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 804, 67, 67, 67, 67, 67, 1077, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2543616, 2170880, 2170880, 2170880, 2170880, 2170880, 2629632, 1169, 97, 1171, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 936, 45, 45, 67, 67, 214, 67, 220, 67, 67, 233, 67, 243, 67, 248, 67, 67, 67, 67, 67, 67, 1298, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1617, 97, 0, 0, 0, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 45, 45, 45, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 1281, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 776, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 907, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 690, 45, 45, 695, 45, 45, 67, 67, 67, 67, 67, 1465, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1712, 97, 97, 97, 97, 1741, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1924, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1983, 97, 97, 45, 45, 1987, 45, 1988, 45, 0, 97, 97, 97, 97, 0, 0, 0, 1942, 97, 97, 97, 97, 97, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 711, 45, 45, 153, 45, 45, 166, 45, 176, 45, 181, 45, 45, 188, 191, 196, 45, 204, 255, 258, 263, 67, 271, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 97, 97, 294, 97, 300, 97, 97, 313, 97, 323, 97, 328, 97, 97, 335, 338, 343, 97, 351, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1411, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 67, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1263, 67, 67, 67, 67, 67, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1526, 97, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 0, 97, 97, 1796, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1744, 45, 45, 45, 369, 0, 651, 45, 653, 45, 654, 45, 656, 45, 45, 45, 660, 45, 45, 45, 45, 1558, 45, 45, 45, 45, 45, 45, 45, 45, 1566, 45, 45, 681, 45, 683, 45, 45, 45, 45, 45, 45, 45, 45, 691, 692, 694, 45, 45, 45, 716, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 709, 45, 45, 712, 45, 714, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 726, 45, 45, 45, 733, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 747, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 1613, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 67, 764, 67, 67, 67, 67, 768, 67, 770, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1977, 67, 778, 779, 781, 67, 67, 67, 67, 67, 67, 788, 789, 67, 67, 792, 793, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 67, 67, 824, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 836, 97, 838, 97, 839, 97, 841, 97, 97, 97, 845, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 97, 97, 0, 1728, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1802, 45, 97, 97, 862, 97, 97, 97, 97, 866, 97, 868, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1788, 97, 97, 97, 0, 0, 97, 97, 876, 877, 879, 97, 97, 97, 97, 97, 97, 886, 887, 97, 97, 890, 891, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 97, 97, 922, 923, 45, 955, 45, 957, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 195, 45, 45, 45, 45, 45, 981, 982, 45, 45, 45, 45, 45, 45, 989, 45, 45, 45, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 67, 67, 1031, 67, 1033, 67, 67, 67, 67, 67, 67, 67, 817, 819, 67, 67, 67, 67, 67, 37689, 544, 67, 1065, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 1078, 67, 67, 1081, 1082, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2437406, 2171166, 2171166, 97, 1115, 97, 1117, 97, 97, 97, 97, 97, 97, 1125, 97, 1127, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 1644, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 1642, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1159, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1502, 97, 97, 97, 97, 97, 1172, 97, 97, 1175, 1176, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 935, 45, 45, 45, 1233, 45, 45, 45, 1236, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1873, 67, 67, 45, 45, 1218, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 1230, 45, 45, 67, 67, 215, 219, 222, 67, 230, 67, 67, 244, 246, 249, 67, 67, 67, 67, 67, 67, 1882, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1904, 45, 1905, 45, 67, 67, 67, 67, 67, 1258, 67, 1260, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 67, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 67, 818, 67, 67, 67, 67, 67, 67, 37689, 544, 67, 67, 1295, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 97, 97, 97, 1326, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 97, 97, 97, 97, 97, 1338, 97, 1340, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 1503, 97, 1363, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 578, 97, 1375, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 45, 45, 45, 45, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1778, 97, 97, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 97, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 1554, 45, 1570, 1571, 45, 67, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 67, 1061, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 1594, 67, 67, 67, 67, 67, 97, 2038, 0, 97, 97, 97, 97, 97, 2044, 45, 45, 45, 995, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 45, 45, 45, 1809, 45, 1811, 45, 45, 45, 45, 45, 67, 1610, 1611, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 1618, 1647, 1649, 97, 97, 97, 1652, 97, 1654, 1655, 97, 0, 45, 45, 45, 1658, 45, 45, 67, 67, 216, 67, 67, 67, 67, 234, 67, 67, 67, 67, 252, 254, 1845, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 947, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1881, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1902, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1921, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 0, 97, 1937, 97, 97, 1940, 0, 0, 97, 97, 97, 97, 97, 97, 1947, 1948, 1949, 45, 45, 45, 1952, 45, 1954, 45, 45, 45, 45, 1959, 1960, 1961, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 67, 67, 1964, 67, 1966, 67, 67, 67, 67, 1971, 1972, 1973, 97, 0, 0, 0, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 884, 97, 97, 97, 889, 97, 97, 1978, 97, 0, 0, 1981, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 736, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 45, 67, 67, 67, 67, 0, 2049, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 933, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 97, 97, 288, 97, 97, 97, 97, 97, 97, 317, 97, 97, 97, 97, 97, 97, 0, 0, 97, 1787, 97, 97, 97, 97, 0, 0, 45, 45, 378, 45, 45, 45, 45, 45, 390, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 431, 433, 45, 45, 45, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 67, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 632, 97, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 67, 97, 97, 97, 97, 97, 97, 1837, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1897, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 97, 2010, 45, 45, 45, 45, 45, 45, 2016, 67, 67, 67, 67, 67, 67, 2022, 45, 2046, 67, 67, 67, 0, 0, 2050, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 932, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 45, 45, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 701, 702, 45, 45, 705, 706, 45, 45, 45, 45, 45, 45, 703, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 45, 45, 45, 45, 45, 725, 45, 45, 45, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 834, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1799, 97, 97, 45, 45, 45, 1569, 45, 45, 45, 1572, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1306, 0, 67, 67, 67, 1598, 67, 67, 67, 67, 67, 67, 67, 67, 1606, 67, 67, 1609, 97, 97, 97, 1650, 97, 97, 1653, 97, 97, 97, 0, 45, 45, 1657, 45, 45, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1421, 45, 45, 45, 1703, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1711, 97, 97, 0, 1895, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 958, 45, 960, 45, 45, 45, 45, 45, 45, 45, 45, 1913, 45, 45, 1915, 67, 67, 67, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 481, 67, 45, 1749, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 45, 45, 45, 45, 173, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1773, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1886, 0, 0, 0, 97, 97, 67, 2035, 2036, 67, 67, 97, 0, 0, 97, 2041, 2042, 97, 97, 45, 45, 45, 45, 1662, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1397, 45, 45, 45, 45, 151, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 437, 205, 45, 67, 67, 67, 218, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 67, 97, 97, 97, 97, 298, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 97, 97, 97, 97, 97, 97, 352, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 365, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1427, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1435, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1037, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1919, 67, 1759, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 45, 154, 45, 162, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 964, 45, 45, 45, 206, 45, 67, 67, 67, 67, 221, 67, 229, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 67, 785, 67, 67, 67, 67, 67, 67, 67, 67, 802, 67, 67, 67, 807, 67, 67, 67, 97, 97, 97, 97, 353, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 402, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 45, 45, 674, 45, 45, 45, 45, 45, 45, 45, 45, 389, 45, 394, 45, 45, 398, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 447, 45, 45, 45, 454, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 488, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 67, 67, 67, 67, 67, 1774, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 67, 67, 523, 67, 67, 527, 67, 67, 67, 67, 67, 533, 67, 67, 67, 540, 97, 97, 97, 585, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 97, 97, 97, 97, 1784, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 620, 97, 97, 624, 97, 97, 97, 97, 97, 630, 97, 97, 97, 637, 713, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 45, 45, 45, 1197, 45, 45, 45, 45, 45, 45, 45, 45, 730, 732, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1581, 67, 45, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 775, 67, 67, 67, 67, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 67, 1080, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 287, 0, 2379776, 2170880, 2170880, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 920, 97, 97, 0, 0, 0, 0, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 45, 959, 45, 45, 45, 45, 45, 45, 45, 45, 45, 184, 45, 45, 45, 45, 202, 45, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1266, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1279, 67, 67, 67, 67, 67, 272, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1293, 67, 67, 67, 1296, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 281, 94, 0, 0, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 0, 97, 1376, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1384, 45, 45, 67, 208, 67, 67, 67, 67, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1069, 1070, 67, 67, 67, 67, 67, 67, 67, 0, 37140, 24854, 0, 0, 0, 0, 41098, 65821, 45, 1423, 45, 45, 45, 45, 45, 45, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1083, 37689, 0, 25403, 0, 66365, 0, 0, 0, 1436, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1830, 67, 1452, 1453, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 67, 67, 1461, 67, 67, 67, 1464, 67, 1466, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 1587, 67, 67, 67, 67, 67, 67, 67, 67, 1595, 1489, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 1505, 1506, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 1164, 97, 97, 97, 97, 97, 1516, 97, 97, 97, 1519, 97, 1521, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1301, 0, 0, 0, 1307, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 919, 97, 97, 97, 0, 97, 97, 97, 1781, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1792, 1860, 45, 1862, 1863, 45, 1865, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1875, 67, 1877, 1878, 67, 1880, 67, 97, 97, 97, 97, 97, 1887, 0, 1889, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 237568, 0, 367, 0, 97, 1893, 0, 0, 0, 97, 1898, 1899, 97, 1901, 97, 45, 45, 45, 45, 45, 2014, 45, 67, 67, 67, 67, 67, 2020, 67, 97, 1989, 45, 1990, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1996, 67, 1997, 67, 67, 67, 67, 67, 273, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 2005, 0, 97, 2007, 97, 97, 18, 0, 139621, 0, 0, 0, 642, 0, 133, 364, 0, 0, 367, 41606, 0, 97, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 209, 67, 67, 67, 223, 67, 67, 67, 67, 67, 67, 67, 67, 67, 786, 67, 67, 67, 791, 67, 67, 45, 45, 940, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1016, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 142, 45, 45, 67, 210, 67, 67, 67, 225, 67, 67, 239, 67, 67, 67, 250, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 476, 67, 67, 67, 67, 67, 67, 67, 1709, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1843, 0, 67, 259, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 289, 97, 97, 97, 303, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 97, 339, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 358, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1953, 45, 1955, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1687, 1688, 67, 67, 67, 67, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1203, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 477, 67, 67, 67, 67, 67, 67, 67, 1970, 97, 97, 97, 1974, 0, 0, 0, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1372, 97, 97, 97, 97, 67, 522, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 536, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 574, 97, 97, 97, 97, 97, 301, 97, 309, 97, 97, 97, 97, 97, 97, 97, 97, 97, 900, 97, 97, 97, 905, 97, 97, 97, 619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 633, 97, 97, 18, 0, 139621, 0, 0, 362, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 664, 67, 67, 67, 67, 750, 751, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1057, 1058, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 67, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 902, 97, 97, 97, 97, 67, 67, 1051, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1302, 0, 0, 0, 1308, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1139, 97, 97, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 1161, 97, 97, 97, 97, 97, 1166, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 1257, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 97, 97, 1337, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1630, 97, 67, 1474, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380062, 2171166, 2171166, 97, 1529, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 45, 45, 67, 67, 67, 67, 1707, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1891, 1739, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 1200, 45, 45, 45, 45, 97, 97, 1894, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 45, 45, 45, 67, 67, 1965, 67, 1967, 67, 67, 67, 97, 97, 97, 97, 0, 1976, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 97, 97, 1979, 0, 0, 97, 1982, 97, 97, 97, 1986, 45, 45, 45, 45, 45, 735, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 2000, 97, 97, 97, 2002, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1798, 97, 97, 97, 45, 45, 45, 2034, 67, 67, 67, 67, 97, 0, 0, 2040, 97, 97, 97, 97, 45, 45, 45, 45, 1752, 45, 45, 45, 1753, 1754, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 45, 45, 438, 45, 45, 45, 45, 45, 445, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1430, 67, 67, 67, 67, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 531, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1096, 97, 97, 97, 621, 97, 97, 97, 97, 97, 628, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 45, 942, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 708, 45, 45, 45, 45, 763, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 809, 810, 67, 67, 67, 67, 783, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1303, 0, 0, 0, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 45, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 67, 67, 67, 67, 1027, 67, 67, 67, 67, 1032, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1097, 1064, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 67, 1098, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 331, 97, 97, 97, 97, 1158, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 1309, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1374, 97, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1240, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1252, 67, 97, 97, 97, 1635, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1800, 97, 45, 45, 45, 97, 97, 1793, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1743, 45, 45, 45, 1746, 45, 0, 97, 97, 97, 97, 97, 1851, 97, 45, 45, 45, 45, 1856, 45, 45, 45, 45, 1864, 45, 45, 67, 67, 1869, 67, 67, 67, 67, 1874, 67, 0, 97, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 211, 67, 67, 67, 67, 67, 67, 240, 67, 67, 67, 67, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 67, 67, 268, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 290, 97, 97, 97, 305, 97, 97, 319, 97, 97, 97, 330, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 643, 367, 41606, 97, 97, 348, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 395, 45, 45, 45, 400, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 45, 972, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1086, 25403, 1090, 66365, 1094, 0, 0, 97, 843, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 1121, 97, 97, 97, 97, 1126, 97, 97, 97, 97, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1400, 45, 67, 67, 67, 1011, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1304, 0, 0, 0, 1190, 45, 45, 1193, 1194, 45, 45, 45, 45, 45, 1199, 45, 1201, 45, 45, 45, 45, 1911, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 67, 67, 45, 1205, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1217, 45, 45, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 1229, 45, 45, 45, 1388, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1574, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 1254, 67, 67, 67, 67, 67, 1259, 67, 1261, 67, 67, 67, 67, 1265, 67, 67, 67, 67, 67, 67, 1708, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 1289, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1087, 25403, 1091, 66365, 1095, 0, 0, 97, 97, 97, 97, 1339, 97, 1341, 97, 97, 97, 97, 1345, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 573, 97, 97, 97, 97, 97, 97, 1717, 97, 0, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1329, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 97, 97, 97, 1365, 97, 97, 97, 97, 1369, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1399, 45, 45, 45, 1413, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1669, 45, 1422, 45, 45, 1425, 45, 45, 1428, 45, 1429, 67, 67, 67, 67, 67, 67, 67, 67, 1468, 67, 67, 67, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 539, 67, 67, 1475, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 97, 97, 1530, 97, 0, 45, 45, 1534, 45, 45, 45, 45, 45, 45, 45, 45, 1956, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 67, 67, 1601, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 67, 1632, 97, 1634, 0, 97, 97, 97, 1640, 97, 97, 97, 1643, 97, 97, 1645, 97, 97, 97, 97, 97, 912, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1660, 1661, 45, 45, 45, 45, 1665, 1666, 45, 45, 45, 45, 45, 1670, 1692, 1693, 67, 67, 67, 67, 67, 1697, 67, 67, 67, 67, 67, 67, 67, 1702, 97, 97, 1714, 1715, 97, 97, 97, 97, 0, 1721, 1722, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 97, 97, 1362, 1726, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 1734, 97, 97, 97, 97, 97, 848, 849, 97, 97, 97, 97, 856, 97, 97, 97, 97, 97, 354, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 45, 45, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1681, 45, 0, 1846, 97, 97, 97, 97, 97, 97, 45, 45, 1854, 45, 45, 45, 45, 1859, 67, 67, 67, 1879, 67, 67, 97, 97, 1884, 97, 97, 0, 0, 0, 97, 97, 97, 1105, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 1347, 97, 1892, 97, 0, 0, 0, 97, 97, 97, 1900, 97, 97, 45, 45, 45, 45, 45, 997, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1002, 45, 45, 1005, 1006, 45, 67, 67, 67, 67, 67, 1926, 67, 67, 1928, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1737, 97, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1944, 97, 97, 1946, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 190, 45, 45, 45, 152, 155, 45, 163, 45, 45, 177, 179, 182, 45, 45, 45, 193, 197, 45, 45, 45, 1672, 45, 45, 45, 45, 45, 1677, 45, 1679, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 67, 260, 264, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 295, 299, 302, 97, 310, 97, 97, 324, 326, 329, 97, 97, 97, 0, 97, 97, 1639, 0, 1641, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 97, 1523, 97, 97, 97, 97, 97, 97, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 97, 97, 312, 97, 97, 97, 97, 97, 97, 97, 97, 1123, 97, 97, 97, 97, 97, 97, 97, 340, 344, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 373, 375, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 435, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1410, 45, 45, 45, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 67, 67, 67, 67, 1969, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 2064, 2065, 0, 2066, 45, 521, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 465, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1933, 0, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 18, 640, 139621, 358, 641, 0, 0, 0, 0, 364, 0, 0, 367, 0, 618, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 97, 97, 881, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 569, 97, 97, 97, 97, 97, 369, 0, 45, 652, 45, 45, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1432, 67, 67, 67, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 67, 0, 1305, 0, 1311, 0, 1317, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 1724, 97, 97, 97, 777, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 535, 67, 67, 67, 67, 67, 67, 67, 814, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 837, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 97, 97, 97, 0, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1168, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 97, 97, 0, 1637, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1801, 45, 45, 97, 875, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1151, 1152, 97, 97, 97, 67, 67, 67, 1040, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 790, 67, 67, 67, 1180, 0, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 200, 45, 45, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 67, 67, 67, 0, 0, 0, 1481, 0, 1094, 0, 0, 97, 1483, 97, 97, 97, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 1633, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1381, 0, 0, 45, 45, 45, 45, 97, 97, 1727, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 636, 45, 45, 1760, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 67, 67, 1299, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1616, 97, 97, 1803, 45, 45, 45, 45, 1807, 45, 45, 45, 45, 45, 1813, 45, 45, 45, 67, 67, 1684, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 822, 67, 67, 37689, 544, 67, 67, 1818, 67, 67, 67, 67, 1822, 67, 67, 67, 67, 67, 1828, 67, 67, 67, 67, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2012, 2013, 45, 45, 67, 67, 67, 2018, 2019, 67, 67, 97, 67, 97, 97, 97, 1833, 97, 97, 0, 0, 97, 97, 1840, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 1733, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 1849, 97, 97, 97, 45, 45, 45, 45, 45, 1857, 45, 45, 45, 1910, 45, 1912, 45, 45, 1914, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 67, 1020, 67, 45, 1861, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1446, 67, 67, 67, 67, 67, 1876, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1890, 97, 97, 97, 97, 97, 1134, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 97, 97, 97, 580, 1935, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1906, 45, 67, 67, 67, 67, 2048, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 931, 45, 45, 45, 45, 45, 45, 1674, 45, 1676, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1871, 67, 67, 67, 67, 0, 97, 97, 45, 67, 0, 97, 2060, 2061, 0, 2063, 45, 67, 0, 97, 45, 45, 156, 45, 45, 45, 45, 45, 45, 45, 45, 45, 192, 45, 45, 45, 45, 1673, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 429, 45, 45, 45, 45, 67, 67, 67, 269, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 349, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 374, 45, 45, 67, 67, 213, 217, 67, 67, 67, 67, 67, 242, 67, 247, 67, 253, 45, 45, 698, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 399, 45, 45, 0, 0, 0, 0, 925, 41606, 0, 929, 0, 0, 45, 45, 45, 45, 45, 45, 1391, 45, 45, 1395, 45, 45, 45, 45, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 436, 45, 67, 67, 67, 67, 1041, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1776, 67, 67, 97, 97, 97, 1099, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 888, 97, 97, 97, 1131, 97, 97, 97, 97, 1135, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 97, 97, 883, 97, 97, 97, 97, 97, 97, 1310, 0, 0, 0, 1316, 0, 0, 0, 0, 1100, 0, 0, 0, 97, 97, 97, 97, 97, 1107, 97, 97, 97, 97, 97, 97, 97, 97, 1343, 97, 97, 97, 97, 97, 97, 1348, 0, 0, 1317, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1868, 67, 1870, 67, 67, 67, 67, 67, 1817, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 823, 67, 37689, 544, 67, 97, 1832, 97, 97, 1834, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 1732, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1177, 0, 0, 925, 0, 0, 0, 0, 97, 97, 97, 97, 0, 0, 1941, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1991, 1992, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1998, 134, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 941, 45, 45, 944, 45, 45, 45, 45, 45, 45, 952, 45, 45, 207, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 67, 67, 67, 37689, 544, 369, 650, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1682, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 835, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1725, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 1036, 67, 67, 67, 265, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 296, 97, 97, 97, 97, 314, 97, 97, 97, 97, 332, 334, 97, 97, 97, 97, 97, 1146, 1147, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 97, 97, 345, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 372, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 45, 45, 404, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 451, 452, 45, 45, 45, 67, 1683, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 490, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 1450, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 537, 538, 67, 67, 67, 67, 67, 506, 67, 67, 508, 67, 67, 511, 67, 67, 67, 67, 0, 1476, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1484, 97, 97, 97, 97, 97, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1499, 97, 97, 97, 97, 97, 97, 97, 97, 97, 587, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 634, 635, 97, 97, 97, 97, 97, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 97, 97, 97, 369, 0, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 1001, 45, 45, 45, 45, 45, 45, 45, 45, 715, 45, 45, 45, 720, 45, 45, 45, 45, 45, 45, 45, 45, 728, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 840, 97, 97, 97, 97, 97, 1174, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 0, 0, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 97, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 680, 45, 968, 45, 970, 45, 973, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 962, 45, 45, 45, 45, 45, 979, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 688, 45, 45, 45, 45, 45, 45, 45, 1007, 1008, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 1044, 67, 1046, 67, 1049, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 808, 67, 67, 0, 0, 0, 1102, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 97, 97, 97, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 1138, 97, 1140, 97, 1143, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 45, 1191, 45, 45, 45, 45, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 991, 45, 67, 67, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1048, 67, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 97, 1386, 45, 1387, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 455, 45, 457, 45, 45, 1424, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1433, 67, 1434, 67, 67, 67, 67, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 1593, 67, 67, 45, 45, 1805, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1814, 45, 45, 1816, 67, 67, 67, 67, 1820, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1829, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 821, 67, 67, 67, 37689, 544, 67, 1831, 97, 97, 97, 97, 1835, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1850, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 961, 45, 45, 45, 45, 965, 45, 967, 1907, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1920, 0, 1936, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 28672, 97, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2054, 97, 97, 291, 97, 97, 97, 97, 97, 97, 320, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 926, 1179, 0, 45, 377, 45, 45, 45, 381, 45, 45, 392, 45, 45, 396, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 45, 45, 45, 67, 67, 67, 67, 463, 67, 67, 67, 467, 67, 67, 478, 67, 67, 482, 67, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 1472, 67, 502, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1460, 67, 97, 97, 97, 97, 560, 97, 97, 97, 564, 97, 97, 575, 97, 97, 579, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 930, 97, 599, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 872, 97, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1758, 0, 362, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 934, 45, 45, 45, 164, 168, 174, 178, 45, 45, 45, 45, 45, 194, 45, 45, 45, 165, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 45, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 1052, 1053, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1063, 97, 1157, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1167, 97, 97, 97, 97, 97, 1379, 97, 97, 97, 0, 0, 0, 45, 1383, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 1812, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1471, 67, 45, 1402, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 67, 1462, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 1517, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 1636, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1705, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1842, 0, 0, 1779, 97, 97, 97, 1782, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1789, 97, 97, 0, 0, 0, 97, 1847, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 45, 737, 738, 67, 740, 67, 741, 67, 743, 67, 67, 67, 67, 67, 67, 1968, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 2062, 97, 45, 67, 0, 97, 45, 67, 67, 97, 97, 2001, 97, 0, 0, 2004, 97, 97, 0, 97, 97, 97, 97, 1797, 97, 97, 97, 97, 97, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 292, 97, 97, 97, 97, 311, 315, 321, 325, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1330, 97, 97, 1333, 1334, 97, 341, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 363, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 416, 45, 376, 45, 45, 45, 45, 382, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 45, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 414, 45, 45, 45, 418, 67, 67, 67, 462, 67, 67, 67, 67, 468, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 1604, 67, 67, 67, 67, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 1067, 67, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 274, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 504, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 517, 519, 541, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 554, 97, 97, 97, 559, 97, 97, 97, 97, 565, 97, 97, 97, 97, 97, 97, 97, 1718, 0, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 906, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 597, 97, 97, 97, 97, 97, 1520, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 1656, 45, 45, 45, 97, 97, 601, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 614, 616, 638, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 661, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1815, 45, 67, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 678, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 977, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 697, 67, 67, 748, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1274, 67, 67, 67, 67, 67, 67, 67, 67, 765, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 780, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1777, 67, 97, 97, 97, 97, 97, 97, 846, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 97, 1742, 45, 45, 45, 45, 45, 45, 45, 1747, 97, 97, 97, 863, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 1178, 925, 0, 1179, 0, 97, 97, 97, 878, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 954, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 963, 45, 45, 966, 45, 45, 157, 45, 45, 171, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 1022, 67, 67, 1026, 67, 67, 67, 1030, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 1605, 67, 67, 67, 1608, 67, 67, 67, 1039, 67, 67, 1042, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 67, 0, 1100, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 97, 97, 97, 97, 1116, 97, 97, 1120, 97, 97, 97, 1124, 97, 97, 97, 97, 97, 97, 562, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1133, 97, 97, 1136, 97, 97, 97, 97, 97, 97, 97, 97, 915, 917, 97, 97, 97, 97, 97, 0, 97, 1170, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1993, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 1278, 67, 0, 0, 0, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1189, 1204, 45, 45, 45, 1207, 45, 45, 1209, 45, 1210, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 45, 689, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 805, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1249, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1300, 0, 0, 0, 0, 0, 1267, 67, 67, 1269, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 97, 1349, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 97, 0, 1980, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 677, 45, 45, 45, 45, 1401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 953, 67, 1437, 67, 1440, 67, 67, 67, 67, 1445, 67, 67, 67, 1448, 67, 67, 67, 67, 67, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 67, 67, 67, 1473, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 0, 834, 97, 97, 97, 97, 1490, 97, 1493, 97, 97, 97, 97, 1498, 97, 97, 97, 1501, 97, 97, 97, 0, 97, 1638, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 916, 97, 97, 97, 97, 97, 97, 0, 1528, 97, 97, 97, 0, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1932, 0, 0, 1555, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1567, 45, 45, 158, 45, 45, 172, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 67, 212, 67, 67, 67, 67, 231, 235, 241, 245, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 472, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1651, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 45, 67, 1704, 67, 1706, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1841, 97, 0, 1844, 97, 97, 97, 97, 1716, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1385, 1748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1757, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 97, 97, 1780, 97, 97, 97, 0, 0, 1786, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1730, 0, 97, 97, 97, 97, 97, 1736, 97, 1738, 67, 97, 97, 97, 97, 97, 97, 0, 1838, 97, 97, 97, 97, 97, 0, 0, 97, 1729, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 1165, 97, 97, 97, 45, 1950, 45, 45, 45, 45, 45, 45, 45, 45, 1958, 67, 67, 67, 1962, 67, 67, 67, 67, 67, 1246, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1710, 97, 97, 97, 1999, 67, 97, 97, 97, 97, 0, 2003, 97, 97, 97, 0, 97, 97, 2008, 2009, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 2052, 67, 2053, 0, 0, 0, 0, 925, 41606, 0, 0, 930, 0, 45, 45, 45, 45, 45, 45, 1392, 45, 1394, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 1565, 45, 45, 45, 1568, 0, 97, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 28672, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 679, 45, 45, 67, 67, 266, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 346, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 362, 0, 364, 0, 367, 41098, 369, 140, 371, 45, 45, 45, 379, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 449, 45, 45, 45, 45, 45, 67, 67, 542, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 97, 0, 1794, 1795, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 97, 639, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 45, 731, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 251, 67, 67, 67, 67, 67, 798, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1073, 67, 67, 67, 860, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 873, 0, 0, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 921, 97, 0, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1250, 67, 67, 1253, 0, 0, 1312, 0, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 97, 1155, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1141, 97, 97, 67, 67, 1439, 67, 1441, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 97, 97, 1492, 97, 1494, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 97, 67, 67, 67, 2037, 67, 97, 0, 0, 97, 97, 97, 2043, 97, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 232, 67, 67, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1975, 0, 0, 97, 874, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1142, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 65, 86, 117, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 63, 84, 115, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 61, 82, 113, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 59, 80, 111, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 57, 78, 109, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 55, 76, 107, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 53, 74, 105, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 51, 72, 103, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 49, 70, 101, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 47, 68, 99, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 45, 67, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 213085, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 0, 0, 44, 0, 0, 32863, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 41, 41, 41, 0, 0, 1138688, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 89, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 127, 127, 127, 127, 102432, 67, 262, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 342, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 360, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 45, 45, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1292, 67, 67, 1294, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1615, 97, 97, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 66, 87, 118, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 64, 85, 116, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 62, 83, 114, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 60, 81, 112, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 58, 79, 110, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 56, 77, 108, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 54, 75, 106, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 52, 73, 104, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 50, 71, 102, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 48, 69, 100, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 46, 67, 98, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 233472, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 69724, 53264, 18, 18, 49172, 0, 57366, 262144, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 45, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 28, 139621, 359, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1389, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 45, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1449, 67, 67, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1154, 97, 0, 0, 0, 0, 925, 41606, 927, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 67, 67, 45, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 951, 45, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 45, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1488, 67, 67, 267, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 347, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 361, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 734, 45, 45, 45, 67, 67, 67, 67, 67, 742, 67, 67, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1214, 45, 45, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1361, 97, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 45, 45, 0, 0, 0, 0, 2220032, 0, 0, 1130496, 0, 0, 0, 0, 2170880, 2171020, 2170880, 2170880, 18, 0, 0, 131072, 0, 0, 0, 90112, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1485, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1390, 45, 1393, 45, 45, 45, 45, 1398, 45, 45, 45, 2170880, 2171167, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2721252, 2744320, 2170880, 2170880, 2170880, 2834432, 2840040, 2170880, 2908160, 2170880, 2170880, 2936832, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3014656, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 0, 2220032, 0, 0, 0, 1142784, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3215360, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 543, 0, 545, 0, 0, 2183168, 0, 0, 831, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 2170880, 2170880, 3092480, 2170880, 2170880, 3125248, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 0, 0, 0, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 0, 0, 0, 65820, 65820, 0, 287, 97, 97, 97, 97, 97, 1783, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1791, 0, 0, 546, 70179, 0, 0, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 97, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 0, 0, 147456, 0, 0, 0, 0, 925, 41606, 0, 928, 0, 0, 45, 45, 45, 45, 45, 45, 998, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 1564, 45, 45, 45, 45, 0, 2158592, 2158592, 0, 0, 0, 0, 2232320, 2232320, 2232320, 0, 2240512, 2240512, 2240512, 2240512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640 +]; + +JSONiqTokenizer.EXPECTED = +[ 291, 300, 304, 341, 315, 309, 305, 295, 319, 323, 327, 329, 296, 333, 337, 339, 342, 346, 350, 294, 356, 360, 312, 367, 352, 371, 363, 375, 379, 383, 387, 391, 395, 726, 399, 405, 518, 684, 405, 405, 405, 405, 808, 405, 405, 405, 512, 405, 405, 405, 431, 405, 405, 406, 405, 405, 404, 405, 405, 405, 405, 405, 405, 405, 908, 631, 410, 415, 405, 414, 419, 608, 405, 429, 602, 405, 435, 443, 405, 441, 641, 478, 405, 447, 451, 450, 456, 643, 461, 460, 762, 679, 465, 469, 741, 473, 477, 482, 486, 492, 932, 931, 523, 498, 504, 720, 405, 510, 596, 405, 516, 941, 580, 522, 929, 527, 590, 589, 897, 939, 534, 538, 547, 551, 555, 559, 563, 567, 571, 969, 575, 708, 690, 689, 579, 584, 634, 405, 594, 731, 405, 600, 882, 405, 606, 895, 786, 452, 612, 405, 615, 620, 876, 624, 628, 638, 647, 651, 655, 659, 663, 667, 676, 683, 688, 695, 694, 791, 405, 699, 437, 405, 706, 714, 405, 712, 825, 870, 405, 718, 724, 769, 768, 823, 730, 735, 745, 751, 422, 755, 759, 425, 766, 902, 810, 587, 775, 888, 887, 405, 773, 992, 405, 779, 962, 405, 785, 781, 986, 790, 795, 797, 506, 500, 499, 801, 805, 814, 820, 829, 833, 837, 841, 845, 849, 853, 857, 861, 616, 865, 869, 868, 488, 405, 874, 816, 405, 880, 738, 405, 886, 892, 543, 405, 901, 906, 913, 912, 918, 494, 541, 922, 926, 936, 945, 949, 953, 957, 530, 966, 973, 960, 702, 701, 405, 979, 981, 405, 985, 747, 405, 990, 998, 914, 405, 996, 1004, 672, 975, 974, 1014, 1002, 1008, 670, 1012, 405, 405, 405, 405, 405, 401, 1018, 1022, 1026, 1106, 1071, 1111, 1111, 1111, 1082, 1145, 1030, 1101, 1034, 1038, 1106, 1106, 1106, 1106, 1046, 1206, 1052, 1106, 1072, 1111, 1111, 1042, 1134, 1065, 1111, 1112, 1056, 1160, 1207, 1062, 1204, 1208, 1069, 1106, 1106, 1106, 1076, 1111, 1207, 1161, 1122, 1205, 1064, 1094, 1106, 1106, 1107, 1111, 1111, 1111, 1078, 1086, 1207, 1092, 1098, 1046, 1058, 1106, 1106, 1110, 1111, 1111, 1116, 1120, 1161, 1126, 1202, 1104, 1106, 1145, 1146, 1129, 1138, 1088, 1151, 1048, 1157, 1153, 1132, 1141, 1165, 1107, 1111, 1172, 1179, 1109, 1183, 1175, 1143, 1147, 1187, 1108, 1191, 1195, 1144, 1199, 1168, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1557, 1247, 1241, 1241, 1038, 1434, 1241, 1241, 1241, 1241, 1254, 1275, 1617, 1241, 1280, 1287, 1241, 1241, 1241, 1287, 1241, 2114, 1291, 1241, 1243, 1241, 2049, 1824, 2094, 2095, 1520, 1309, 1241, 1241, 1302, 1241, 1321, 1311, 1241, 1241, 1313, 1778, 1325, 1336, 1241, 1241, 1325, 1330, 1353, 1241, 1241, 1695, 1354, 1241, 1241, 1241, 1294, 1686, 1331, 1241, 1696, 1368, 1241, 1338, 1370, 1241, 1392, 1399, 1364, 2017, 1406, 2016, 1405, 1716, 1406, 1407, 1422, 1417, 1421, 1241, 1241, 1241, 1349, 1426, 1241, 1774, 1756, 1241, 1773, 1241, 1241, 1345, 1964, 1812, 1432, 1241, 1241, 1345, 1993, 1459, 1241, 1241, 1241, 1395, 1848, 1767, 1465, 1241, 1241, 1394, 1847, 1242, 1477, 1241, 1241, 1428, 1241, 1445, 1492, 1241, 1241, 1438, 1241, 1499, 1241, 1241, 1241, 1455, 1241, 1818, 1448, 1241, 1250, 1241, 2026, 1623, 1449, 1241, 1612, 1616, 1241, 1614, 1241, 1257, 1241, 1241, 1985, 1292, 1586, 1512, 1241, 1517, 2050, 1526, 1674, 1519, 1524, 1647, 2051, 1532, 1537, 1551, 1544, 1550, 1555, 1561, 1571, 1578, 1584, 1590, 1591, 1653, 1595, 1602, 1606, 1610, 1634, 1628, 1640, 1633, 1645, 1241, 1241, 1241, 1469, 1241, 1970, 1651, 1241, 1270, 1241, 1241, 1819, 1449, 1241, 1293, 1664, 1241, 1241, 1481, 1485, 1574, 1672, 1241, 1241, 1513, 1317, 1487, 1684, 1241, 1241, 1533, 1299, 1694, 1241, 1241, 1295, 1241, 1241, 1241, 1546, 1700, 1241, 1241, 1707, 1241, 1713, 1241, 1849, 1715, 1241, 1720, 1241, 1276, 1267, 1241, 1241, 2107, 1657, 1864, 1241, 1881, 1241, 1326, 1292, 1241, 1685, 1358, 1724, 1338, 1241, 1363, 1362, 1342, 1340, 1361, 1339, 1833, 1372, 1360, 1833, 1833, 1342, 1343, 1835, 1341, 1731, 1738, 1344, 1241, 1745, 1241, 1379, 1241, 1241, 2092, 1241, 1388, 1761, 1754, 1241, 1386, 1241, 1400, 1760, 1241, 1241, 1241, 1598, 1734, 1241, 1241, 1241, 1635, 1645, 1241, 1780, 1766, 1241, 1241, 1332, 1771, 1241, 1241, 1629, 2079, 1241, 1242, 1784, 1241, 1241, 1680, 1639, 2063, 1790, 1241, 1241, 1741, 1241, 1241, 1800, 1241, 1241, 1762, 1473, 1241, 1806, 1241, 1241, 1786, 1240, 1709, 1241, 1241, 1241, 1668, 1811, 1241, 1940, 1241, 1401, 1974, 1241, 1408, 1413, 1382, 1241, 1816, 1241, 1241, 1802, 2086, 1811, 1241, 1817, 1945, 1823, 2095, 2095, 2047, 2094, 2046, 2080, 1241, 1409, 1312, 1376, 2096, 2048, 1241, 1241, 1807, 1241, 1241, 1241, 2035, 1241, 1241, 1828, 1241, 2057, 2061, 1241, 1241, 1843, 1241, 2059, 1241, 1241, 1241, 1690, 1847, 1241, 1241, 1241, 1703, 2102, 1848, 1241, 1241, 1853, 1292, 1848, 1241, 2016, 1857, 1241, 2002, 1868, 1241, 1436, 1241, 1241, 1271, 1305, 1241, 1874, 1241, 1241, 1884, 2037, 1892, 1241, 1890, 1241, 1461, 1241, 1241, 1795, 1241, 1241, 1891, 1241, 1878, 1241, 1888, 1241, 1888, 1905, 1896, 2087, 1912, 1903, 1241, 1911, 1906, 1916, 1905, 2027, 1863, 1925, 2088, 1859, 1861, 1922, 1927, 1931, 1935, 1494, 1241, 1241, 1918, 1907, 1939, 1917, 1944, 1949, 1241, 1241, 1451, 1955, 1241, 1241, 1241, 1796, 1727, 2061, 1241, 1241, 1899, 1241, 1660, 1968, 1241, 1241, 1951, 1678, 1978, 1241, 1241, 1241, 1839, 1241, 1241, 1984, 1982, 1241, 1488, 1241, 1241, 1624, 1450, 1989, 1241, 1241, 1241, 1870, 1995, 1292, 1241, 1241, 1958, 1261, 1241, 1996, 1241, 1241, 1241, 2039, 2008, 1241, 1241, 1750, 2000, 1241, 1256, 2001, 1960, 1241, 1564, 1241, 1504, 1241, 1241, 1442, 1241, 1241, 1564, 1528, 1263, 1241, 1508, 1241, 1241, 1468, 1498, 2006, 1540, 2015, 1539, 2014, 1748, 2013, 1539, 1831, 2014, 2012, 1500, 1567, 2022, 2021, 1241, 1580, 1241, 1241, 2033, 2037, 1791, 2045, 2031, 1241, 1621, 1241, 1641, 2044, 1241, 1241, 1241, 2093, 1241, 1241, 2055, 1241, 1241, 2067, 1241, 1283, 1241, 1241, 1241, 2101, 2071, 1241, 1241, 1241, 2073, 1848, 2040, 1241, 1241, 1241, 2077, 1241, 1241, 2106, 1241, 1241, 2084, 1241, 2111, 1241, 1241, 1381, 1380, 1241, 1241, 1241, 2100, 1241, 2129, 2118, 2122, 2126, 2197, 2133, 3010, 2825, 2145, 2698, 2156, 2226, 2160, 2161, 2165, 2174, 2293, 2194, 2630, 2201, 2203, 2152, 3019, 2226, 2263, 2209, 2213, 2218, 2269, 2292, 2269, 2269, 2184, 2226, 2238, 2148, 2151, 3017, 2245, 2214, 2269, 2269, 2185, 2226, 2292, 2269, 2291, 2269, 2269, 2269, 2292, 2205, 3019, 2226, 2226, 2160, 2160, 2160, 2261, 2160, 2160, 2160, 2262, 2276, 2160, 2160, 2277, 2216, 2283, 2216, 2269, 2269, 2268, 2269, 2267, 2269, 2269, 2269, 2271, 2568, 2292, 2269, 2293, 2269, 2182, 2190, 2269, 2186, 2226, 2226, 2226, 2226, 2227, 2160, 2160, 2160, 2160, 2263, 2160, 2275, 2277, 2282, 2215, 2217, 2269, 2269, 2291, 2269, 2269, 2293, 2291, 2269, 2220, 2269, 2295, 2294, 2269, 2269, 2305, 2233, 2262, 2278, 2218, 2269, 2234, 2226, 2226, 2228, 2160, 2160, 2160, 2289, 2220, 2294, 2294, 2269, 2269, 2304, 2269, 2160, 2160, 2287, 2269, 2269, 2305, 2269, 2269, 2312, 2269, 2269, 2225, 2226, 2160, 2287, 2289, 2219, 2304, 2295, 2314, 2234, 2226, 2314, 2269, 2226, 2226, 2160, 2288, 2219, 2222, 2304, 2296, 2269, 2224, 2160, 2160, 2269, 2302, 2294, 2314, 2224, 2226, 2288, 2220, 2294, 2269, 2290, 2269, 2269, 2293, 2269, 2269, 2269, 2269, 2270, 2221, 2313, 2225, 2227, 2160, 2300, 2269, 2225, 2261, 2309, 2234, 2229, 2223, 2318, 2318, 2318, 2328, 2336, 2340, 2344, 2350, 2637, 2712, 2358, 2362, 2372, 2135, 2378, 2398, 2135, 2135, 2135, 2135, 2136, 2417, 2241, 2135, 2378, 2135, 2135, 2980, 2984, 2135, 3006, 2135, 2135, 2135, 2945, 2931, 2425, 2400, 2135, 2135, 2135, 2954, 2135, 2481, 2433, 2135, 2135, 2988, 2824, 2135, 2135, 2482, 2434, 2135, 2135, 2440, 2445, 2452, 2135, 2135, 2998, 3002, 2961, 2441, 2446, 2453, 2463, 2974, 2135, 2135, 2135, 2140, 2642, 2709, 2459, 2470, 2465, 2135, 2135, 3005, 2135, 2135, 2987, 2823, 2458, 2469, 2464, 2975, 2135, 2135, 2135, 2353, 2488, 2447, 2324, 2974, 2135, 2409, 2459, 2448, 2135, 2961, 2487, 2446, 2476, 2323, 2973, 2135, 2135, 2135, 2354, 2476, 2974, 2135, 2135, 2135, 2957, 2135, 2135, 2960, 2135, 2135, 2135, 2363, 2409, 2459, 2474, 2465, 2487, 2571, 2973, 2135, 2135, 2168, 2973, 2135, 2135, 2135, 2959, 2135, 2135, 2135, 2506, 2135, 2957, 2488, 2170, 2135, 2135, 2135, 2960, 2135, 2818, 2493, 2135, 2135, 3033, 2135, 2135, 2135, 2934, 2819, 2494, 2135, 2135, 2135, 2976, 2780, 2499, 2135, 2135, 2135, 3000, 2968, 2135, 2935, 2135, 2135, 2135, 2364, 2507, 2135, 2135, 2934, 2135, 2135, 2780, 2492, 2507, 2135, 2135, 2506, 2780, 2135, 2135, 2782, 2780, 2135, 2782, 2135, 2783, 2374, 2514, 2135, 2135, 2135, 3007, 2530, 2974, 2135, 2135, 2135, 3008, 2135, 2135, 2134, 2135, 2526, 2531, 2975, 2135, 2135, 3042, 2581, 2575, 2956, 2135, 2135, 2135, 2394, 2135, 2508, 2535, 2840, 2844, 2495, 2135, 2135, 2136, 2684, 2537, 2842, 2846, 2135, 2136, 2561, 2581, 2551, 2536, 2841, 2845, 2975, 3043, 2582, 2843, 2555, 2135, 3040, 3044, 2538, 2844, 2975, 2135, 2135, 2253, 2644, 2672, 2542, 2554, 2135, 2135, 2346, 2873, 2551, 2555, 2135, 2135, 2135, 2381, 2559, 2565, 2538, 2553, 2135, 2560, 2914, 2576, 2590, 2135, 2135, 2135, 2408, 2136, 2596, 2624, 2135, 2135, 2135, 2409, 2135, 2618, 2597, 3008, 2135, 2135, 2380, 2956, 2601, 2135, 2135, 2135, 2410, 2620, 2624, 2135, 2136, 2383, 2135, 2135, 2783, 2623, 2135, 2135, 2393, 2888, 2136, 2621, 3008, 2135, 2618, 2618, 2622, 2135, 2135, 2405, 2414, 2619, 2384, 2624, 2135, 2136, 2950, 2135, 2138, 2135, 2139, 2135, 2604, 2623, 2135, 2140, 2878, 2665, 2957, 2622, 2135, 2135, 2428, 2762, 2606, 2612, 2135, 2135, 2501, 2586, 2604, 3038, 2135, 2604, 3036, 2387, 2958, 2386, 2135, 2141, 2135, 2421, 2387, 2385, 2135, 2385, 2384, 2384, 2135, 2386, 2628, 2384, 2135, 2135, 2501, 2596, 2591, 2135, 2135, 2135, 2400, 2135, 2634, 2135, 2135, 2559, 2580, 2575, 2648, 2135, 2135, 2135, 2429, 2649, 2135, 2135, 2135, 2435, 2654, 2658, 2135, 2135, 2135, 2436, 2649, 2178, 2659, 2135, 2135, 2595, 2601, 2669, 2677, 2135, 2135, 2616, 2957, 2879, 2665, 2691, 2135, 2363, 2367, 2900, 2878, 2664, 2690, 2975, 2877, 2643, 2670, 2974, 2671, 2975, 2135, 2135, 2619, 2608, 2669, 2673, 2135, 2135, 2653, 2177, 2672, 2135, 2135, 2135, 2486, 2168, 2251, 2255, 2695, 2974, 2709, 2135, 2135, 2135, 2487, 2169, 2399, 2716, 2975, 2135, 2363, 2770, 2776, 2640, 2717, 2135, 2135, 2729, 2135, 2135, 2641, 2718, 2135, 2135, 2135, 2505, 2135, 2640, 2257, 2974, 2135, 2727, 2975, 2135, 2365, 2332, 2895, 2957, 2135, 2959, 2135, 2365, 2749, 2754, 2959, 2958, 2958, 2135, 2380, 2793, 2799, 2135, 2735, 2738, 2135, 2381, 2135, 2135, 2940, 2974, 2135, 2744, 2135, 2135, 2739, 2519, 2976, 2745, 2135, 2135, 2135, 2509, 2755, 2135, 2135, 2135, 2510, 2772, 2778, 2135, 2135, 2740, 2520, 2135, 2771, 2777, 2135, 2135, 2759, 2750, 2792, 2798, 2135, 2135, 2781, 2392, 2779, 2135, 2135, 2135, 2521, 2135, 2679, 2248, 2135, 2135, 2681, 2480, 2135, 2135, 2786, 3000, 2135, 2679, 2683, 2135, 2135, 2416, 2135, 2135, 2135, 2525, 2135, 2730, 2135, 2135, 2135, 2560, 2581, 2135, 2805, 2135, 2135, 2804, 2962, 2832, 2974, 2135, 2382, 2135, 2135, 2958, 2135, 2135, 2960, 2135, 2829, 2833, 2975, 2961, 2965, 2969, 2973, 2968, 2972, 2135, 2135, 2135, 2641, 2135, 2515, 2966, 2970, 2851, 2478, 2135, 2135, 2808, 2135, 2809, 2135, 2135, 2135, 2722, 2852, 2479, 2135, 2135, 2815, 2135, 2135, 2766, 2853, 2480, 2135, 2857, 2479, 2135, 2388, 2723, 2135, 2364, 2331, 2894, 2858, 2480, 2135, 2135, 2850, 2478, 2135, 2135, 2135, 2806, 2864, 2135, 2399, 2256, 2974, 2865, 2135, 2135, 2862, 2135, 2135, 2135, 2685, 2807, 2865, 2135, 2135, 2807, 2863, 2135, 2135, 2135, 2686, 2884, 2807, 2135, 2809, 2807, 2135, 2135, 2807, 2806, 2705, 2810, 2808, 2700, 2869, 2702, 2702, 2702, 2704, 2883, 2135, 2135, 2135, 2730, 2884, 2135, 2135, 2135, 2731, 2321, 2546, 2135, 2135, 2876, 2255, 2889, 2322, 2547, 2135, 2401, 2135, 2135, 2135, 2949, 2367, 2893, 2544, 2973, 2906, 2973, 2135, 2135, 2877, 2663, 2368, 2901, 2907, 2974, 2366, 2899, 2905, 2972, 2920, 2974, 2135, 2135, 2911, 2900, 2920, 2363, 2913, 2918, 2465, 2941, 2975, 2135, 2135, 2924, 2928, 2974, 2945, 2931, 2135, 2135, 2135, 2765, 2136, 2955, 2135, 2135, 2939, 2931, 2380, 2135, 2135, 2380, 2135, 2135, 2135, 2780, 2507, 2137, 2135, 2137, 2135, 2139, 2135, 2806, 2810, 2135, 2135, 2135, 2992, 2135, 2135, 2962, 2966, 2970, 2974, 2135, 2135, 2787, 3014, 2135, 2521, 2993, 2135, 2135, 2135, 2803, 2135, 2135, 2135, 2618, 2607, 2997, 3001, 2135, 2135, 2963, 2967, 2971, 2975, 2135, 2135, 2791, 2797, 2135, 3009, 2999, 3003, 2787, 3001, 2135, 2135, 2964, 2968, 2785, 2999, 3003, 2135, 2135, 2135, 2804, 2785, 2999, 3004, 2135, 2135, 2135, 2807, 2135, 2135, 3023, 2135, 2135, 2135, 2811, 2135, 2135, 3027, 2135, 2135, 2135, 2837, 2968, 3028, 2135, 2135, 2135, 2875, 2135, 2784, 3029, 2135, 2408, 2457, 2446, 0, 14, 0, -2120220672, 1610612736, -2074083328, -2002780160, -2111830528, 1073872896, 1342177280, 1075807216, 4096, 16384, 2048, 8192, 0, 8192, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, -2145386496, 8388608, 1073741824, 0, 0x80000000, 0x80000000, 2097152, 2097152, 2097152, 536870912, 0, 0, 134217728, 33554432, 1536, 268435456, 268435456, 268435456, 268435456, 128, 256, 32, 0, 65536, 131072, 524288, 16777216, 268435456, 0x80000000, 1572864, 1835008, 640, 32768, 65536, 262144, 1048576, 2097152, 196608, 196800, 196608, 196608, 0, 131072, 131072, 131072, 196608, 196624, 196608, 196624, 196608, 196608, 128, 4096, 16384, 16384, 2048, 0, 4, 0, 0, 0x80000000, 2097152, 0, 1024, 32, 32, 0, 65536, 1572864, 1048576, 32768, 32768, 32768, 32768, 196608, 196608, 196608, 64, 64, 196608, 196608, 131072, 131072, 131072, 131072, 268435456, 268435456, 64, 196736, 196608, 196608, 196608, 131072, 196608, 196608, 16384, 4, 4, 4, 2, 32, 32, 65536, 1048576, 12582912, 1073741824, 0, 0, 2, 8, 16, 96, 2048, 32768, 0, 0, 131072, 268435456, 268435456, 268435456, 256, 256, 196608, 196672, 196608, 196608, 196608, 196608, 4, 0, 256, 256, 256, 256, 32, 32, 32768, 32, 32, 32, 32, 32768, 268435456, 268435456, 268435456, 196608, 196608, 196608, 196624, 196608, 196608, 196608, 16, 16, 16, 268435456, 196608, 64, 64, 64, 196608, 196608, 196608, 196672, 268435456, 64, 64, 196608, 196608, 16, 196608, 196608, 196608, 268435456, 64, 196608, 131072, 262144, 4194304, 25165824, 33554432, 134217728, 268435456, 268435456, 196608, 262152, 8, 256, 512, 3072, 16384, 200, -1073741816, 8392713, 40, 8392718, 520, 807404072, 40, 520, 100663304, 0, 0, -540651761, -540651761, 257589048, 0, 262144, 0, 0, 3, 8, 256, 0, 4, 6, 4100, 8388612, 0, 0, 0, 3, 4, 8, 256, 512, 1024, 0, 2097152, 0, 0, -537854471, -537854471, 0, 100663296, 0, 0, 1, 2, 0, 0, 0, 16384, 0, 0, 0, 96, 14336, 0, 0, 0, 7, 8, 234881024, 0, 0, 0, 8, 0, 0, 0, 0, 262144, 0, 0, 16, 64, 384, 512, 0, 1, 1, 0, 12582912, 0, 0, 0, 0, 33554432, 67108864, -606084144, -606084144, -606084138, 0, 0, 28, 32, 768, 1966080, -608174080, 0, 0, 0, 14, 35056, 16, 64, 896, 24576, 98304, 98304, 131072, 262144, 524288, 1048576, 4194304, 25165824, 1048576, 62914560, 134217728, -805306368, 0, 384, 512, 16384, 65536, 131072, 262144, 29360128, 33554432, 134217728, 268435456, 1073741824, 0x80000000, 262144, 524288, 1048576, 29360128, 33554432, 524288, 1048576, 16777216, 33554432, 134217728, 268435456, 1073741824, 0, 0, 0, 123856, 1966080, 0, 64, 384, 16384, 65536, 131072, 16384, 65536, 524288, 268435456, 0x80000000, 0, 0, 524288, 0x80000000, 0, 0, 1, 16, 0, 256, 524288, 0, 0, 0, 25, 96, 128, -537854471, 0, 0, 0, 32, 7404800, -545259520, 0, 0, 0, 60, 0, 249, 64768, 1048576, 6291456, 6291456, 25165824, 100663296, 402653184, 1073741824, 96, 128, 1280, 2048, 4096, 57344, 6291456, 57344, 6291456, 8388608, 16777216, 33554432, 201326592, 1342177280, 0x80000000, 0, 57344, 6291456, 8388608, 100663296, 134217728, 0x80000000, 0, 0, 0, 1, 8, 16, 64, 128, 64, 128, 256, 1024, 131072, 131072, 131072, 262144, 524288, 16777216, 57344, 6291456, 8388608, 67108864, 134217728, 64, 256, 1024, 2048, 4096, 57344, 64, 256, 0, 24576, 32768, 6291456, 67108864, 134217728, 0, 1, 64, 256, 24576, 32768, 4194304, 32768, 4194304, 67108864, 0, 0, 64, 256, 0, 0, 24576, 32768, 0, 16384, 4194304, 67108864, 64, 16384, 0, 0, 1, 64, 256, 16384, 4194304, 67108864, 0, 0, 0, 16384, 0, 16384, 16384, 0, -470447874, -470447874, -470447874, 0, 0, 128, 0, 0, 8, 96, 2048, 32768, 262144, 8388608, 35056, 1376256, -471859200, 0, 0, 14, 16, 224, 2048, 32768, 2097152, 4194304, 8388608, -486539264, 0, 96, 128, 2048, 32768, 262144, 2097152, 262144, 2097152, 8388608, 33554432, 536870912, 1073741824, 0x80000000, 0, 1610612736, 0x80000000, 0, 0, 1, 524288, 1048576, 12582912, 0, 0, 0, 151311, 264503296, 2097152, 8388608, 33554432, 1610612736, 0x80000000, 262144, 8388608, 33554432, 536870912, 67108864, 4194304, 0, 4194304, 0, 4194304, 4194304, 0, 0, 524288, 8388608, 536870912, 1073741824, 0x80000000, 1, 4097, 8388609, 96, 2048, 32768, 1073741824, 0x80000000, 0, 96, 2048, 0x80000000, 0, 0, 96, 2048, 0, 0, 1, 12582912, 0, 0, 0, 0, 1641895695, 1641895695, 0, 0, 0, 249, 7404800, 15, 87808, 1835008, 1639972864, 0, 768, 5120, 16384, 65536, 1835008, 1835008, 12582912, 16777216, 1610612736, 0, 3, 4, 8, 768, 4096, 65536, 0, 0, 256, 512, 786432, 8, 256, 512, 4096, 16384, 1835008, 16384, 1835008, 12582912, 1610612736, 0, 0, 0, 256, 0, 0, 0, 4, 8, 16, 32, 1, 2, 8, 256, 16384, 524288, 16384, 524288, 1048576, 12582912, 1610612736, 0, 0, 0, 8388608, 0, 0, 0, 524288, 4194304, 0, 0, 0, 8388608, -548662288, -548662288, -548662288, 0, 0, 256, 16384, 65536, 520093696, -1073741824, 0, 0, 0, 16777216, 0, 16, 32, 960, 4096, 4980736, 520093696, 1073741824, 0, 32, 896, 4096, 57344, 1048576, 6291456, 8388608, 16777216, 100663296, 134217728, 268435456, 0x80000000, 0, 512, 786432, 4194304, 33554432, 134217728, 268435456, 0, 786432, 4194304, 134217728, 268435456, 0, 524288, 4194304, 268435456, 0, 0, 0, 0, 0, 4194304, 4194304, -540651761, 0, 0, 0, 2, 4, 8, 16, 96, 128, 264503296, -805306368, 0, 0, 0, 8, 256, 512, 19456, 131072, 3072, 16384, 131072, 262144, 8388608, 16777216, 512, 1024, 2048, 16384, 131072, 262144, 131072, 262144, 8388608, 33554432, 201326592, 268435456, 0, 3, 4, 256, 1024, 2048, 57344, 16384, 131072, 8388608, 33554432, 134217728, 268435456, 0, 3, 256, 1024, 16384, 131072, 33554432, 134217728, 1073741824, 0x80000000, 0, 0, 256, 524288, 0x80000000, 0, 3, 256, 33554432, 134217728, 1073741824, 0, 1, 2, 33554432, 1, 2, 134217728, 1073741824, 0, 1, 2, 134217728, 0, 0, 0, 64, 0, 0, 0, 16, 32, 896, 4096, 786432, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 0, 0, 0, 15, 0, 4980736, 4980736, 4980736, 70460, 70460, 3478332, 0, 0, 1008, 4984832, 520093696, 60, 4864, 65536, 0, 0, 0, 12, 16, 32, 256, 512, 4096, 65536, 0, 0, 0, 67108864, 0, 0, 0, 12, 0, 256, 512, 65536, 0, 0, 1024, 512, 131072, 131072, 4, 16, 32, 65536, 0, 4, 16, 32, 0, 0, 0, 4, 16, 0, 0, 16384, 67108864, 0, 0, 1, 24, 96, 128, 256, 1024 +]; + +JSONiqTokenizer.TOKEN = +[ + "(0)", + "JSONChar", + "JSONCharRef", + "JSONPredefinedCharRef", + "ModuleDecl", + "Annotation", + "OptionDecl", + "Operator", + "Variable", + "Tag", + "EndTag", + "PragmaContents", + "DirCommentContents", + "DirPIContents", + "CDataSectionContents", + "AttrTest", + "Wildcard", + "EQName", + "IntegerLiteral", + "DecimalLiteral", + "DoubleLiteral", + "PredefinedEntityRef", + "'\"\"'", + "EscapeApos", + "AposChar", + "ElementContentChar", + "QuotAttrContentChar", + "AposAttrContentChar", + "NCName", + "QName", + "S", + "CharRef", + "CommentContents", + "DocTag", + "DocCommentContents", + "EOF", + "'!'", + "'\"'", + "'#'", + "'#)'", + "'$$'", + "''''", + "'('", + "'(#'", + "'(:'", + "'(:~'", + "')'", + "'*'", + "'*'", + "','", + "'-->'", + "'.'", + "'/'", + "'/>'", + "':'", + "':)'", + "';'", + "''), token: xmlcomment, next: function(stack){ stack.pop(); } } + ], + CData: [ + { name: 'CDataSectionContents', token: cdata }, + { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } } + ], + PI: [ + { name: 'DirPIContents', token: pi }, + { name: n('?'), token: pi }, + { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } } + ], + AposString: [ + { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } }, + { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, + { name: 'CharRef', token: 'constant.language.escape' }, + { name: 'EscapeApos', token: 'constant.language.escape' }, + { name: 'AposChar', token: 'string' } + ], + QuotString: [ + { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } }, + { name: 'JSONPredefinedCharRef', token: 'constant.language.escape' }, + { name: 'JSONCharRef', token: 'constant.language.escape' }, + { name: 'JSONChar', token: 'string' } + ] +}; + +exports.JSONiqLexer = function(){ return new Lexer(JSONiqTokenizer, Rules); }; +},{"./JSONiqTokenizer":"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}],"/node_modules/xqlint/lib/lexers/lexer.js":[function(_dereq_,module,exports){ +'use strict'; + +var TokenHandler = function(code) { + var input = code; + this.tokens = []; + + this.reset = function() { + input = input; + this.tokens = []; + }; + + this.startNonterminal = function() {}; + this.endNonterminal = function() {}; + + this.terminal = function(name, begin, end) { + this.tokens.push({ + name: name, + value: input.substring(begin, end) + }); + }; + + this.whitespace = function(begin, end) { + this.tokens.push({ + name: 'WS', + value: input.substring(begin, end) + }); + }; +}; + +exports.Lexer = function(Tokenizer, Rules) { + + this.tokens = []; + + this.getLineTokens = function(line, state) { + state = (state === 'start' || !state) ? '["start"]' : state; + var stack = JSON.parse(state); + var h = new TokenHandler(line); + var tokenizer = new Tokenizer(line, h); + var tokens = []; + + while(true) { + var currentState = stack[stack.length - 1]; + try { + h.tokens = []; + tokenizer['parse_' + currentState](); + var info = null; + + if(h.tokens.length > 1 && h.tokens[0].name === 'WS') { + tokens.push({ + type: 'text', + value: h.tokens[0].value + }); + h.tokens.splice(0, 1); + } + + var token = h.tokens[0]; + var rules = Rules[currentState]; + for(var k = 0; k < rules.length; k++) { + var rule = Rules[currentState][k]; + if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) { + info = rule; + break; + } + } + + if(token.name === 'EOF') { break; } + if(token.value === '') { throw 'Encountered empty string lexical rule.'; } + + tokens.push({ + type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token), + value: token.value + }); + + if(info && info.next) { + info.next(stack); + } + + } catch(e) { + if(e instanceof tokenizer.ParseException) { + var index = 0; + for(var i=0; i < tokens.length; i++) { + index += tokens[i].value.length; + } + tokens.push({ type: 'text', value: line.substring(index) }); + return { + tokens: tokens, + state: JSON.stringify(['start']) + }; + } else { + throw e; + } + } + } + + return { + tokens: tokens, + state: JSON.stringify(stack) + }; + }; +}; +},{}]},{},["/node_modules/xqlint/lib/lexers/jsoniq_lexer.js"]); + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + var atCursor = false; + var state = JSON.parse(state).pop(); + if ((token && token.value === '>') || state !== "StartTag") + return; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))) { + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } + else { + atCursor = true; + } + var previous = iterator.stepBackward(); + if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { + return; + } + var tag = token.value.substring(1); + if (atCursor) { + var tag = tag.substring(0, position.column - token.start); + } + return { + text: '>' + '', + selection: [1, 1] + }; + } + }); +}; +oop.inherits(XQueryBehaviour, Behaviour); +exports.XQueryBehaviour = XQueryBehaviour; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { +"use strict"; + +var WorkerClient = require("../worker/worker_client").WorkerClient; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JSONiqLexer = require("./xquery/jsoniq_lexer").JSONiqLexer; +var Range = require("../range").Range; +var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Anchor = require("../anchor").Anchor; + +var Mode = function() { + this.$tokenizer = new JSONiqLexer(); + this.$behaviour = new XQueryBehaviour(); + this.foldingRules = new CStyleFoldMode(); + this.$highlightRules = new TextHighlightRules(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.completer = { + getCompletions: function(editor, session, pos, prefix, callback) { + if (!session.$worker) + return callback(); + session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } }); + session.$worker.on("complete", function(e){ + callback(null, e.data); + }); + } + }; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); + if (match) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*[\}\)]/.test(input); + }; + + this.autoOutdent = function(state, doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*[\}\)])/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.toggleCommentLines = function(state, doc, startRow, endRow) { + var i, line; + var outdent = true; + var re = /^\s*\(:(.*):\)/; + + for (i=startRow; i<= endRow; i++) { + if (!re.test(doc.getLine(i))) { + outdent = false; + break; + } + } + + var range = new Range(0, 0, 0, 0); + for (i=startRow; i<= endRow; i++) { + line = doc.getLine(i); + range.start.row = i; + range.end.row = i; + range.end.column = line.length; + + doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); + } + }; + this.createWorker = function(session) { + + var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); + var that = this; + + worker.attachToDocument(session.getDocument()); + + worker.on("ok", function(e) { + session.clearAnnotations(); + }); + + worker.on("markers", function(e) { + session.clearAnnotations(); + that.addMarkers(e.data, session); + }); + + return worker; + }; + + this.removeMarkers = function(session) { + var markers = session.getMarkers(false); + for (var id in markers) { + if (markers[id].clazz.indexOf('language_highlight_') === 0) { + session.removeMarker(id); + } + } + for (var i = 0; i < session.markerAnchors.length; i++) { + session.markerAnchors[i].detach(); + } + session.markerAnchors = []; + }; + + this.addMarkers = function(annos, mySession) { + var _self = this; + + if (!mySession.markerAnchors) mySession.markerAnchors = []; + this.removeMarkers(mySession); + mySession.languageAnnos = []; + annos.forEach(function(anno) { + var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0); + mySession.markerAnchors.push(anchor); + var markerId; + var colDiff = anno.pos.ec - anno.pos.sc; + var rowDiff = anno.pos.el - anno.pos.sl; + var gutterAnno = { + guttertext: anno.message, + type: anno.level || "warning", + text: anno.message + }; + + function updateFloat(single) { + if (markerId) + mySession.removeMarker(markerId); + gutterAnno.row = anchor.row; + if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) { + var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec); + markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default")); + } + if (single) mySession.setAnnotations(mySession.languageAnnos); + } + updateFloat(); + anchor.on("change", function() { + updateFloat(true); + }); + if (anno.message) mySession.languageAnnos.push(gutterAnno); + }); + mySession.setAnnotations(mySession.languageAnnos); + }; + + this.$id = "ace/mode/jsoniq"; + this.snippetFileId = "ace/snippets/jsoniq"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/jsoniq"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jsp.js b/ui/base1/ace/mode-jsp.js new file mode 100644 index 0000000..a188b13 --- /dev/null +++ b/ui/base1/ace/mode-jsp.js @@ -0,0 +1,1610 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JavaHighlightRules = function () { + var identifierRe = "[a-zA-Z_$][a-zA-Z0-9_$]*"; + var keywords = ("abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "const|float|native|super|while|" + + "var|exports|opens|requires|uses|yield|" + + "module|permits|(?:non\\-)?sealed|var|" + + "provides|to|when|" + + "open|record|transitive|with"); + var buildinConstants = ("null|Infinity|NaN|undefined"); + var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" + + "ClassFormatError|Deprecated|EnumConstantNotPresentException|" + + "ExceptionInInitializerError|IllegalAccessError|" + + "IllegalThreadStateException|InstantiationError|InternalError|" + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|" + + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" + + "SuppressWarnings|TypeNotPresentException|UnknownError|" + + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" + + "InstantiationException|IndexOutOfBoundsException|" + + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" + + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" + + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" + + "InterruptedException|NoSuchMethodException|IllegalAccessException|" + + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" + + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" + + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" + + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" + + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" + + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" + + "StackOverflowError|OutOfMemoryError|VirtualMachineError|" + + "ArrayStoreException|ClassCastException|LinkageError|" + + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" + + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" + + "Cloneable|Class|CharSequence|Comparable|String|Object"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, + { include: "multiline-strings" }, + { include: "strings" }, + { include: "constants" }, + { + regex: "(open(?:\\s+))?module(?=\\s*\\w)", + token: "keyword", + next: [{ + regex: "{", + token: "paren.lparen", + next: [{ + regex: "}", + token: "paren.rparen", + next: "start" + }, { + regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b", + token: "keyword" + }] + }, { + token: "text", + regex: "\\s+" + }, { + token: "identifier", + regex: "\\w+" + }, { + token: "punctuation.operator", + regex: "." + }, { + token: "text", + regex: "\\s+" + }, { + regex: "", // exit if there is anything else + next: "start" + }] + }, + { include: "statements" } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "strings": [ + { + token: ["punctuation", "string"], + regex: /(\.)(")/, + push: [ + { + token: "lparen", + regex: /\\\{/, + push: [ + { + token: "text", + regex: /$/, + next: "start" + }, { + token: "rparen", + regex: /}/, + next: "pop" + }, { + include: "strings" + }, { + include: "constants" + }, { + include: "statements" + } + ] + }, { + token: "string", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + } + ] + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + } + ], + "multiline-strings": [ + { + token: ["punctuation", "string"], + regex: /(\.)(""")/, + push: [ + { + token: "string", + regex: '"""', + next: "pop" + }, { + token: "lparen", + regex: /\\\{/, + push: [ + { + token: "text", + regex: /$/, + next: "start" + }, { + token: "rparen", + regex: /}/, + next: "pop" + }, { + include: "multiline-strings" + }, { + include: "strings" + }, { + include: "constants" + }, { + include: "statements" + } + ] + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + defaultToken: "string" + } + ] + }, + { + token: "string", + regex: '"""', + push: [ + { + token: "string", + regex: '"""', + next: "pop" + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + defaultToken: "string" + } + ] + } + ], + "constants": [ + { + token: "constant.numeric", // hex + regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ + }, { + token: "constant.numeric", // float + regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + } + ], + "statements": [ + { + token: ["keyword", "text", "identifier"], + regex: "(record)(\\s+)(" + identifierRe + ")\\b" + }, + { + token: "keyword", + regex: "(?:" + keywords + ")\\b" + }, { + token: "storage.type.annotation", + regex: "@" + identifierRe + "\\b" + }, { + token: "entity.name.function", + regex: identifierRe + "(?=\\()" + }, { + token: keywordMapper, // TODO: Unicode escape sequences + regex: identifierRe + "\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(JavaHighlightRules, TextHighlightRules); +exports.JavaHighlightRules = JavaHighlightRules; + +}); + +define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; +var JspHighlightRules = function () { + HtmlHighlightRules.call(this); + var builtinVariables = 'request|response|out|session|' + + 'application|config|pageContext|page|Exception'; + var keywords = 'page|include|taglib'; + var startRules = [ + { + token: "comment", + regex: "<%--", + push: "jsp-dcomment" + }, { + token: "meta.tag", // jsp open tag + regex: "<%@?|<%=?|<%!?|]+>", + push: "jsp-start" + } + ]; + var endRules = [ + { + token: "meta.tag", // jsp close tag + regex: "%>|<\\/jsp:[^>]+>", + next: "pop" + }, { + token: "variable.language", + regex: builtinVariables + }, { + token: "keyword", + regex: keywords + } + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.embedRules(JavaHighlightRules, "jsp-", endRules, ["start"]); + this.addRules({ + "jsp-dcomment": [{ + token: "comment", + regex: ".*?--%>", + next: "pop" + }] + }); + this.normalizeRules(); +}; +oop.inherits(JspHighlightRules, HtmlHighlightRules); +exports.JspHighlightRules = JspHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = JspHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/jsp"; + this.snippetFileId = "ace/snippets/jsp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/jsp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jssm.js b/ui/base1/ace/mode-jssm.js new file mode 100644 index 0000000..3ce5ce1 --- /dev/null +++ b/ui/base1/ace/mode-jssm.js @@ -0,0 +1,293 @@ +define("ace/mode/jssm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from ./jssm.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JSSMHighlightRules = function () { + this.$rules = { + start: [{ + token: "punctuation.definition.comment.mn", + regex: /\/\*/, + push: [{ + token: "punctuation.definition.comment.mn", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment.block.jssm" + }], + comment: "block comment" + }, { + token: "comment.line.jssm", + regex: /\/\//, + push: [{ + token: "comment.line.jssm", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.line.jssm" + }], + comment: "block comment" + }, { + token: "entity.name.function", + regex: /\${/, + push: [{ + token: "entity.name.function", + regex: /}/, + next: "pop" + }, { + defaultToken: "keyword.other" + }], + comment: "js outcalls" + }, { + token: "constant.numeric", + regex: /[0-9]*\.[0-9]*\.[0-9]*/, + comment: "semver" + }, { + token: "constant.language.jssmLanguage", + regex: /graph_layout\s*:/, + comment: "jssm language tokens" + }, { + token: "constant.language.jssmLanguage", + regex: /machine_name\s*:/, + comment: "jssm language tokens" + }, { + token: "constant.language.jssmLanguage", + regex: /machine_version\s*:/, + comment: "jssm language tokens" + }, { + token: "constant.language.jssmLanguage", + regex: /jssm_version\s*:/, + comment: "jssm language tokens" + }, { + token: "keyword.control.transition.jssmArrow.legal_legal", + regex: /<->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.legal_none", + regex: /<-/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.none_legal", + regex: /->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_main", + regex: /<=>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.none_main", + regex: /=>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_none", + regex: /<=/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_forced", + regex: /<~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.none_forced", + regex: /~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_none", + regex: /<~/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.legal_main", + regex: /<-=>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_legal", + regex: /<=->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.legal_forced", + regex: /<-~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_legal", + regex: /<~->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_forced", + regex: /<=~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_main", + regex: /<~=>/, + comment: "transitions" + }, { + token: "constant.numeric.jssmProbability", + regex: /[0-9]+%/, + comment: "edge probability annotation" + }, { + token: "constant.character.jssmAction", + regex: /\'[^']*\'/, + comment: "action annotation" + }, { + token: "entity.name.tag.jssmLabel.doublequoted", + regex: /\"[^"]*\"/, + comment: "jssm label annotation" + }, { + token: "entity.name.tag.jssmLabel.atom", + regex: /[a-zA-Z0-9_.+&()#@!?,]/, + comment: "jssm label annotation" + }] + }; + this.normalizeRules(); +}; +JSSMHighlightRules.metaData = { + fileTypes: ["jssm", "jssm_state"], + name: "JSSM", + scopeName: "source.jssm" +}; +oop.inherits(JSSMHighlightRules, TextHighlightRules); +exports.JSSMHighlightRules = JSSMHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jssm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jssm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JSSMHighlightRules = require("./jssm_highlight_rules").JSSMHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = JSSMHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/jssm"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/jssm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-jsx.js b/ui/base1/ace/mode-jsx.js new file mode 100644 index 0000000..89f8af6 --- /dev/null +++ b/ui/base1/ace/mode-jsx.js @@ -0,0 +1,1209 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var jsMode = require("./javascript").Mode; +function Mode() { + jsMode.call(this); + this.$highlightRuleConfig = { jsx: true }; +} +oop.inherits(Mode, jsMode); +(function () { + this.createWorker = function () { + return null; + }; + this.$id = "ace/mode/jsx"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/jsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-julia.js b/ui/base1/ace/mode-julia.js new file mode 100644 index 0000000..a964509 --- /dev/null +++ b/ui/base1/ace/mode-julia.js @@ -0,0 +1,254 @@ +define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.github.com/JuliaLang/julia/master/contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JuliaHighlightRules = function () { + this.$rules = { start: [{ include: '#function_decl' }, + { include: '#function_call' }, + { include: '#type_decl' }, + { include: '#keyword' }, + { include: '#operator' }, + { include: '#number' }, + { include: '#string' }, + { include: '#comment' }], + '#bracket': [{ token: 'keyword.bracket.julia', + regex: '\\(|\\)|\\[|\\]|\\{|\\}|,' }], + '#comment': [{ token: ['punctuation.definition.comment.julia', + 'comment.line.number-sign.julia'], + regex: '(#)(?!\\{)(.*$)' }], + '#function_call': [{ token: ['support.function.julia', 'text'], + regex: '([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()' }], + '#function_decl': [{ token: ['keyword.other.julia', 'meta.function.julia', + 'entity.name.function.julia', 'meta.function.julia', 'text'], + regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])' }], + '#keyword': [{ token: 'keyword.other.julia', + regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' }, + { token: 'keyword.control.julia', + regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' }, + { token: 'storage.modifier.variable.julia', + regex: '\\b(?:global|local|const|export|import|importall|using)\\b' }, + { token: 'variable.macro.julia', regex: '@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b' }], + '#number': [{ token: 'constant.numeric.julia', + regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' }], + '#operator': [{ token: 'keyword.operator.update.julia', + regex: '=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=' }, + { token: 'keyword.operator.ternary.julia', regex: '\\?|:' }, + { token: 'keyword.operator.boolean.julia', + regex: '\\|\\||&&|!' }, + { token: 'keyword.operator.arrow.julia', regex: '->|<-|-->' }, + { token: 'keyword.operator.relation.julia', + regex: '>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>' }, + { token: 'keyword.operator.range.julia', regex: ':' }, + { token: 'keyword.operator.shift.julia', regex: '<<|>>' }, + { token: 'keyword.operator.bitwise.julia', regex: '\\||\\&|~' }, + { token: 'keyword.operator.arithmetic.julia', + regex: '\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^' }, + { token: 'keyword.operator.isa.julia', regex: '::' }, + { token: 'keyword.operator.dots.julia', + regex: '\\.(?=[a-zA-Z])|\\.\\.+' }, + { token: 'keyword.operator.interpolation.julia', + regex: '\\$#?(?=.)' }, + { token: ['variable', 'keyword.operator.transposed-variable.julia'], + regex: '([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:\'|\\.\')*\\.?\')' }, + { token: 'text', + regex: '\\[|\\(' }, + { token: ['text', 'keyword.operator.transposed-matrix.julia'], + regex: "([\\]\\)])((?:'|\\.')*\\.?')" }], + '#string': [{ token: 'punctuation.definition.string.begin.julia', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.julia', + regex: '\'', + next: 'pop' }, + { include: '#string_escaped_char' }, + { defaultToken: 'string.quoted.single.julia' }] }, + { token: 'punctuation.definition.string.begin.julia', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.julia', + regex: '"', + next: 'pop' }, + { include: '#string_escaped_char' }, + { defaultToken: 'string.quoted.double.julia' }] }, + { token: 'punctuation.definition.string.begin.julia', + regex: '\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"', + push: [{ token: 'punctuation.definition.string.end.julia', + regex: '"[\\w\\xff-\\u218e\\u2455-\\uffff]*', + next: 'pop' }, + { include: '#string_custom_escaped_char' }, + { defaultToken: 'string.quoted.custom-double.julia' }] }, + { token: 'punctuation.definition.string.begin.julia', + regex: '`', + push: [{ token: 'punctuation.definition.string.end.julia', + regex: '`', + next: 'pop' }, + { include: '#string_escaped_char' }, + { defaultToken: 'string.quoted.backtick.julia' }] }], + '#string_custom_escaped_char': [{ token: 'constant.character.escape.julia', regex: '\\\\"' }], + '#string_escaped_char': [{ token: 'constant.character.escape.julia', + regex: '\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)' }], + '#type_decl': [{ token: ['keyword.control.type.julia', + 'meta.type.julia', + 'entity.name.type.julia', + 'entity.other.inherited-class.julia', + 'punctuation.separator.inheritance.julia', + 'entity.other.inherited-class.julia'], + regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' }, + { token: ['other.typed-variable.julia', 'support.type.julia'], + regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' }] }; + this.normalizeRules(); +}; +JuliaHighlightRules.metaData = { fileTypes: ['jl'], + firstLineMatch: '^#!.*\\bjulia\\s*$', + foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$', + foldingStopMarker: '^\\s*(?:end)\\b.*$', + name: 'Julia', + scopeName: 'source.julia' }; +oop.inherits(JuliaHighlightRules, TextHighlightRules); +exports.JuliaHighlightRules = JuliaHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = JuliaHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = ""; + this.$id = "ace/mode/julia"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/julia"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-kotlin.js b/ui/base1/ace/mode-kotlin.js new file mode 100644 index 0000000..8cb271f --- /dev/null +++ b/ui/base1/ace/mode-kotlin.js @@ -0,0 +1,445 @@ +define("ace/mode/kotlin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var KotlinHighlightRules = function () { + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "storage.modifier.kotlin": "var|val|public|private|protected|abstract|final|enum|open|attribute|" + + "annotation|override|inline|var|val|vararg|lazy|in|out|internal|data|tailrec|operator|infix|const|" + + "yield|typealias|typeof|sealed|inner|value|lateinit|external|suspend|noinline|crossinline|reified|" + + "expect|actual", + "keyword": "companion|class|object|interface|namespace|type|fun|constructor|if|else|while|for|do|return|when|" + + "where|break|continue|try|catch|finally|throw|in|is|as|assert|constructor", + "constant.language.kotlin": "true|false|null|this|super", + "entity.name.function.kotlin": "get|set" + }, "identifier"); + this.$rules = { + start: [{ + include: "#comments" + }, { + token: [ + "text", + "keyword.other.kotlin", + "text", + "entity.name.package.kotlin", + "text" + ], + regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*))?/ + }, { + token: "comment", + regex: /^\s*#!.*$/ + }, { + include: "#imports" + }, { + include: "#expressions" + }, { + token: "string", + regex: /@[a-zA-Z][a-zA-Z:]*\b/ + }, { + token: ["keyword.other.kotlin", "text", "entity.name.variable.kotlin"], + regex: /\b(var|val)(\s+)([a-zA-Z_][\w]*)\b/ + }, { + token: ["keyword.other.kotlin", "text", "entity.name.variable.kotlin", "paren.lparen"], + regex: /(fun)(\s+)(\w+)(\()/, + push: [{ + token: ["variable.parameter.function.kotlin", "text", "keyword.operator"], + regex: /(\w+)(\s*)(:)/ + }, { + token: "paren.rparen", + regex: /\)/, + next: "pop" + }, { + include: "#comments" + }, { + include: "#types" + }, { + include: "#expressions" + }] + }, { + token: ["text", "keyword", "text", "identifier"], + regex: /^(\s*)(class)(\s*)([a-zA-Z]+)/, + next: "#classes" + }, { + token: ["identifier", "punctuaction"], + regex: /([a-zA-Z_][\w]*)(<)/, + push: [{ + include: "#generics" + }, { + include: "#defaultTypes" + }, { + token: "punctuation", + regex: />/, + next: "pop" + }] + }, { + token: keywordMapper, + regex: /[a-zA-Z_][\w]*\b/ + }, { + token: "paren.lparen", + regex: /[{(\[]/ + }, { + token: "paren.rparen", + regex: /[})\]]/ + }], + "#comments": [{ + token: "comment", + regex: /\/\*/, + push: [{ + token: "comment", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment" + }] + }, { + token: [ + "text", + "comment" + ], + regex: /(\s*)(\/\/.*$)/ + }], + "#constants": [{ + token: "constant.numeric.kotlin", + regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\b/ + }, { + token: "constant.other.kotlin", + regex: /\b[A-Z][A-Z0-9_]+\b/ + }], + "#expressions": [{ + include: "#strings" + }, { + include: "#constants" + }, { + include: "#keywords" + }], + "#imports": [{ + token: [ + "text", + "keyword.other.kotlin", + "text", + "keyword.other.kotlin" + ], + regex: /^(\s*)(import)(\s+[^ $]+\s+)((?:as)?)/ + }], + "#generics": [{ + token: "punctuation", + regex: //, + next: "pop" + }, { + token: "storage.type.generic.kotlin", + regex: /\w+/ + }, { + token: "keyword.operator", + regex: /:/ + }, { + token: "punctuation", + regex: /,/ + }, { + include: "#generics" + }] + }], + "#classes": [{ + include: "#generics" + }, { + token: "keyword", + regex: /public|private|constructor/ + }, { + token: "string", + regex: /@[a-zA-Z][a-zA-Z:]*\b/ + }, { + token: "text", + regex: /(?=$|\(|{)/, + next: "start" + }], + "#keywords": [{ + token: "keyword.operator.kotlin", + regex: /==|!=|===|!==|<=|>=|<|>|=>|->|::|\?:/ + }, { + token: "keyword.operator.assignment.kotlin", + regex: /=/ + }, { + token: "keyword.operator.declaration.kotlin", + regex: /:/, + push: [{ + token: "text", + regex: /(?=$|{|=|,)/, + next: "pop" + }, { + include: "#types" + }] + }, { + token: "keyword.operator.dot.kotlin", + regex: /\./ + }, { + token: "keyword.operator.increment-decrement.kotlin", + regex: /\-\-|\+\+/ + }, { + token: "keyword.operator.arithmetic.kotlin", + regex: /\-|\+|\*|\/|%/ + }, { + token: "keyword.operator.arithmetic.assign.kotlin", + regex: /\+=|\-=|\*=|\/=/ + }, { + token: "keyword.operator.logical.kotlin", + regex: /!|&&|\|\|/ + }, { + token: "keyword.operator.range.kotlin", + regex: /\.\./ + }, { + token: "punctuation.kotlin", + regex: /[;,]/ + }], + "#types": [{ + include: "#defaultTypes" + }, { + token: "paren.lparen", + regex: /\(/, + push: [{ + token: "paren.rparen", + regex: /\)/, + next: "pop" + }, { + include: "#defaultTypes" + }, { + token: "punctuation", + regex: /,/ + }] + }, { + include: "#generics" + }, { + token: "keyword.operator.declaration.kotlin", + regex: /->/ + }, { + token: "paren.rparen", + regex: /\)/ + }, { + token: "keyword.operator.declaration.kotlin", + regex: /:/, + push: [{ + token: "text", + regex: /(?=$|{|=|,)/, + next: "pop" + }, { + include: "#types" + }] + }], + "#defaultTypes": [{ + token: "storage.type.buildin.kotlin", + regex: /\b(Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic|IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray|Array|List|Map|Nothing|Enum|Throwable|Comparable)\b/ + }], + "#strings": [{ + token: "string", + regex: /"""/, + push: [{ + token: "string", + regex: /"""/, + next: "pop" + }, { + token: "variable.parameter.template.kotlin", + regex: /\$\w+|\${[^}]+}/ + }, { + token: "constant.character.escape.kotlin", + regex: /\\./ + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: /"/, + push: [{ + token: "string", + regex: /"/, + next: "pop" + }, { + token: "variable.parameter.template.kotlin", + regex: /\$\w+|\$\{[^\}]+\}/ + }, { + token: "constant.character.escape.kotlin", + regex: /\\./ + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: /'/, + push: [{ + token: "string", + regex: /'/, + next: "pop" + }, { + token: "constant.character.escape.kotlin", + regex: /\\./ + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: /`/, + push: [{ + token: "string", + regex: /`/, + next: "pop" + }, { + defaultToken: "string" + }] + }] + }; + this.normalizeRules(); +}; +KotlinHighlightRules.metaData = { + fileTypes: ["kt", "kts"], + name: "Kotlin", + scopeName: "source.Kotlin" +}; +oop.inherits(KotlinHighlightRules, TextHighlightRules); +exports.KotlinHighlightRules = KotlinHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var KotlinHighlightRules = require("./kotlin_highlight_rules").KotlinHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = KotlinHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/kotlin"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/kotlin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-latex.js b/ui/base1/ace/mode-latex.js new file mode 100644 index 0000000..72e7555 --- /dev/null +++ b/ui/base1/ace/mode-latex.js @@ -0,0 +1,252 @@ +define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LatexHighlightRules = function () { + this.$rules = { + "start": [{ + token: "comment", + regex: "%.*$" + }, { + token: ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"], + regex: "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})" + }, { + token: ["keyword", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?" + }, { + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\begin)({)(verbatim)(})", + next: "verbatim" + }, { + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\begin)({)(lstlisting)(})", + next: "lstlisting" + }, { + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\(?:begin|end))({)([\\w*]*)(})" + }, { + token: "storage.type", + regex: /\\verb\b\*?/, + next: [{ + token: ["keyword.operator", "string", "keyword.operator"], + regex: "(.)(.*?)(\\1|$)|", + next: "start" + }] + }, { + token: "storage.type", + regex: "\\\\[a-zA-Z]+" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "constant.character.escape", + regex: "\\\\[^a-zA-Z]?" + }, { + token: "string", + regex: "\\${1,2}", + next: "equation" + }], + "equation": [{ + token: "comment", + regex: "%.*$" + }, { + token: "string", + regex: "\\${1,2}", + next: "start" + }, { + token: "constant.character.escape", + regex: "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" + }, { + token: "error", + regex: "^\\s*$", + next: "start" + }, { + defaultToken: "string" + }], + "verbatim": [{ + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\end)({)(verbatim)(})", + next: "start" + }, { + defaultToken: "text" + }], + "lstlisting": [{ + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\end)({)(lstlisting)(})", + next: "start" + }, { + defaultToken: "text" + }] + }; + this.normalizeRules(); +}; +oop.inherits(LatexHighlightRules, TextHighlightRules); +exports.LatexHighlightRules = LatexHighlightRules; + +}); + +define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var keywordLevels = { + "\\subparagraph": 1, + "\\paragraph": 2, + "\\subsubsubsection": 3, + "\\subsubsection": 4, + "\\subsection": 5, + "\\section": 6, + "\\chapter": 7, + "\\part": 8, + "\\begin": 9, + "\\end": 10 +}; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\b|{\s*$/; + this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1]) + return this.latexBlock(session, row, match[0].length - 1); + if (match[2]) + return this.latexSection(session, row, match[0].length - 1); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[1]) + return this.latexBlock(session, row, match[0].length - 1); + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.latexBlock = function (session, row, column, returnRange) { + var keywords = { + "\\begin": 1, + "\\end": -1 + }; + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape")) + return; + var val = token.value; + var dir = keywords[val]; + var getType = function () { + var token = stream.stepForward(); + var type = token && token.type == "lparen" ? stream.stepForward().value : ""; + if (dir === -1) { + stream.stepBackward(); + if (type) + stream.stepBackward(); + } + return type; + }; + var stack = [getType()]; + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while (token = stream.step()) { + if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape")) + continue; + var level = keywords[token.value]; + if (!level) + continue; + var type = getType(); + if (level === dir) + stack.unshift(type); + else if (stack.shift() !== type || !stack.length) + break; + } + if (stack.length) + return; + if (dir == 1) { + stream.stepBackward(); + stream.stepBackward(); + } + if (returnRange) + return stream.getCurrentTokenRange(); + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; + this.latexSection = function (session, row, column) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || token.type != "storage.type") + return; + var startLevel = keywordLevels[token.value] || 0; + var stackDepth = 0; + var endRow = row; + while (token = stream.stepForward()) { + if (token.type !== "storage.type") + continue; + var level = keywordLevels[token.value] || 0; + if (level >= 9) { + if (!stackDepth) + endRow = stream.getCurrentTokenRow() - 1; + stackDepth += level == 9 ? 1 : -1; + if (stackDepth < 0) + break; + } + else if (level >= startLevel) + break; + } + if (!stackDepth) + endRow = stream.getCurrentTokenRow() - 1; + while (endRow > row && !/\S/.test(session.getLine(endRow))) + endRow--; + return new Range(row, session.getLine(row).length, endRow, session.getLine(endRow).length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/latex"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var LatexFoldMode = require("./folding/latex").FoldMode; +var Mode = function () { + this.HighlightRules = LatexHighlightRules; + this.foldingRules = new LatexFoldMode(); + this.$behaviour = new CstyleBehaviour({ braces: true }); +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.lineCommentStart = "%"; + this.$id = "ace/mode/latex"; + this.getMatching = function (session, row, column) { + if (row == undefined) + row = session.selection.lead; + if (typeof row == "object") { + column = row.column; + row = row.row; + } + var startToken = session.getTokenAt(row, column); + if (!startToken) + return; + if (startToken.value == "\\begin" || startToken.value == "\\end") { + return this.foldingRules.latexBlock(session, row, column, true); + } + }; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/latex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-latte.js b/ui/base1/ace/mode-latte.js new file mode 100644 index 0000000..2b7d120 --- /dev/null +++ b/ui/base1/ace/mode-latte.js @@ -0,0 +1,2522 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/latte_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LatteHighlightRules = function () { + HtmlHighlightRules.call(this); + for (var rule in this.$rules) { + this.$rules[rule].unshift({ + token: "comment.start.latte", + regex: "\\{\\*", + push: [{ + token: "comment.end.latte", + regex: ".*\\*\\}", + next: "pop" + }, { + defaultToken: "comment" + }] + }, { + token: "meta.tag.punctuation.tag-open.latte", + regex: "\\{(?![\\s'\"{}]|$)/?", + push: [{ + token: "meta.tag.latte", + regex: "(?:_|=|[a-z]\\w*(?:[.:-]\\w+)*)?", + next: [{ + token: "meta.tag.punctuation.tag-close.latte", + regex: "\\}", + next: "pop" + }, { + include: "latte-content" + }] + }] + }); + } + this.$rules['tag_stuff'].unshift({ + token: "meta.attribute.latte", + regex: "n:[\\w-]+", + next: [{ + include: "tag_whitespace" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + next: [{ + token: "string.attribute-value.xml", + regex: "'", + next: [ + { token: "string.attribute-value.xml", regex: "'", next: "tag_stuff" }, + { include: "latte-content" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + next: [ + { token: "string.attribute-value.xml", regex: '"', next: "tag_stuff" }, + { include: "latte-content" } + ] + }, { + token: "text.tag-whitespace.xml", + regex: "\\s", + next: "tag_stuff" + }, { + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + next: "tag_stuff" + }, { + include: "latte-content" + }] + }, { + token: "empty", + regex: "", + next: "tag_stuff" + }] + }); + this.$rules["latte-content"] = [ + { + token: "comment.start.latte", // multi line comment + regex: "\\/\\*", + push: [ + { + token: "comment.end.latte", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + } + ] + }, { + token: "string.start", // " string start + regex: '"', + push: [ + { + token: "constant.language.escape", + regex: '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, { + token: "variable", + regex: /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/ + }, { + token: "variable", + regex: /\$\{[^"\}]+\}?/ // this is wrong but ok for now + }, + { token: "string.end", regex: '"', next: "pop" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", // ' string start + regex: "'", + push: [ + { token: "constant.language.escape", regex: /\\['\\]/ }, + { token: "string.end", regex: "'", next: "pop" }, + { defaultToken: "string" } + ] + }, { + token: "keyword.control", + regex: "\\b(?:INF|NAN|and|or|xor|AND|OR|XOR|clone|new|instanceof|return|continue|break|as)\\b" + }, { + token: "constant.language", + regex: "\\b(?:true|false|null|TRUE|FALSE|NULL)\\b" + }, { + token: "variable", + regex: /\$\w+/ + }, { + token: "constant.numeric", + regex: "[+-]?[0-9]+(?:\\.[0-9]+)?(?:e[0-9]+)?" + }, { + token: ["support.class", "keyword.operator"], + regex: "\\b(\\w+)(::)" + }, { + token: "constant.language", // constants + regex: "\\b(?:[A-Z0-9_]+)\\b" + }, { + token: "string.unquoted", + regex: "\\w+(?:-+\\w+)*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "keyword.operator", + regex: "::|=>|->|\\?->|\\?\\?->|\\+\\+|--|<<|>>|<=>|<=|>=|===|!==|==|!=|<>|&&|\\|\\||\\?\\?|\\?>|\\*\\*|\\.\\.\\.|[^'\"]" // =>, any char except quotes + } + ]; + this.normalizeRules(); +}; +oop.inherits(LatteHighlightRules, TextHighlightRules); +exports.LatteHighlightRules = LatteHighlightRules; + +}); + +define("ace/mode/latte",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/latte_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var LatteHighlightRules = require("./latte_highlight_rules").LatteHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = LatteHighlightRules; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.blockComment = { start: "{*", end: "*}" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*\{(?:if|else|elseif|ifset|elseifset|ifchanged|switch|case|foreach|iterateWhile|for|while|first|last|sep|try|capture|spaceless|snippet|block|define|embed|snippetArea)\b[^{]*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return /^\s+\{\/$/.test(line + input); + }; + this.autoOutdent = function (state, doc, row) { + }; + this.$id = "ace/mode/latte"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/latte"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-less.js b/ui/base1/ace/mode-less.js new file mode 100644 index 0000000..a5dc9a8 --- /dev/null +++ b/ui/base1/ace/mode-less.js @@ -0,0 +1,742 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require('./css_highlight_rules'); +var LessHighlightRules = function () { + var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" + + "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" + + "or|and|when|not"; + var keywords = keywordList.split('|'); + var properties = CssHighlightRules.supportType.split('|'); + var keywordMapper = this.createKeywordMapper({ + "support.constant": CssHighlightRules.supportConstant, + "keyword": keywordList, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "identifier", true); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "paren.lparen", "string", "paren.rparen"], + regex: "(url)(\\()(.*)(\\))" + }, { + token: ["support.function", "paren.lparen"], + regex: "(:extend|[a-z0-9_\\-]+)(\\()" + }, { + token: function (value) { + if (keywords.indexOf(value.toLowerCase()) > -1) + return "keyword"; + else + return "variable"; + }, + regex: "[@\\$][a-z0-9_\\-@\\$]*\\b" + }, { + token: "variable", + regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}" + }, { + token: function (first, second) { + if (properties.indexOf(first.toLowerCase()) > -1) { + return ["support.type.property", "text"]; + } + else { + return ["support.type.unknownProperty", "text"]; + } + }, + regex: "([a-z0-9-_]+)(\\s*:)" + }, { + token: "keyword", + regex: "&" // special case - always treat as keyword + }, { + token: keywordMapper, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z_][a-z0-9-_]*" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(LessHighlightRules, TextHighlightRules); +exports.LessHighlightRules = LessHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CssCompletions = require("./css_completions").CssCompletions; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = LessHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions("ruleset", session, pos, prefix); + }; + this.$id = "ace/mode/less"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/less"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-liquid.js b/ui/base1/ace/mode-liquid.js new file mode 100644 index 0000000..23015d3 --- /dev/null +++ b/ui/base1/ace/mode-liquid.js @@ -0,0 +1,2741 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "variable", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "text", // single quoted strings are not allowed + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "comment", // comments are not allowed, but who cares? + regex: "\\/\\/.*$" + }, { + token: "comment.start", // comments are not allowed, but who cares? + regex: "\\/\\*", + next: "comment" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "punctuation.operator", + regex: /[,]/ + }, { + token: "text", + regex: "\\s+" + } + ], + "string": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + } + ], + "comment": [ + { + token: "comment.end", // comments are not allowed, but who cares? + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; +}; +oop.inherits(JsonHighlightRules, TextHighlightRules); +exports.JsonHighlightRules = JsonHighlightRules; + +}); + +define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./json_highlight_rules").JsonHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/json"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules","ace/mode/html_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var LiquidHighlightRules = function () { + HtmlHighlightRules.call(this); + function onMatchEmbedded(name) { + var length = name.length; + return function (value) { + var idx = value.indexOf(name); + var x = [ + { + type: "meta.tag.punctuation.tag-open", + value: "{%" + }, + { + type: "text", + value: value.slice(2, idx) + }, + { + type: "keyword.tag" + name + ".tag-name", + value: value.slice(idx, idx + length) + }, + { + type: "text", + value: value.slice(idx + length, value.indexOf("%}")) + }, + { + type: "meta.tag.punctuation.tag-close", + value: "%}" + } + ]; + return x; + }; + } + for (var rule in this.$rules) { + this.$rules[rule].unshift({ + token: "comment.block", + regex: /{%-?\s*comment\s*-?%}/, + next: [ + { + token: "comment.block", + regex: /{%-?\s*endcomment\s*-?%}/, + next: "pop" + }, + { + defaultToken: "comment", + caseInsensitive: false + } + ] + }, { + token: "comment.line", + regex: /{%-?\s*#/, + next: [ + { + token: "comment.line", + regex: /-?%}/, + next: "pop" + }, + { + defaultToken: "comment", + caseInsensitive: false + } + ] + }, { + token: 'style.embedded.start', + regex: /({%-?\s*\bstyle\b\s*-?%})/, + next: "style-start", + onMatch: onMatchEmbedded("style") + }, { + regex: /({%-?\s*\bstylesheet\b\s*-?%})/, + next: "stylesheet-start", + onMatch: onMatchEmbedded("stylesheet") + }, { + regex: /({%-?\s*\bschema\b\s*-?%})/, + next: "schema-start", + onMatch: onMatchEmbedded("schema") + }, { + regex: /({%-?\s*\bjavascript\b\s*-?%})/, + next: "javascript-start", + onMatch: onMatchEmbedded("javascript") + }, { + token: "meta.tag.punctuation.tag-open", + regex: /({%)/, + next: [ + { + token: "keyword.block", + regex: /-?\s*[a-zA-Z_$][a-zA-Z0-9_$]+\b/, + next: 'liquid-start' + }, + { + token: "meta.tag.punctuation.tag-close", + regex: /(-?)(%})/, + next: "pop" + } + ] + }, { + token: "meta.tag.punctuation.ouput-open", + regex: /({{)/, + push: "liquid-start" + }); + } + this.embedRules(JsonHighlightRules, "schema-", [ + { + token: "schema-start", + next: "pop", + regex: /({%-?\s*\bendschema\b\s*-?%})/, + onMatch: onMatchEmbedded("endschema") + } + ]); + this.embedRules(JavaScriptHighlightRules, "javascript-", [ + { + token: "javascript-start", + next: "pop", + regex: /({%-?\s*\bendjavascript\b\s*-?%})/, + onMatch: onMatchEmbedded("endjavascript") + } + ]); + this.embedRules(CssHighlightRules, "style-", [ + { + token: "style-start", + next: "pop", + regex: /({%-?\s*\bendstyle\b\s*-?%})/, + onMatch: onMatchEmbedded("endstyle") + } + ]); + this.embedRules(CssHighlightRules, "stylesheet-", [ + { + token: "stylesheet-start", + next: "pop", + regex: /({%-?\s*\bendstylesheet\b\s*-?%})/, + onMatch: onMatchEmbedded("endstylesheet") + } + ]); + this.addRules({ + "liquid-start": [ + { + token: "meta.tag.punctuation.ouput-close", + regex: /}}/, + next: "pop" + }, + { + token: "meta.tag.punctuation.tag-close", + regex: /%}/, + next: "pop" + }, + { + token: "string", + regex: /['](?:(?:\\.)|(?:[^'\\]))*?[']/ + }, + { + token: "string", + regex: /["](?:(?:\\.)|(?:[^'\\]))*?["]/ + }, + { + token: "constant.numeric", + regex: /0[xX][0-9a-fA-F]+\b/ + }, + { + token: "constant.numeric", + regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, + { + token: "keyword.operator", + regex: /\*|\-|\+|=|!=|\?\|\:/ + }, + { + token: "constant.language.boolean", + regex: /(?:true|false|nil|empty)\b/ + }, + { + token: "keyword.operator", + regex: /\s+(?:and|contains|in|with)\b\s+/ + }, + { + token: ["keyword.operator", "support.function"], + regex: /(\|\s*)([a-zA-Z_]+)/ + }, + { + token: "support.function", + regex: /\s*([a-zA-Z_]+\b)(?=:)/ + }, + { + token: "keyword.operator", + regex: /(:)\s*(?=[a-zA-Z_])/ + }, + { + token: [ + "support.class", + "keyword.operator", + "support.object", + "keyword.operator", + "variable.parameter" + ], + regex: /(\w+)(\.)(\w+)(\.)?(\w+)?/ + }, + { + token: "variable.parameter", + regex: /\.([a-zA-Z_$][a-zA-Z0-9_$]*\b)$/ + }, + { + token: "support.class", + regex: /(?:additional_checkout_buttons|content_for_additional_checkout_buttons)\b/ + }, + { + token: "paren.lparen", + regex: /[\[\({]/ + }, + { + token: "paren.rparen", + regex: /[\])}]/ + }, + { + token: "text", + regex: /\s+/ + } + ] + }); + this.normalizeRules(); +}; +oop.inherits(LiquidHighlightRules, TextHighlightRules); +exports.LiquidHighlightRules = LiquidHighlightRules; + +}); + +define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/html","ace/mode/javascript","ace/mode/json","ace/mode/css","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HtmlMode = require("./html").Mode; +var JavascriptMode = require("./javascript").Mode; +var JsonMode = require("./json").Mode; +var CssMode = require("./css").Mode; +var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + JsonMode.call(this); + HtmlMode.call(this); + CssMode.call(this); + JavascriptMode.call(this); + this.HighlightRules = LiquidHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = new HtmlMode().voidElements; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/liquid"; + this.snippetFileId = "ace/snippets/liquid"; +}.call(Mode.prototype)); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/liquid"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-lisp.js b/ui/base1/ace/mode-lisp.js new file mode 100644 index 0000000..5bf4b3d --- /dev/null +++ b/ui/base1/ace/mode-lisp.js @@ -0,0 +1,104 @@ +define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY Lisp.tmlanguage (UUID: 00D451C9-6B1D-11D9-8DFA-000D93589AF6) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LispHighlightRules = function () { + var keywordControl = "case|do|let|loop|if|else|when"; + var keywordOperator = "eq|neq|and|or"; + var constantLanguage = "null|nil"; + var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn"; + var keywordMapper = this.createKeywordMapper({ + "keyword.control": keywordControl, + "keyword.operator": keywordOperator, + "constant.language": constantLanguage, + "support.function": supportFunctions + }, "identifier", true); + this.$rules = + { + "start": [ + { + token: "comment", + regex: ";.*$" + }, + { + token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"], + regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" + }, + { + token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"], + regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)" + }, + { + token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"], + regex: "(\\*)(\\S*)(\\*)" + }, + { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, + { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "string", + regex: '"(?=.)', + next: "qqstring" + } + ], + "qqstring": [ + { + token: "constant.character.escape.lisp", + regex: "\\\\." + }, + { + token: "string", + regex: '[^"\\\\]+' + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + } + ] + }; +}; +oop.inherits(LispHighlightRules, TextHighlightRules); +exports.LispHighlightRules = LispHighlightRules; + +}); + +define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules; +var Mode = function () { + this.HighlightRules = LispHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.$id = "ace/mode/lisp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/lisp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-livescript.js b/ui/base1/ace/mode-livescript.js new file mode 100644 index 0000000..37d1d73 --- /dev/null +++ b/ui/base1/ace/mode-livescript.js @@ -0,0 +1,272 @@ +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/text"], function(require, exports, module){var identifier, LiveScriptMode, keywordend, stringfill; +identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; +exports.Mode = LiveScriptMode = (function (superclass) { + var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode; + function LiveScriptMode() { + var that; + this.$tokenizer = new (require('../tokenizer')).Tokenizer(LiveScriptMode.Rules); + if (that = require('../mode/matching_brace_outdent')) { + this.$outdent = new that.MatchingBraceOutdent; + } + this.$id = "ace/mode/livescript"; + this.$behaviour = new (require("./behaviour/cstyle").CstyleBehaviour)(); + } + indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); + prototype.getNextLineIndent = function (state, line, tab) { + var indent, tokens; + indent = this.$getIndent(line); + tokens = this.$tokenizer.getLineTokens(line, state).tokens; + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) { + if (state === 'start' && indenter.test(line)) { + indent += tab; + } + } + return indent; + }; + prototype.lineCommentStart = "#"; + prototype.blockComment = { start: "###", end: "###" }; + prototype.checkOutdent = function (state, line, input) { + var ref$; + return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8; + }; + prototype.autoOutdent = function (state, doc, row) { + var ref$; + return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8; + }; + return LiveScriptMode; +}(require('../mode/text').Mode)); +keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; +stringfill = { + defaultToken: 'string' +}; +LiveScriptMode.Rules = { + start: [ + { + token: 'keyword', + regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend + }, { + token: 'constant.language', + regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend + }, { + token: 'invalid.illegal', + regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend + }, { + token: 'language.support.class', + regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend + }, { + token: 'language.support.function', + regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend + }, { + token: 'variable.language', + regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend + }, { + token: 'identifier', + regex: identifier + '\\s*:(?![:=])' + }, { + token: 'variable', + regex: identifier + }, { + token: 'keyword.operator', + regex: '(?:\\.{3}|\\s+\\?)' + }, { + token: 'keyword.variable', + regex: '(?:@+|::|\\.\\.)', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\.\\s*', + next: 'key' + }, { + token: 'string', + regex: '\\\\\\S[^\\s,;)}\\]]*' + }, { + token: 'string.doc', + regex: '\'\'\'', + next: 'qdoc' + }, { + token: 'string.doc', + regex: '"""', + next: 'qqdoc' + }, { + token: 'string', + regex: '\'', + next: 'qstring' + }, { + token: 'string', + regex: '"', + next: 'qqstring' + }, { + token: 'string', + regex: '`', + next: 'js' + }, { + token: 'string', + regex: '<\\[', + next: 'words' + }, { + token: 'string.regex', + regex: '//', + next: 'heregex' + }, { + token: 'comment.doc', + regex: '/\\*', + next: 'comment' + }, { + token: 'comment', + regex: '#.*' + }, { + token: 'string.regex', + regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', + next: 'key' + }, { + token: 'constant.numeric', + regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' + }, { + token: 'lparen', + regex: '[({[]' + }, { + token: 'rparen', + regex: '[)}\\]]', + next: 'key' + }, { + token: 'keyword.operator', + regex: '[\\^!|&%+\\-]+' + }, { + token: 'text', + regex: '\\s+' + } + ], + heregex: [ + { + token: 'string.regex', + regex: '.*?//[gimy$?]{0,4}', + next: 'start' + }, { + token: 'string.regex', + regex: '\\s*#{' + }, { + token: 'comment.regex', + regex: '\\s+(?:#.*)?' + }, { + defaultToken: 'string.regex' + } + ], + key: [ + { + token: 'keyword.operator', + regex: '[.?@!]+' + }, { + token: 'identifier', + regex: identifier, + next: 'start' + }, { + token: 'text', + regex: '', + next: 'start' + } + ], + comment: [ + { + token: 'comment.doc', + regex: '.*?\\*/', + next: 'start' + }, { + defaultToken: 'comment.doc' + } + ], + qdoc: [ + { + token: 'string', + regex: ".*?'''", + next: 'key' + }, stringfill + ], + qqdoc: [ + { + token: 'string', + regex: '.*?"""', + next: 'key' + }, stringfill + ], + qstring: [ + { + token: 'string', + regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', + next: 'key' + }, stringfill + ], + qqstring: [ + { + token: 'string', + regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', + next: 'key' + }, stringfill + ], + js: [ + { + token: 'string', + regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', + next: 'key' + }, stringfill + ], + words: [ + { + token: 'string', + regex: '.*?\\]>', + next: 'key' + }, stringfill + ] +}; +function extend$(sub, sup) { + function fun() { } + fun.prototype = (sub.superclass = sup).prototype; + (sub.prototype = new fun).constructor = sub; + if (typeof sup.extended == 'function') + sup.extended(sub); + return sub; +} +function import$(obj, src) { + var own = {}.hasOwnProperty; + for (var key in src) + if (own.call(src, key)) + obj[key] = src[key]; + return obj; +} + +}); (function() { + window.require(["ace/mode/livescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-logiql.js b/ui/base1/ace/mode-logiql.js new file mode 100644 index 0000000..f22b15e --- /dev/null +++ b/ui/base1/ace/mode-logiql.js @@ -0,0 +1,272 @@ +define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* THIS FILE WAS AUTOGENERATED FROM tool\LogicBlox.tmbundle\Syntaxes\LogicBlox.tmLanguage (UUID: 59bf5022-e261-453f-b1cb-9f9fa0712413) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LogiQLHighlightRules = function () { + this.$rules = { start: [{ token: 'comment.block', + regex: '/\\*', + push: [{ token: 'comment.block', regex: '\\*/', next: 'pop' }, + { defaultToken: 'comment.block' }] + }, + { token: 'comment.single', + regex: '//.*' + }, + { token: 'constant.numeric', + regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?' + }, + { token: 'string', + regex: '"', + push: [{ token: 'string', regex: '"', next: 'pop' }, + { defaultToken: 'string' }] + }, + { token: 'constant.language', + regex: '\\b(true|false)\\b' + }, + { token: 'entity.name.type.logicblox', + regex: '`[a-zA-Z_:]+(\\d|\\a)*\\b' + }, + { token: 'keyword.start', regex: '->', comment: 'Constraint' }, + { token: 'keyword.start', regex: '-->', comment: 'Level 1 Constraint' }, + { token: 'keyword.start', regex: '<-', comment: 'Rule' }, + { token: 'keyword.start', regex: '<--', comment: 'Level 1 Rule' }, + { token: 'keyword.end', regex: '\\.', comment: 'Terminator' }, + { token: 'keyword.other', regex: '!', comment: 'Negation' }, + { token: 'keyword.other', regex: ',', comment: 'Conjunction' }, + { token: 'keyword.other', regex: ';', comment: 'Disjunction' }, + { token: 'keyword.operator', regex: '<=|>=|!=|<|>', comment: 'Equality' }, + { token: 'keyword.other', regex: '@', comment: 'Equality' }, + { token: 'keyword.operator', regex: '\\+|-|\\*|/', comment: 'Arithmetic operations' }, + { token: 'keyword', regex: '::', comment: 'Colon colon' }, + { token: 'support.function', + regex: '\\b(agg\\s*<<)', + push: [{ include: '$self' }, + { token: 'support.function', + regex: '>>', + next: 'pop' }] + }, + { token: 'storage.modifier', + regex: '\\b(lang:[\\w:]*)' + }, + { token: ['storage.type', 'text'], + regex: '(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)' + }, + { token: 'entity.name', + regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))' + }, + { token: 'variable.parameter', + regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))' + }] }; + this.normalizeRules(); +}; +oop.inherits(LogiQLHighlightRules, TextHighlightRules); +exports.LogiQLHighlightRules = LogiQLHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/matching_brace_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var TokenIterator = require("../token_iterator").TokenIterator; +var Range = require("../range").Range; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + this.HighlightRules = LogiQLHighlightRules; + this.foldingRules = new FoldMode(); + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (/comment|string/.test(endState)) + return indent; + if (tokens.length && tokens[tokens.length - 1].type == "comment.single") + return indent; + var match = line.match(); + if (/(-->|<--|<-|->|{)\s*$/.test(line)) + indent += tab; + return indent; + }; + this.checkOutdent = function (state, line, input) { + if (this.$outdent.checkOutdent(line, input)) + return true; + if (input !== "\n" && input !== "\r\n") + return false; + if (!/^\s+/.test(line)) + return false; + return true; + }; + this.autoOutdent = function (state, doc, row) { + if (this.$outdent.autoOutdent(doc, row)) + return; + var prevLine = doc.getLine(row); + var match = prevLine.match(/^\s+/); + var column = prevLine.lastIndexOf(".") + 1; + if (!match || !row || !column) + return 0; + var line = doc.getLine(row + 1); + var startRange = this.getMatching(doc, { row: row, column: column }); + if (!startRange || startRange.start.row == row) + return 0; + column = match[0].length; + var indent = this.$getIndent(doc.getLine(startRange.start.row)); + doc.replace(new Range(row + 1, 0, row + 1, column), indent); + }; + this.getMatching = function (session, row, column) { + if (row == undefined) + row = session.selection.lead; + if (typeof row == "object") { + column = row.column; + row = row.row; + } + var startToken = session.getTokenAt(row, column); + var KW_START = "keyword.start", KW_END = "keyword.end"; + var tok; + if (!startToken) + return; + if (startToken.type == KW_START) { + var it = new TokenIterator(session, row, column); + it.step = it.stepForward; + } + else if (startToken.type == KW_END) { + var it = new TokenIterator(session, row, column); + it.step = it.stepBackward; + } + else + return; + while (tok = it.step()) { + if (tok.type == KW_START || tok.type == KW_END) + break; + } + if (!tok || tok.type == startToken.type) + return; + var col = it.getCurrentTokenColumn(); + var row = it.getCurrentTokenRow(); + return new Range(row, col, row, col + tok.value.length); + }; + this.$id = "ace/mode/logiql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/logiql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-logtalk.js b/ui/base1/ace/mode-logtalk.js new file mode 100644 index 0000000..663ed73 --- /dev/null +++ b/ui/base1/ace/mode-logtalk.js @@ -0,0 +1,309 @@ +define("ace/mode/logtalk_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LogtalkHighlightRules = function () { + this.$rules = { start: [{ token: 'punctuation.definition.comment.logtalk', + regex: '/\\*', + push: [{ token: 'punctuation.definition.comment.logtalk', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.logtalk' }] }, + { todo: 'fix grouping', + token: ['comment.line.percentage.logtalk', + 'punctuation.definition.comment.logtalk'], + regex: '%.*$\\n?' }, + { todo: 'fix grouping', + token: ['storage.type.opening.logtalk', + 'punctuation.definition.storage.type.logtalk'], + regex: ':-\\s(?:object|protocol|category|module)(?=[(])' }, + { todo: 'fix grouping', + token: ['storage.type.closing.logtalk', + 'punctuation.definition.storage.type.logtalk'], + regex: ':-\\send_(?:object|protocol|category)(?=[.])' }, + { caseInsensitive: false, + token: 'storage.type.relations.logtalk', + regex: '\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])' }, + { caseInsensitive: false, + todo: 'fix grouping', + token: ['storage.modifier.others.logtalk', + 'punctuation.definition.storage.modifier.logtalk'], + regex: ':-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])' }, + { caseInsensitive: false, + todo: 'fix grouping', + token: ['storage.modifier.others.logtalk', + 'punctuation.definition.storage.modifier.logtalk'], + regex: ':-\\s(?:c(?:alls|oinductive)|e(?:lif|n(?:coding|sure_loaded)|xport)|i(?:f|n(?:clude|itialization|fo))|reexport|set_(?:logtalk|prolog)_flag|uses)(?=[(])' }, + { caseInsensitive: false, + todo: 'fix grouping', + token: ['storage.modifier.others.logtalk', + 'punctuation.definition.storage.modifier.logtalk'], + regex: ':-\\s(?:alias|info|d(?:ynamic|iscontiguous)|m(?:eta_(?:non_terminal|predicate)|ode|ultifile)|p(?:ublic|r(?:otected|ivate))|op|use(?:s|_module)|synchronized)(?=[(])' }, + { token: 'keyword.operator.message-sending.logtalk', + regex: '(:|::|\\^\\^)' }, + { token: 'keyword.operator.external-call.logtalk', + regex: '([{}])' }, + { token: 'keyword.operator.mode.logtalk', regex: '(\\?|@)' }, + { token: 'keyword.operator.comparison.term.logtalk', + regex: '(@=<|@<|@>|@>=|==|\\\\==)' }, + { token: 'keyword.operator.comparison.arithmetic.logtalk', + regex: '(=<|<|>|>=|=:=|=\\\\=)' }, + { token: 'keyword.operator.bitwise.logtalk', + regex: '(<<|>>|/\\\\|\\\\/|\\\\)' }, + { token: 'keyword.operator.evaluable.logtalk', + regex: '\\b(?:e|pi|div|mod|rem)\\b(?![-!(^~])' }, + { token: 'keyword.operator.evaluable.logtalk', + regex: '(\\*\\*|\\+|-|\\*|/|//)' }, + { token: 'keyword.operator.misc.logtalk', + regex: '(:-|!|\\\\+|,|;|-->|->|=|\\=|\\.|=\\.\\.|\\^|\\bas\\b|\\bis\\b)' }, + { caseInsensitive: false, + token: 'support.function.evaluable.logtalk', + regex: '\\b(a(bs|cos|sin|tan|tan2)|c(eiling|os)|div|exp|flo(at(_(integer|fractional)_part)?|or)|log|m(ax|in|od)|r(em|ound)|s(i(n|gn)|qrt)|t(an|runcate)|xor)(?=[(])' }, + { token: 'support.function.control.logtalk', + regex: '\\b(?:true|fa(?:il|lse)|repeat|(?:instantiation|system)_error)\\b(?![-!(^~])' }, + { token: 'support.function.control.logtalk', + regex: '\\b((?:uninstantiation|type|domain|existence|permission|representation|evaluation|resource|syntax)_error)(?=[(])' }, + { token: 'support.function.control.logtalk', + regex: '\\b(?:ca(?:ll|tch)|ignore|throw|once)(?=[(])' }, + { token: 'support.function.chars-and-bytes-io.logtalk', + regex: '\\b(?:(?:get|p(?:eek|ut))_(c(?:har|ode)|byte)|nl)(?=[(])' }, + { token: 'support.function.chars-and-bytes-io.logtalk', + regex: '\\bnl\\b' }, + { token: 'support.function.atom-term-processing.logtalk', + regex: '\\b(?:atom_(?:length|c(?:hars|o(?:ncat|des)))|sub_atom|char_code|number_c(?:har|ode)s)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.term-testing.logtalk', + regex: '\\b(?:var|atom(ic)?|integer|float|c(?:allable|ompound)|n(?:onvar|umber)|ground|acyclic_term)(?=[(])' }, + { token: 'support.function.term-comparison.logtalk', + regex: '\\b(compare)(?=[(])' }, + { token: 'support.function.term-io.logtalk', + regex: '\\b(?:read(_term)?|write(?:q|_(?:canonical|term))?|(current_)?(?:char_conversion|op))(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.term-creation-and-decomposition.logtalk', + regex: '\\b(arg|copy_term|functor|numbervars|term_variables)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.term-unification.logtalk', + regex: '\\b(subsumes_term|unify_with_occurs_check)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.stream-selection-and-control.logtalk', + regex: '\\b(?:(?:se|curren)t_(?:in|out)put|open|close|flush_output|stream_property|at_end_of_stream|set_stream_position)(?=[(])' }, + { token: 'support.function.stream-selection-and-control.logtalk', + regex: '\\b(?:flush_output|at_end_of_stream)\\b' }, + { token: 'support.function.prolog-flags.logtalk', + regex: '\\b((?:se|curren)t_prolog_flag)(?=[(])' }, + { token: 'support.function.compiling-and-loading.logtalk', + regex: '\\b(logtalk_(?:compile|l(?:ibrary_path|oad|oad_context)|make(_target_action)?))(?=[(])' }, + { token: 'support.function.compiling-and-loading.logtalk', + regex: '\\b(logtalk_make)\\b' }, + { caseInsensitive: false, + token: 'support.function.event-handling.logtalk', + regex: '\\b(?:(?:abolish|define)_events|current_event)(?=[(])' }, + { token: 'support.function.implementation-defined-hooks.logtalk', + regex: '\\b(?:(?:create|current|set)_logtalk_flag|halt)(?=[(])' }, + { token: 'support.function.implementation-defined-hooks.logtalk', + regex: '\\b(halt)\\b' }, + { token: 'support.function.sorting.logtalk', + regex: '\\b((key)?(sort))(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.entity-creation-and-abolishing.logtalk', + regex: '\\b((c(?:reate|urrent)|abolish)_(?:object|protocol|category))(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.reflection.logtalk', + regex: '\\b((object|protocol|category)_property|co(mplements_object|nforms_to_protocol)|extends_(object|protocol|category)|imp(orts_category|lements_protocol)|(instantiat|specializ)es_class)(?=[(])' }, + { token: 'support.function.logtalk', + regex: '\\b((?:for|retract)all)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.execution-context.logtalk', + regex: '\\b(?:context|parameter|se(?:lf|nder)|this)(?=[(])' }, + { token: 'support.function.database.logtalk', + regex: '\\b(?:a(?:bolish|ssert(?:a|z))|clause|retract(all)?)(?=[(])' }, + { token: 'support.function.all-solutions.logtalk', + regex: '\\b((?:bag|set)of|f(?:ind|or)all)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.multi-threading.logtalk', + regex: '\\b(threaded(_(ca(?:ll|ncel)|once|ignore|exit|peek|wait|notify))?)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.engines.logtalk', + regex: '\\b(threaded_engine(_(create|destroy|self|next(?:_reified)?|yield|post|fetch))?)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.reflection.logtalk', + regex: '\\b(?:current_predicate|predicate_property)(?=[(])' }, + { token: 'support.function.event-handler.logtalk', + regex: '\\b(?:before|after)(?=[(])' }, + { token: 'support.function.message-forwarding-handler.logtalk', + regex: '\\b(forward)(?=[(])' }, + { token: 'support.function.grammar-rule.logtalk', + regex: '\\b(?:expand_(?:goal|term)|(?:goal|term)_expansion|phrase)(?=[(])' }, + { token: 'punctuation.definition.string.begin.logtalk', + regex: '\'', + push: [{ token: 'constant.character.escape.logtalk', + regex: '\\\\([\\\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\\\)' }, + { token: 'punctuation.definition.string.end.logtalk', + regex: '\'', + next: 'pop' }, + { defaultToken: 'string.quoted.single.logtalk' }] }, + { token: 'punctuation.definition.string.begin.logtalk', + regex: '"', + push: [{ token: 'constant.character.escape.logtalk', + regex: '\\\\([\\\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\\\)' }, + { token: 'punctuation.definition.string.end.logtalk', + regex: '"', + next: 'pop' }, + { defaultToken: 'string.quoted.double.logtalk' }] }, + { token: 'constant.numeric.logtalk', + regex: '\\b(0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+)\\b' }, + { token: 'constant.numeric.logtalk', + regex: '\\b(0\'\\\\.|0\'.|0\'\'|0\'")' }, + { token: 'constant.numeric.logtalk', + regex: '\\b(\\d+\\.?\\d*((e|E)(\\+|-)?\\d+)?)\\b' }, + { token: 'variable.other.logtalk', + regex: '\\b([A-Z_][A-Za-z0-9_]*)\\b' }] }; + this.normalizeRules(); +}; +oop.inherits(LogtalkHighlightRules, TextHighlightRules); +exports.LogtalkHighlightRules = LogtalkHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/logtalk",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/logtalk_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var Tokenizer = require("../tokenizer").Tokenizer; +var LogtalkHighlightRules = require("./logtalk_highlight_rules").LogtalkHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = LogtalkHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "%"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/logtalk"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/logtalk"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-lsl.js b/ui/base1/ace/mode-lsl.js new file mode 100644 index 0000000..77be900 --- /dev/null +++ b/ui/base1/ace/mode-lsl.js @@ -0,0 +1,287 @@ +define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +oop.inherits(LSLHighlightRules, TextHighlightRules); +function LSLHighlightRules() { + var keywordMapper = this.createKeywordMapper({ + "constant.language.float.lsl": "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI", + "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_BODY_SHAPE_TYPE|OBJECT_CHARACTER_TIME|OBJECT_CLICK_ACTION|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_HOVER_HEIGHT|OBJECT_LAST_OWNER_ID|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASS_ALWAYS|PASS_IF_NOT_HANDLED|PASS_NEVER|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR", + "constant.language.integer.boolean.lsl": "FALSE|TRUE", + "constant.language.quaternion.lsl": "ZERO_ROTATION", + "constant.language.string.lsl": "EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED", + "constant.language.vector.lsl": "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR", + "invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH", + "invalid.deprecated.lsl": "ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect", + "invalid.illegal.lsl": "event", + "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_EXPERIENCE|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera", + "reserved.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask", + "reserved.log.lsl": "print", + "keyword.control.lsl": "do|else|for|if|jump|return|while", + "storage.type.lsl": "float|integer|key|list|quaternion|rotation|string|vector", + "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetAttachedList|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64", + "support.function.event.lsl": "at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result" + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment.line.double-slash.lsl", + regex: "\\/\\/.*$" + }, { + token: "comment.block.begin.lsl", + regex: "\\/\\*", + next: "comment" + }, { + token: "string.quoted.double.lsl", + start: '"', + end: '"', + next: [{ + token: "constant.character.escape.lsl", + regex: /\\[tn"\\]/ + }] + }, { + token: "constant.numeric.lsl", + regex: "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b" + }, { + token: "entity.name.state.lsl", + regex: "\\b((state)\\s+[A-Za-z_]\\w*|default)\\b" + }, { + token: keywordMapper, + regex: "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "support.function.user-defined.lsl", + regex: /\b([a-zA-Z_]\w*)(?=\(.*?\))/ + }, { + token: "keyword.operator.lsl", + regex: "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?" + }, { + token: "invalid.illegal.keyword.operator.lsl", + regex: ":=?" + }, { + token: "punctuation.operator.lsl", + regex: "\\,|\\;" + }, { + token: "paren.lparen.lsl", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen.lsl", + regex: "[\\]\\)\\}]" + }, { + token: "text.lsl", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment.block.end.lsl", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment.block.lsl" + } + ] + }; + this.normalizeRules(); +} +exports.LSLHighlightRules = LSLHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/text","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module){"use strict"; +var Rules = require("./lsl_highlight_rules").LSLHighlightRules; +var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var TextMode = require("./text").Mode; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var oop = require("../lib/oop"); +var Mode = function () { + this.HighlightRules = Rules; + this.$outdent = new Outdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["//"]; + this.blockComment = { + start: "/*", + end: "*/" + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type === "comment.block.lsl") { + return indent; + } + if (state === "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/lsl"; + this.snippetFileId = "ace/snippets/lsl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/lsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-lua.js b/ui/base1/ace/mode-lua.js new file mode 100644 index 0000000..108a9f1 --- /dev/null +++ b/ui/base1/ace/mode-lua.js @@ -0,0 +1,393 @@ +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LuaHighlightRules = function () { + var keywords = ("break|do|else|elseif|end|for|function|if|in|local|repeat|" + + "return|then|until|while|or|and|not"); + var builtinConstants = ("true|false|nil|_G|_VERSION"); + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|require|" + + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|" + + "collectgarbage|getmetatable|module|rawset|math|debug|" + + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|" + + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|" + + "load|error|loadfile|" + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|" + + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|" + + "loaders|cpath|config|path|seeall|exit|setlocale|date|" + + "getenv|difftime|remove|time|clock|tmpname|rename|execute|" + + "lines|write|close|flush|open|output|type|read|stderr|" + + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|" + + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|" + + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|" + + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|" + + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|" + + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|" + + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|" + + "status|wrap|create|running|" + + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|" + + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"); + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "keyword.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "variable.language": "self" + }, "identifier"); + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + this.$rules = { + "start": [{ + stateName: "bracketedComment", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex: /\-\-\[=*\[/, + next: [ + { + onMatch: function (value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return "comment"; + }, + regex: /\]=*\]/, + next: "start" + }, { + defaultToken: "comment.body" + } + ] + }, + { + token: "comment", + regex: "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length, currentState); + return "string.start"; + }, + regex: /\[=*\[/, + next: [ + { + onMatch: function (value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return "string.end"; + }, + regex: /\]=*\]/, + next: "start" + }, { + defaultToken: "string" + } + ] + }, + { + token: "string", // " string + regex: '"(?:[^\\\\]|\\\\.)*?"' + }, { + token: "string", // ' string + regex: "'(?:[^\\\\]|\\\\.)*?'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+|\\w+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(LuaHighlightRules, TextHighlightRules); +exports.LuaHighlightRules = LuaHighlightRules; + +}); + +define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; + this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1] == "then" && /\belseif\b/.test(line)) + return; + if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "start"; + } + else if (match[2]) { + var type = session.bgTokenizer.getState(row) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "start"; + } + else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + var match = line.match(this.foldingStopMarker); + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } + else if (match[0][0] === "]") { + var type = session.bgTokenizer.getState(row - 1) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "end"; + } + else + return "end"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1]) + return this.luaBlock(session, row, match.index + 1); + if (match[2]) + return session.getCommentFoldRange(row, match.index + 1); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.luaBlock(session, row, match.index + 1); + } + if (match[0][0] === "]") + return session.getCommentFoldRange(row, match.index + 1); + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.luaBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var indentKeywords = { + "function": 1, + "do": 1, + "then": 1, + "elseif": -1, + "end": -1, + "repeat": 1, + "until": -1 + }; + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + var val = token.value; + var stack = [val]; + var dir = indentKeywords[val]; + if (!dir) + return; + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while (token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = dir * indentKeywords[token.value]; + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0) { + stack.shift(); + if (!stack.length && token.value != "elseif") + break; + if (level === 0) + stack.unshift(token.value); + } + } + if (!token) + return null; + if (tokenRange) + return stream.getCurrentTokenRange(); + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; +var LuaFoldMode = require("./folding/lua").FoldMode; +var Range = require("../range").Range; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = LuaHighlightRules; + this.foldingRules = new LuaFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "--[[", end: "--]]" }; + var indentKeywords = { + "function": 1, + "then": 1, + "do": 1, + "else": 1, + "elseif": 1, + "repeat": 1, + "end": -1, + "until": -1 + }; + var outdentKeywords = [ + "else", + "elseif", + "end", + "until" + ]; + function getNetIndentLevel(tokens) { + var level = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type == "keyword") { + if (token.value in indentKeywords) { + level += indentKeywords[token.value]; + } + } + else if (token.type == "paren.lparen") { + level += token.value.length; + } + else if (token.type == "paren.rparen") { + level -= token.value.length; + } + } + if (level < 0) { + return -1; + } + else if (level > 0) { + return 1; + } + else { + return 0; + } + } + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var level = 0; + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (state == "start") { + level = getNetIndentLevel(tokens); + } + if (level > 0) { + return indent + tab; + } + else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { + if (!this.checkOutdent(state, line, "\n")) { + return indent.substr(0, indent.length - tab.length); + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + if (input != "\n" && input != "\r" && input != "\r\n") + return false; + if (line.match(/^\s*[\)\}\]]$/)) + return true; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens || !tokens.length) + return false; + return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); + }; + this.getMatching = function (session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in indentKeywords) + return this.foldingRules.luaBlock(session, row, column, true); + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + var column = line.match(/^\s*/)[0].length; + if (!column || !row) + return; + var startRange = this.getMatching(session, row, column + 1); + if (!startRange || startRange.start.row == row) + return; + var indent = this.$getIndent(session.getLine(startRange.start.row)); + if (indent.length != column) { + session.replace(new Range(row, 0, row, column), indent); + session.outdentRows(new Range(row + 1, 0, row + 1, 0)); + } + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/lua"; + this.snippetFileId = "ace/snippets/lua"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/lua"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-luapage.js b/ui/base1/ace/mode-luapage.js new file mode 100644 index 0000000..cb44009 --- /dev/null +++ b/ui/base1/ace/mode-luapage.js @@ -0,0 +1,2785 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LuaHighlightRules = function () { + var keywords = ("break|do|else|elseif|end|for|function|if|in|local|repeat|" + + "return|then|until|while|or|and|not"); + var builtinConstants = ("true|false|nil|_G|_VERSION"); + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|require|" + + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|" + + "collectgarbage|getmetatable|module|rawset|math|debug|" + + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|" + + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|" + + "load|error|loadfile|" + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|" + + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|" + + "loaders|cpath|config|path|seeall|exit|setlocale|date|" + + "getenv|difftime|remove|time|clock|tmpname|rename|execute|" + + "lines|write|close|flush|open|output|type|read|stderr|" + + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|" + + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|" + + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|" + + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|" + + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|" + + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|" + + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|" + + "status|wrap|create|running|" + + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|" + + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"); + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "keyword.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "variable.language": "self" + }, "identifier"); + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + this.$rules = { + "start": [{ + stateName: "bracketedComment", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex: /\-\-\[=*\[/, + next: [ + { + onMatch: function (value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return "comment"; + }, + regex: /\]=*\]/, + next: "start" + }, { + defaultToken: "comment.body" + } + ] + }, + { + token: "comment", + regex: "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length, currentState); + return "string.start"; + }, + regex: /\[=*\[/, + next: [ + { + onMatch: function (value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return "string.end"; + }, + regex: /\]=*\]/, + next: "start" + }, { + defaultToken: "string" + } + ] + }, + { + token: "string", // " string + regex: '"(?:[^\\\\]|\\\\.)*?"' + }, { + token: "string", // ' string + regex: "'(?:[^\\\\]|\\\\.)*?'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+|\\w+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(LuaHighlightRules, TextHighlightRules); +exports.LuaHighlightRules = LuaHighlightRules; + +}); + +define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; + this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1] == "then" && /\belseif\b/.test(line)) + return; + if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "start"; + } + else if (match[2]) { + var type = session.bgTokenizer.getState(row) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "start"; + } + else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + var match = line.match(this.foldingStopMarker); + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } + else if (match[0][0] === "]") { + var type = session.bgTokenizer.getState(row - 1) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "end"; + } + else + return "end"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1]) + return this.luaBlock(session, row, match.index + 1); + if (match[2]) + return session.getCommentFoldRange(row, match.index + 1); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.luaBlock(session, row, match.index + 1); + } + if (match[0][0] === "]") + return session.getCommentFoldRange(row, match.index + 1); + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.luaBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var indentKeywords = { + "function": 1, + "do": 1, + "then": 1, + "elseif": -1, + "end": -1, + "repeat": 1, + "until": -1 + }; + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + var val = token.value; + var stack = [val]; + var dir = indentKeywords[val]; + if (!dir) + return; + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while (token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = dir * indentKeywords[token.value]; + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0) { + stack.shift(); + if (!stack.length && token.value != "elseif") + break; + if (level === 0) + stack.unshift(token.value); + } + } + if (!token) + return null; + if (tokenRange) + return stream.getCurrentTokenRange(); + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; +var LuaFoldMode = require("./folding/lua").FoldMode; +var Range = require("../range").Range; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = LuaHighlightRules; + this.foldingRules = new LuaFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "--[[", end: "--]]" }; + var indentKeywords = { + "function": 1, + "then": 1, + "do": 1, + "else": 1, + "elseif": 1, + "repeat": 1, + "end": -1, + "until": -1 + }; + var outdentKeywords = [ + "else", + "elseif", + "end", + "until" + ]; + function getNetIndentLevel(tokens) { + var level = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type == "keyword") { + if (token.value in indentKeywords) { + level += indentKeywords[token.value]; + } + } + else if (token.type == "paren.lparen") { + level += token.value.length; + } + else if (token.type == "paren.rparen") { + level -= token.value.length; + } + } + if (level < 0) { + return -1; + } + else if (level > 0) { + return 1; + } + else { + return 0; + } + } + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var level = 0; + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (state == "start") { + level = getNetIndentLevel(tokens); + } + if (level > 0) { + return indent + tab; + } + else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { + if (!this.checkOutdent(state, line, "\n")) { + return indent.substr(0, indent.length - tab.length); + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + if (input != "\n" && input != "\r" && input != "\r\n") + return false; + if (line.match(/^\s*[\)\}\]]$/)) + return true; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens || !tokens.length) + return false; + return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); + }; + this.getMatching = function (session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in indentKeywords) + return this.foldingRules.luaBlock(session, row, column, true); + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + var column = line.match(/^\s*/)[0].length; + if (!column || !row) + return; + var startRange = this.getMatching(session, row, column + 1); + if (!startRange || startRange.start.row == row) + return; + var indent = this.$getIndent(session.getLine(startRange.start.row)); + if (indent.length != column) { + session.replace(new Range(row, 0, row, column), indent); + session.outdentRows(new Range(row + 1, 0, row + 1, 0)); + } + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/lua"; + this.snippetFileId = "ace/snippets/lua"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"], function(require, exports, module){// LuaPage implements the LuaPage markup as described by the Kepler Project's CGILua +"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; +var LuaPageHighlightRules = function () { + HtmlHighlightRules.call(this); + var startRules = [ + { + token: "keyword", + regex: "<\\%\\=?", + push: "lua-start" + }, { + token: "keyword", + regex: "<\\?lua\\=?", + push: "lua-start" + } + ]; + var endRules = [ + { + token: "keyword", + regex: "\\%>", + next: "pop" + }, { + token: "keyword", + regex: "\\?>", + next: "pop" + } + ]; + this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]); + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.normalizeRules(); +}; +oop.inherits(LuaPageHighlightRules, HtmlHighlightRules); +exports.LuaPageHighlightRules = LuaPageHighlightRules; + +}); + +define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var LuaMode = require("./lua").Mode; +var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = LuaPageHighlightRules; + this.createModeDelegates({ + "lua-": LuaMode + }); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/luapage"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/luapage"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-lucene.js b/ui/base1/ace/mode-lucene.js new file mode 100644 index 0000000..332be98 --- /dev/null +++ b/ui/base1/ace/mode-lucene.js @@ -0,0 +1,145 @@ +define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LuceneHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "constant.language.escape", + regex: /\\[\-+&|!(){}\[\]^"~*?:\\]/ + }, { + token: "constant.character.negation", + regex: "\\-" + }, { + token: "constant.character.interro", + regex: "\\?" + }, { + token: "constant.character.required", + regex: "\\+" + }, { + token: "constant.character.asterisk", + regex: "\\*" + }, { + token: 'constant.character.proximity', + regex: '~(?:0\\.[0-9]+|[0-9]+)?' + }, { + token: 'keyword.operator', + regex: '(AND|OR|NOT|TO)\\b' + }, { + token: "paren.lparen", + regex: "[\\(\\{\\[]" + }, { + token: "paren.rparen", + regex: "[\\)\\}\\]]" + }, { + token: "keyword.operator", + regex: /[><=^]/ + }, { + token: "constant.numeric", + regex: /\d[\d.-]*/ + }, { + token: "string", + regex: /"(?:\\"|[^"])*"/ + }, { + token: "keyword", + regex: /(?:\\.|[^\s\-+&|!(){}\[\]^"~*?:\\])+:/, + next: "maybeRegex" + }, { + token: "term", + regex: /\w+/ + }, { + token: "text", + regex: /\s+/ + } + ], + "maybeRegex": [{ + token: "text", + regex: /\s+/ + }, { + token: "string.regexp.start", + regex: "/", + next: "regex" + }, { + regex: "", + next: "start" + }], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp.end", + regex: "/[sxngimy]*", + next: "start" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.escape", + regex: "<\d+-\d+>|[~&@]" + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "start" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "start" + }, { + defaultToken: "string.regexp.characterclass" + } + ] + }; +}; +oop.inherits(LuceneHighlightRules, TextHighlightRules); +exports.LuceneHighlightRules = LuceneHighlightRules; + +}); + +define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module){'use strict'; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; +var Mode = function () { + this.HighlightRules = LuceneHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/lucene"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/lucene"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-makefile.js b/ui/base1/ace/mode-makefile.js new file mode 100644 index 0000000..c8de686 --- /dev/null +++ b/ui/base1/ace/mode-makefile.js @@ -0,0 +1,374 @@ +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var reservedKeywords = exports.reservedKeywords = ('!|{|}|case|do|done|elif|else|' + + 'esac|fi|for|if|in|then|until|while|' + + '&|;|export|local|read|typeset|unset|' + + 'elif|select|set|function|declare|readonly'); +var languageConstructs = exports.languageConstructs = ('[|]|alias|bg|bind|break|builtin|' + + 'cd|command|compgen|complete|continue|' + + 'dirs|disown|echo|enable|eval|exec|' + + 'exit|fc|fg|getopts|hash|help|history|' + + 'jobs|kill|let|logout|popd|printf|pushd|' + + 'pwd|return|set|shift|shopt|source|' + + 'suspend|test|times|trap|type|ulimit|' + + 'umask|unalias|wait'); +var ShHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + var func = "(?:" + variableName + "\\s*\\(\\))"; + this.$rules = { + "start": [{ + token: "constant", + regex: /\\./ + }, { + token: ["text", "comment"], + regex: /(^|\s)(#.*)$/ + }, { + token: "string.start", + regex: '"', + push: [{ + token: "constant.language.escape", + regex: /\\(?:[$`"\\]|$)/ + }, { + include: "variables" + }, { + token: "keyword.operator", + regex: /`/ // TODO highlight ` + }, { + token: "string.end", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\$'", + push: [{ + token: "constant.language.escape", + regex: /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex: "<<<", + token: "keyword.operator" + }, { + stateName: "heredoc", + regex: "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch: function (value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + { type: "constant", value: tokens[1] }, + { type: "text", value: tokens[2] }, + { type: "string", value: tokens[3] }, + { type: "support.class", value: tokens[4] }, + { type: "string", value: tokens[5] } + ]; + }, + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: ["keyword", "text", "text", "text", "variable"], + regex: /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token: "variable.language", + regex: builtinVariable + }, { + token: "variable", + regex: variable + }, { + include: "variables" + }, { + token: "support.function", + regex: func + }, { + token: "support.function", + regex: fileDescriptor + }, { + token: "string", // ' string + start: "'", end: "'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token: "punctuation.operator", + regex: ";" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]]" + }, { + token: "paren.rparen", + regex: "[\\)\\}]", + next: "pop" + }], + variables: [{ + token: "variable", + regex: /(\$)(\w+)/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\()/, + push: "start" + }, { + token: ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex: /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push: "start" + }, { + token: "variable", + regex: /\$[*@#?\-$!0_]/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\{)/, + push: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ShHighlightRules, TextHighlightRules); +exports.ShHighlightRules = ShHighlightRules; + +}); + +define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ShHighlightFile = require("./sh_highlight_rules"); +var MakefileHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": ShHighlightFile.reservedKeywords, + "support.function.builtin": ShHighlightFile.languageConstructs, + "invalid.deprecated": "debugger" + }, "string"); + this.$rules = + { + "start": [ + { + token: "string.interpolated.backtick.makefile", + regex: "`", + next: "shell-start" + }, + { + token: "punctuation.definition.comment.makefile", + regex: /#(?=.)/, + next: "comment" + }, + { + token: ["keyword.control.makefile"], + regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)" + }, + { + token: ["entity.name.function.makefile", "text"], + regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)" + } + ], + "comment": [ + { + token: "punctuation.definition.comment.makefile", + regex: /.+\\/ + }, + { + token: "punctuation.definition.comment.makefile", + regex: ".+", + next: "start" + } + ], + "shell-start": [ + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "string", + regex: "\\w+" + }, + { + token: "string.interpolated.backtick.makefile", + regex: "`", + next: "start" + } + ] + }; +}; +oop.inherits(MakefileHighlightRules, TextHighlightRules); +exports.MakefileHighlightRules = MakefileHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = MakefileHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$indentWithTabs = true; + this.$id = "ace/mode/makefile"; + this.snippetFileId = "ace/snippets/makefile"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/makefile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-markdown.js b/ui/base1/ace/mode-markdown.js new file mode 100644 index 0000000..86bcf9b --- /dev/null +++ b/ui/base1/ace/mode-markdown.js @@ -0,0 +1,2935 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var escaped = function (ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +}; +var MarkdownHighlightRules = function () { + HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token: "support.function", + regex: /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function (value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next: "githubblock" + }; + var codeBlockRules = [{ + token: "support.function", + regex: ".*", + onMatch: function (value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if (m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; + this.$rules["start"].unshift({ + token: "empty_line", + regex: '^$', + next: "allowBlock" + }, { + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token: function (value) { + return "markup.heading." + value.length; + }, + regex: /^#{1,6}(?=\s|$)/, + next: "header" + }, codeBlockStartRule, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + token: "constant", + regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic" + }); + this.addRules({ + "basic": [{ + token: "constant.language.escape", + regex: /\\[\\`*_{}\[\]()#+\-.!]/ + }, { + token: "support.function", + regex: "(`+)(.*?[^`])(\\1)" + }, { + token: ["text", "constant", "text", "url", "string", "text"], + regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { + token: ["text", "string", "text", "constant", "text"], + regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])" + }, { + token: ["text", "string", "text", "markup.underline", "string", "text"], + regex: "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text + ")(\\]\\()" + // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { + token: "string.strong", + regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: "string.emphasis", + regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: ["text", "url", "text"], + regex: "(<)(" + + "(?:https?|ftp|dict):[^'\">\\s]+" + + "|" + + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" + + ")(>)" + }], + "allowBlock": [ + { token: "support.function", regex: "^ {4}.+", next: "allowBlock" }, + { token: "empty_line", regex: '^$', next: "allowBlock" }, + { token: "empty", regex: "", next: "start" } + ], + "header": [{ + regex: "$", + next: "start" + }, { + include: "basic" + }, { + defaultToken: "heading" + }], + "listblock-start": [{ + token: "support.variable", + regex: /(?:\[[ x]\])?/, + next: "listblock" + }], + "listblock": [{ + token: "empty_line", + regex: "^$", + next: "start" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic", noEscape: true + }, + codeBlockStartRule, + { + defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly + }], + "blockquote": [{ + token: "empty_line", + regex: "^\\s*$", + next: "start" + }, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + include: "basic", noEscape: true + }, { + defaultToken: "string.blockquote" + }], + "githubblock": codeBlockRules + }); + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); +exports.MarkdownHighlightRules = MarkdownHighlightRules; + +}); + +define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (!this.foldingStartMarker.test(line)) + return ""; + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) == "start") + return "end"; + return "start"; + } + return "start"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (!line.match(this.foldingStartMarker)) + return; + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) !== "start") { + while (++row < maxRow) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(startRow, startColumn, row, 0); + } + else { + while (row-- > 0) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(row, line.length, startRow, 0); + } + } + var token; + function isHeading(row) { + token = session.getTokens(row)[0]; + return token && token.type.lastIndexOf(heading, 0) === 0; + } + var heading = "markup.heading"; + function getLevel() { + var ch = token.value[0]; + if (ch == "=") + return 6; + if (ch == "-") + return 5; + return 7 - token.value.search(/[^#]|$/); + } + if (isHeading(row)) { + var startHeadingLevel = getLevel(); + while (++row < maxRow) { + if (!isHeading(row)) + continue; + var level = getLevel(); + if (level >= startHeadingLevel) + break; + } + endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2); + if (endRow > startRow) { + while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) + endRow--; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var reservedKeywords = exports.reservedKeywords = ('!|{|}|case|do|done|elif|else|' + + 'esac|fi|for|if|in|then|until|while|' + + '&|;|export|local|read|typeset|unset|' + + 'elif|select|set|function|declare|readonly'); +var languageConstructs = exports.languageConstructs = ('[|]|alias|bg|bind|break|builtin|' + + 'cd|command|compgen|complete|continue|' + + 'dirs|disown|echo|enable|eval|exec|' + + 'exit|fc|fg|getopts|hash|help|history|' + + 'jobs|kill|let|logout|popd|printf|pushd|' + + 'pwd|return|set|shift|shopt|source|' + + 'suspend|test|times|trap|type|ulimit|' + + 'umask|unalias|wait'); +var ShHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + var func = "(?:" + variableName + "\\s*\\(\\))"; + this.$rules = { + "start": [{ + token: "constant", + regex: /\\./ + }, { + token: ["text", "comment"], + regex: /(^|\s)(#.*)$/ + }, { + token: "string.start", + regex: '"', + push: [{ + token: "constant.language.escape", + regex: /\\(?:[$`"\\]|$)/ + }, { + include: "variables" + }, { + token: "keyword.operator", + regex: /`/ // TODO highlight ` + }, { + token: "string.end", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\$'", + push: [{ + token: "constant.language.escape", + regex: /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex: "<<<", + token: "keyword.operator" + }, { + stateName: "heredoc", + regex: "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch: function (value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + { type: "constant", value: tokens[1] }, + { type: "text", value: tokens[2] }, + { type: "string", value: tokens[3] }, + { type: "support.class", value: tokens[4] }, + { type: "string", value: tokens[5] } + ]; + }, + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: ["keyword", "text", "text", "text", "variable"], + regex: /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token: "variable.language", + regex: builtinVariable + }, { + token: "variable", + regex: variable + }, { + include: "variables" + }, { + token: "support.function", + regex: func + }, { + token: "support.function", + regex: fileDescriptor + }, { + token: "string", // ' string + start: "'", end: "'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token: "punctuation.operator", + regex: ";" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]]" + }, { + token: "paren.rparen", + regex: "[\\)\\}]", + next: "pop" + }], + variables: [{ + token: "variable", + regex: /(\$)(\w+)/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\()/, + push: "start" + }, { + token: ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex: /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push: "start" + }, { + token: "variable", + regex: /\$[*@#?\-$!0_]/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\{)/, + push: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ShHighlightRules, TextHighlightRules); +exports.ShHighlightRules = ShHighlightRules; + +}); + +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var Range = require("../range").Range; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/sh"; + this.snippetFileId = "ace/snippets/sh"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = require("./folding/xml").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.voidElements = lang.arrayToMap([]); + this.blockComment = { start: "" }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/xml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var TextMode = require("./text").Mode; +var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; +var MarkdownFoldMode = require("./folding/markdown").FoldMode; +var Mode = function () { + this.HighlightRules = MarkdownHighlightRules; + this.createModeDelegates({ + javascript: require("./javascript").Mode, + html: require("./html").Mode, + bash: require("./sh").Mode, + sh: require("./sh").Mode, + xml: require("./xml").Mode, + css: require("./css").Mode + }); + this.foldingRules = new MarkdownFoldMode(); + this.$behaviour = new CstyleBehaviour({ braces: true }); +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.blockComment = { start: "" }; + this.$quotes = { '"': '"', "`": "`" }; + this.getNextLineIndent = function (state, line, tab) { + if (state == "listblock") { + var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line); + if (!match) + return ""; + var marker = match[2]; + if (!marker) + marker = parseInt(match[3], 10) + 1 + "."; + return match[1] + marker + match[4]; + } + else { + return this.$getIndent(line); + } + }; + this.$id = "ace/mode/markdown"; + this.snippetFileId = "ace/snippets/markdown"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/markdown"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mask.js b/ui/base1/ace/mode-mask.js new file mode 100644 index 0000000..2330280 --- /dev/null +++ b/ui/base1/ace/mode-mask.js @@ -0,0 +1,1757 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var escaped = function (ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +}; +var MarkdownHighlightRules = function () { + HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token: "support.function", + regex: /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function (value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next: "githubblock" + }; + var codeBlockRules = [{ + token: "support.function", + regex: ".*", + onMatch: function (value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if (m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; + this.$rules["start"].unshift({ + token: "empty_line", + regex: '^$', + next: "allowBlock" + }, { + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token: function (value) { + return "markup.heading." + value.length; + }, + regex: /^#{1,6}(?=\s|$)/, + next: "header" + }, codeBlockStartRule, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + token: "constant", + regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic" + }); + this.addRules({ + "basic": [{ + token: "constant.language.escape", + regex: /\\[\\`*_{}\[\]()#+\-.!]/ + }, { + token: "support.function", + regex: "(`+)(.*?[^`])(\\1)" + }, { + token: ["text", "constant", "text", "url", "string", "text"], + regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { + token: ["text", "string", "text", "constant", "text"], + regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])" + }, { + token: ["text", "string", "text", "markup.underline", "string", "text"], + regex: "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text + ")(\\]\\()" + // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { + token: "string.strong", + regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: "string.emphasis", + regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: ["text", "url", "text"], + regex: "(<)(" + + "(?:https?|ftp|dict):[^'\">\\s]+" + + "|" + + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" + + ")(>)" + }], + "allowBlock": [ + { token: "support.function", regex: "^ {4}.+", next: "allowBlock" }, + { token: "empty_line", regex: '^$', next: "allowBlock" }, + { token: "empty", regex: "", next: "start" } + ], + "header": [{ + regex: "$", + next: "start" + }, { + include: "basic" + }, { + defaultToken: "heading" + }], + "listblock-start": [{ + token: "support.variable", + regex: /(?:\[[ x]\])?/, + next: "listblock" + }], + "listblock": [{ + token: "empty_line", + regex: "^$", + next: "start" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic", noEscape: true + }, + codeBlockStartRule, + { + defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly + }], + "blockquote": [{ + token: "empty_line", + regex: "^\\s*$", + next: "start" + }, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + include: "basic", noEscape: true + }, { + defaultToken: "string.blockquote" + }], + "githubblock": codeBlockRules + }); + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); +exports.MarkdownHighlightRules = MarkdownHighlightRules; + +}); + +define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +exports.MaskHighlightRules = MaskHighlightRules; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextRules = require("./text_highlight_rules").TextHighlightRules; +var JSRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var CssRules = require("./css_highlight_rules").CssHighlightRules; +var MDRules = require("./markdown_highlight_rules").MarkdownHighlightRules; +var HTMLRules = require("./html_highlight_rules").HtmlHighlightRules; +var token_TAG = "keyword.support.constant.language", token_COMPO = "support.function.markup.bold", token_KEYWORD = "keyword", token_LANG = "constant.language", token_UTIL = "keyword.control.markup.italic", token_ATTR = "support.variable.class", token_PUNKT = "keyword.operator", token_ITALIC = "markup.italic", token_BOLD = "markup.bold", token_LPARE = "paren.lparen", token_RPARE = "paren.rparen"; +var const_FUNCTIONS, const_KEYWORDS, const_CONST, const_TAGS; +(function () { + const_FUNCTIONS = lang.arrayToMap(("log").split("|")); + const_CONST = lang.arrayToMap((":dualbind|:bind|:import|slot|event|style|html|markdown|md").split("|")); + const_KEYWORDS = lang.arrayToMap(("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import").split("|")); + const_TAGS = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); +}()); +function MaskHighlightRules() { + this.$rules = { + "start": [ + Token("comment", "\\/\\/.*$"), + Token("comment", "\\/\\*", [ + Token("comment", ".*?\\*\\/", "start"), + Token("comment", ".+") + ]), + Blocks.string("'''"), + Blocks.string('"""'), + Blocks.string('"'), + Blocks.string("'"), + Blocks.syntax(/(markdown|md)\b/, "md-multiline", "multiline"), + Blocks.syntax(/html\b/, "html-multiline", "multiline"), + Blocks.syntax(/(slot|event)\b/, "js-block", "block"), + Blocks.syntax(/style\b/, "css-block", "block"), + Blocks.syntax(/var\b/, "js-statement", "attr"), + Blocks.tag(), + Token(token_LPARE, "[[({>]"), + Token(token_RPARE, "[\\])};]", "start"), + { + caseInsensitive: true + } + ] + }; + var rules = this; + addJavaScript("interpolation", /\]/, token_RPARE + "." + token_ITALIC); + addJavaScript("statement", /\)|}|;/); + addJavaScript("block", /\}/); + addCss(); + addMarkdown(); + addHtml(); + function addJavaScript(name, escape, closeType) { + var prfx = "js-" + name + "-", rootTokens = name === "block" ? ["start"] : ["start", "no_regex"]; + add(JSRules, prfx, escape, rootTokens, closeType); + } + function addCss() { + add(CssRules, "css-block-", /\}/); + } + function addMarkdown() { + add(MDRules, "md-multiline-", /("""|''')/, []); + } + function addHtml() { + add(HTMLRules, "html-multiline-", /("""|''')/); + } + function add(Rules, strPrfx, rgxEnd, rootTokens, closeType) { + var next = "pop"; + var tokens = rootTokens || ["start"]; + if (tokens.length === 0) { + tokens = null; + } + if (/block|multiline/.test(strPrfx)) { + next = strPrfx + "end"; + rules.$rules[next] = [ + Token("empty", "", "start") + ]; + } + rules.embedRules(Rules, strPrfx, [Token(closeType || token_RPARE, rgxEnd, next)], tokens, tokens == null ? true : false); + } + this.normalizeRules(); +} +oop.inherits(MaskHighlightRules, TextRules); +var Blocks = { + string: function (str, next) { + var token = Token("string.start", str, [ + Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()), + Token("string.end", str, "pop"), + { + defaultToken: "string" + } + ], next); + if (str.length === 1) { + var escaped = Token("string.escape", "\\\\" + str); + token.push.unshift(escaped); + } + return token; + }, + interpolation: function () { + return [ + Token(token_UTIL, /\s*\w*\s*:/), + "js-interpolation-start" + ]; + }, + tagHead: function (rgx) { + return Token(token_ATTR, rgx, [ + Token(token_ATTR, /[\w\-_]+/), + Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()), + Blocks.goUp() + ]); + }, + tag: function () { + return { + token: 'tag', + onMatch: function (value) { + if (void 0 !== const_KEYWORDS[value]) + return token_KEYWORD; + if (void 0 !== const_CONST[value]) + return token_LANG; + if (void 0 !== const_FUNCTIONS[value]) + return "support.function"; + if (void 0 !== const_TAGS[value.toLowerCase()]) + return token_TAG; + return token_COMPO; + }, + regex: /([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/, + push: [ + Blocks.tagHead(/\./), + Blocks.tagHead(/#/), + Blocks.expression(), + Blocks.attribute(), + Token(token_LPARE, /[;>{]/, "pop") + ] + }; + }, + syntax: function (rgx, next, type) { + return { + token: token_LANG, + regex: rgx, + push: ({ + "attr": [ + next + "-start", + Token(token_PUNKT, /;/, "start") + ], + "multiline": [ + Blocks.tagHead(/\./), + Blocks.tagHead(/#/), + Blocks.attribute(), + Blocks.expression(), + Token(token_LPARE, /[>\{]/), + Token(token_PUNKT, /;/, "start"), + Token(token_LPARE, /'''|"""/, [next + "-start"]) + ], + "block": [ + Blocks.tagHead(/\./), + Blocks.tagHead(/#/), + Blocks.attribute(), + Blocks.expression(), + Token(token_LPARE, /\{/, [next + "-start"]) + ] + })[type] + }; + }, + attribute: function () { + return Token(function (value) { + return /^x\-/.test(value) + ? token_ATTR + "." + token_BOLD + : token_ATTR; + }, /[\w_-]+/, [ + Token(token_PUNKT, /\s*=\s*/, [ + Blocks.string('"'), + Blocks.string("'"), + Blocks.word(), + Blocks.goUp() + ]), + Blocks.goUp() + ]); + }, + expression: function () { + return Token(token_LPARE, /\(/, ["js-statement-start"]); + }, + word: function () { + return Token("string", /[\w-_]+/); + }, + goUp: function () { + return Token("text", "", "pop"); + }, + goStart: function () { + return Token("text", "", "start"); + } +}; +function Token(token, rgx, mix) { + var push, next, onMatch; + if (arguments.length === 4) { + push = mix; + next = arguments[3]; + } + else if (typeof mix === "string") { + next = mix; + } + else { + push = mix; + } + if (typeof token === "function") { + onMatch = token; + token = "empty"; + } + return { + token: token, + regex: rgx, + push: push, + next: next, + onMatch: onMatch + }; +} + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MaskHighlightRules = require("./mask_highlight_rules").MaskHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = MaskHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/mask"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mask"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-matlab.js b/ui/base1/ace/mode-matlab.js new file mode 100644 index 0000000..ebc7fe9 --- /dev/null +++ b/ui/base1/ace/mode-matlab.js @@ -0,0 +1,239 @@ +define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MatlabHighlightRules = function () { + var keywords = ("break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while"); + var builtinConstants = ("true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout"); + var builtinFunctions = ("abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|" + + "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" + + "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|" + + "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|" + + "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|" + + "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:.(?:close|closeVar|" + + "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|" + + "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|" + + "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|" + + "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|" + + "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|" + + "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|" + + "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|" + + "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|" + + "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|" + + "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|" + + "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|" + + "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|" + + "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|" + + "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|" + + "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|" + + "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|" + + "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|" + + "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|" + + "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|" + + "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|" + + "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|" + + "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|" + + "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|" + + "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|" + + "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|" + + "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|" + + "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|" + + "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|" + + "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|" + + "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|" + + "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|" + + "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|" + + "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab.io.MatFile|matlab.mixin.(?:Copyable|Heterogeneous(?:.getDefaultScalarElement)?)|matlabrc|" + + "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta.(?:class(?:.fromName)?|DynamicProperty|EnumeratedValue|event|" + + "MetaData|method|package(?:.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|" + + "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|" + + "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|" + + "ncwriteschema|ndgrid|ndims|ne|NET(?:.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|" + + "NetException|setStaticProperty))?|netcdf.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|" + + "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|" + + "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|" + + "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|" + + "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|" + + "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|" + + "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|" + + "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|" + + "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:.(?:create|" + + "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|" + + "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|" + + "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|" + + "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|" + + "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|" + + "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|" + + "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|" + + "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|" + + "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|" + + "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|" + + "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|" + + "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|" + + "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|" + + "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:.isPlatformSupported)?|VideoWriter(?:.getProfiles)?|" + + "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|" + + "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|" + + "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|" + + "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|" + + "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:.(?:fit|make|template))?|Ensemble|KNN(?:.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|" + + "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|" + + "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|" + + "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|" + + "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:.fit)?|geo(?:cdf|inv|mean|" + + "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|" + + "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|" + + "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|" + + "LinearModel(?:.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|" + + "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:.fit)?|nan(?:cov|max|mean|median|min|std|" + + "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|" + + "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|" + + "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|" + + "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|" + + "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|regstats|relieff|ridge|" + + "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|" + + "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|" + + "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest" + + "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|" + + "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|" + + "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|" + + "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|" + + "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|" + + "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|" + + "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|" + + "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|" + + "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|" + + "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|" + + "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|" + + "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|" + + "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|" + + "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|" + + "reflect|regionprops|registration.metric.(?:MattesMutualInformation|MeanSquares)|registration.optimizer.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|" + + "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|" + + "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|" + + "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog"); + var storageType = ("cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse"); + var keywordMapper = this.createKeywordMapper({ + "storage.type": storageType, + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + this.$rules = { + start: [{ + token: "string", + regex: "'", + stateName: "qstring", + next: [{ + token: "constant.language.escape", + regex: "''" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }] + }, { + token: "text", + regex: "\\s+" + }, { + regex: "", + next: "noQstring" + }], + noQstring: [{ + regex: "^\\s*%{\\s*$", + token: "comment.start", + push: "blockComment" + }, { + token: "comment", + regex: "%[^\r\n]*" + }, { + token: "string", + regex: '"', + stateName: "qqstring", + next: [{ + token: "constant.language.escape", + regex: /\\./ + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }] + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=", + next: "start" + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\.", + next: "start" + }, { + token: "paren.lparen", + regex: "[({\\[]", + next: "start" + }, { + token: "paren.rparen", + regex: "[\\]})]" + }, { + token: "text", + regex: "\\s+" + }, { + token: "text", + regex: "$", + next: "start" + }], + blockComment: [{ + regex: "^\\s*%{\\s*$", + token: "comment.start", + push: "blockComment" + }, { + regex: "^\\s*%}\\s*$", + token: "comment.end", + next: "pop" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +}; +oop.inherits(MatlabHighlightRules, TextHighlightRules); +exports.MatlabHighlightRules = MatlabHighlightRules; + +}); + +define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules; +var Mode = function () { + this.HighlightRules = MatlabHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "%"; + this.blockComment = { start: "%{", end: "%}" }; + this.$id = "ace/mode/matlab"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/matlab"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-maze.js b/ui/base1/ace/mode-maze.js new file mode 100644 index 0000000..3f6f25b --- /dev/null +++ b/ui/base1/ace/mode-maze.js @@ -0,0 +1,256 @@ +define("ace/mode/maze_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MazeHighlightRules = function () { + this.$rules = { + start: [{ + token: "keyword.control", + regex: /##|``/, + comment: "Wall" + }, { + token: "entity.name.tag", + regex: /\.\./, + comment: "Path" + }, { + token: "keyword.control", + regex: /<>/, + comment: "Splitter" + }, { + token: "entity.name.tag", + regex: /\*[\*A-Za-z0-9]/, + comment: "Signal" + }, { + token: "constant.numeric", + regex: /[0-9]{2}/, + comment: "Pause" + }, { + token: "keyword.control", + regex: /\^\^/, + comment: "Start" + }, { + token: "keyword.control", + regex: /\(\)/, + comment: "Hole" + }, { + token: "support.function", + regex: />>/, + comment: "Out" + }, { + token: "support.function", + regex: />\//, + comment: "Ln Out" + }, { + token: "support.function", + regex: /< *)(?:([-+*\/]=)( *)((?:-)?)([0-9]+)|(=)( *)(?:((?:-)?)([0-9]+)|("[^"]*")|('[^']*')))/, + comment: "Assignment function" + }, { + token: [ + "entity.name.function", + "keyword.other", + "keyword.control", + "keyword.other", + "keyword.operator", + "keyword.other", + "keyword.operator", + "constant.numeric", + "entity.name.tag", + "keyword.other", + "keyword.control", + "keyword.other", + "constant.language", + "keyword.other", + "keyword.control", + "keyword.other", + "constant.language" + ], + regex: /([A-Za-z][A-Za-z0-9])( *-> *)(IF|if)( *)(?:([<>]=?|==)( *)((?:-)?)([0-9]+)|(\*[\*A-Za-z0-9]))( *)(THEN|then)( *)(%[LRUDNlrudn])(?:( *)(ELSE|else)( *)(%[LRUDNlrudn]))?/, + comment: "Equality Function" + }, { + token: "entity.name.function", + regex: /[A-Za-z][A-Za-z0-9]/, + comment: "Function cell" + }, { + token: "comment.line.double-slash", + regex: / *\/\/.*/, + comment: "Comment" + }] + }; + this.normalizeRules(); +}; +MazeHighlightRules.metaData = { + fileTypes: ["mz"], + name: "Maze", + scopeName: "source.maze" +}; +oop.inherits(MazeHighlightRules, TextHighlightRules); +exports.MazeHighlightRules = MazeHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/maze",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/maze_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MazeHighlightRules = require("./maze_highlight_rules").MazeHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = MazeHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/maze"; + this.snippetFileId = "ace/snippets/maze"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/maze"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mediawiki.js b/ui/base1/ace/mode-mediawiki.js new file mode 100644 index 0000000..4bcf912 --- /dev/null +++ b/ui/base1/ace/mode-mediawiki.js @@ -0,0 +1,580 @@ +define("ace/mode/mediawiki_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MediaWikiHighlightRules = function () { + this.$rules = { + start: [{ + include: "#switch" + }, { + include: "#redirect" + }, { + include: "#variable" + }, { + include: "#comment" + }, { + include: "#entity" + }, { + include: "#emphasis" + }, { + include: "#tag" + }, { + include: "#table" + }, { + include: "#hr" + }, { + include: "#heading" + }, { + include: "#link" + }, { + include: "#list" + }, { + include: "#template" + }], + "#hr": [{ + token: "markup.bold", + regex: /^[-]{4,}/ + }], + "#switch": [{ + token: "constant.language", + regex: /(__NOTOC__|__FORCETOC__|__TOC__|__NOEDITSECTION__|__NEWSECTIONLINK__|__NONEWSECTIONLINK__|__NOWYSIWYG__|__NOGALLERY__|__HIDDENCAT__|__EXPECTUNUSEDCATEGORY__|__NOCONTENTCONVERT__|__NOCC__|__NOTITLECONVERT__|__NOTC__|__START__|__END__|__INDEX__|__NOINDEX__|__STATICREDIRECT__|__NOGLOBAL__|__DISAMBIG__)/ + }], + "#redirect": [{ + token: [ + "keyword.control.redirect", + "meta.keyword.control" + ], + regex: /(^#REDIRECT|^#redirect|^#Redirect)(\s+)/ + }], + "#variable": [{ + token: "storage.type.variable", + regex: /{{{/, + push: [{ + token: "storage.type.variable", + regex: /}}}/, + next: "pop" + }, { + token: [ + "text", + "variable.other", + "text", + "keyword.operator" + ], + regex: /(\s*)(\w+)(\s*)((?:\|)?)/ + }, { + defaultToken: "storage.type.variable" + }] + }], + "#entity": [{ + token: "constant.character.entity", + regex: /&\w+;/ + }], + "#list": [{ + token: "markup.bold", + regex: /^[#*;:]+/, + push: [{ + token: "markup.list", + regex: /$/, + next: "pop" + }, { + include: "$self" + }, { + defaultToken: "markup.list" + }] + }], + "#template": [{ + token: [ + "storage.type.function", + "meta.template", + "entity.name.function", + "meta.template" + ], + regex: /({{)(\s*)([#\w: ]+)(\s*)/, + push: [{ + token: "storage.type.function", + regex: /}}/, + next: "pop" + }, { + token: [ + "storage", + "meta.structure.dictionary", + "support.type.property-name", + "meta.structure.dictionary", + "punctuation.separator.dictionary.key-value", + "meta.structure.dictionary", + "meta.structure.dictionary.value" + ], + regex: /(\|)(\s*)([a-zA-Z-]*)(\s*)(=)(\s*)([^|}]*)/, + push: [{ + token: "meta.structure.dictionary", + regex: /(?=}}|[|])/, + next: "pop" + }, { + defaultToken: "meta.structure.dictionary" + }] + }, { + token: ["storage", "meta.template.value"], + regex: /(\|)(.*?)/, + push: [{ + token: [], + regex: /(?=}}|[|])/, + next: "pop" + }, { + include: "$self" + }, { + defaultToken: "meta.template.value" + }] + }, { + defaultToken: "meta.template" + }] + }], + "#link": [{ + token: [ + "punctuation.definition.tag.begin", + "meta.tag.link.internal", + "entity.name.tag", + "meta.tag.link.internal", + "string.other.link.title", + "meta.tag.link.internal", + "punctuation.definition.tag" + ], + regex: /(\[\[)(\s*)((?:Category|Wikipedia)?)(:?)([^\]\]\|]+)(\s*)((?:\|)*)/, + push: [{ + token: "punctuation.definition.tag.end", + regex: /\]\]/, + next: "pop" + }, { + include: "$self" + }, { + defaultToken: "meta.tag.link.internal" + }] + }, { + token: [ + "punctuation.definition.tag.begin", + "meta.tag.link.external", + "meta.tag.link.external", + "string.unquoted", + "punctuation.definition.tag.end" + ], + regex: /(\[)(.*?)([\s]+)(.*?)(\])/ + }], + "#comment": [{ + token: "punctuation.definition.comment.html", + regex: //, + next: "pop" + }, { + defaultToken: "comment.block.html" + }] + }], + "#emphasis": [{ + token: [ + "punctuation.definition.tag.begin", + "markup.italic.bold", + "punctuation.definition.tag.end" + ], + regex: /(''''')(?!')(.*?)('''''|$)/ + }, { + token: [ + "punctuation.definition.tag.begin", + "markup.bold", + "punctuation.definition.tag.end" + ], + regex: /(''')(?!')(.*?)('''|$)/ + }, { + token: [ + "punctuation.definition.tag.begin", + "markup.italic", + "punctuation.definition.tag.end" + ], + regex: /('')(?!')(.*?)(''|$)/ + }], + "#heading": [{ + token: [ + "punctuation.definition.heading", + "entity.name.section", + "punctuation.definition.heading" + ], + regex: /(={1,6})(.+?)(\1)(?!=)/ + }], + "#tag": [{ + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag", + "meta.tag.block.ref", + "punctuation.definition.tag.end" + ], + regex: /(<)(ref)((?:\s+.*?)?)(>)/, + caseInsensitive: true, + push: [{ + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag", + "meta.tag.block.ref", + "punctuation.definition.tag.end" + ], + regex: /(<\/)(ref)(\s*)(>)/, + caseInsensitive: true, + next: "pop" + }, { + include: "$self" + }, { + defaultToken: "meta.tag.block.ref" + }] + }, + { + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag", + "meta.tag.block.nowiki", + "punctuation.definition.tag.end" + ], + regex: /(<)(nowiki)((?:\s+.*?)?)(>)/, + caseInsensitive: true, + push: [{ + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag", + "meta.tag.block.nowiki", + "punctuation.definition.tag.end" + ], + regex: /(<\/)(nowiki)(\s*)(>)/, + caseInsensitive: true, + next: "pop" + }, { + defaultToken: "meta.tag.block.nowiki" + }] + }, { + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag" + ], + regex: /(<\/?)(noinclude|includeonly|onlyinclude)(?=\W)/, + caseInsensitive: true, + push: [{ + token: [ + "invalid.illegal", + "punctuation.definition.tag.end" + ], + regex: /((?:\/)?)(>)/, + next: "pop" + }, { + include: "#attribute" + }, { + defaultToken: "meta.tag.block.any" + }] + }, { + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag" + ], + regex: /(<)(br|wbr|hr|meta|link)(?=\W)/, + caseInsensitive: true, + push: [{ + token: "punctuation.definition.tag.end", + regex: /\/?>/, + next: "pop" + }, { + include: "#attribute" + }, { + defaultToken: "meta.tag.other" + }] + }, { + token: [ + "punctuation.definition.tag.begin", + "entity.name.tag" + ], + regex: /(<\/?)(div|center|span|h1|h2|h3|h4|h5|h6|bdo|em|strong|cite|dfn|code|samp|kbd|var|abbr|blockquote|q|sub|sup|p|pre|ins|del|ul|ol|li|dl|dd|dt|table|caption|thead|tfoot|tbody|colgroup|col|tr|td|th|a|img|video|source|track|tt|b|i|big|small|strike|s|u|font|ruby|rb|rp|rt|rtc|math|figure|figcaption|bdi|data|time|mark|html)(?=\W)/, + caseInsensitive: true, + push: [{ + token: [ + "invalid.illegal", + "punctuation.definition.tag.end" + ], + regex: /((?:\/)?)(>)/, + next: "pop" + }, { + include: "#attribute" + }, { + defaultToken: "meta.tag.block" + }] + }, { + token: [ + "punctuation.definition.tag.begin", + "invalid.illegal" + ], + regex: /(<\/)(br|wbr|hr|meta|link)(?=\W)/, + caseInsensitive: true, + push: [{ + token: "punctuation.definition.tag.end", + regex: /\/?>/, + next: "pop" + }, { + include: "#attribute" + }, { + defaultToken: "meta.tag.other" + }] + }], + "#caption": [{ + token: [ + "meta.tag.block.table-caption", + "punctuation.definition.tag.begin" + ], + regex: /^(\s*)(\|\+)/, + push: [{ + token: "meta.tag.block.table-caption", + regex: /$/, + next: "pop" + }, { + defaultToken: "meta.tag.block.table-caption" + }] + }], + "#tr": [{ + token: [ + "meta.tag.block.tr", + "punctuation.definition.tag.begin", + "meta.tag.block.tr", + "invalid.illegal" + ], + regex: /^(\s*)(\|\-)([\s]*)(.*)/ + }], + "#th": [{ + token: [ + "meta.tag.block.th.heading", + "punctuation.definition.tag.begin", + "meta.tag.block.th.heading", + "punctuation.definition.tag", + "markup.bold" + ], + regex: /^(\s*)(!)(?:(.*?)(\|))?(.*?)(?=!!|$)/, + push: [{ + token: "meta.tag.block.th.heading", + regex: /$/, + next: "pop" + }, { + token: [ + "punctuation.definition.tag.begin", + "meta.tag.block.th.inline", + "punctuation.definition.tag", + "markup.bold" + ], + regex: /(!!)(?:(.*?)(\|))?(.*?)(?=!!|$)/ + }, { + include: "$self" + }, { + defaultToken: "meta.tag.block.th.heading" + }] + }], + "#td": [{ + token: [ + "meta.tag.block.td", + "punctuation.definition.tag.begin" + ], + regex: /^(\s*)(\|)/, + push: [{ + token: "meta.tag.block.td", + regex: /$/, + next: "pop" + }, { + include: "$self" + }, { + defaultToken: "meta.tag.block.td" + }] + }], + "#table": [{ + patterns: [{ + name: "meta.tag.block.table", + begin: "^\\s*({\\|)(.*?)$", + end: "^\\s*\\|}", + beginCaptures: { + 1: { + name: "punctuation.definition.tag.begin" + }, + 2: { + patterns: [{ + include: "#attribute" + }] + }, + 3: { + name: "invalid.illegal" + } + }, + endCaptures: { + 0: { + name: "punctuation.definition.tag.end" + } + }, + patterns: [{ + include: "#comment" + }, { + include: "#template" + }, { + include: "#caption" + }, { + include: "#tr" + }, { + include: "#th" + }, { + include: "#td" + }] + }], + repository: { + caption: { + name: "meta.tag.block.table-caption", + begin: "^\\s*(\\|\\+)", + end: "$", + beginCaptures: { + 1: { + name: "punctuation.definition.tag.begin" + } + } + }, + tr: { + name: "meta.tag.block.tr", + match: "^\\s*(\\|\\-)[\\s]*(.*)", + captures: { + 1: { + name: "punctuation.definition.tag.begin" + }, + 2: { + name: "invalid.illegal" + } + } + }, + th: { + name: "meta.tag.block.th.heading", + begin: "^\\s*(!)((.*?)(\\|))?(.*?)(?=(!!)|$)", + end: "$", + beginCaptures: { + 1: { + name: "punctuation.definition.tag.begin" + }, + 3: { + patterns: [{ + include: "#attribute" + }] + }, + 4: { + name: "punctuation.definition.tag" + }, + 5: { + name: "markup.bold" + } + }, + patterns: [{ + name: "meta.tag.block.th.inline", + match: "(!!)((.*?)(\\|))?(.*?)(?=(!!)|$)", + captures: { + 1: { + name: "punctuation.definition.tag.begin" + }, + 3: { + patterns: [{ + include: "#attribute" + }] + }, + 4: { + name: "punctuation.definition.tag" + }, + 5: { + name: "markup.bold" + } + } + }, { + include: "$self" + }] + }, + td: { + name: "meta.tag.block.td", + begin: "^\\s*(\\|)", + end: "$", + beginCaptures: { + 1: { + name: "punctuation.definition.tag.begin" + }, + 2: { + patterns: [{ + include: "#attribute" + }] + }, + 3: { + name: "punctuation.definition.tag" + } + }, + patterns: [{ + include: "$self" + }] + } + } + }], + "#attribute": [{ + include: "#string" + }, { + token: "entity.other.attribute-name", + regex: /\w+/ + }], + "#string": [{ + token: "string.quoted.double", + regex: /\"/, + push: [{ + token: "string.quoted.double", + regex: /\"/, + next: "pop" + }, { + defaultToken: "string.quoted.double" + }] + }, { + token: "string.quoted.single", + regex: /\'/, + push: [{ + token: "string.quoted.single", + regex: /\'/, + next: "pop" + }, { + defaultToken: "string.quoted.single" + }] + }], + "#url": [{ + token: "markup.underline.link", + regex: /(?:http(?:s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:\/?#\[\]@!\$&'\(\)\*\+,;=.]+/ + }, { + token: "invalid.illegal", + regex: /.*/ + }] + }; + this.normalizeRules(); +}; +MediaWikiHighlightRules.metaData = { + name: "MediaWiki", + scopeName: "text.html.mediawiki", + fileTypes: ["mediawiki", "wiki"] +}; +oop.inherits(MediaWikiHighlightRules, TextHighlightRules); +exports.MediaWikiHighlightRules = MediaWikiHighlightRules; + +}); + +define("ace/mode/mediawiki",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mediawiki_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MediaWikiHighlightRules = require("./mediawiki_highlight_rules").MediaWikiHighlightRules; +var Mode = function () { + this.HighlightRules = MediaWikiHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.blockComment = { start: "" }; + this.$id = "ace/mode/mediawiki"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mediawiki"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mel.js b/ui/base1/ace/mode-mel.js new file mode 100644 index 0000000..6acbc66 --- /dev/null +++ b/ui/base1/ace/mode-mel.js @@ -0,0 +1,213 @@ +define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* THIS FILE WAS AUTOGENERATED FROM MEL.tmLanguage (UUID: 69554E52-391D-42BC-9F65-7A77444BA1CF) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MELHighlightRules = function () { + this.$rules = { start: [{ caseInsensitive: true, + token: 'storage.type.mel', + regex: '\\b(matrix|string|vector|float|int|void)\\b' }, + { caseInsensitive: true, + token: 'support.function.mel', + regex: '\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b' }, + { caseInsensitive: true, + token: 'support.constant.mel', + regex: '\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b' }, + { caseInsensitive: true, + token: 'keyword.control.mel', + regex: '\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b' }, + { token: 'keyword.other.mel', regex: '\\b(global)\\b' }, + { caseInsensitive: true, + token: 'constant.language.mel', + regex: '\\b(null|undefined)\\b' }, + { token: 'constant.numeric.mel', + regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b' }, + { token: 'punctuation.definition.string.begin.mel', + regex: '"', + push: [{ token: 'constant.character.escape.mel', regex: '\\\\.' }, + { token: 'punctuation.definition.string.end.mel', + regex: '"', + next: 'pop' }, + { defaultToken: 'string.quoted.double.mel' }] }, + { token: ['variable.other.mel', 'punctuation.definition.variable.mel'], + regex: '(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)' }, + { token: 'punctuation.definition.string.begin.mel', + regex: '\'', + push: [{ token: 'constant.character.escape.mel', regex: '\\\\.' }, + { token: 'punctuation.definition.string.end.mel', + regex: '\'', + next: 'pop' }, + { defaultToken: 'string.quoted.single.mel' }] }, + { token: 'constant.language.mel', + regex: '\\b(false|true|yes|no|on|off)\\b' }, + { token: 'punctuation.definition.comment.mel', + regex: '/\\*', + push: [{ token: 'punctuation.definition.comment.mel', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.mel' }] }, + { token: ['comment.line.double-slash.mel', 'punctuation.definition.comment.mel'], + regex: '(//)(.*$\\n?)' }, + { caseInsensitive: true, + token: 'keyword.operator.mel', + regex: '\\b(instanceof)\\b' }, + { token: 'keyword.operator.symbolic.mel', + regex: '[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]' }, + { token: ['meta.preprocessor.mel', 'punctuation.definition.preprocessor.mel'], + regex: '(^[ \\t]*)((?:#)[a-zA-Z]+)' }, + { token: ['meta.function.mel', 'keyword.other.mel', 'storage.type.mel', 'entity.name.function.mel', 'punctuation.section.function.mel'], + regex: '(global\\s*)?(proc\\s*)(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*\\()', + push: [{ include: '$self' }, + { token: 'punctuation.section.function.mel', + regex: '\\)', + next: 'pop' }, + { defaultToken: 'meta.function.mel' }] } + ] }; + this.normalizeRules(); +}; +oop.inherits(MELHighlightRules, TextHighlightRules); +exports.MELHighlightRules = MELHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = MELHighlightRules; + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/mel"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mips.js b/ui/base1/ace/mode-mips.js new file mode 100644 index 0000000..f84bbf8 --- /dev/null +++ b/ui/base1/ace/mode-mips.js @@ -0,0 +1,231 @@ +define("ace/mode/mips_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from mips.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MIPSHighlightRules = function () { + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + this.$rules = { + start: [{ + token: "storage.modifier.mips", + regex: /\.\b(?:align|ascii|asciiz|byte|double|extern|float|globl|space|word)\b/, + comment: "Assembler directives for data storage" + }, { + token: "entity.name.section.mips", + regex: /\.\b(?:data|text|kdata|ktext|)\b/, + comment: "Segements: .data .text" + }, { + token: "variable.parameter.mips", + regex: /\$(?:(?:3[01]|[12]?[0-9]|[0-9])|zero|at|v[01]|a[0-3]|s[0-7]|t[0-9]|k[01]|gp|sp|fp|ra)/, + comment: "Registers by id $1, $2, ..." + }, { + token: "variable.parameter.mips", + regex: /\$f(?:[0-9]|[1-2][0-9]|3[0-1])/, + comment: "Floating point registers" + }, { + token: "support.function.source.mips", + regex: /\b(?:(?:add|sub|div|l|mov|mult|neg|s|c\.eq|c\.le|c\.lt)\.[ds]|cvt\.s\.[dw]|cvt\.d\.[sw]|cvt\.w\.[ds]|bc1[tf])\b/, + comment: "The MIPS floating-point instruction set" + }, { + token: "support.function.source.mips", + regex: /\b(?:add|addu|addi|addiu|sub|subu|and|andi|or|not|ori|nor|xor|xori|slt|sltu|slti|sltiu|sll|sllv|rol|srl|sra|srlv|ror|j|jr|jal|beq|bne|lw|sw|lb|sb|lui|move|mfhi|mflo|mthi|mtlo)\b/, + comment: "Just the hardcoded instructions provided by the MIPS assembly language" + }, { + token: "support.function.other.mips", + regex: /\b(?:abs|b|beqz|bge|bgt|bgtu|ble|bleu|blt|bltu|bnez|div|divu|la|li|move|mul|neg|not|rem|remu|seq|sge|sgt|sle|sne)\b/, + comment: "Pseudo instructions" + }, { + token: "entity.name.function.mips", + regex: /\bsyscall\b/, + comment: "Other" + }, { + token: "string", // character + regex: "(?:'\")(?:" + escapeRe + "|.)?(?:'\")" + }, { + token: "string.start", + regex: '\'', + stateName: "qstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "string.end", regex: '\'|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric.mips", + regex: /\b(?:\d+|0(?:x|X)[a-fA-F0-9]+)\b/, + comment: "Numbers like +12, -3, 55, 0x3F" + }, { + token: "entity.name.tag.mips", + regex: /\b[\w]+\b:/, + comment: "Labels at line start: begin_repeat: add ..." + }, { + token: "comment.assembly", + regex: /#.*$/, + comment: "Single line comments" + }] + }; + this.normalizeRules(); +}; +MIPSHighlightRules.metaData = { + fileTypes: ["s", "asm"], + name: "MIPS", + scopeName: "source.mips" +}; +oop.inherits(MIPSHighlightRules, TextHighlightRules); +exports.MIPSHighlightRules = MIPSHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/mips",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MIPSHighlightRules = require("./mips_highlight_rules").MIPSHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = MIPSHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["#"]; + this.$id = "ace/mode/mips"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mips"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mixal.js b/ui/base1/ace/mode-mixal.js new file mode 100644 index 0000000..b5f5f07 --- /dev/null +++ b/ui/base1/ace/mode-mixal.js @@ -0,0 +1,110 @@ +define("ace/mode/mixal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MixalHighlightRules = function () { + var isValidSymbol = function (string) { + return string && string.search(/^[A-Z\u0394\u03a0\u03a30-9]{1,10}$/) > -1 && string.search(/[A-Z\u0394\u03a0\u03a3]/) > -1; + }; + var isValidOp = function (op) { + return op && [ + 'NOP', 'ADD', 'FADD', 'SUB', 'FSUB', 'MUL', 'FMUL', 'DIV', 'FDIV', 'NUM', 'CHAR', 'HLT', + 'SLA', 'SRA', 'SLAX', 'SRAX', 'SLC', 'SRC', 'MOVE', 'LDA', 'LD1', 'LD2', 'LD3', 'LD4', + 'LD5', 'LD6', 'LDX', 'LDAN', 'LD1N', 'LD2N', 'LD3N', 'LD4N', 'LD5N', 'LD6N', 'LDXN', + 'STA', 'ST1', 'ST2', 'ST3', 'ST4', 'ST5', 'ST6', 'STX', 'STJ', 'STZ', 'JBUS', 'IOC', + 'IN', 'OUT', 'JRED', 'JMP', 'JSJ', 'JOV', 'JNOV', 'JL', 'JE', 'JG', 'JGE', 'JNE', 'JLE', + 'JAN', 'JAZ', 'JAP', 'JANN', 'JANZ', 'JANP', 'J1N', 'J1Z', 'J1P', 'J1NN', 'J1NZ', + 'J1NP', 'J2N', 'J2Z', 'J2P', 'J2NN', 'J2NZ', 'J2NP', 'J3N', 'J3Z', 'J3P', 'J3NN', 'J3NZ', + 'J3NP', 'J4N', 'J4Z', 'J4P', 'J4NN', 'J4NZ', 'J4NP', 'J5N', 'J5Z', 'J5P', 'J5NN', + 'J5NZ', 'J5NP', 'J6N', 'J6Z', 'J6P', 'J6NN', 'J6NZ', 'J6NP', 'JXN', 'JXZ', 'JXP', + 'JXNN', 'JXNZ', 'JXNP', 'INCA', 'DECA', 'ENTA', 'ENNA', 'INC1', 'DEC1', 'ENT1', 'ENN1', + 'INC2', 'DEC2', 'ENT2', 'ENN2', 'INC3', 'DEC3', 'ENT3', 'ENN3', 'INC4', 'DEC4', 'ENT4', + 'ENN4', 'INC5', 'DEC5', 'ENT5', 'ENN5', 'INC6', 'DEC6', 'ENT6', 'ENN6', 'INCX', 'DECX', + 'ENTX', 'ENNX', 'CMPA', 'FCMP', 'CMP1', 'CMP2', 'CMP3', 'CMP4', 'CMP5', 'CMP6', 'CMPX', + 'EQU', 'ORIG', 'CON', 'ALF', 'END' + ].indexOf(op) > -1; + }; + var containsOnlySupportedCharacters = function (string) { + return string && string.search(/[^ A-Z\u0394\u03a0\u03a30-9.,()+*/=$<>@;:'-]/) == -1; + }; + this.$rules = { + "start": [{ + token: "comment.line.character", + regex: /^ *\*.*$/ + }, { + token: function (label, space0, keyword, space1, literal, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + "keyword.control", + "text", + containsOnlySupportedCharacters(literal) ? "text" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(ALF)( )(.{5})(\s+.*)?$/ + }, { + token: function (label, space0, keyword, space1, literal, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + "keyword.control", + "text", + containsOnlySupportedCharacters(literal) ? "text" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(ALF)( )(\S.{4})(\s+.*)?$/ + }, { + token: function (label, space0, op, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + isValidOp(op) ? "keyword.control" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(\S+)(?:\s*)$/ + }, { + token: function (label, space0, op, space1, address, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + isValidOp(op) ? "keyword.control" : "invalid.illegal", + "text", + containsOnlySupportedCharacters(address) ? "text" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(\S+)( +)(\S+)(\s+.*)?$/ + }, { + defaultToken: "text" + }] + }; +}; +oop.inherits(MixalHighlightRules, TextHighlightRules); +exports.MixalHighlightRules = MixalHighlightRules; + +}); + +define("ace/mode/mixal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mixal_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MixalHighlightRules = require("./mixal_highlight_rules").MixalHighlightRules; +var Mode = function () { + this.HighlightRules = MixalHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/mixal"; + this.lineCommentStart = "*"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mixal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mushcode.js b/ui/base1/ace/mode-mushcode.js new file mode 100644 index 0000000..fbf1ab9 --- /dev/null +++ b/ui/base1/ace/mode-mushcode.js @@ -0,0 +1,642 @@ +define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * MUSHCodeMode + */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MushCodeRules = function () { + var keywords = ("@if|" + + "@ifelse|" + + "@switch|" + + "@halt|" + + "@dolist|" + + "@create|" + + "@scent|" + + "@sound|" + + "@touch|" + + "@ataste|" + + "@osound|" + + "@ahear|" + + "@aahear|" + + "@amhear|" + + "@otouch|" + + "@otaste|" + + "@drop|" + + "@odrop|" + + "@adrop|" + + "@dropfail|" + + "@odropfail|" + + "@smell|" + + "@oemit|" + + "@emit|" + + "@pemit|" + + "@parent|" + + "@clone|" + + "@taste|" + + "whisper|" + + "page|" + + "say|" + + "pose|" + + "semipose|" + + "teach|" + + "touch|" + + "taste|" + + "smell|" + + "listen|" + + "look|" + + "move|" + + "go|" + + "home|" + + "follow|" + + "unfollow|" + + "desert|" + + "dismiss|" + + "@tel"); + var builtinConstants = ("=#0"); + var builtinFunctions = ("default|" + + "edefault|" + + "eval|" + + "get_eval|" + + "get|" + + "grep|" + + "grepi|" + + "hasattr|" + + "hasattrp|" + + "hasattrval|" + + "hasattrpval|" + + "lattr|" + + "nattr|" + + "poss|" + + "udefault|" + + "ufun|" + + "u|" + + "v|" + + "uldefault|" + + "xget|" + + "zfun|" + + "band|" + + "bnand|" + + "bnot|" + + "bor|" + + "bxor|" + + "shl|" + + "shr|" + + "and|" + + "cand|" + + "cor|" + + "eq|" + + "gt|" + + "gte|" + + "lt|" + + "lte|" + + "nand|" + + "neq|" + + "nor|" + + "not|" + + "or|" + + "t|" + + "xor|" + + "con|" + + "entrances|" + + "exit|" + + "followers|" + + "home|" + + "lcon|" + + "lexits|" + + "loc|" + + "locate|" + + "lparent|" + + "lsearch|" + + "next|" + + "num|" + + "owner|" + + "parent|" + + "pmatch|" + + "rloc|" + + "rnum|" + + "room|" + + "where|" + + "zone|" + + "worn|" + + "held|" + + "carried|" + + "acos|" + + "asin|" + + "atan|" + + "ceil|" + + "cos|" + + "e|" + + "exp|" + + "fdiv|" + + "fmod|" + + "floor|" + + "log|" + + "ln|" + + "pi|" + + "power|" + + "round|" + + "sin|" + + "sqrt|" + + "tan|" + + "aposs|" + + "andflags|" + + "conn|" + + "commandssent|" + + "controls|" + + "doing|" + + "elock|" + + "findable|" + + "flags|" + + "fullname|" + + "hasflag|" + + "haspower|" + + "hastype|" + + "hidden|" + + "idle|" + + "isbaker|" + + "lock|" + + "lstats|" + + "money|" + + "who|" + + "name|" + + "nearby|" + + "obj|" + + "objflags|" + + "photo|" + + "poll|" + + "powers|" + + "pendingtext|" + + "receivedtext|" + + "restarts|" + + "restarttime|" + + "subj|" + + "shortestpath|" + + "tmoney|" + + "type|" + + "visible|" + + "cat|" + + "element|" + + "elements|" + + "extract|" + + "filter|" + + "filterbool|" + + "first|" + + "foreach|" + + "fold|" + + "grab|" + + "graball|" + + "index|" + + "insert|" + + "itemize|" + + "items|" + + "iter|" + + "last|" + + "ldelete|" + + "map|" + + "match|" + + "matchall|" + + "member|" + + "mix|" + + "munge|" + + "pick|" + + "remove|" + + "replace|" + + "rest|" + + "revwords|" + + "setdiff|" + + "setinter|" + + "setunion|" + + "shuffle|" + + "sort|" + + "sortby|" + + "splice|" + + "step|" + + "wordpos|" + + "words|" + + "add|" + + "lmath|" + + "max|" + + "mean|" + + "median|" + + "min|" + + "mul|" + + "percent|" + + "sign|" + + "stddev|" + + "sub|" + + "val|" + + "bound|" + + "abs|" + + "inc|" + + "dec|" + + "dist2d|" + + "dist3d|" + + "div|" + + "floordiv|" + + "mod|" + + "modulo|" + + "remainder|" + + "vadd|" + + "vdim|" + + "vdot|" + + "vmag|" + + "vmax|" + + "vmin|" + + "vmul|" + + "vsub|" + + "vunit|" + + "regedit|" + + "regeditall|" + + "regeditalli|" + + "regediti|" + + "regmatch|" + + "regmatchi|" + + "regrab|" + + "regraball|" + + "regraballi|" + + "regrabi|" + + "regrep|" + + "regrepi|" + + "after|" + + "alphamin|" + + "alphamax|" + + "art|" + + "before|" + + "brackets|" + + "capstr|" + + "case|" + + "caseall|" + + "center|" + + "containsfansi|" + + "comp|" + + "decompose|" + + "decrypt|" + + "delete|" + + "edit|" + + "encrypt|" + + "escape|" + + "if|" + + "ifelse|" + + "lcstr|" + + "left|" + + "lit|" + + "ljust|" + + "merge|" + + "mid|" + + "ostrlen|" + + "pos|" + + "repeat|" + + "reverse|" + + "right|" + + "rjust|" + + "scramble|" + + "secure|" + + "space|" + + "spellnum|" + + "squish|" + + "strcat|" + + "strmatch|" + + "strinsert|" + + "stripansi|" + + "stripfansi|" + + "strlen|" + + "switch|" + + "switchall|" + + "table|" + + "tr|" + + "trim|" + + "ucstr|" + + "unsafe|" + + "wrap|" + + "ctitle|" + + "cwho|" + + "channels|" + + "clock|" + + "cflags|" + + "ilev|" + + "itext|" + + "inum|" + + "convsecs|" + + "convutcsecs|" + + "convtime|" + + "ctime|" + + "etimefmt|" + + "isdaylight|" + + "mtime|" + + "secs|" + + "msecs|" + + "starttime|" + + "time|" + + "timefmt|" + + "timestring|" + + "utctime|" + + "atrlock|" + + "clone|" + + "create|" + + "cook|" + + "dig|" + + "emit|" + + "lemit|" + + "link|" + + "oemit|" + + "open|" + + "pemit|" + + "remit|" + + "set|" + + "tel|" + + "wipe|" + + "zemit|" + + "fbcreate|" + + "fbdestroy|" + + "fbwrite|" + + "fbclear|" + + "fbcopy|" + + "fbcopyto|" + + "fbclip|" + + "fbdump|" + + "fbflush|" + + "fbhset|" + + "fblist|" + + "fbstats|" + + "qentries|" + + "qentry|" + + "play|" + + "ansi|" + + "break|" + + "c|" + + "asc|" + + "die|" + + "isdbref|" + + "isint|" + + "isnum|" + + "isletters|" + + "linecoords|" + + "localize|" + + "lnum|" + + "nameshort|" + + "null|" + + "objeval|" + + "r|" + + "rand|" + + "s|" + + "setq|" + + "setr|" + + "soundex|" + + "soundslike|" + + "valid|" + + "vchart|" + + "vchart2|" + + "vlabel|" + + "@@|" + + "bakerdays|" + + "bodybuild|" + + "box|" + + "capall|" + + "catalog|" + + "children|" + + "ctrailer|" + + "darttime|" + + "debt|" + + "detailbar|" + + "exploredroom|" + + "fansitoansi|" + + "fansitoxansi|" + + "fullbar|" + + "halfbar|" + + "isdarted|" + + "isnewbie|" + + "isword|" + + "lambda|" + + "lobjects|" + + "lplayers|" + + "lthings|" + + "lvexits|" + + "lvobjects|" + + "lvplayers|" + + "lvthings|" + + "newswrap|" + + "numsuffix|" + + "playerson|" + + "playersthisweek|" + + "randomad|" + + "randword|" + + "realrandword|" + + "replacechr|" + + "second|" + + "splitamount|" + + "strlenall|" + + "text|" + + "third|" + + "tofansi|" + + "totalac|" + + "unique|" + + "getaddressroom|" + + "listpropertycomm|" + + "listpropertyres|" + + "lotowner|" + + "lotrating|" + + "lotratingcount|" + + "lotvalue|" + + "boughtproduct|" + + "companyabb|" + + "companyicon|" + + "companylist|" + + "companyname|" + + "companyowners|" + + "companyvalue|" + + "employees|" + + "invested|" + + "productlist|" + + "productname|" + + "productowners|" + + "productrating|" + + "productratingcount|" + + "productsoldat|" + + "producttype|" + + "ratedproduct|" + + "soldproduct|" + + "topproducts|" + + "totalspentonproduct|" + + "totalstock|" + + "transfermoney|" + + "uniquebuyercount|" + + "uniqueproductsbought|" + + "validcompany|" + + "deletepicture|" + + "fbsave|" + + "getpicturesecurity|" + + "haspicture|" + + "listpictures|" + + "picturesize|" + + "replacecolor|" + + "rgbtocolor|" + + "savepicture|" + + "setpicturesecurity|" + + "showpicture|" + + "piechart|" + + "piechartlabel|" + + "createmaze|" + + "drawmaze|" + + "drawwireframe"); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + this.$rules = { + "start": [ + { + token: "variable", // mush substitution register + regex: "%[0-9]{1}" + }, + { + token: "variable", // mush substitution register + regex: "%q[0-9A-Za-z]{1}" + }, + { + token: "variable", // mush special character register + regex: "%[a-zA-Z]{1}" + }, + { + token: "variable.language", + regex: "%[a-z0-9-_]+" + }, + { + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+" + } + ] + }; +}; +oop.inherits(MushCodeRules, TextHighlightRules); +exports.MushCodeRules = MushCodeRules; + +}); + +define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MushCodeRules = require("./mushcode_highlight_rules").MushCodeRules; +var PythonFoldMode = require("./folding/pythonic").FoldMode; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = MushCodeRules; + this.foldingRules = new PythonFoldMode("\\:"); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/mushcode"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mushcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-mysql.js b/ui/base1/ace/mode-mysql.js new file mode 100644 index 0000000..960d260 --- /dev/null +++ b/ui/base1/ace/mode-mysql.js @@ -0,0 +1,150 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MysqlHighlightRules = function () { + var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|lateral|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|intersect|except|update|values|where" + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|by|group_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat"; + var builtins = "rank|coalesce|ifnull|isnull|nvl"; + var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee"; + var datetimeFunctions = 'adddate|addtime|convert_tz|curdate|current_date|current_time|current_timestamp|curtime|date|date_add|date_format|date_sub|datediff|day|dayname|dayofmonth|dayofweek|dayofyear|extract|from_days|from_unixtime|get_format|hour|last_day|localtime|localtimestamp|makedate|maketime|microsecond|minute|month|monthname|now|period_add|period_diff|quarter|sec_to_time|second|str_to_date|subdate|subtime|sysdate|time|time_format|time_to_sec|timediff|timestamp|timestampadd|timestampdiff|to_days|to_seconds|unix_timestamp|utc_date|utc_time|utc_timestamp|week|weekday|weekofyear|year|yearweek'; + var encryptionFunctions = 'aes_decrypt|aes_encrypt|compress|md|random_bytes|sha|sha|statement_digest|statement_digest_text|uncompress|uncompressed_length|validate_password_strength'; + var mathFunctions = 'abs|acos|asin|atan|atan|ceil|ceiling|conv|cos|cot|crc|degrees|div|exp|floor|ln|log|log10|log2|mod|pi|pow|power|radians|rand|round|sign|sin|sqrt|tan|truncate'; + var stringFunctions = 'ascii|bin|bit_length|char|char_length|character_length|concat|concat_ws|elt|export_set|field|find_in_set|format|from_base|hex|insert|instr|lcase|left|length|like|load_file|locate|lower|lpad|ltrim|make_set|match|mid|not|not|oct|octet_length|ord|position|quote|regexp|regexp_instr|regexp_like|regexp_replace|regexp_substr|repeat|replace|reverse|right|rlike|rpad|rtrim|soundex|sounds|space|strcmp|substr|substring|substring_index|to_base|trim|ucase|unhex|upper|weight_string'; + var dataTypes = ("bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|" + + "bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric"); + var keywordMapper = this.createKeywordMapper({ + "support.function": [builtins, datetimeFunctions, encryptionFunctions, mathFunctions, stringFunctions].join('|'), + "keyword": mySqlKeywords, + "storage.type": dataTypes, + "constant": "false|true|null|unknown|ODBCdotTable|zerolessFloat", + "variable.language": variable + }, "identifier", true); + function string(rule) { + var start = rule.start; + var escapeSeq = rule.escape; + return { + token: "string.start", + regex: start, + next: [ + { token: "constant.language.escape", regex: escapeSeq }, + { token: "string.end", next: "start", regex: start }, + { defaultToken: "string" } + ] + }; + } + this.$rules = { + "start": [{ + token: "comment", regex: "(?:-- |#).*$" + }, + string({ start: '"', escape: /\\[0'"bnrtZ\\%_]?/ }), + string({ start: "'", escape: /\\[0'"bnrtZ\\%_]?/ }), + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: /\/\*/, + next: "comment" + }, { + token: "constant.numeric", // hex + regex: /0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/ + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "constant.class", + regex: "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "constant.buildin", + regex: "`[^`]*`" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }], + "comment": [ + { token: "comment", regex: "\\*\\/", next: "start" }, + { defaultToken: "comment" } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(MysqlHighlightRules, TextHighlightRules); +exports.MysqlHighlightRules = MysqlHighlightRules; + +}); + +define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("../mode/text").Mode; +var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules; +var Mode = function () { + this.HighlightRules = MysqlHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["--", "#"]; // todo space + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/mysql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/mysql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-nasal.js b/ui/base1/ace/mode-nasal.js new file mode 100644 index 0000000..d6cb8a8 --- /dev/null +++ b/ui/base1/ace/mode-nasal.js @@ -0,0 +1,513 @@ +define("ace/mode/nasal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NasalHighlightRules = function () { + this.$rules = { + start: [{ + token: "constant.other.allcaps.nasal", + regex: /\b[[:upper:]_][[:upper:][:digit:]_]*\b(?![\.\(\'\"])/, + comment: "Match identifiers in ALL_CAPS as constants, except when followed by `.`, `(`, `'`, or `\"`." + }, { + todo: { + token: [ + "support.class.nasal", + "meta.function.nasal", + "entity.name.function.nasal", + "meta.function.nasal", + "keyword.operator.nasal", + "meta.function.nasal", + "storage.type.function.nasal", + "meta.function.nasal", + "punctuation.definition.parameters.begin.nasal" + ], + regex: /([a-zA-Z_?.$][\w?.$]*)(\.)([a-zA-Z_?.$][\w?.$]*)(\s*)(=)(\s*)(func)(\s*)(\()/, + push: [{ + token: "punctuation.definition.parameters.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }, { + token: "variable.parameter.nasal", + regex: /\w/ + }, { + defaultToken: "meta.function.nasal" + }] + }, + comment: "match stuff like: Sound.play = func() { … }" + }, { + todo: { + token: [ + "entity.name.function.nasal", + "meta.function.nasal", + "keyword.operator.nasal", + "meta.function.nasal", + "storage.type.function.nasal", + "meta.function.nasal", + "punctuation.definition.parameters.begin.nasal" + ], + regex: /([a-zA-Z_?$][\w?$]*)(\s*)(=)(\s*)(func)(\s*)(\()/, + push: [{ + token: "punctuation.definition.parameters.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }, { + token: "variable.parameter.nasal", + regex: /\w/ + }, { + defaultToken: "meta.function.nasal" + }] + }, + comment: "match stuff like: play = func() { … }" + }, { + todo: { + token: [ + "entity.name.function.nasal", + "meta.function.nasal", + "keyword.operator.nasal", + "meta.function.nasal", + "storage.type.function.nasal", + "meta.function.nasal", + "punctuation.definition.parameters.begin.nasal" + ], + regex: /([a-zA-Z_?$][\w?$]*)(\s*)(=)(\s*\(\s*)(func)(\s*)(\()/, + push: [{ + token: "punctuation.definition.parameters.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }, { + token: "variable.parameter.nasal", + regex: /\w/ + }, { + defaultToken: "meta.function.nasal" + }] + }, + comment: "match stuff like: play = (func() { … }" + }, { + todo: { + token: [ + "entity.name.function.nasal", + "meta.function.hash.nasal", + "storage.type.function.nasal", + "meta.function.hash.nasal", + "punctuation.definition.parameters.begin.nasal" + ], + regex: /\b([a-zA-Z_?.$][\w?.$]*)(\s*:\s*\b)(func)(\s*)(\()/, + push: [{ + token: "punctuation.definition.parameters.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }, { + token: "variable.parameter.nasal", + regex: /\w/ + }, { + defaultToken: "meta.function.hash.nasal" + }] + }, + comment: "match stuff like: foobar: func() { … }" + }, { + todo: { + token: [ + "storage.type.function.nasal", + "meta.function.nasal", + "punctuation.definition.parameters.begin.nasal" + ], + regex: /\b(func)(\s*)(\()/, + push: [{ + token: "punctuation.definition.parameters.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }, { + token: "variable.parameter.nasal", + regex: /\w/ + }, { + defaultToken: "meta.function.nasal" + }] + }, + comment: "match stuff like: func() { … }" + }, { + token: [ + "keyword.operator.new.nasal", + "meta.class.instance.constructor", + "entity.name.type.instance.nasal" + ], + regex: /(new)(\s+)(\w+(?:\.\w*)?)/ + }, { + token: "keyword.control.nasal", + regex: /\b(?:if|else|elsif|while|for|foreach|forindex)\b/ + }, { + token: "keyword.control.nasal", + regex: /\b(?:break(?:\s+[A-Z]{2,16})?(?=\s*(?:;|\}))|continue(?:\s+[A-Z]{2,16})?(?=\s*(?:;|\}))|[A-Z]{2,16}(?=\s*;(?:[^\)#;]*?;){0,2}[^\)#;]*?\)))\b/ + }, { + token: "keyword.operator.nasal", + regex: /!|\*|\-|\+|~|\/|==|=|!=|<=|>=|<|>|!|\?|\:|\*=|\/=|\+=|\-=|~=|\.\.\.|\b(?:and|or)\b/ + }, { + token: "variable.language.nasal", + regex: /\b(?:me|arg|parents|obj)\b/ + }, { + token: "storage.type.nasal", + regex: /\b(?:return|var)\b/ + }, { + token: "constant.language.nil.nasal", + regex: /\bnil\b/ + }, { + token: "punctuation.definition.string.begin.nasal", + regex: /'/, + push: [{ + token: "punctuation.definition.string.end.nasal", + regex: /'/, + next: "pop" + }, { + token: "constant.character.escape.nasal", + regex: /\\'/ + }, { + defaultToken: "string.quoted.single.nasal" + }], + comment: "Single quoted strings" + }, { + token: "punctuation.definition.string.begin.nasal", + regex: /"/, + push: [{ + token: "punctuation.definition.string.end.nasal", + regex: /"/, + next: "pop" + }, { + token: "constant.character.escape.nasal", + regex: /\\(?:x[\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|r|n|t|\\|")/ + }, { + token: "constant.character.escape.nasal", + regex: /%(?:%|(?:\d+\$)?[+-]?(?:[ 0]|'.{1})?-?\d*(?:\.\d+)?[bcdeEufFgGosxX])/ + }, { + defaultToken: "string.quoted.double.nasal" + }], + comment: "Double quoted strings" + }, { + token: [ + "punctuation.definition.string.begin.nasal", + "string.other", + "punctuation.definition.string.end.nasal" + ], + regex: /(`)(.)(`)/, + comment: "Single-byte ASCII character constants" + }, { + token: [ + "punctuation.definition.comment.nasal", + "comment.line.hash.nasal" + ], + regex: /(#)(.*$)/, + comment: "Comments" + }, { + token: "constant.numeric.nasal", + regex: /(?:(?:\b[0-9]+)?\.)?\b[0-9]+(?:[eE][-+]?[0-9]+)?\b/, + comment: "Integers, floats, and scientific format" + }, { + token: "constant.numeric.nasal", + regex: /0[x|X][0-9a-fA-F]+/, + comment: "Hex codes" + }, { + token: "punctuation.terminator.statement.nasal", + regex: /\;/ + }, { + token: [ + "punctuation.section.scope.begin.nasal", + "punctuation.section.scope.end.nasal" + ], + regex: /(\[)(\])/ + }, { + todo: { + token: "punctuation.section.scope.begin.nasal", + regex: /\{/, + push: [{ + token: "punctuation.section.scope.end.nasal", + regex: /\}/, + next: "pop" + }, { + include: "$self" + }] + } + }, { + todo: { + token: "punctuation.section.scope.begin.nasal", + regex: /\(/, + push: [{ + token: "punctuation.section.scope.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }] + } + }, { + token: "invalid.illegal", + regex: /%|\$|@|&|\^|\||\\|`/, + comment: "Illegal characters" + }, { + todo: { + comment: "TODO: Symbols in hash keys" + }, + comment: "TODO: Symbols in hash keys" + }, { + token: "variable.language.nasal", + regex: /\b(?:append|bind|call|caller|chr|closure|cmp|compile|contains|delete|die|find|ghosttype|id|int|keys|left|num|pop|right|setsize|size|sort|split|sprintf|streq|substr|subvec|typeof|readline)\b/, + comment: "Core functions" + }, { + token: "variable.language.nasal", + regex: /\b(?:abort|abs|aircraftToCart|addcommand|airportinfo|airwaysRoute|assert|carttogeod|cmdarg|courseAndDistance|createDiscontinuity|createViaTo|createWP|createWPFrom|defined|directory|fgcommand|findAirportsByICAO|findAirportsWithinRange|findFixesByID|findNavaidByFrequency|findNavaidsByFrequency|findNavaidsByID|findNavaidsWithinRange|finddata|flightplan|geodinfo|geodtocart|get_cart_ground_intersection|getprop|greatCircleMove|interpolate|isa|logprint|magvar|maketimer|start|stop|restart|maketimestamp|md5|navinfo|parse_markdown|parsexml|print|printf|printlog|rand|registerFlightPlanDelegate|removecommand|removelistener|resolvepath|setlistener|_setlistener|setprop|srand|systime|thisfunc|tileIndex|tilePath|values)\b/, + comment: "FG ext core functions" + }, { + token: "variable.language.nasal", + regex: /\b(?:singleShot|isRunning|simulatedTime)\b/, + comment: "FG ext core functions" + }, { + token: "constant.language.nasal", + regex: /\b(?:D2R|FPS2KT|FT2M|GAL2L|IN2M|KG2LB|KT2FPS|KT2MPS|LG2GAL|LB2KG|M2FT|M2IN|M2NM|MPS2KT|NM2M|R2D)\b/, + comment: "FG ext core constants" + }, { + token: "support.function.nasal", + regex: /\b(?:addChild|addChildren|alias|clearValue|equals|getAliasTarget|getAttribute|getBoolValue|getChild|getChildren|getIndex|getName|getNode|getParent|getPath|getType|getValue|getValues|initNode|remove|removeAllChildren|removeChild|removeChildren|setAttribute|setBoolValue|setDoubleValue|setIntValue|setValue|setValues|unalias|compileCondition|condition|copy|dump|getNode|nodeList|runBinding|setAll|wrap|wrapNode)\b/, + comment: "FG func props" + }, { + token: "support.class.nasal", + regex: /\bNode\b/, + comment: "FG node class" + }, { + token: "variable.language.nasal", + regex: /\b(?:props|globals)\b/, + comment: "FG func props variables" + }, { + todo: { + token: [ + "support.function.nasal", + "punctuation.definition.arguments.begin.nasal" + ], + regex: /\b([a-zA-Z_?$][\w?$]*)(\()/, + push: [{ + token: "punctuation.definition.arguments.end.nasal", + regex: /\)/, + next: "pop" + }, { + include: "$self" + }, { + defaultToken: "meta.function-call.nasal" + }] + }, + comment: "function call" + }] + }; + this.normalizeRules(); +}; +NasalHighlightRules.metaData = { + fileTypes: ["nas"], + name: "Nasal", + scopeName: "source.nasal" +}; +oop.inherits(NasalHighlightRules, TextHighlightRules); +exports.NasalHighlightRules = NasalHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/nasal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nasal_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var NasalHighlightRules = require("./nasal_highlight_rules").NasalHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = NasalHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/nasal"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/nasal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-nginx.js b/ui/base1/ace/mode-nginx.js new file mode 100644 index 0000000..04bb73f --- /dev/null +++ b/ui/base1/ace/mode-nginx.js @@ -0,0 +1,262 @@ +define("ace/mode/nginx_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NginxHighlightRules = function () { + var keywords = "include|index|absolute_redirect|aio|output_buffers|directio|sendfile|aio_write|alias|root|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|default_type|disable_symlinks|directio_alignment|error_page|etag|if_modified_since|ignore_invalid_headers|internal|keepalive_requests|keepalive_disable|keepalive_timeout|limit_except|large_client_header_buffers|limit_rate|limit_rate_after|lingering_close|lingering_time|lingering_timeout|listen|log_not_found|log_subrequest|max_ranges|merge_slashes|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|output_buffers|port_in_redirect|postpone_output|read_ahead|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|satisfy|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|subrequest_output_buffer_size|tcp_nodelay|tcp_nopush|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|variables_hash_bucket_size|variables_hash_max_size|accept_mutex|accept_mutex_delay|debug_connection|error_log|daemon|debug_points|env|load_module|lock_file|master_process|multi_accept|pcre_jit|pid|ssl_engine|thread_pool|timer_resolution|use|user|worker_aio_requests|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_shutdown_timeout|working_directory|allow|deny|add_before_body|add_after_body|addition_types|api|status_zone|auth_basic|auth_basic_user_file|auth_jwt|auth_jwt|auth_jwt_claim_set|auth_jwt_header_set|auth_jwt_key_file|auth_jwt_key_request|auth_jwt_leeway|auth_request|auth_request_set|autoindex|autoindex_exact_size|autoindex_format|autoindex_localtime|ancient_browser|ancient_browser_value|modern_browser|modern_browser_value|charset|charset_map|charset_types|override_charset|source_charset|create_full_put_path|dav_access|dav_methods|min_delete_depth|empty_gif|f4f|f4f_buffer_size|fastcgi_bind|fastcgi_buffer_size|fastcgi_buffering|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_background_update|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_age|fastcgi_cache_lock_timeout|fastcgi_cache_max_range_offset|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_revalidate|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_catch_stderr|fastcgi_connect_timeout|fastcgi_force_ranges|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_limit_rate|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_next_upstream_timeout|fastcgi_next_upstream_tries|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_pass_request_body|fastcgi_pass_request_headers|fastcgi_read_timeout|fastcgi_request_buffering|fastcgi_send_lowat|fastcgi_send_timeout|fastcgi_socket_keepalive|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geoip_country|geoip_city|geoip_org|geoip_proxy|geoip_proxy_recursive|grpc_bind|grpc_buffer_size|grpc_connect_timeout|grpc_hide_header|grpc_ignore_headers|grpc_intercept_errors|grpc_next_upstream|grpc_next_upstream_timeout|grpc_next_upstream_tries|grpc_pass|grpc_pass_header|grpc_read_timeout|grpc_send_timeout|grpc_set_header|grpc_socket_keepalive|grpc_ssl_certificate|grpc_ssl_certificate_key|grpc_ssl_ciphers|grpc_ssl_crl|grpc_ssl_name|grpc_ssl_password_file|grpc_ssl_protocols|grpc_ssl_server_name|grpc_ssl_session_reuse|grpc_ssl_trusted_certificate|grpc_ssl_verify|grpc_ssl_verify_depth|gunzip|gunzip_buffers|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_types|gzip_vary|gzip_static|add_header|add_trailer|expires|hlshls_buffers|hls_forward_args|hls_fragment|hls_mp4_buffer_size|hls_mp4_max_buffer_size|image_filter|image_filter_buffer|image_filter_interlace|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|image_filter_webp_quality|js_content|js_include|js_set|keyval|keyval_zone|limit_conn|limit_conn_log_level|limit_conn_status|limit_conn_zone|limit_zone|limit_req|limit_req_log_level|limit_req_status|limit_req_zone|access_log|log_format|open_log_file_cache|map_hash_bucket_size|map_hash_max_size|memcached_bind|memcached_buffer_size|memcached_connect_timeout|memcached_force_ranges|memcached_gzip_flag|memcached_next_upstream|memcached_next_upstream_timeout|memcached_next_upstream_tries|memcached_pass|memcached_read_timeout|memcached_send_timeout|memcached_socket_keepalive|mirror|mirror_request_body|mp4|mp4_buffer_size|mp4_max_buffer_size|mp4_limit_rate|mp4_limit_rate_after|perl_modules|perl_require|perl_set|proxy_bind|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_background_update|proxy_cache_bypass|proxy_cache_convert_head|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_age|proxy_cache_lock_timeout|proxy_cache_max_range_offset|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_purge|proxy_cache_revalidate|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_force_ranges|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_limit_rate|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_next_upstream_timeout|proxy_next_upstream_tries|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_socket_keepalive|proxy_ssl_certificate|proxy_ssl_certificate_key|proxy_ssl_ciphers|proxy_ssl_crl|proxy_ssl_name|proxy_ssl_password_file|proxy_ssl_protocols|proxy_ssl_server_name|proxy_ssl_session_reuse|proxy_ssl_trusted_certificate|proxy_ssl_verify|proxy_ssl_verify_depth|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|set_real_ip_from|real_ip_header|real_ip_recursive|referer_hash_bucket_size|referer_hash_max_size|valid_referers|break|return|rewrite_log|set|uninitialized_variable_warn|scgi_bind|scgi_buffer_size|scgi_buffering|scgi_buffers|scgi_busy_buffers_size|scgi_cache|scgi_cache_background_update|scgi_cache_key|scgi_cache_lock|scgi_cache_lock_age|scgi_cache_lock_timeout|scgi_cache_max_range_offset|scgi_cache_methods|scgi_cache_min_uses|scgi_cache_path|scgi_cache_purge|scgi_cache_revalidate|scgi_cache_use_stale|scgi_cache_valid|scgi_connect_timeout|scgi_force_ranges|scgi_hide_header|scgi_ignore_client_abort|scgi_ignore_headers|scgi_intercept_errors|scgi_limit_rate|scgi_max_temp_file_size|scgi_next_upstream|scgi_next_upstream_timeout|scgi_next_upstream_tries|scgi_no_cache|scgi_param|scgi_pass|scgi_pass_header|scgi_pass_request_body|scgi_pass_request_headers|scgi_read_timeout|scgi_request_buffering|scgi_send_timeout|scgi_socket_keepalive|scgi_store|scgi_store_access|scgi_temp_file_write_size|scgi_temp_path|secure_link|secure_link_md5|secure_link_secret|session_log|session_log_format|session_log_zone|slice|spdy_chunk_size|spdy_headers_comp|ssi|ssi_last_modified|ssi_min_file_chunk|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_buffer_size|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_early_data|ssl_ecdh_curve|ssl_password_file|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_ticket_key|ssl_session_tickets|ssl_session_timeout|ssl_stapling|ssl_stapling_file|ssl_stapling_responder|ssl_stapling_verify|ssl_trusted_certificate|ssl_verify_client|ssl_verify_depth|status|status_format|status_zone|stub_status|sub_filter|sub_filter_last_modified|sub_filter_once|sub_filter_types|server|zone|state|hash|ip_hash|keepalive|keepalive_requests|keepalive_timeout|ntlm|least_conn|least_time|queue|random|sticky|sticky_cookie_insert|upstream_conf|health_check|userid|userid_domain|userid_expires|userid_mark|userid_name|userid_p3p|userid_path|userid_service|uwsgi_bind|uwsgi_buffer_size|uwsgi_buffering|uwsgi_buffers|uwsgi_busy_buffers_size|uwsgi_cache|uwsgi_cache_background_update|uwsgi_cache_bypass|uwsgi_cache_key|uwsgi_cache_lock|uwsgi_cache_lock_age|uwsgi_cache_lock_timeout|uwsgi_cache_max_range_offset|uwsgi_cache_methods|uwsgi_cache_min_uses|uwsgi_cache_path|uwsgi_cache_purge|uwsgi_cache_revalidate|uwsgi_cache_use_stale|uwsgi_cache_valid|uwsgi_connect_timeout|uwsgi_force_ranges|uwsgi_hide_header|uwsgi_ignore_client_abort|uwsgi_ignore_headers|uwsgi_intercept_errors|uwsgi_limit_rate|uwsgi_max_temp_file_size|uwsgi_modifier1|uwsgi_modifier2|uwsgi_next_upstream|uwsgi_next_upstream_timeout|uwsgi_next_upstream_tries|uwsgi_no_cache|uwsgi_param|uwsgi_pass|uwsgi_pass_header|uwsgi_pass_request_body|uwsgi_pass_request_headers|uwsgi_read_timeout|uwsgi_request_buffering|uwsgi_send_timeout|uwsgi_socket_keepalive|uwsgi_ssl_certificate|uwsgi_ssl_certificate_key|uwsgi_ssl_ciphers|uwsgi_ssl_crl|uwsgi_ssl_name|uwsgi_ssl_password_file|uwsgi_ssl_protocols|uwsgi_ssl_server_name|uwsgi_ssl_session_reuse|uwsgi_ssl_trusted_certificate|uwsgi_ssl_verify|uwsgi_ssl_verify_depth|uwsgi_store|uwsgi_store_access|uwsgi_temp_file_write_size|uwsgi_temp_path|http2_body_preread_size|http2_chunk_size|http2_idle_timeout|http2_max_concurrent_pushes|http2_max_concurrent_streams|http2_max_field_size|http2_max_header_size|http2_max_requests|http2_push|http2_push_preload|http2_recv_buffer_size|http2_recv_timeout|xml_entities|xslt_last_modified|xslt_param|xslt_string_param|xslt_stylesheet|xslt_types|listen|protocol|resolver|resolver_timeout|timeout|auth_http|auth_http_header|auth_http_pass_client_cert|auth_http_timeout|proxy_buffer|proxy_pass_error_message|proxy_timeout|xclient|starttls|imap_auth|imap_capabilities|imap_client_buffer|pop3_auth|pop3_capabilities|smtp_auth|smtp_capabilities|smtp_client_buffer|smtp_greeting_delay|preread_buffer_size|preread_timeout|proxy_protocol_timeout|js_access|js_filter|js_preread|proxy_download_rate|proxy_requests|proxy_responses|proxy_upload_rate|ssl_handshake_timeout|ssl_preread|health_check_timeout|zone_sync|zone_sync_buffers|zone_sync_connect_retry_interval|zone_sync_connect_timeout|zone_sync_interval|zone_sync_recv_buffer_size|zone_sync_server|zone_sync_ssl|zone_sync_ssl_certificate|zone_sync_ssl_certificate_key|zone_sync_ssl_ciphers|zone_sync_ssl_crl|zone_sync_ssl_name|zone_sync_ssl_password_file|zone_sync_ssl_protocols|zone_sync_ssl_server_name|zone_sync_ssl_trusted_certificate|zone_sync_ssl_verify_depth|zone_sync_timeout|google_perftools_profiles|proxy|perl"; + this.$rules = { + "start": [{ + token: ["storage.type", "text", "string.regexp", "paren.lparen"], + regex: "\\b(location)(\\s+)([\\^]?~[\\*]?\\s+.*?)({)" + }, { + token: ["storage.type", "text", "text", "paren.lparen"], + regex: "\\b(location|match|upstream)(\\s+)(.*?)({)" + }, { + token: ["storage.type", "text", "string", "text", "variable", "text", "paren.lparen"], + regex: '\\b(split_clients|map)(\\s+)(\\".*\\")(\\s+)(\\$[\\w_]+)(\\s*)({)' + }, { + token: ["storage.type", "text", "paren.lparen"], + regex: "\\b(http|events|server|mail|stream)(\\s*)({)" + }, { + token: ["storage.type", "text", "variable", "text", "variable", "text", "paren.lparen"], + regex: '\\b(geo|map)(\\s+)(\\$[\\w_]+)?(\\s*)(\\$[\\w_]+)(\\s*)({)' + }, { + token: "paren.rparen", + regex: "(})" + }, { + token: "paren.lparen", + regex: "({)" + }, { + token: ["storage.type", "text", "paren.lparen"], + regex: "\\b(if)(\\s+)(\\()", + push: [{ + token: "paren.rparen", + regex: "\\)|$", + next: "pop" + }, { + include: "lexical" + }] + }, { + token: "keyword", + regex: "\\b(" + keywords + ")\\b", + push: [{ + token: "punctuation", + regex: ";", + next: "pop" + }, { + include: "lexical" + }] + }, { + token: ["keyword", "text", "string.regexp", "text", "punctuation"], + regex: "\\b(rewrite)(\\s)(\\S*)(\\s.*)(;)" + }, { + include: "lexical" + }, { + include: "comments" + }], + comments: [{ + token: "comment", + regex: '#.*$' + }], + lexical: [{ + token: "string", + regex: "'", + push: [{ + token: "string", + regex: "'", + next: "pop" + }, { + include: "variables" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: '"', + push: [{ + token: "string", + regex: '"', + next: "pop" + }, { + include: "variables" + }, { + defaultToken: "string" + }] + }, { + token: "string.regexp", + regex: /[!]?[~][*]?\s+.*(?=\))/ + }, { + token: "string.regexp", + regex: /[\^]\S*(?=;$)/ + }, { + token: "string.regexp", + regex: /[\^]\S*(?=;|\s|$)/ + }, { + token: "keyword.operator", + regex: "\\B(\\+|\\-|\\*|\\=|!=)\\B" + }, { + token: "constant.language", + regex: "\\b(true|false|on|off|all|any|main|always)\\b" + }, { + token: "text", + regex: "\\s+" + }, { + include: "variables" + } + ], + variables: [{ + token: "variable", + regex: "\\$[\\w_]+" + }, { + token: "variable.language", + regex: "\\b(GET|POST|HEAD)\\b" + }] + }; + this.normalizeRules(); +}; +oop.inherits(NginxHighlightRules, TextHighlightRules); +exports.NginxHighlightRules = NginxHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/nginx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nginx_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var NginxHighlightRules = require("./nginx_highlight_rules").NginxHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + TextMode.call(this); + this.HighlightRules = NginxHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/nginx"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/nginx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-nim.js b/ui/base1/ace/mode-nim.js new file mode 100644 index 0000000..2b8bb78 --- /dev/null +++ b/ui/base1/ace/mode-nim.js @@ -0,0 +1,325 @@ +define("ace/mode/nim_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NimHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable": "var|let|const", + "keyword": "assert|parallel|spawn|export|include|from|template|mixin|bind|import|concept|raise|defer|try|finally|except|converter|proc|func|macro|method|and|or|not|xor|shl|shr|div|mod|in|notin|is|isnot|of|static|if|elif|else|case|of|discard|when|return|yield|block|break|while|echo|continue|asm|using|cast|addr|unsafeAddr|type|ref|ptr|do|declared|defined|definedInScope|compiles|sizeOf|is|shallowCopy|getAst|astToStr|spawn|procCall|for|iterator|as", + "storage.type": "newSeq|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|char|bool|string|set|pointer|float32|float64|enum|object|cstring|array|seq|openArray|varargs|UncheckedArray|tuple|set|distinct|void|auto|openarray|range", + "support.function": "lock|ze|toU8|toU16|toU32|ord|low|len|high|add|pop|contains|card|incl|excl|dealloc|inc", + "constant.language": "nil|true|false" + }, "identifier"); + var hexNumber = "(?:0[xX][\\dA-Fa-f][\\dA-Fa-f_]*)"; + var decNumber = "(?:[0-9][\\d_]*)"; + var octNumber = "(?:0o[0-7][0-7_]*)"; + var binNumber = "(?:0[bB][01][01_]*)"; + var intNumber = "(?:" + hexNumber + "|" + decNumber + "|" + octNumber + "|" + binNumber + ")(?:'?[iIuU](?:8|16|32|64)|u)?\\b"; + var exponent = "(?:[eE][+-]?[\\d][\\d_]*)"; + var floatNumber = "(?:[\\d][\\d_]*(?:[.][\\d](?:[\\d_]*)" + exponent + "?)|" + exponent + ")"; + var floatNumberExt = "(?:" + hexNumber + "(?:'(?:(?:[fF](?:32|64)?)|[dD])))|(?:" + floatNumber + "|" + decNumber + "|" + octNumber + "|" + binNumber + ")(?:'(?:(?:[fF](?:32|64)?)|[dD]))"; + var stringEscape = "\\\\([abeprcnlftv\\\"']|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + var identifier = '[a-zA-Z][a-zA-Z0-9_]*'; + this.$rules = { + "start": [{ + token: ["identifier", "keyword.operator", "support.function"], + regex: "(" + identifier + ")([.]{1})(" + identifier + ")(?=\\()" + }, { + token: "paren.lparen", + regex: "(\\{\\.)", + next: [{ + token: "paren.rparen", + regex: '(\\.\\}|\\})', + next: "start" + }, { + include: "methods" + }, { + token: "identifier", + regex: identifier + }, { + token: "punctuation", + regex: /[,]/ + }, { + token: "keyword.operator", + regex: /[=:.]/ + }, { + token: "paren.lparen", + regex: /[[(]/ + }, { + token: "paren.rparen", + regex: /[\])]/ + }, { + include: "math" + }, { + include: "strings" + }, { + defaultToken: "text" + }] + }, { + token: "comment.doc.start", + regex: /##\[(?!])/, + push: "docBlockComment" + }, { + token: "comment.start", + regex: /#\[(?!])/, + push: "blockComment" + }, { + token: "comment.doc", + regex: '##.*$' + }, { + token: "comment", + regex: '#.*$' + }, { + include: "strings" + }, { + token: "string", + regex: "'(?:\\\\(?:[abercnlftv]|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})|.{1})?'" + }, { + include: "methods" + }, { + token: keywordMapper, + regex: "[a-zA-Z][a-zA-Z0-9_]*\\b" + }, { + token: ["keyword.operator", "text", "storage.type"], + regex: "([:])(\\s+)(" + identifier + ")(?=$|\\)|\\[|,|\\s+=|;|\\s+\\{)" + }, { + token: "paren.lparen", + regex: /\[\.|{\||\(\.|\[:|[[({`]/ + }, { + token: "paren.rparen", + regex: /\.\)|\|}|\.]|[\])}]/ + }, { + token: "keyword.operator", + regex: /[=+\-*\/<>@$~&%|!?^.:\\]/ + }, { + token: "punctuation", + regex: /[,;]/ + }, { + include: "math" + }], + blockComment: [{ + regex: /#\[]/, + token: "comment" + }, { + regex: /#\[(?!])/, + token: "comment.start", + push: "blockComment" + }, { + regex: /]#/, + token: "comment.end", + next: "pop" + }, { + defaultToken: "comment" + }], + docBlockComment: [{ + regex: /##\[]/, + token: "comment.doc" + }, { + regex: /##\[(?!])/, + token: "comment.doc.start", + push: "docBlockComment" + }, { + regex: /]##/, + token: "comment.doc.end", + next: "pop" + }, { + defaultToken: "comment.doc" + }], + math: [{ + token: "constant.float", + regex: floatNumberExt + }, { + token: "constant.float", + regex: floatNumber + }, { + token: "constant.integer", + regex: intNumber + }], + methods: [{ + token: "support.function", + regex: "(\\w+)(?=\\()" + }], + strings: [{ + token: "string", + regex: '(\\b' + identifier + ')?"""', + push: [{ + token: "string", + regex: '"""', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\b" + identifier + '"(?=.)', + push: [{ + token: "string", + regex: '"|$', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: '"', + push: [{ + token: "string", + regex: '"|$', + next: "pop" + }, { + token: "constant.language.escape", + regex: stringEscape + }, { + defaultToken: "string" + }] + }] + }; + this.normalizeRules(); +}; +oop.inherits(NimHighlightRules, TextHighlightRules); +exports.NimHighlightRules = NimHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/nim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nim_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var NimHighlightRules = require("./nim_highlight_rules").NimHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + TextMode.call(this); + this.HighlightRules = NimHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = { start: "#[", end: "]#", nestable: true }; + this.$id = "ace/mode/nim"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/nim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-nix.js b/ui/base1/ace/mode-nix.js new file mode 100644 index 0000000..a7f416c --- /dev/null +++ b/ui/base1/ace/mode-nix.js @@ -0,0 +1,555 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen"; +var c_cppHighlightRules = function (extraKeywords) { + var keywordControls = ("break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using"); + var storageType = ("asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" + + "class|wchar_t|template|char16_t|char32_t"); + var storageModifiers = ("const|extern|register|restrict|static|volatile|inline|private|" + + "protected|public|friend|explicit|virtual|export|mutable|typename|" + + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"); + var keywordOperators = ("and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"); + var builtinConstants = ("NULL|true|false|TRUE|FALSE|nullptr"); + var keywordMapper = this.$keywords = this.createKeywordMapper(Object.assign({ + "keyword.control": keywordControls, + "storage.type": storageType, + "storage.modifier": storageModifiers, + "keyword.operator": keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants, + "support.function.C99.c": cFunctions + }, extraKeywords), "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type + this.$rules = { + "start": [ + { + token: "comment", + regex: "//$", + next: "start" + }, { + token: "comment", + regex: "//", + next: "singleLineComment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: "'(?:" + escapeRe + "|.)?'" + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "constant.language.escape", regex: formatRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: 'R"\\(', + stateName: "rawString", + next: [ + { token: "string.end", regex: '\\)"', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b", + next: "directive" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }, { + token: "keyword.operator", + regex: /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(c_cppHighlightRules, TextHighlightRules); +exports.c_cppHighlightRules = c_cppHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = c_cppHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/c_cpp"; + this.snippetFileId = "ace/snippets/c_cpp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NixHighlightRules = function () { + var constantLanguage = "true|false"; + var keywordControl = "with|import|if|else|then|inherit"; + var keywordDeclaration = "let|in|rec"; + var keywordMapper = this.createKeywordMapper({ + "constant.language.nix": constantLanguage, + "keyword.control.nix": keywordControl, + "keyword.declaration.nix": keywordDeclaration + }, "identifier"); + this.$rules = { + "start": [{ + token: "comment", + regex: /#.*$/ + }, { + token: "comment", + regex: /\/\*/, + next: "comment" + }, { + token: "constant", + regex: "<[^>]+>" + }, { + regex: "(==|!=|<=?|>=?)", + token: ["keyword.operator.comparison.nix"] + }, { + regex: "((?:[+*/%-]|\\~)=)", + token: ["keyword.operator.assignment.arithmetic.nix"] + }, { + regex: "=", + token: "keyword.operator.assignment.nix" + }, { + token: "string", + regex: "''", + next: "qqdoc" + }, { + token: "string", + regex: "'", + next: "qstring" + }, { + token: "string", + regex: '"', + push: "qqstring" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + regex: "}", + token: function (val, start, stack) { + return stack[1] && stack[1].charAt(0) == "q" ? "constant.language.escape" : "text"; + }, + next: "pop" + }], + "comment": [{ + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + }], + "qqdoc": [ + { + token: "constant.language.escape", + regex: /\$\{/, + push: "start" + }, { + token: "string", + regex: "''", + next: "pop" + }, { + defaultToken: "string" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: /\$\{/, + push: "start" + }, { + token: "string", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: /\$\{/, + push: "start" + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(NixHighlightRules, TextHighlightRules); +exports.NixHighlightRules = NixHighlightRules; + +}); + +define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var CMode = require("./c_cpp").Mode; +var NixHighlightRules = require("./nix_highlight_rules").NixHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + CMode.call(this); + this.HighlightRules = NixHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, CMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/nix"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/nix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-nsis.js b/ui/base1/ace/mode-nsis.js new file mode 100644 index 0000000..1c33c69 --- /dev/null +++ b/ui/base1/ace/mode-nsis.js @@ -0,0 +1,279 @@ +define("ace/mode/nsis_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NSISHighlightRules = function () { + this.$rules = { + start: [{ + token: "keyword.compiler.nsis", + regex: /^\s*!(?:include|addincludedir|addplugindir|appendfile|assert|cd|delfile|echo|error|execute|packhdr|pragma|finalize|getdllversion|gettlbversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace|uninstfinalize)\b/, + caseInsensitive: true + }, { + token: "keyword.command.nsis", + regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/, + caseInsensitive: true + }, { + token: "keyword.control.nsis", + regex: /^\s*!(?:ifdef|ifndef|if|ifmacrodef|ifmacrondef|else|endif)\b/, + caseInsensitive: true + }, { + token: "keyword.plugin.nsis", + regex: /^\s*\w+::\w+/, + caseInsensitive: true + }, { + token: "keyword.operator.comparison.nsis", + regex: /[!<>]?=|<>|<|>/ + }, { + token: "support.function.nsis", + regex: /(?:\b|^\s*)(?:Function|FunctionEnd|Section|SectionEnd|SectionGroup|SectionGroupEnd|PageEx|PageExEnd)\b/, + caseInsensitive: true + }, { + token: "support.library.nsis", + regex: /\${[\w\.:-]+}/ + }, { + token: "constant.nsis", + regex: /\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/, + caseInsensitive: true + }, { + token: "constant.library.nsis", + regex: /\${(?:AtLeastServicePack|AtLeastWin7|AtLeastWin8|AtLeastWin10|AtLeastWin95|AtLeastWin98|AtLeastWin2000|AtLeastWin2003|AtLeastWin2008|AtLeastWin2008R2|AtLeastWinME|AtLeastWinNT4|AtLeastWinVista|AtLeastWinXP|AtMostServicePack|AtMostWin7|AtMostWin8|AtMostWin10|AtMostWin95|AtMostWin98|AtMostWin2000|AtMostWin2003|AtMostWin2008|AtMostWin2008R2|AtMostWinME|AtMostWinNT4|AtMostWinVista|AtMostWinXP|IsDomainController|IsNT|IsServer|IsServicePack|IsWin7|IsWin8|IsWin10|IsWin95|IsWin98|IsWin2000|IsWin2003|IsWin2008|IsWin2008R2|IsWinME|IsWinNT4|IsWinVista|IsWinXP)}/ + }, { + token: "constant.language.boolean.true.nsis", + regex: /\b(?:true|on)\b/ + }, { + token: "constant.language.boolean.false.nsis", + regex: /\b(?:false|off)\b/ + }, { + token: "constant.language.option.nsis", + regex: /(?:\b|^\s*)(?:(?:un\.)?components|(?:un\.)?custom|(?:un\.)?directory|(?:un\.)?instfiles|(?:un\.)?license|uninstConfirm|admin|all|amd64-unicode|auto|both|bottom|bzip2|current|force|hide|highest|ifdiff|ifnewer|lastused|leave|left|listonly|lzma|nevershow|none|normal|notset|right|show|silent|silentlog|textonly|top|try|user|Win10|Win7|Win8|WinVista|x86-(ansi|unicode)|zlib)\b/, + caseInsensitive: true + }, { + token: "constant.language.slash-option.nsis", + regex: /\b\/(?:a|BRANDING|CENTER|COMPONENTSONLYONCUSTOM|CUSTOMSTRING=|date|e|ENABLECANCEL|FILESONLY|file|FINAL|GLOBAL|gray|ifempty|ifndef|ignorecase|IMGID=|ITALIC|LANG=|NOCUSTOM|noerrors|NONFATAL|nonfatal|oname=|o|REBOOTOK|redef|RESIZETOFIT|r|SHORT|SILENT|SOLID|STRIKE|TRIM|UNDERLINE|utcdate|windows|x)\b/, + caseInsensitive: true + }, { + token: "constant.numeric.nsis", + regex: /\b(?:0(?:x|X)[0-9a-fA-F]+|[0-9]+(?:\.[0-9]+)?)\b/ + }, { + token: "entity.name.function.nsis", + regex: /\$\([\w\.:-]+\)/ + }, { + token: "storage.type.function.nsis", + regex: /\$\w+/ + }, { + token: "punctuation.definition.string.begin.nsis", + regex: /`/, + push: [{ + token: "punctuation.definition.string.end.nsis", + regex: /`/, + next: "pop" + }, { + token: "constant.character.escape.nsis", + regex: /\$\\./ + }, { + defaultToken: "string.quoted.back.nsis" + }] + }, { + token: "punctuation.definition.string.begin.nsis", + regex: /"/, + push: [{ + token: "punctuation.definition.string.end.nsis", + regex: /"/, + next: "pop" + }, { + token: "constant.character.escape.nsis", + regex: /\$\\./ + }, { + defaultToken: "string.quoted.double.nsis" + }] + }, { + token: "punctuation.definition.string.begin.nsis", + regex: /'/, + push: [{ + token: "punctuation.definition.string.end.nsis", + regex: /'/, + next: "pop" + }, { + token: "constant.character.escape.nsis", + regex: /\$\\./ + }, { + defaultToken: "string.quoted.single.nsis" + }] + }, { + token: [ + "punctuation.definition.comment.nsis", + "comment.line.nsis" + ], + regex: /(;|#)(.*$)/ + }, { + token: "punctuation.definition.comment.nsis", + regex: /\/\*/, + push: [{ + token: "punctuation.definition.comment.nsis", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment.block.nsis" + }] + }, { + token: "text", + regex: /(?:!include|!insertmacro)\b/ + }] + }; + this.normalizeRules(); +}; +NSISHighlightRules.metaData = { + comment: "\n\ttodo: - highlight functions\n\t", + fileTypes: ["nsi", "nsh"], + name: "NSIS", + scopeName: "source.nsis" +}; +oop.inherits(NSISHighlightRules, TextHighlightRules); +exports.NSISHighlightRules = NSISHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/nsis",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nsis_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var NSISHighlightRules = require("./nsis_highlight_rules").NSISHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = NSISHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = [";", "#"]; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/nsis"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/nsis"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-nunjucks.js b/ui/base1/ace/mode-nunjucks.js new file mode 100644 index 0000000..9746374 --- /dev/null +++ b/ui/base1/ace/mode-nunjucks.js @@ -0,0 +1,2518 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/nunjucks_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var NunjucksHighlightRules = function () { + HtmlHighlightRules.call(this); + this.$rules["start"].unshift({ + token: "punctuation.begin", + regex: /{{-?/, + push: [{ + token: "punctuation.end", + regex: /-?}}/, + next: "pop" + }, + { include: "expression" } + ] + }, { + token: "punctuation.begin", + regex: /{%-?/, + push: [{ + token: "punctuation.end", + regex: /-?%}/, + next: "pop" + }, { + token: "constant.language.escape", + regex: /\b(r\/.*\/[gimy]?)\b/ + }, + { include: "statement" } + ] + }, { + token: "comment.begin", + regex: /{#/, + push: [{ + token: "comment.end", + regex: /#}/, + next: "pop" + }, + { defaultToken: "comment" } + ] + }); + this.addRules({ + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { + token: "punctuation.begin", + regex: /{{-?/, + push: [{ + token: "punctuation.end", + regex: /-?}}/, + next: "pop" + }, + { include: "expression" } + ] + }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { + token: "punctuation.begin", + regex: /{{-?/, + push: [{ + token: "punctuation.end", + regex: /-?}}/, + next: "pop" + }, + { include: "expression" } + ] + }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }], + "statement": [{ + token: "keyword.control", + regex: /\b(block|endblock|extends|endif|elif|for|endfor|asyncEach|endeach|include|asyncAll|endall|macro|endmacro|set|endset|ignore missing|as|from|raw|verbatim|filter|endfilter)\b/ + }, + { include: "expression" } + ], + "expression": [{ + token: "constant.language", + regex: /\b(true|false|none)\b/ + }, { + token: "string", + regex: /"/, + push: [{ + token: "string", + regex: /"/, + next: "pop" + }, + { include: "escapeStrings" }, + { defaultToken: "string" } + ] + }, { + token: "string", + regex: /'/, + push: [{ + token: "string", + regex: /'/, + next: "pop" + }, + { include: "escapeStrings" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "keyword.operator", + regex: /\+|-|\/\/|\/|%|\*\*|\*|===|==|!==|!=|>=|>|<=|>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(c_cppHighlightRules, TextHighlightRules); +exports.c_cppHighlightRules = c_cppHighlightRules; + +}); + +define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var CHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var ObjectiveCHighlightRules = function () { + var NSKeywords = { + "support.function.cocoa.leopard": "NSRectToCGRect|NSRectFromCGRect|NSMakeCollectable|NSStringFromProtocol|NSSizeToCGSize|NSSizeFromCGSize|NSDrawNinePartImage|NSDrawThreePartImage|NSPointToCGPoint|NSPointFromCGPoint|NSProtocolFromString|NSEventMaskFromType|NSValue", + "support.function.cocoa": "NSRoundDownToMultipleOfPageSize|NSRoundUpToMultipleOfPageSize|NSRunCriticalAlertPanel|NSRunCriticalAlertPanelRelativeToWindow|NSRunInformationalAlertPanel|NSRunInformationalAlertPanelRelativeToWindow|NSRunAlertPanel|NSRunAlertPanelRelativeToWindow|NSResetMapTable|NSResetHashTable|NSRecycleZone|NSRectClip|NSRectClipList|NSRectFill|NSRectFillUsingOperation|NSRectFillList|NSRectFillListUsingOperation|NSRectFillListWithGrays|NSRectFillListWithColors|NSRectFillListWithColorsUsingOperation|NSRectFromString|NSRecordAllocationEvent|NSReturnAddress|NSReleaseAlertPanel|NSReadPixel|NSRealMemoryAvailable|NSReallocateCollectable|NSRegisterServicesProvider|NSRangeFromString|NSGetSizeAndAlignment|NSGetCriticalAlertPanel|NSGetInformationalAlertPanel|NSGetUncaughtExceptionHandler|NSGetFileType|NSGetFileTypes|NSGetWindowServerMemory|NSGetAlertPanel|NSMinX|NSMinY|NSMidX|NSMidY|NSMouseInRect|NSMapRemove|NSMapGet|NSMapMember|NSMapInsert|NSMapInsertIfAbsent|NSMapInsertKnownAbsent|NSMakeRect|NSMakeRange|NSMakeSize|NSMakePoint|NSMaxRange|NSMaxX|NSMaxY|NSBitsPerSampleFromDepth|NSBitsPerPixelFromDepth|NSBestDepth|NSBeep|NSBeginCriticalAlertSheet|NSBeginInformationalAlertSheet|NSBeginAlertSheet|NSShouldRetainWithZone|NSShowsServicesMenuItem|NSShowAnimationEffect|NSStringFromRect|NSStringFromRange|NSStringFromMapTable|NSStringFromSize|NSStringFromSelector|NSStringFromHashTable|NSStringFromClass|NSStringFromPoint|NSSizeFromString|NSSetShowsServicesMenuItem|NSSetZoneName|NSSetUncaughtExceptionHandler|NSSetFocusRingStyle|NSSelectorFromString|NSSearchPathForDirectoriesInDomains|NSSwapBigShortToHost|NSSwapBigIntToHost|NSSwapBigDoubleToHost|NSSwapBigFloatToHost|NSSwapBigLongToHost|NSSwapBigLongLongToHost|NSSwapShort|NSSwapHostShortToBig|NSSwapHostShortToLittle|NSSwapHostIntToBig|NSSwapHostIntToLittle|NSSwapHostDoubleToBig|NSSwapHostDoubleToLittle|NSSwapHostFloatToBig|NSSwapHostFloatToLittle|NSSwapHostLongToBig|NSSwapHostLongToLittle|NSSwapHostLongLongToBig|NSSwapHostLongLongToLittle|NSSwapInt|NSSwapDouble|NSSwapFloat|NSSwapLittleShortToHost|NSSwapLittleIntToHost|NSSwapLittleDoubleToHost|NSSwapLittleFloatToHost|NSSwapLittleLongToHost|NSSwapLittleLongLongToHost|NSSwapLong|NSSwapLongLong|NSHighlightRect|NSHostByteOrder|NSHomeDirectory|NSHomeDirectoryForUser|NSHeight|NSHashRemove|NSHashGet|NSHashInsert|NSHashInsertIfAbsent|NSHashInsertKnownAbsent|NSHFSTypeCodeFromFileType|NSHFSTypeOfFile|NSNumberOfColorComponents|NSNextMapEnumeratorPair|NSNextHashEnumeratorItem|NSContainsRect|NSConvertGlyphsToPackedGlyphs|NSConvertSwappedDoubleToHost|NSConvertSwappedFloatToHost|NSConvertHostDoubleToSwapped|NSConvertHostFloatToSwapped|NSCountMapTable|NSCountHashTable|NSCountFrames|NSCountWindows|NSCountWindowsForContext|NSCopyMemoryPages|NSCopyMapTableWithZone|NSCopyBits|NSCopyHashTableWithZone|NSCopyObject|NSColorSpaceFromDepth|NSCompareMapTables|NSCompareHashTables|NSClassFromString|NSCreateMapTable|NSCreateMapTableWithZone|NSCreateHashTable|NSCreateHashTableWithZone|NSCreateZone|NSCreateFilenamePboardType|NSCreateFileContentsPboardType|NSTemporaryDirectory|NSIsControllerMarker|NSIsEmptyRect|NSIsFreedObject|NSInsetRect|NSIncrementExtraRefCount|NSIntersectsRect|NSIntersectionRect|NSIntersectionRange|NSInterfaceStyleForKey|NSIntegralRect|NSZoneRealloc|NSZoneMalloc|NSZoneName|NSZoneCalloc|NSZoneFromPointer|NSZoneFree|NSOpenStepRootDirectory|NSOffsetRect|NSDisableScreenUpdates|NSDivideRect|NSDottedFrameRect|NSDecimalRound|NSDecimalMultiply|NSDecimalString|NSDecimalSubtract|NSDecimalNormalize|NSDecimalCopy|NSDecimalCompact|NSDecimalCompare|NSDecimalIsNotANumber|NSDecimalDivide|NSDecimalPower|NSDecimalAdd|NSDecrementExtraRefCountWasZero|NSDefaultMallocZone|NSDeallocateMemoryPages|NSDeallocateObject|NSDrawGroove|NSDrawGrayBezel|NSDrawBitmap|NSDrawButton|NSDrawColorTiledRects|NSDrawTiledRects|NSDrawDarkBezel|NSDrawWhiteBezel|NSDrawWindowBackground|NSDrawLightBezel|NSUserName|NSUnionRect|NSUnionRange|NSUnregisterServicesProvider|NSUpdateDynamicServices|NSJavaBundleSetup|NSJavaBundleCleanup|NSJavaSetup|NSJavaSetupVirtualMachine|NSJavaNeedsToLoadClasses|NSJavaNeedsVirtualMachine|NSJavaClassesForBundle|NSJavaClassesFromPath|NSJavaObjectNamedInPath|NSJavaProvidesClasses|NSPointInRect|NSPointFromString|NSPerformService|NSPlanarFromDepth|NSPageSize|NSEndMapTableEnumeration|NSEndHashTableEnumeration|NSEnumerateMapTable|NSEnumerateHashTable|NSEnableScreenUpdates|NSEqualRects|NSEqualRanges|NSEqualSizes|NSEqualPoints|NSEraseRect|NSExtraRefCount|NSFileTypeForHFSTypeCode|NSFullUserName|NSFreeMapTable|NSFreeHashTable|NSFrameRect|NSFrameRectWithWidth|NSFrameRectWithWidthUsingOperation|NSFrameAddress|NSWindowList|NSWindowListForContext|NSWidth|NSLocationInRange|NSLog|NSLogv|NSLogPageSize|NSAccessibilityRoleDescription|NSAccessibilityRoleDescriptionForUIElement|NSAccessibilityRaiseBadArgumentException|NSAccessibilityUnignoredChildren|NSAccessibilityUnignoredChildrenForOnlyChild|NSAccessibilityUnignoredDescendant|NSAccessibilityUnignoredAncestor|NSAccessibilityPostNotification|NSAccessibilityActionDescription|NSApplicationMain|NSApplicationLoad|NSAvailableWindowDepths|NSAllMapTableValues|NSAllMapTableKeys|NSAllHashTableObjects|NSAllocateMemoryPages|NSAllocateCollectable|NSAllocateObject", + "support.class.cocoa.leopard": "NSRuleEditor|NSGarbageCollector|NSGradient|NSMapTable|NSHashTable|NSCondition|NSCollectionView|NSCollectionViewItem|NSToolbarItemGroup|NSTextInputClient|NSTreeNode|NSTrackingArea|NSInvocationOperation|NSOperation|NSOperationQueue|NSDictionaryController|NSDockTile|NSPointerFunctions|NSPointerArray|NSPathControl|NSPathControlDelegate|NSPathComponentCell|NSPathCell|NSPathCellDelegate|NSPrintPanelAccessorizing|NSPredicateEditor|NSPredicateEditorRowTemplate|NSViewController|NSFastEnumeration|NSAnimationContext|NSAnimatablePropertyContainer", + "support.class.cocoa": "NSRunLoop|NSRulerMarker|NSRulerView|NSResponder|NSRecursiveLock|NSRelativeSpecifier|NSRandomSpecifier|NSRangeSpecifier|NSGetCommand|NSGlyphGenerator|NSGlyphStorage|NSGlyphInfo|NSGraphicsContext|NSXMLNode|NSXMLDocument|NSXMLDTD|NSXMLDTDNode|NSXMLParser|NSXMLElement|NSMiddleSpecifier|NSMovie|NSMovieView|NSMoveCommand|NSMutableString|NSMutableSet|NSMutableCharacterSet|NSMutableCopying|NSMutableIndexSet|NSMutableDictionary|NSMutableData|NSMutableURLRequest|NSMutableParagraphStyle|NSMutableAttributedString|NSMutableArray|NSMessagePort|NSMessagePortNameServer|NSMenu|NSMenuItem|NSMenuItemCell|NSMenuView|NSMethodSignature|NSMetadataItem|NSMetadataQuery|NSMetadataQueryResultGroup|NSMetadataQueryAttributeValueTuple|NSMachBootstrapServer|NSMachPort|NSMatrix|NSBitmapImageRep|NSBox|NSBundle|NSButton|NSButtonCell|NSBezierPath|NSBrowser|NSBrowserCell|NSShadow|NSScanner|NSScriptSuiteRegistry|NSScriptCoercionHandler|NSScriptCommand|NSScriptCommandDescription|NSScriptClassDescription|NSScriptObjectSpecifier|NSScriptExecutionContext|NSScriptWhoseTest|NSScroller|NSScrollView|NSScreen|NSStepper|NSStepperCell|NSStatusBar|NSStatusItem|NSString|NSStream|NSSimpleHorizontalTypesetter|NSSimpleCString|NSSocketPort|NSSocketPortNameServer|NSSound|NSSortDescriptor|NSSpecifierTest|NSSpeechRecognizer|NSSpeechSynthesizer|NSSpellServer|NSSpellChecker|NSSplitView|NSSecureTextField|NSSecureTextFieldCell|NSSet|NSSetCommand|NSSearchField|NSSearchFieldCell|NSSerializer|NSSegmentedControl|NSSegmentedCell|NSSlider|NSSliderCell|NSSavePanel|NSHost|NSHTTPCookie|NSHTTPCookieStorage|NSHTTPURLResponse|NSHelpManager|NSNib|NSNibConnector|NSNibControlConnector|NSNibOutletConnector|NSNotification|NSNotificationCenter|NSNotificationQueue|NSNull|NSNumber|NSNumberFormatter|NSNetService|NSNetServiceBrowser|NSNameSpecifier|NSChangeSpelling|NSCharacterSet|NSConstantString|NSConnection|NSControl|NSController|NSConditionLock|NSCoding|NSCoder|NSCountCommand|NSCountedSet|NSCopying|NSColor|NSColorSpace|NSColorPickingCustom|NSColorPickingDefault|NSColorPicker|NSColorPanel|NSColorWell|NSColorList|NSCompoundPredicate|NSComparisonPredicate|NSComboBox|NSComboBoxCell|NSCustomImageRep|NSCursor|NSCIImageRep|NSCell|NSClipView|NSCloseCommand|NSCloneCommand|NSClassDescription|NSCachedImageRep|NSCachedURLResponse|NSCalendar|NSCalendarDate|NSCreateCommand|NSThread|NSTypesetter|NSTimeZone|NSTimer|NSToolbar|NSToolbarItem|NSToolbarItemValidations|NSTokenField|NSTokenFieldCell|NSText|NSTextBlock|NSTextStorage|NSTextContainer|NSTextTab|NSTextTable|NSTextTableBlock|NSTextInput|NSTextView|NSTextField|NSTextFieldCell|NSTextList|NSTextAttachment|NSTextAttachmentCell|NSTask|NSTableHeaderCell|NSTableHeaderView|NSTableColumn|NSTableView|NSTabView|NSTabViewItem|NSTreeController|NSIndexSpecifier|NSIndexSet|NSIndexPath|NSInputManager|NSInputStream|NSInputServiceProvider|NSInputServer|NSInputServerMouseTracker|NSInvocation|NSIgnoreMisspelledWords|NSImage|NSImageRep|NSImageCell|NSImageView|NSOutputStream|NSOutlineView|NSOpenGLContext|NSOpenGLPixelBuffer|NSOpenGLPixelFormat|NSOpenGLView|NSOpenPanel|NSObjCTypeSerializationCallBack|NSObject|NSObjectController|NSDistantObject|NSDistantObjectRequest|NSDistributedNotificationCenter|NSDistributedLock|NSDictionary|NSDirectoryEnumerator|NSDocument|NSDocumentController|NSDeserializer|NSDecimalNumber|NSDecimalNumberBehaviors|NSDecimalNumberHandler|NSDeleteCommand|NSDate|NSDateComponents|NSDatePicker|NSDatePickerCell|NSDateFormatter|NSData|NSDrawer|NSDraggingInfo|NSUserInterfaceValidations|NSUserDefaults|NSUserDefaultsController|NSURL|NSURLResponse|NSURLRequest|NSURLHandle|NSURLHandleClient|NSURLConnection|NSURLCache|NSURLCredential|NSURLCredentialStorage|NSURLDownload|NSURLDownloadDelegate|NSURLProtocol|NSURLProtocolClient|NSURLProtectionSpace|NSURLAuthenticationChallenge|NSURLAuthenticationChallengeSender|NSUniqueIDSpecifier|NSUndoManager|NSUnarchiver|NSPipe|NSPositionalSpecifier|NSPopUpButton|NSPopUpButtonCell|NSPort|NSPortMessage|NSPortNameServer|NSPortCoder|NSPICTImageRep|NSPersistentDocument|NSPDFImageRep|NSPasteboard|NSPanel|NSParagraphStyle|NSPageLayout|NSPrintInfo|NSPrinter|NSPrintOperation|NSPrintPanel|NSProcessInfo|NSProtocolChecker|NSPropertySpecifier|NSPropertyListSerialization|NSProgressIndicator|NSProxy|NSPredicate|NSEnumerator|NSEvent|NSEPSImageRep|NSError|NSException|NSExistsCommand|NSExpression|NSView|NSViewAnimation|NSValidatedToobarItem|NSValidatedUserInterfaceItem|NSValueTransformer|NSKeyedUnarchiver|NSKeyedArchiver|NSQuickDrawView|NSQuitCommand|NSFileManager|NSFileHandle|NSFileWrapper|NSFont|NSFontManager|NSFontDescriptor|NSFontPanel|NSFormCell|NSFormatter|NSWhoseSpecifier|NSWindow|NSWindowController|NSWorkspace|NSLock|NSLocking|NSLocale|NSLogicalTest|NSLevelIndicator|NSLevelIndicatorCell|NSLayoutManager|NSAssertionHandler|NSAnimation|NSActionCell|NSAttributedString|NSAutoreleasePool|NSATSTypesetter|NSApplication|NSAppleScript|NSAppleEventManager|NSAppleEventDescriptor|NSAffineTransform|NSAlert|NSArchiver|NSArray|NSArrayController", + "support.type.cocoa.leopard": "", + "support.class.quartz": "CISampler|CIContext|CIColor|CIImage|CIImageAccumulator|CIPlugIn|CIPlugInRegistration|CIVector|CIKernel|CIFilter|CIFilterGenerator|CIFilterShape|CARenderer|CAMediaTiming|CAMediaTimingFunction|CABasicAnimation|CAScrollLayer|CAConstraint|CAConstraintLayoutManager|CATiledLayer|CATextLayer|CATransition|CATransaction|CAOpenGLLayer|CAPropertyAnimation|CAKeyframeAnimation|CALayer|CAAnimation|CAAnimationGroup|CAAction", + "support.type.quartz": "CGFloat|CGPoint|CGSize|CGRect|CIFormat|CAConstraintAttribute", + "support.type.cocoa": "NSRect|NSRectEdge|NSRange|NSGlyph|NSGlyphRelation|NSGlyphLayoutMode|NSGradientType|NSModalSession|NSMatrixMode|NSMapEnumerator|NSBitmapImageFileType|NSBorderType|NSButtonType|NSBezelStyle|NSBackingStoreType|NSBrowserColumnResizingType|NSScrollerPart|NSScrollerArrow|NSScrollArrowPosition|NSScreenAuxiliaryOpaque|NSStringEncoding|NSSize|NSSocketNativeHandle|NSSelectionGranularity|NSSelectionDirection|NSSelectionAffinity|NSSwappedDouble|NSSwappedFloat|NSSaveOperationType|NSHashEnumerator|NSHandler|NSHandler2|NSControlSize|NSControlTint|NSCompositingOperation|NSComparisonResult|NSCellState|NSCellType|NSCellImagePosition|NSCellAttribute|NSThreadPrivate|NSTypesetterGlyphInfo|NSTickMarkPosition|NSTitlePosition|NSTimeInterval|NSToolTipTag|NSToolbarSizeMode|NSToolbarDisplayMode|NSTokenStyle|NSTIFFCompression|NSTextTabType|NSTextAlignment|NSTabState|NSTableViewDropOperation|NSTabViewType|NSTrackingRectTag|NSImageInterpolation|NSZone|NSOpenGLContextAuxiliary|NSOpenGLPixelFormatAuxiliary|NSDocumentChangeType|NSDatePickerElementFlags|NSDrawerState|NSDragOperation|NSUsableScrollerParts|NSPoint|NSPrintingPageOrder|NSProgressIndicatorStyle|NSProgressIndicatorThickness|NSProgressIndicatorThreadInfo|NSEventType|NSKeyValueObservingOptions|NSFontSymbolicTraits|NSFontTraitMask|NSFontAction|NSFocusRingType|NSWindowOrderingMode|NSWindowDepth|NSWorkspaceIconCreationOptions|NSWorkspaceLaunchOptions|NSWritingDirection|NSLineBreakMode|NSLayoutStatus|NSLayoutDirection|NSAnimationProgress|NSAnimationEffect|NSApplicationTerminateReply|NSApplicationDelegateReply|NSApplicationPrintReply|NSAppleEventManagerSuspensionID|NSAffineTransformStruct|NSAlertStyle", + "support.constant.cocoa": "NSRGBModeColorPanel|NSRGBColorSpaceModel|NSRightMouseDown|NSRightMouseDownMask|NSRightMouseDragged|NSRightMouseDraggedMask|NSRightMouseUp|NSRightMouseUpMask|NSRightTextMovement|NSRightTextAlignment|NSRightTabsBezelBorder|NSRightTabStopType|NSRightArrowFunctionKey|NSRoundRectBezelStyle|NSRoundBankers|NSRoundedBezelStyle|NSRoundedTokenStyle|NSRoundedDisclosureBezelStyle|NSRoundDown|NSRoundUp|NSRoundPlain|NSRoundLineCapStyle|NSRoundLineJoinStyle|NSRunStoppedResponse|NSRunContinuesResponse|NSRunAbortedResponse|NSResizableWindowMask|NSResetCursorRectsRunLoopOrdering|NSResetFunctionKey|NSRecessedBezelStyle|NSReceiversCantHandleCommandScriptError|NSReceiverEvaluationScriptError|NSReturnTextMovement|NSRedoFunctionKey|NSRequiredArgumentsMissingScriptError|NSRelevancyLevelIndicatorStyle|NSRelativeBefore|NSRelativeAfter|NSRegularSquareBezelStyle|NSRegularControlSize|NSRemoveTraitFontAction|NSRandomSubelement|NSRangeDateMode|NSRatingLevelIndicatorStyle|NSRadioModeMatrix|NSRadioButton|NSGIFFileType|NSGlyphBelow|NSGlyphInscribeBelow|NSGlyphInscribeBase|NSGlyphInscribeOverstrike|NSGlyphInscribeOverBelow|NSGlyphInscribeAbove|NSGlyphLayoutWithPrevious|NSGlyphLayoutAtAPoint|NSGlyphLayoutAgainstAPoint|NSGlyphAttributeBidiLevel|NSGlyphAttributeSoft|NSGlyphAttributeInscribe|NSGlyphAttributeElastic|NSGlyphAbove|NSGrooveBorder|NSGreaterThanComparison|NSGreaterThanOrEqualToComparison|NSGreaterThanOrEqualToPredicateOperatorType|NSGreaterThanPredicateOperatorType|NSGrayModeColorPanel|NSGrayColorSpaceModel|NSGradientNone|NSGradientConcaveStrong|NSGradientConcaveWeak|NSGradientConvexStrong|NSGradientConvexWeak|NSGraphiteControlTint|NSXMLNotationDeclarationKind|NSXMLNodeCompactEmptyElement|NSXMLNodeIsCDATA|NSXMLNodeOptionsNone|NSXMLNodeUseSingleQuotes|NSXMLNodeUseDoubleQuotes|NSXMLNodePreserveNamespaceOrder|NSXMLNodePreserveCharacterReferences|NSXMLNodePreserveCDATA|NSXMLNodePreserveDTD|NSXMLNodePreservePrefixes|NSXMLNodePreserveEntities|NSXMLNodePreserveEmptyElements|NSXMLNodePreserveQuotes|NSXMLNodePreserveWhitespace|NSXMLNodePreserveAttributeOrder|NSXMLNodePreserveAll|NSXMLNodePrettyPrint|NSXMLNodeExpandEmptyElement|NSXMLNamespaceKind|NSXMLCommentKind|NSXMLTextKind|NSXMLInvalidKind|NSXMLDocumentXMLKind|NSXMLDocumentXHTMLKind|NSXMLDocumentXInclude|NSXMLDocumentHTMLKind|NSXMLDocumentTidyXML|NSXMLDocumentTidyHTML|NSXMLDocumentTextKind|NSXMLDocumentIncludeContentTypeDeclaration|NSXMLDocumentValidate|NSXMLDocumentKind|NSXMLDTDKind|NSXMLParserGTRequiredError|NSXMLParserXMLDeclNotStartedError|NSXMLParserXMLDeclNotFinishedError|NSXMLParserMisplacedXMLDeclarationError|NSXMLParserMisplacedCDATAEndStringError|NSXMLParserMixedContentDeclNotStartedError|NSXMLParserMixedContentDeclNotFinishedError|NSXMLParserStandaloneValueError|NSXMLParserStringNotStartedError|NSXMLParserStringNotClosedError|NSXMLParserSpaceRequiredError|NSXMLParserSeparatorRequiredError|NSXMLParserNMTOKENRequiredError|NSXMLParserNotationNotStartedError|NSXMLParserNotationNotFinishedError|NSXMLParserNotWellBalancedError|NSXMLParserNoDTDError|NSXMLParserNamespaceDeclarationError|NSXMLParserNAMERequiredError|NSXMLParserCharacterRefInDTDError|NSXMLParserCharacterRefInPrologError|NSXMLParserCharacterRefInEpilogError|NSXMLParserCharacterRefAtEOFError|NSXMLParserConditionalSectionNotStartedError|NSXMLParserConditionalSectionNotFinishedError|NSXMLParserCommentNotFinishedError|NSXMLParserCommentContainsDoubleHyphenError|NSXMLParserCDATANotFinishedError|NSXMLParserTagNameMismatchError|NSXMLParserInternalError|NSXMLParserInvalidHexCharacterRefError|NSXMLParserInvalidCharacterRefError|NSXMLParserInvalidCharacterInEntityError|NSXMLParserInvalidCharacterError|NSXMLParserInvalidConditionalSectionError|NSXMLParserInvalidDecimalCharacterRefError|NSXMLParserInvalidURIError|NSXMLParserInvalidEncodingNameError|NSXMLParserInvalidEncodingError|NSXMLParserOutOfMemoryError|NSXMLParserDocumentStartError|NSXMLParserDelegateAbortedParseError|NSXMLParserDOCTYPEDeclNotFinishedError|NSXMLParserURIRequiredError|NSXMLParserURIFragmentError|NSXMLParserUndeclaredEntityError|NSXMLParserUnparsedEntityError|NSXMLParserUnknownEncodingError|NSXMLParserUnfinishedTagError|NSXMLParserPCDATARequiredError|NSXMLParserPublicIdentifierRequiredError|NSXMLParserParsedEntityRefMissingSemiError|NSXMLParserParsedEntityRefNoNameError|NSXMLParserParsedEntityRefInInternalSubsetError|NSXMLParserParsedEntityRefInInternalError|NSXMLParserParsedEntityRefInPrologError|NSXMLParserParsedEntityRefInEpilogError|NSXMLParserParsedEntityRefAtEOFError|NSXMLParserProcessingInstructionNotStartedError|NSXMLParserProcessingInstructionNotFinishedError|NSXMLParserPrematureDocumentEndError|NSXMLParserEncodingNotSupportedError|NSXMLParserEntityRefInDTDError|NSXMLParserEntityRefInPrologError|NSXMLParserEntityRefInEpilogError|NSXMLParserEntityReferenceMissingSemiError|NSXMLParserEntityReferenceWithoutNameError|NSXMLParserEntityRefLoopError|NSXMLParserEntityRefAtEOFError|NSXMLParserEntityBoundaryError|NSXMLParserEntityNotStartedError|NSXMLParserEntityNotFinishedError|NSXMLParserEntityIsParameterError|NSXMLParserEntityIsExternalError|NSXMLParserEntityValueRequiredError|NSXMLParserEqualExpectedError|NSXMLParserElementContentDeclNotStartedError|NSXMLParserElementContentDeclNotFinishedError|NSXMLParserExternalStandaloneEntityError|NSXMLParserExternalSubsetNotFinishedError|NSXMLParserExtraContentError|NSXMLParserEmptyDocumentError|NSXMLParserLiteralNotStartedError|NSXMLParserLiteralNotFinishedError|NSXMLParserLTRequiredError|NSXMLParserLTSlashRequiredError|NSXMLParserLessThanSymbolInAttributeError|NSXMLParserAttributeRedefinedError|NSXMLParserAttributeHasNoValueError|NSXMLParserAttributeNotStartedError|NSXMLParserAttributeNotFinishedError|NSXMLParserAttributeListNotStartedError|NSXMLParserAttributeListNotFinishedError|NSXMLProcessingInstructionKind|NSXMLEntityGeneralKind|NSXMLEntityDeclarationKind|NSXMLEntityUnparsedKind|NSXMLEntityParsedKind|NSXMLEntityParameterKind|NSXMLEntityPredefined|NSXMLElementDeclarationMixedKind|NSXMLElementDeclarationUndefinedKind|NSXMLElementDeclarationElementKind|NSXMLElementDeclarationEmptyKind|NSXMLElementDeclarationKind|NSXMLElementDeclarationAnyKind|NSXMLElementKind|NSXMLAttributeNMTokensKind|NSXMLAttributeNMTokenKind|NSXMLAttributeNotationKind|NSXMLAttributeCDATAKind|NSXMLAttributeIDRefsKind|NSXMLAttributeIDRefKind|NSXMLAttributeIDKind|NSXMLAttributeDeclarationKind|NSXMLAttributeEntityKind|NSXMLAttributeEntitiesKind|NSXMLAttributeEnumerationKind|NSXMLAttributeKind|NSMinXEdge|NSMiniaturizableWindowMask|NSMinYEdge|NSMinuteCalendarUnit|NSMiterLineJoinStyle|NSMiddleSubelement|NSMixedState|NSMonthCalendarUnit|NSModeSwitchFunctionKey|NSMouseMoved|NSMouseMovedMask|NSMouseEntered|NSMouseEnteredMask|NSMouseEventSubtype|NSMouseExited|NSMouseExitedMask|NSMoveToBezierPathElement|NSMomentaryChangeButton|NSMomentaryPushButton|NSMomentaryPushInButton|NSMomentaryLight|NSMomentaryLightButton|NSMenuFunctionKey|NSMacintoshInterfaceStyle|NSMacOSRomanStringEncoding|NSMatchesPredicateOperatorType|NSMappedRead|NSMaxXEdge|NSMaxYEdge|NSMACHOperatingSystem|NSBMPFileType|NSBottomTabsBezelBorder|NSBoldFontMask|NSBorderlessWindowMask|NSBoxSecondary|NSBoxSeparator|NSBoxOldStyle|NSBoxPrimary|NSButtLineCapStyle|NSBezelBorder|NSBevelLineJoinStyle|NSBelowBottom|NSBelowTop|NSBeginsWithComparison|NSBeginsWithPredicateOperatorType|NSBeginFunctionKey|NSBlueControlTint|NSBackspaceCharacter|NSBacktabTextMovement|NSBackingStoreRetained|NSBackingStoreBuffered|NSBackingStoreNonretained|NSBackTabCharacter|NSBackwardsSearch|NSBackgroundTab|NSBrowserNoColumnResizing|NSBrowserUserColumnResizing|NSBrowserAutoColumnResizing|NSBreakFunctionKey|NSShiftJISStringEncoding|NSShiftKeyMask|NSShowControlGlyphs|NSShowInvisibleGlyphs|NSShadowlessSquareBezelStyle|NSSysReqFunctionKey|NSSystemDomainMask|NSSystemDefined|NSSystemDefinedMask|NSSystemFunctionKey|NSSymbolStringEncoding|NSScannedOption|NSScaleNone|NSScaleToFit|NSScaleProportionally|NSScrollerNoPart|NSScrollerIncrementPage|NSScrollerIncrementLine|NSScrollerIncrementArrow|NSScrollerDecrementPage|NSScrollerDecrementLine|NSScrollerDecrementArrow|NSScrollerKnob|NSScrollerKnobSlot|NSScrollerArrowsMinEnd|NSScrollerArrowsMaxEnd|NSScrollerArrowsNone|NSScrollerArrowsDefaultSetting|NSScrollWheel|NSScrollWheelMask|NSScrollLockFunctionKey|NSScreenChangedEventType|NSStopFunctionKey|NSStringDrawingOneShot|NSStringDrawingDisableScreenFontSubstitution|NSStringDrawingUsesDeviceMetrics|NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin|NSStreamStatusReading|NSStreamStatusNotOpen|NSStreamStatusClosed|NSStreamStatusOpen|NSStreamStatusOpening|NSStreamStatusError|NSStreamStatusWriting|NSStreamStatusAtEnd|NSStreamEventHasBytesAvailable|NSStreamEventHasSpaceAvailable|NSStreamEventNone|NSStreamEventOpenCompleted|NSStreamEventEndEncountered|NSStreamEventErrorOccurred|NSSingleDateMode|NSSingleUnderlineStyle|NSSizeDownFontAction|NSSizeUpFontAction|NSSolarisOperatingSystem|NSSunOSOperatingSystem|NSSpecialPageOrder|NSSecondCalendarUnit|NSSelectByCharacter|NSSelectByParagraph|NSSelectByWord|NSSelectingNext|NSSelectingPrevious|NSSelectionAffinityDownstream|NSSelectionAffinityUpstream|NSSelectedTab|NSSelectFunctionKey|NSSegmentSwitchTrackingMomentary|NSSegmentSwitchTrackingSelectOne|NSSegmentSwitchTrackingSelectAny|NSSquareLineCapStyle|NSSwitchButton|NSSaveToOperation|NSSaveOptionsYes|NSSaveOptionsNo|NSSaveOptionsAsk|NSSaveOperation|NSSaveAsOperation|NSSmallSquareBezelStyle|NSSmallControlSize|NSSmallCapsFontMask|NSSmallIconButtonBezelStyle|NSHighlightModeMatrix|NSHSBModeColorPanel|NSHourMinuteSecondDatePickerElementFlag|NSHourMinuteDatePickerElementFlag|NSHourCalendarUnit|NSHorizontalRuler|NSHomeFunctionKey|NSHTTPCookieAcceptPolicyNever|NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain|NSHTTPCookieAcceptPolicyAlways|NSHelpButtonBezelStyle|NSHelpKeyMask|NSHelpFunctionKey|NSHeavierFontAction|NSHPUXOperatingSystem|NSYearMonthDayDatePickerElementFlag|NSYearMonthDatePickerElementFlag|NSYearCalendarUnit|NSNonStandardCharacterSetFontMask|NSNonZeroWindingRule|NSNonactivatingPanelMask|NSNonLossyASCIIStringEncoding|NSNoBorder|NSNotificationSuspensionBehaviorHold|NSNotificationSuspensionBehaviorCoalesce|NSNotificationSuspensionBehaviorDeliverImmediately|NSNotificationSuspensionBehaviorDrop|NSNotificationNoCoalescing|NSNotificationCoalescingOnSender|NSNotificationCoalescingOnName|NSNotificationDeliverImmediately|NSNotificationPostToAllSessions|NSNotPredicateType|NSNotEqualToPredicateOperatorType|NSNoScriptError|NSNoScrollerParts|NSNoSubelement|NSNoSpecifierError|NSNoCellMask|NSNoTitle|NSNoTopLevelContainersSpecifierError|NSNoTabsBezelBorder|NSNoTabsNoBorder|NSNoTabsLineBorder|NSNoInterfaceStyle|NSNoImage|NSNoUnderlineStyle|NSNoFontChangeAction|NSNullGlyph|NSNullCellType|NSNumericSearch|NSNumericPadKeyMask|NSNumberFormatterRoundHalfDown|NSNumberFormatterRoundHalfUp|NSNumberFormatterRoundHalfEven|NSNumberFormatterRoundCeiling|NSNumberFormatterRoundDown|NSNumberFormatterRoundUp|NSNumberFormatterRoundFloor|NSNumberFormatterBehavior10|NSNumberFormatterBehaviorDefault|NSNumberFormatterScientificStyle|NSNumberFormatterSpellOutStyle|NSNumberFormatterNoStyle|NSNumberFormatterCurrencyStyle|NSNumberFormatterDecimalStyle|NSNumberFormatterPercentStyle|NSNumberFormatterPadBeforeSuffix|NSNumberFormatterPadBeforePrefix|NSNumberFormatterPadAfterSuffix|NSNumberFormatterPadAfterPrefix|NSNetServicesBadArgumentError|NSNetServicesNotFoundError|NSNetServicesCollisionError|NSNetServicesCancelledError|NSNetServicesTimeoutError|NSNetServicesInvalidError|NSNetServicesUnknownError|NSNetServicesActivityInProgress|NSNetworkDomainMask|NSNewlineCharacter|NSNextStepInterfaceStyle|NSNextFunctionKey|NSNEXTSTEPStringEncoding|NSNativeShortGlyphPacking|NSNaturalTextAlignment|NSNarrowFontMask|NSChangeReadOtherContents|NSChangeGrayCell|NSChangeGrayCellMask|NSChangeBackgroundCell|NSChangeBackgroundCellMask|NSChangeCleared|NSChangeDone|NSChangeUndone|NSChangeAutosaved|NSCMYKModeColorPanel|NSCMYKColorSpaceModel|NSCircularBezelStyle|NSCircularSlider|NSConstantValueExpressionType|NSContinuousCapacityLevelIndicatorStyle|NSContentsCellMask|NSContainsComparison|NSContainerSpecifierError|NSControlGlyph|NSControlKeyMask|NSCondensedFontMask|NSColorPanelRGBModeMask|NSColorPanelGrayModeMask|NSColorPanelHSBModeMask|NSColorPanelCMYKModeMask|NSColorPanelColorListModeMask|NSColorPanelCustomPaletteModeMask|NSColorPanelCrayonModeMask|NSColorPanelWheelModeMask|NSColorPanelAllModesMask|NSColorListModeColorPanel|NSCoreServiceDirectory|NSCompositeXOR|NSCompositeSourceIn|NSCompositeSourceOut|NSCompositeSourceOver|NSCompositeSourceAtop|NSCompositeHighlight|NSCompositeCopy|NSCompositeClear|NSCompositeDestinationIn|NSCompositeDestinationOut|NSCompositeDestinationOver|NSCompositeDestinationAtop|NSCompositePlusDarker|NSCompositePlusLighter|NSCompressedFontMask|NSCommandKeyMask|NSCustomSelectorPredicateOperatorType|NSCustomPaletteModeColorPanel|NSCursorUpdate|NSCursorUpdateMask|NSCursorPointingDevice|NSCurveToBezierPathElement|NSCenterTextAlignment|NSCenterTabStopType|NSCellHighlighted|NSCellHasImageHorizontal|NSCellHasImageOnLeftOrBottom|NSCellHasOverlappingImage|NSCellChangesContents|NSCellIsBordered|NSCellIsInsetButton|NSCellDisabled|NSCellEditable|NSCellLightsByGray|NSCellLightsByBackground|NSCellLightsByContents|NSCellAllowsMixedState|NSClipPagination|NSClosePathBezierPathElement|NSClosableWindowMask|NSClockAndCalendarDatePickerStyle|NSClearControlTint|NSClearDisplayFunctionKey|NSClearLineFunctionKey|NSCaseInsensitiveSearch|NSCaseInsensitivePredicateOption|NSCannotCreateScriptCommandError|NSCancelButton|NSCancelTextMovement|NSCachesDirectory|NSCalculationNoError|NSCalculationOverflow|NSCalculationDivideByZero|NSCalculationUnderflow|NSCalculationLossOfPrecision|NSCarriageReturnCharacter|NSCriticalRequest|NSCriticalAlertStyle|NSCrayonModeColorPanel|NSThickSquareBezelStyle|NSThickerSquareBezelStyle|NSTypesetterBehavior|NSTypesetterHorizontalTabAction|NSTypesetterContainerBreakAction|NSTypesetterZeroAdvancementAction|NSTypesetterOriginalBehavior|NSTypesetterParagraphBreakAction|NSTypesetterWhitespaceAction|NSTypesetterLineBreakAction|NSTypesetterLatestBehavior|NSTickMarkRight|NSTickMarkBelow|NSTickMarkLeft|NSTickMarkAbove|NSTitledWindowMask|NSTimeZoneDatePickerElementFlag|NSToolbarItemVisibilityPriorityStandard|NSToolbarItemVisibilityPriorityHigh|NSToolbarItemVisibilityPriorityUser|NSToolbarItemVisibilityPriorityLow|NSTopTabsBezelBorder|NSToggleButton|NSTIFFCompressionNone|NSTIFFCompressionNEXT|NSTIFFCompressionCCITTFAX3|NSTIFFCompressionCCITTFAX4|NSTIFFCompressionOldJPEG|NSTIFFCompressionJPEG|NSTIFFCompressionPackBits|NSTIFFCompressionLZW|NSTIFFFileType|NSTerminateNow|NSTerminateCancel|NSTerminateLater|NSTextReadInapplicableDocumentTypeError|NSTextReadWriteErrorMinimum|NSTextReadWriteErrorMaximum|NSTextBlockMinimumHeight|NSTextBlockMinimumWidth|NSTextBlockMiddleAlignment|NSTextBlockMargin|NSTextBlockMaximumHeight|NSTextBlockMaximumWidth|NSTextBlockBottomAlignment|NSTextBlockBorder|NSTextBlockBaselineAlignment|NSTextBlockHeight|NSTextBlockTopAlignment|NSTextBlockPercentageValueType|NSTextBlockPadding|NSTextBlockWidth|NSTextBlockAbsoluteValueType|NSTextStorageEditedCharacters|NSTextStorageEditedAttributes|NSTextCellType|NSTexturedRoundedBezelStyle|NSTexturedBackgroundWindowMask|NSTexturedSquareBezelStyle|NSTextTableFixedLayoutAlgorithm|NSTextTableAutomaticLayoutAlgorithm|NSTextFieldRoundedBezel|NSTextFieldSquareBezel|NSTextFieldAndStepperDatePickerStyle|NSTextWriteInapplicableDocumentTypeError|NSTextListPrependEnclosingMarker|NSTwoByteGlyphPacking|NSTabCharacter|NSTabTextMovement|NSTabletPoint|NSTabletPointMask|NSTabletPointEventSubtype|NSTabletProximity|NSTabletProximityMask|NSTabletProximityEventSubtype|NSTableColumnNoResizing|NSTableColumnUserResizingMask|NSTableColumnAutoresizingMask|NSTableViewReverseSequentialColumnAutoresizingStyle|NSTableViewGridNone|NSTableViewSolidHorizontalGridLineMask|NSTableViewSolidVerticalGridLineMask|NSTableViewSequentialColumnAutoresizingStyle|NSTableViewNoColumnAutoresizing|NSTableViewUniformColumnAutoresizingStyle|NSTableViewFirstColumnOnlyAutoresizingStyle|NSTableViewLastColumnOnlyAutoresizingStyle|NSTrackModeMatrix|NSInsertCharFunctionKey|NSInsertFunctionKey|NSInsertLineFunctionKey|NSIntType|NSInternalScriptError|NSInternalSpecifierError|NSIndexSubelement|NSInvalidIndexSpecifierError|NSInformationalRequest|NSInformationalAlertStyle|NSInPredicateOperatorType|NSItalicFontMask|NSISO2022JPStringEncoding|NSISOLatin1StringEncoding|NSISOLatin2StringEncoding|NSIdentityMappingCharacterCollection|NSIllegalTextMovement|NSImageRight|NSImageRepMatchesDevice|NSImageRepLoadStatusReadingHeader|NSImageRepLoadStatusCompleted|NSImageRepLoadStatusInvalidData|NSImageRepLoadStatusUnexpectedEOF|NSImageRepLoadStatusUnknownType|NSImageRepLoadStatusWillNeedAllData|NSImageBelow|NSImageCellType|NSImageCacheBySize|NSImageCacheNever|NSImageCacheDefault|NSImageCacheAlways|NSImageInterpolationHigh|NSImageInterpolationNone|NSImageInterpolationDefault|NSImageInterpolationLow|NSImageOnly|NSImageOverlaps|NSImageFrameGroove|NSImageFrameGrayBezel|NSImageFrameButton|NSImageFrameNone|NSImageFramePhoto|NSImageLoadStatusReadError|NSImageLoadStatusCompleted|NSImageLoadStatusCancelled|NSImageLoadStatusInvalidData|NSImageLoadStatusUnexpectedEOF|NSImageLeft|NSImageAlignRight|NSImageAlignBottom|NSImageAlignBottomRight|NSImageAlignBottomLeft|NSImageAlignCenter|NSImageAlignTop|NSImageAlignTopRight|NSImageAlignTopLeft|NSImageAlignLeft|NSImageAbove|NSOnState|NSOneByteGlyphPacking|NSOnOffButton|NSOnlyScrollerArrows|NSOtherMouseDown|NSOtherMouseDownMask|NSOtherMouseDragged|NSOtherMouseDraggedMask|NSOtherMouseUp|NSOtherMouseUpMask|NSOtherTextMovement|NSOSF1OperatingSystem|NSOpenGLGOResetLibrary|NSOpenGLGORetainRenderers|NSOpenGLGOClearFormatCache|NSOpenGLGOFormatCacheSize|NSOpenGLPFARobust|NSOpenGLPFARendererID|NSOpenGLPFAMinimumPolicy|NSOpenGLPFAMultisample|NSOpenGLPFAMultiScreen|NSOpenGLPFAMPSafe|NSOpenGLPFAMaximumPolicy|NSOpenGLPFABackingStore|NSOpenGLPFAScreenMask|NSOpenGLPFAStencilSize|NSOpenGLPFAStereo|NSOpenGLPFASingleRenderer|NSOpenGLPFASupersample|NSOpenGLPFASamples|NSOpenGLPFASampleBuffers|NSOpenGLPFASampleAlpha|NSOpenGLPFANoRecovery|NSOpenGLPFAColorSize|NSOpenGLPFAColorFloat|NSOpenGLPFACompliant|NSOpenGLPFAClosestPolicy|NSOpenGLPFAOffScreen|NSOpenGLPFADoubleBuffer|NSOpenGLPFADepthSize|NSOpenGLPFAPixelBuffer|NSOpenGLPFAVirtualScreenCount|NSOpenGLPFAFullScreen|NSOpenGLPFAWindow|NSOpenGLPFAAccumSize|NSOpenGLPFAAccelerated|NSOpenGLPFAAuxBuffers|NSOpenGLPFAAuxDepthStencil|NSOpenGLPFAAlphaSize|NSOpenGLPFAAllRenderers|NSOpenStepUnicodeReservedBase|NSOperationNotSupportedForKeyScriptError|NSOperationNotSupportedForKeySpecifierError|NSOffState|NSOKButton|NSOrPredicateType|NSObjCBitfield|NSObjCBoolType|NSObjCShortType|NSObjCStringType|NSObjCStructType|NSObjCSelectorType|NSObjCNoType|NSObjCCharType|NSObjCObjectType|NSObjCDoubleType|NSObjCUnionType|NSObjCPointerType|NSObjCVoidType|NSObjCFloatType|NSObjCLongType|NSObjCLonglongType|NSObjCArrayType|NSDisclosureBezelStyle|NSDiscreteCapacityLevelIndicatorStyle|NSDisplayWindowRunLoopOrdering|NSDiacriticInsensitivePredicateOption|NSDirectSelection|NSDirectPredicateModifier|NSDocModalWindowMask|NSDocumentDirectory|NSDocumentationDirectory|NSDoubleType|NSDownTextMovement|NSDownArrowFunctionKey|NSDescendingPageOrder|NSDesktopDirectory|NSDecimalTabStopType|NSDeviceNColorSpaceModel|NSDeviceIndependentModifierFlagsMask|NSDeveloperDirectory|NSDeveloperApplicationDirectory|NSDefaultControlTint|NSDefaultTokenStyle|NSDeleteCharacter|NSDeleteCharFunctionKey|NSDeleteFunctionKey|NSDeleteLineFunctionKey|NSDemoApplicationDirectory|NSDayCalendarUnit|NSDateFormatterMediumStyle|NSDateFormatterBehavior10|NSDateFormatterBehaviorDefault|NSDateFormatterShortStyle|NSDateFormatterNoStyle|NSDateFormatterFullStyle|NSDateFormatterLongStyle|NSDrawerClosingState|NSDrawerClosedState|NSDrawerOpeningState|NSDrawerOpenState|NSDragOperationGeneric|NSDragOperationMove|NSDragOperationNone|NSDragOperationCopy|NSDragOperationDelete|NSDragOperationPrivate|NSDragOperationEvery|NSDragOperationLink|NSDragOperationAll|NSUserCancelledError|NSUserDirectory|NSUserDomainMask|NSUserFunctionKey|NSURLHandleNotLoaded|NSURLHandleLoadSucceeded|NSURLHandleLoadInProgress|NSURLHandleLoadFailed|NSURLCredentialPersistenceNone|NSURLCredentialPersistencePermanent|NSURLCredentialPersistenceForSession|NSUnscaledWindowMask|NSUncachedRead|NSUnicodeStringEncoding|NSUnitalicFontMask|NSUnifiedTitleAndToolbarWindowMask|NSUndoCloseGroupingRunLoopOrdering|NSUndoFunctionKey|NSUndefinedDateComponent|NSUnderlineStyleSingle|NSUnderlineStyleNone|NSUnderlineStyleThick|NSUnderlineStyleDouble|NSUnderlinePatternSolid|NSUnderlinePatternDot|NSUnderlinePatternDash|NSUnderlinePatternDashDot|NSUnderlinePatternDashDotDot|NSUnknownColorSpaceModel|NSUnknownPointingDevice|NSUnknownPageOrder|NSUnknownKeyScriptError|NSUnknownKeySpecifierError|NSUnboldFontMask|NSUtilityWindowMask|NSUTF8StringEncoding|NSUpdateWindowsRunLoopOrdering|NSUpTextMovement|NSUpArrowFunctionKey|NSJustifiedTextAlignment|NSJPEG2000FileType|NSJPEGFileType|NSJapaneseEUCGlyphPacking|NSJapaneseEUCStringEncoding|NSPostNow|NSPosterFontMask|NSPostWhenIdle|NSPostASAP|NSPositionReplace|NSPositionBefore|NSPositionBeginning|NSPositionEnd|NSPositionAfter|NSPositiveIntType|NSPositiveDoubleType|NSPositiveFloatType|NSPopUpNoArrow|NSPopUpArrowAtBottom|NSPopUpArrowAtCenter|NSPowerOffEventType|NSPortraitOrientation|NSPNGFileType|NSPushInCell|NSPushInCellMask|NSPushOnPushOffButton|NSPenTipMask|NSPenUpperSideMask|NSPenPointingDevice|NSPenLowerSideMask|NSPeriodic|NSPeriodicMask|NSPPScaleField|NSPPStatusTitle|NSPPStatusField|NSPPSaveButton|NSPPNoteTitle|NSPPNoteField|NSPPNameTitle|NSPPNameField|NSPPCopiesField|NSPPTitleField|NSPPImageButton|NSPPOptionsButton|NSPPPaperFeedButton|NSPPPageRangeTo|NSPPPageRangeFrom|NSPPPageChoiceMatrix|NSPPPreviewButton|NSPPLayoutButton|NSPlainTextTokenStyle|NSPauseFunctionKey|NSParagraphSeparatorCharacter|NSPageDownFunctionKey|NSPageUpFunctionKey|NSPrintingReplyLater|NSPrintingSuccess|NSPrintingCancelled|NSPrintingFailure|NSPrintScreenFunctionKey|NSPrinterTableNotFound|NSPrinterTableOK|NSPrinterTableError|NSPrintFunctionKey|NSPropertyListXMLFormat|NSPropertyListMutableContainers|NSPropertyListMutableContainersAndLeaves|NSPropertyListBinaryFormat|NSPropertyListImmutable|NSPropertyListOpenStepFormat|NSProprietaryStringEncoding|NSProgressIndicatorBarStyle|NSProgressIndicatorSpinningStyle|NSProgressIndicatorPreferredSmallThickness|NSProgressIndicatorPreferredThickness|NSProgressIndicatorPreferredLargeThickness|NSProgressIndicatorPreferredAquaThickness|NSPressedTab|NSPrevFunctionKey|NSPLHeightForm|NSPLCancelButton|NSPLTitleField|NSPLImageButton|NSPLOKButton|NSPLOrientationMatrix|NSPLUnitsButton|NSPLPaperNameButton|NSPLWidthForm|NSEnterCharacter|NSEndsWithComparison|NSEndsWithPredicateOperatorType|NSEndFunctionKey|NSEvenOddWindingRule|NSEverySubelement|NSEvaluatedObjectExpressionType|NSEqualToComparison|NSEqualToPredicateOperatorType|NSEraserPointingDevice|NSEraCalendarUnit|NSEraDatePickerElementFlag|NSExclude10|NSExcludeQuickDrawElementsIconCreationOption|NSExpandedFontMask|NSExecuteFunctionKey|NSViewMinXMargin|NSViewMinYMargin|NSViewMaxXMargin|NSViewMaxYMargin|NSViewHeightSizable|NSViewNotSizable|NSViewWidthSizable|NSViaPanelFontAction|NSVerticalRuler|NSValidationErrorMinimum|NSValidationErrorMaximum|NSVariableExpressionType|NSKeySpecifierEvaluationScriptError|NSKeyDown|NSKeyDownMask|NSKeyUp|NSKeyUpMask|NSKeyPathExpressionType|NSKeyValueMinusSetMutation|NSKeyValueSetSetMutation|NSKeyValueChangeReplacement|NSKeyValueChangeRemoval|NSKeyValueChangeSetting|NSKeyValueChangeInsertion|NSKeyValueIntersectSetMutation|NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld|NSKeyValueUnionSetMutation|NSKeyValueValidationError|NSQTMovieNormalPlayback|NSQTMovieLoopingBackAndForthPlayback|NSQTMovieLoopingPlayback|NSF11FunctionKey|NSF17FunctionKey|NSF12FunctionKey|NSF18FunctionKey|NSF13FunctionKey|NSF19FunctionKey|NSF14FunctionKey|NSF15FunctionKey|NSF1FunctionKey|NSF10FunctionKey|NSF16FunctionKey|NSF7FunctionKey|NSFindPanelActionReplace|NSFindPanelActionReplaceAndFind|NSFindPanelActionReplaceAll|NSFindPanelActionReplaceAllInSelection|NSFindPanelActionShowFindPanel|NSFindPanelActionSetFindString|NSFindPanelActionSelectAll|NSFindPanelActionSelectAllInSelection|NSFindPanelActionNext|NSFindPanelActionPrevious|NSFindFunctionKey|NSFitPagination|NSFileReadNoSuchFileError|NSFileReadNoPermissionError|NSFileReadCorruptFileError|NSFileReadInvalidFileNameError|NSFileReadInapplicableStringEncodingError|NSFileReadUnsupportedSchemeError|NSFileReadUnknownError|NSFileHandlingPanelCancelButton|NSFileHandlingPanelOKButton|NSFileNoSuchFileError|NSFileErrorMinimum|NSFileErrorMaximum|NSFileWriteNoPermissionError|NSFileWriteInvalidFileNameError|NSFileWriteInapplicableStringEncodingError|NSFileWriteOutOfSpaceError|NSFileWriteUnsupportedSchemeError|NSFileWriteUnknownError|NSFileLockingError|NSFixedPitchFontMask|NSF21FunctionKey|NSF27FunctionKey|NSF22FunctionKey|NSF28FunctionKey|NSF23FunctionKey|NSF29FunctionKey|NSF24FunctionKey|NSF25FunctionKey|NSF2FunctionKey|NSF20FunctionKey|NSF26FunctionKey|NSFontMonoSpaceTrait|NSFontModernSerifsClass|NSFontBoldTrait|NSFontSymbolicClass|NSFontScriptsClass|NSFontSlabSerifsClass|NSFontSansSerifClass|NSFontCondensedTrait|NSFontCollectionApplicationOnlyMask|NSFontClarendonSerifsClass|NSFontTransitionalSerifsClass|NSFontIntegerAdvancementsRenderingMode|NSFontItalicTrait|NSFontOldStyleSerifsClass|NSFontOrnamentalsClass|NSFontDefaultRenderingMode|NSFontUnknownClass|NSFontUIOptimizedTrait|NSFontPanelShadowEffectModeMask|NSFontPanelStandardModesMask|NSFontPanelStrikethroughEffectModeMask|NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask|NSFontPanelTextColorEffectModeMask|NSFontPanelDocumentColorEffectModeMask|NSFontPanelUnderlineEffectModeMask|NSFontPanelFaceModeMask|NSFontPanelAllModesMask|NSFontPanelAllEffectsModeMask|NSFontExpandedTrait|NSFontVerticalTrait|NSFontFamilyClassMask|NSFontFreeformSerifsClass|NSFontAntialiasedRenderingMode|NSFontAntialiasedIntegerAdvancementsRenderingMode|NSFocusRingBelow|NSFocusRingTypeNone|NSFocusRingTypeDefault|NSFocusRingTypeExterior|NSFocusRingOnly|NSFocusRingAbove|NSFourByteGlyphPacking|NSFormattingError|NSFormattingErrorMinimum|NSFormattingErrorMaximum|NSFormFeedCharacter|NSF8FunctionKey|NSFunctionExpressionType|NSFunctionKeyMask|NSF31FunctionKey|NSF32FunctionKey|NSF33FunctionKey|NSF34FunctionKey|NSF35FunctionKey|NSF3FunctionKey|NSF30FunctionKey|NSF9FunctionKey|NSF4FunctionKey|NSFPRevertButton|NSFPSizeTitle|NSFPSizeField|NSFPSetButton|NSFPCurrentField|NSFPPreviewButton|NSFPPreviewField|NSFloatingPointSamplesBitmapFormat|NSFloatType|NSFlagsChanged|NSFlagsChangedMask|NSFaxButton|NSF5FunctionKey|NSF6FunctionKey|NSWheelModeColorPanel|NSWindowsNTOperatingSystem|NSWindowsCP1251StringEncoding|NSWindowsCP1252StringEncoding|NSWindowsCP1253StringEncoding|NSWindowsCP1254StringEncoding|NSWindowsCP1250StringEncoding|NSWindows95InterfaceStyle|NSWindows95OperatingSystem|NSWindowMiniaturizeButton|NSWindowMovedEventType|NSWindowBelow|NSWindowCloseButton|NSWindowToolbarButton|NSWindowZoomButton|NSWindowOut|NSWindowDocumentIconButton|NSWindowExposedEventType|NSWindowAbove|NSWorkspaceLaunchNewInstance|NSWorkspaceLaunchInhibitingBackgroundOnly|NSWorkspaceLaunchDefault|NSWorkspaceLaunchPreferringClassic|NSWorkspaceLaunchWithoutActivation|NSWorkspaceLaunchWithoutAddingToRecents|NSWorkspaceLaunchAsync|NSWorkspaceLaunchAndHide|NSWorkspaceLaunchAndHideOthers|NSWorkspaceLaunchAndPrint|NSWorkspaceLaunchAllowingClassicStartup|NSWeekdayCalendarUnit|NSWeekdayOrdinalCalendarUnit|NSWeekCalendarUnit|NSWantsBidiLevels|NSWarningAlertStyle|NSWritingDirectionRightToLeft|NSWritingDirectionNatural|NSWritingDirectionLeftToRight|NSWrapCalendarComponents|NSListModeMatrix|NSLineMovesRight|NSLineMovesDown|NSLineMovesUp|NSLineMovesLeft|NSLineBorder|NSLineBreakByCharWrapping|NSLineBreakByClipping|NSLineBreakByTruncatingMiddle|NSLineBreakByTruncatingHead|NSLineBreakByTruncatingTail|NSLineBreakByWordWrapping|NSLineSeparatorCharacter|NSLineSweepRight|NSLineSweepDown|NSLineSweepUp|NSLineSweepLeft|NSLineToBezierPathElement|NSLineDoesntMove|NSLinearSlider|NSLiteralSearch|NSLikePredicateOperatorType|NSLighterFontAction|NSLibraryDirectory|NSLocalDomainMask|NSLessThanComparison|NSLessThanOrEqualToComparison|NSLessThanOrEqualToPredicateOperatorType|NSLessThanPredicateOperatorType|NSLeftMouseDown|NSLeftMouseDownMask|NSLeftMouseDragged|NSLeftMouseDraggedMask|NSLeftMouseUp|NSLeftMouseUpMask|NSLeftTextMovement|NSLeftTextAlignment|NSLeftTabsBezelBorder|NSLeftTabStopType|NSLeftArrowFunctionKey|NSLayoutRightToLeft|NSLayoutNotDone|NSLayoutCantFit|NSLayoutOutOfGlyphs|NSLayoutDone|NSLayoutLeftToRight|NSLandscapeOrientation|NSLABColorSpaceModel|NSAsciiWithDoubleByteEUCGlyphPacking|NSAscendingPageOrder|NSAnyType|NSAnyPredicateModifier|NSAnyEventMask|NSAnchoredSearch|NSAnimationBlocking|NSAnimationNonblocking|NSAnimationNonblockingThreaded|NSAnimationEffectDisappearingItemDefault|NSAnimationEffectPoof|NSAnimationEaseIn|NSAnimationEaseInOut|NSAnimationEaseOut|NSAnimationLinear|NSAndPredicateType|NSAtBottom|NSAttachmentCharacter|NSAtomicWrite|NSAtTop|NSASCIIStringEncoding|NSAdobeGB1CharacterCollection|NSAdobeCNS1CharacterCollection|NSAdobeJapan1CharacterCollection|NSAdobeJapan2CharacterCollection|NSAdobeKorea1CharacterCollection|NSAddTraitFontAction|NSAdminApplicationDirectory|NSAutosaveOperation|NSAutoPagination|NSApplicationSupportDirectory|NSApplicationDirectory|NSApplicationDefined|NSApplicationDefinedMask|NSApplicationDelegateReplySuccess|NSApplicationDelegateReplyCancel|NSApplicationDelegateReplyFailure|NSApplicationDeactivatedEventType|NSApplicationActivatedEventType|NSAppKitDefined|NSAppKitDefinedMask|NSAlternateKeyMask|NSAlphaShiftKeyMask|NSAlphaNonpremultipliedBitmapFormat|NSAlphaFirstBitmapFormat|NSAlertSecondButtonReturn|NSAlertThirdButtonReturn|NSAlertOtherReturn|NSAlertDefaultReturn|NSAlertErrorReturn|NSAlertFirstButtonReturn|NSAlertAlternateReturn|NSAllScrollerParts|NSAllDomainsMask|NSAllPredicateModifier|NSAllLibrariesDirectory|NSAllApplicationsDirectory|NSArgumentsWrongScriptError|NSArgumentEvaluationScriptError|NSAboveBottom|NSAboveTop|NSAWTEventType", + "support.constant.notification.cocoa.leopard": "NSMenuDidBeginTrackingNotification|NSViewDidUpdateTrackingAreasNotification", + "support.constant.notification.cocoa": "NSMenuDidRemoveItemNotification|NSMenuDidSendActionNotification|NSMenuDidChangeItemNotification|NSMenuDidEndTrackingNotification|NSMenuDidAddItemNotification|NSMenuWillSendActionNotification|NSSystemColorsDidChangeNotification|NSSplitViewDidResizeSubviewsNotification|NSSplitViewWillResizeSubviewsNotification|NSContextHelpModeDidDeactivateNotification|NSContextHelpModeDidActivateNotification|NSControlTintDidChangeNotification|NSControlTextDidBeginEditingNotification|NSControlTextDidChangeNotification|NSControlTextDidEndEditingNotification|NSColorPanelColorDidChangeNotification|NSColorListDidChangeNotification|NSComboBoxSelectionIsChangingNotification|NSComboBoxSelectionDidChangeNotification|NSComboBoxWillDismissNotification|NSComboBoxWillPopUpNotification|NSClassDescriptionNeededForClassNotification|NSToolbarDidRemoveItemNotification|NSToolbarWillAddItemNotification|NSTextStorageDidProcessEditingNotification|NSTextStorageWillProcessEditingNotification|NSTextDidBeginEditingNotification|NSTextDidChangeNotification|NSTextDidEndEditingNotification|NSTextViewDidChangeSelectionNotification|NSTextViewDidChangeTypingAttributesNotification|NSTextViewWillChangeNotifyingTextViewNotification|NSTableViewSelectionIsChangingNotification|NSTableViewSelectionDidChangeNotification|NSTableViewColumnDidResizeNotification|NSTableViewColumnDidMoveNotification|NSImageRepRegistryDidChangeNotification|NSOutlineViewSelectionIsChangingNotification|NSOutlineViewSelectionDidChangeNotification|NSOutlineViewColumnDidResizeNotification|NSOutlineViewColumnDidMoveNotification|NSOutlineViewItemDidCollapseNotification|NSOutlineViewItemDidExpandNotification|NSOutlineViewItemWillCollapseNotification|NSOutlineViewItemWillExpandNotification|NSDrawerDidCloseNotification|NSDrawerDidOpenNotification|NSDrawerWillCloseNotification|NSDrawerWillOpenNotification|NSPopUpButtonCellWillPopUpNotification|NSPopUpButtonWillPopUpNotification|NSViewGlobalFrameDidChangeNotification|NSViewBoundsDidChangeNotification|NSViewFocusDidChangeNotification|NSViewFrameDidChangeNotification|NSFontSetChangedNotification|NSWindowDidResizeNotification|NSWindowDidResignMainNotification|NSWindowDidResignKeyNotification|NSWindowDidMiniaturizeNotification|NSWindowDidMoveNotification|NSWindowDidBecomeMainNotification|NSWindowDidBecomeKeyNotification|NSWindowDidChangeScreenNotification|NSWindowDidChangeScreenProfileNotification|NSWindowDidDeminiaturizeNotification|NSWindowDidUpdateNotification|NSWindowDidEndSheetNotification|NSWindowDidExposeNotification|NSWindowWillMiniaturizeNotification|NSWindowWillMoveNotification|NSWindowWillBeginSheetNotification|NSWindowWillCloseNotification|NSWorkspaceSessionDidResignActiveNotification|NSWorkspaceSessionDidBecomeActiveNotification|NSWorkspaceDidMountNotification|NSWorkspaceDidTerminateApplicationNotification|NSWorkspaceDidUnmountNotification|NSWorkspaceDidPerformFileOperationNotification|NSWorkspaceDidWakeNotification|NSWorkspaceDidLaunchApplicationNotification|NSWorkspaceWillSleepNotification|NSWorkspaceWillUnmountNotification|NSWorkspaceWillPowerOffNotification|NSWorkspaceWillLaunchApplicationNotification|NSAntialiasThresholdChangedNotification|NSApplicationDidResignActiveNotification|NSApplicationDidBecomeActiveNotification|NSApplicationDidHideNotification|NSApplicationDidChangeScreenParametersNotification|NSApplicationDidUnhideNotification|NSApplicationDidUpdateNotification|NSApplicationDidFinishLaunchingNotification|NSApplicationWillResignActiveNotification|NSApplicationWillBecomeActiveNotification|NSApplicationWillHideNotification|NSApplicationWillTerminateNotification|NSApplicationWillUnhideNotification|NSApplicationWillUpdateNotification|NSApplicationWillFinishLaunchingNotification|NSAppleEventManagerWillProcessFirstEventNotification", + "support.constant.cocoa.leopard": "NSRuleEditorRowTypeSimple|NSRuleEditorRowTypeCompound|NSRuleEditorNestingModeSingle|NSRuleEditorNestingModeSimple|NSRuleEditorNestingModeCompound|NSRuleEditorNestingModeList|NSGradientDrawsBeforeStartingLocation|NSGradientDrawsAfterEndingLocation|NSMinusSetExpressionType|NSMachPortDeallocateReceiveRight|NSMachPortDeallocateSendRight|NSMachPortDeallocateNone|NSMapTableStrongMemory|NSMapTableCopyIn|NSMapTableZeroingWeakMemory|NSMapTableObjectPointerPersonality|NSBoxCustom|NSBundleExecutableArchitectureX86|NSBundleExecutableArchitectureI386|NSBundleExecutableArchitecturePPC|NSBundleExecutableArchitecturePPC64|NSBetweenPredicateOperatorType|NSBackgroundStyleRaised|NSBackgroundStyleDark|NSBackgroundStyleLight|NSBackgroundStyleLowered|NSStringDrawingTruncatesLastVisibleLine|NSStringEncodingConversionExternalRepresentation|NSStringEncodingConversionAllowLossy|NSSubqueryExpressionType|NSSpeechSentenceBoundary|NSSpeechImmediateBoundary|NSSpeechWordBoundary|NSSpellingStateGrammarFlag|NSSpellingStateSpellingFlag|NSSplitViewDividerStyleThin|NSSplitViewDividerStyleThick|NSServiceRequestTimedOutError|NSServiceMiscellaneousError|NSServiceMalformedServiceDictionaryError|NSServiceInvalidPasteboardDataError|NSServiceErrorMinimum|NSServiceErrorMaximum|NSServiceApplicationNotFoundError|NSServiceApplicationLaunchFailedError|NSSegmentStyleRoundRect|NSSegmentStyleRounded|NSSegmentStyleSmallSquare|NSSegmentStyleCapsule|NSSegmentStyleTexturedRounded|NSSegmentStyleTexturedSquare|NSSegmentStyleAutomatic|NSHUDWindowMask|NSHashTableStrongMemory|NSHashTableCopyIn|NSHashTableZeroingWeakMemory|NSHashTableObjectPointerPersonality|NSNoModeColorPanel|NSNetServiceNoAutoRename|NSChangeRedone|NSContainsPredicateOperatorType|NSColorRenderingIntentRelativeColorimetric|NSColorRenderingIntentSaturation|NSColorRenderingIntentDefault|NSColorRenderingIntentPerceptual|NSColorRenderingIntentAbsoluteColorimetric|NSCollectorDisabledOption|NSCellHitNone|NSCellHitContentArea|NSCellHitTrackableArea|NSCellHitEditableTextArea|NSTimeZoneNameStyleShortStandard|NSTimeZoneNameStyleShortDaylightSaving|NSTimeZoneNameStyleStandard|NSTimeZoneNameStyleDaylightSaving|NSTextFieldDatePickerStyle|NSTableViewSelectionHighlightStyleRegular|NSTableViewSelectionHighlightStyleSourceList|NSTrackingMouseMoved|NSTrackingMouseEnteredAndExited|NSTrackingCursorUpdate|NSTrackingInVisibleRect|NSTrackingEnabledDuringMouseDrag|NSTrackingAssumeInside|NSTrackingActiveInKeyWindow|NSTrackingActiveInActiveApp|NSTrackingActiveWhenFirstResponder|NSTrackingActiveAlways|NSIntersectSetExpressionType|NSIndexedColorSpaceModel|NSImageScaleNone|NSImageScaleProportionallyDown|NSImageScaleProportionallyUpOrDown|NSImageScaleAxesIndependently|NSOpenGLPFAAllowOfflineRenderers|NSOperationQueueDefaultMaxConcurrentOperationCount|NSOperationQueuePriorityHigh|NSOperationQueuePriorityNormal|NSOperationQueuePriorityVeryHigh|NSOperationQueuePriorityVeryLow|NSOperationQueuePriorityLow|NSDiacriticInsensitiveSearch|NSDownloadsDirectory|NSUnionSetExpressionType|NSUTF16BigEndianStringEncoding|NSUTF16StringEncoding|NSUTF16LittleEndianStringEncoding|NSUTF32BigEndianStringEncoding|NSUTF32StringEncoding|NSUTF32LittleEndianStringEncoding|NSPointerFunctionsMachVirtualMemory|NSPointerFunctionsMallocMemory|NSPointerFunctionsStrongMemory|NSPointerFunctionsStructPersonality|NSPointerFunctionsCStringPersonality|NSPointerFunctionsCopyIn|NSPointerFunctionsIntegerPersonality|NSPointerFunctionsZeroingWeakMemory|NSPointerFunctionsOpaqueMemory|NSPointerFunctionsOpaquePersonality|NSPointerFunctionsObjectPointerPersonality|NSPointerFunctionsObjectPersonality|NSPathStyleStandard|NSPathStyleNavigationBar|NSPathStylePopUp|NSPatternColorSpaceModel|NSPrintPanelShowsScaling|NSPrintPanelShowsCopies|NSPrintPanelShowsOrientation|NSPrintPanelShowsPaperSize|NSPrintPanelShowsPageRange|NSPrintPanelShowsPageSetupAccessory|NSPrintPanelShowsPreview|NSExecutableRuntimeMismatchError|NSExecutableNotLoadableError|NSExecutableErrorMinimum|NSExecutableErrorMaximum|NSExecutableLinkError|NSExecutableLoadError|NSExecutableArchitectureMismatchError|NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionPrior|NSFindPanelSubstringMatchTypeStartsWith|NSFindPanelSubstringMatchTypeContains|NSFindPanelSubstringMatchTypeEndsWith|NSFindPanelSubstringMatchTypeFullWord|NSFileReadTooLargeError|NSFileReadUnknownStringEncodingError|NSForcedOrderingSearch|NSWindowBackingLocationMainMemory|NSWindowBackingLocationDefault|NSWindowBackingLocationVideoMemory|NSWindowSharingReadOnly|NSWindowSharingReadWrite|NSWindowSharingNone|NSWindowCollectionBehaviorMoveToActiveSpace|NSWindowCollectionBehaviorCanJoinAllSpaces|NSWindowCollectionBehaviorDefault|NSWidthInsensitiveSearch|NSAggregateExpressionType" + }; + var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" + + "[0-3]\\d{1,2}|" + + "[4-7]\\d?|" + + "222|" + + "x[a-zA-Z0-9]+)"; + var specialVariables = [{ + regex: "\\b_cmd\\b", + token: "variable.other.selector.objc" + }, { + regex: "\\b(?:self|super)\\b", + token: "variable.language.objc" + } + ]; + var cObj = new CHighlightRules(NSKeywords); + var cRules = cObj.getRules(); + this.$keywordList = cObj.$keywordList; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, + { + token: ["storage.type.objc", "punctuation.definition.storage.type.objc", + "entity.name.type.objc", "text", "entity.other.inherited-class.objc" + ], + regex: "(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)" + }, + { + token: ["storage.type.objc"], + regex: "(@end)" + }, + { + token: ["storage.type.objc", "entity.name.type.objc", + "entity.other.inherited-class.objc" + ], + regex: "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?" + }, + { + token: "string.begin.objc", + regex: '@"', + next: "constant_NSString" + }, + { + token: "storage.type.objc", + regex: "\\bid\\s*<", + next: "protocol_list" + }, + { + token: "keyword.control.macro.objc", + regex: "\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b" + }, + { + token: ["punctuation.definition.keyword.objc", "keyword.control.exception.objc"], + regex: "(@)(try|catch|finally|throw)\\b" + }, + { + token: ["punctuation.definition.keyword.objc", "keyword.other.objc"], + regex: "(@)(defs|encode)\\b" + }, + { + token: ["storage.type.id.objc", "text"], + regex: "(\\bid\\b)(\\s|\\n)?" + }, + { + token: "storage.type.objc", + regex: "\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b" + }, + { + token: ["punctuation.definition.storage.type.objc", "storage.type.objc"], + regex: "(@)(class|protocol)\\b" + }, + { + token: ["punctuation.definition.storage.type.objc", "punctuation"], + regex: "(@selector)(\\s*\\()", + next: "selectors" + }, + { + token: ["punctuation.definition.storage.modifier.objc", "storage.modifier.objc"], + regex: "(@)(synchronized|public|private|protected|package)\\b" + }, + { + token: "constant.language.objc", + regex: "\\bYES|NO|Nil|nil\\b" + }, + { + token: "support.variable.foundation", + regex: "\\bNSApp\\b" + }, + { + token: cObj.getKeywords(), + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "punctuation.section.scope.begin.objc", + regex: "\\[", + next: "bracketed_content" + }, + { + token: "meta.function.objc", + regex: "^(?:-|\\+)\\s*" + } + ], + "constant_NSString": [ + { + token: "constant.character.escape.objc", + regex: escapedConstRe + }, + { + token: "invalid.illegal.unknown-escape.objc", + regex: "\\\\." + }, + { + token: "string", + regex: '[^"\\\\]+' + }, + { + token: "punctuation.definition.string.end", + regex: "\"", + next: "start" + } + ], + "protocol_list": [ + { + token: "punctuation.section.scope.end.objc", + regex: ">", + next: "start" + }, + { + token: "support.other.protocol.objc", + regex: "\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b" + } + ], + "selectors": [ + { + token: "support.function.any-method.name-of-parameter.objc", + regex: "\\b(?:[a-zA-Z_:][\\w]*)+" + }, + { + token: "punctuation", + regex: "\\)", + next: "start" + } + ], + "bracketed_content": [ + { + token: "punctuation.section.scope.end.objc", + regex: "]", + next: "start" + }, + { + token: ["support.function.any-method.objc"], + regex: "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)", + next: "start" + }, + { + token: "support.function.any-method.objc", + regex: "\\w+(?::|(?=]))", + next: "start" + } + ], + "bracketed_strings": [ + { + token: "punctuation.section.scope.end.objc", + regex: "]", + next: "start" + }, + { + token: "keyword.operator.logical.predicate.cocoa", + regex: "\\b(?:AND|OR|NOT|IN)\\b" + }, + { + token: ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"], + regex: "\\b(\\w+)(:)" + }, + { + regex: "\\b(?:ALL|ANY|SOME|NONE)\\b", + token: "constant.language.predicate.cocoa" + }, + { + regex: "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", + token: "constant.language.predicate.cocoa" + }, + { + regex: "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", + token: "keyword.operator.comparison.predicate.cocoa" + }, + { + regex: "\\bC(?:ASEINSENSITIVE|I)\\b", + token: "keyword.other.modifier.predicate.cocoa" + }, + { + regex: "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", + token: "keyword.other.predicate.cocoa" + }, + { + regex: escapedConstRe, + token: "constant.character.escape.objc" + }, + { + regex: "\\\\.", + token: "invalid.illegal.unknown-escape.objc" + }, + { + token: "string", + regex: '[^"\\\\]' + }, + { + token: "punctuation.definition.string.end.objc", + regex: "\"", + next: "predicates" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "methods": [ + { + token: "meta.function.objc", + regex: "(?=\\{|#)|;", + next: "start" + } + ] + }; + for (var r in cRules) { + if (this.$rules[r]) { + if (this.$rules[r].push) + this.$rules[r].push.apply(this.$rules[r], cRules[r]); + } + else { + this.$rules[r] = cRules[r]; + } + } + this.$rules.bracketed_content = this.$rules.bracketed_content.concat(this.$rules.start, specialVariables); + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(ObjectiveCHighlightRules, CHighlightRules); +exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ObjectiveCHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/objectivec"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/objectivec"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ocaml.js b/ui/base1/ace/mode-ocaml.js new file mode 100644 index 0000000..1baf028 --- /dev/null +++ b/ui/base1/ace/mode-ocaml.js @@ -0,0 +1,378 @@ +define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var OcamlHighlightRules = function () { + var keywords = ("and|as|assert|begin|class|constraint|do|done|downto|else|end|" + + "exception|external|for|fun|function|functor|if|in|include|" + + "inherit|initializer|lazy|let|match|method|module|mutable|new|" + + "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" + + "virtual|when|while|with"); + var builtinConstants = ("true|false"); + var builtinFunctions = ("abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" + + "add_available_units|add_big_int|add_buffer|add_channel|add_char|" + + "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" + + "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" + + "allow_unsafe_modules|always|append|appname_get|appname_set|" + + "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" + + "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" + + "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" + + "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" + + "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" + + "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" + + "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" + + "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" + + "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" + + "chown|chr|chroot|classify_float|clear|clear_available_units|" + + "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" + + "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" + + "close_out|close_out_noerr|close_process|close_process|" + + "close_process_full|close_process_in|close_process_out|close_subwindow|" + + "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" + + "combine|combine|command|compact|compare|compare_big_int|compare_num|" + + "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" + + "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" + + "create_matrix|create_matrix|create_matrix|create_object|" + + "create_object_and_run_initializers|create_object_opt|create_process|" + + "create_process|create_process_env|create_process_env|create_table|" + + "current|current_dir_name|current_point|current_x|current_y|curveto|" + + "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" + + "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" + + "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" + + "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" + + "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" + + "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" + + "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" + + "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" + + "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" + + "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" + + "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" + + "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" + + "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" + + "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" + + "for_all|for_all2|force|force_newline|force_val|foreground|fork|" + + "format_of_string|formatter_of_buffer|formatter_of_out_channel|" + + "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" + + "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" + + "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" + + "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" + + "get_all_formatter_output_functions|get_approx_printing|get_copy|" + + "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" + + "get_formatter_output_functions|get_formatter_tag_functions|get_image|" + + "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" + + "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" + + "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" + + "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" + + "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" + + "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" + + "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" + + "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" + + "global_replace|global_substitute|gmtime|green|grid|group_beginning|" + + "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" + + "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" + + "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" + + "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" + + "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" + + "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" + + "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" + + "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" + + "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" + + "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" + + "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" + + "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" + + "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" + + "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" + + "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" + + "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" + + "marshal|match_beginning|match_end|matched_group|matched_string|max|" + + "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" + + "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" + + "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" + + "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" + + "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" + + "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" + + "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" + + "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" + + "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" + + "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" + + "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" + + "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" + + "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" + + "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" + + "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" + + "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" + + "output_char|output_string|output_value|over_max_boxes|pack|params|" + + "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" + + "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" + + "power_big_int_positive_big_int|power_big_int_positive_int|" + + "power_int_positive_big_int|power_int_positive_int|power_num|" + + "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" + + "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" + + "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" + + "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" + + "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" + + "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" + + "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" + + "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" + + "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" + + "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" + + "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" + + "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" + + "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" + + "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" + + "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" + + "print_bool|print_break|print_char|print_cut|print_endline|print_float|" + + "print_flush|print_if_newline|print_int|print_newline|print_space|" + + "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" + + "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" + + "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" + + "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" + + "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" + + "regexp_string_case_fold|register|register_exception|rem|remember_mode|" + + "remove|remove_assoc|remove_assq|rename|replace|replace_first|" + + "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" + + "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" + + "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" + + "run_initializers|run_initializers_opt|scanf|search_backward|" + + "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" + + "set_all_formatter_output_functions|set_approx_printing|" + + "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" + + "set_close_on_exec|set_color|set_ellipsis_text|" + + "set_error_when_null_denominator|set_field|set_floating_precision|" + + "set_font|set_formatter_out_channel|set_formatter_output_functions|" + + "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" + + "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" + + "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" + + "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" + + "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" + + "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" + + "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" + + "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" + + "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" + + "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" + + "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" + + "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" + + "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" + + "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" + + "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" + + "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" + + "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" + + "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" + + "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" + + "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" + + "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" + + "str_formatter|string|string_after|string_before|string_match|" + + "string_of_big_int|string_of_bool|string_of_float|string_of_format|" + + "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" + + "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" + + "sub_right|subset|subset|substitute_first|substring|succ|succ|" + + "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" + + "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" + + "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" + + "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" + + "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" + + "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" + + "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" + + "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" + + "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" + + "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" + + "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" + + "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" + + "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" + + "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" + + "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" + + "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" + + "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" + + "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" + + "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" + + "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" + + "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" + + "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": builtinConstants, + "support.function": builtinFunctions + }, "identifier"); + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + this.$rules = { + "start": [ + { + token: "comment", + regex: '\\(\\*.*?\\*\\)\\s*?$' + }, + { + token: "comment", + regex: '\\(\\*.*', + next: "comment" + }, + { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, + { + token: "string", // single char + regex: "'.'" + }, + { + token: "string", // " string + regex: '"', + next: "qstring" + }, + { + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, + { + token: "constant.numeric", // float + regex: floatNumber + }, + { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "keyword.operator", + regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=" + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + }, + { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\)", + next: "start" + }, + { + defaultToken: "comment" + } + ], + "qstring": [ + { + token: "string", + regex: '"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; +}; +oop.inherits(OcamlHighlightRules, TextHighlightRules); +exports.OcamlHighlightRules = OcamlHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = OcamlHighlightRules; + this.$behaviour = this.$defaultBehaviour; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, TextMode); +var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/; +(function () { + this.toggleCommentLines = function (state, doc, startRow, endRow) { + var i, line; + var outdent = true; + var re = /^\s*\(\*(.*)\*\)/; + for (i = startRow; i <= endRow; i++) { + if (!re.test(doc.getLine(i))) { + outdent = false; + break; + } + } + var range = new Range(0, 0, 0, 0); + for (i = startRow; i <= endRow; i++) { + line = doc.getLine(i); + range.start.row = i; + range.end.row = i; + range.end.column = line.length; + doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)"); + } + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && + state === 'start' && indenter.test(line)) + indent += tab; + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/ocaml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ocaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-odin.js b/ui/base1/ace/mode-odin.js new file mode 100644 index 0000000..5ec5e84 --- /dev/null +++ b/ui/base1/ace/mode-odin.js @@ -0,0 +1,449 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/odin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var OdinHighlightRules = function () { + var keywords = "using|transmute|cast|distinct|opaque|where|" + + "struct|enum|union|bit_field|bit_set|" + + "if|when|else|do|switch|case|break|fallthrough|" + + "size_of|offset_of|type_info_if|typeid_of|type_of|align_of|" + + "or_return|or_else|inline|no_inline|" + + "import|package|foreign|defer|auto_cast|map|matrix|proc|" + + "for|continue|not_in|in"; + var cartesian = function () { + var a = []; + for (var _i = 0; _i < arguments.length; _i++) { + a[_i] = arguments[_i]; + } + return a + .reduce(function (a, b) { return a.flatMap(function (d) { return b.map(function (e) { return [d, e].flat(); }); }); }) + .map(function (parts) { return parts.join(""); }); + }; + var builtinTypes = __spreadArray(__spreadArray(__spreadArray(__spreadArray([ + "int", + "uint", + "uintptr", + "typeid", + "rawptr", + "string", + "cstring", + "i8", + "u8", + "any", + "byte", + "rune", + "bool", + "b8", + "b16", + "b32", + "b64" + ], __read(cartesian(["i", "u"], ["16", "32", "64", "128"], ["", "le", "be"])), false), __read(cartesian(["f"], ["16", "32", "64"], ["", "le", "be"])), false), __read(cartesian(["complex"], ["32", "64", "128"])), false), __read(cartesian(["quaternion"], ["64", "128", "256"])), false).join("|"); + var operators = [ + "\\*", + "/", + "%", + "%%", + "<<", + ">>", + "&", + "&~", + "\\+", + "\\-", + "~", + "\\|", + ">", + "<", + "<=", + ">=", + "==", + "!=" + ] + .concat(":") + .map(function (operator) { return operator + "="; }) + .concat("=", ":=", "::", "->", "\\^", "&", ":") + .join("|"); + var builtinFunctions = "new|cap|copy|panic|len|make|delete|append|free"; + var builtinConstants = "nil|true|false"; + var keywordMapper = this.createKeywordMapper({ + keyword: keywords, + "constant.language": builtinConstants, + "support.function": builtinFunctions, + "support.type": builtinTypes + }, ""); + var stringEscapeRe = "\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(/\\h/g, "[a-fA-F\\d]"); + this.$rules = { + start: [ + { + token: "comment", + regex: /\/\/.*$/ + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment.start", // multi line comment + regex: "\\/\\*", + next: "comment" + }, + { + token: "string", // single line + regex: /"(?:[^"\\]|\\.)*?"/ + }, + { + token: "string", // raw + regex: "`", + next: "bqstring" + }, + { + token: "support.constant", + regex: /#[a-z_]+/ + }, + { + token: "constant.numeric", // rune + regex: "'(?:[^\\'\uD800-\uDBFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|" + + stringEscapeRe.replace('"', "") + + ")'" + }, + { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, + { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, + { + token: [ + "entity.name.function", + "text", + "keyword.operator", + "text", + "keyword" + ], + regex: "([a-zA-Z_$][a-zA-Z0-9_$]*)(\\s+)(::)(\\s+)(proc)\\b" + }, + { + token: function (val) { + if (val[val.length - 1] == "(") { + return [ + { + type: keywordMapper(val.slice(0, -1)) || "support.function", + value: val.slice(0, -1) + }, + { + type: "paren.lparen", + value: val.slice(-1) + } + ]; + } + return keywordMapper(val) || "identifier"; + }, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?" + }, + { + token: "keyword.operator", + regex: operators + }, + { + token: "punctuation.operator", + regex: "\\?|\\,|\\;|\\." + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + }, + { + token: "text", + regex: "\\s+" + } + ], + comment: [ + { + token: "comment.end", + regex: "\\*\\/", + next: "start" + }, + { + defaultToken: "comment" + } + ], + bqstring: [ + { + token: "string", + regex: "`", + next: "start" + }, + { + defaultToken: "string" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [ + DocCommentHighlightRules.getEndRule("start") + ]); +}; +oop.inherits(OdinHighlightRules, TextHighlightRules); +exports.OdinHighlightRules = OdinHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/odin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/odin_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var OdinHighlightRules = require("./odin_highlight_rules").OdinHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = OdinHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; //end getNextLineIndent + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/odin"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/odin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-partiql.js b/ui/base1/ace/mode-partiql.js new file mode 100644 index 0000000..a9d7ab1 --- /dev/null +++ b/ui/base1/ace/mode-partiql.js @@ -0,0 +1,750 @@ +define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS GENERATED BY 'ligand' USING 'mode_highlight_rules.js' +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var IonHighlightRules = function () { + var k_keywords_bool = "TRUE|FALSE"; + var k_bool = k_keywords_bool; + var k_keywords_null = "NULL.NULL|NULL.BOOL|NULL.INT|NULL.FLOAT|NULL.DECIMAL|NULL.TIMESTAMP|NULL.STRING|NULL.SYMBOL|NULL.BLOB|NULL.CLOB|" + + "NULL.STRUCT|NULL.LIST|NULL.SEXP|NULL"; + var k_null = k_keywords_null; + var keywordMapper = this.createKeywordMapper({ + "constant.language.bool.ion": k_bool, + "constant.language.null.ion": k_null + }, "constant.other.symbol.identifier.ion", true); + var keywordMapperRule = { + token: keywordMapper, + regex: "\\b\\w+(?:\\.\\w+)?\\b" + }; + this.$rules = { + "start": [ + { + "include": "value" + } + ], + "value": [ + { + "include": "whitespace" + }, + { + "include": "comment" + }, + { + "include": "annotation" + }, + { + "include": "string" + }, + { + "include": "number" + }, + { + "include": "keywords" + }, + { + "include": "symbol" + }, + { + "include": "clob" + }, + { + "include": "blob" + }, + { + "include": "struct" + }, + { + "include": "list" + }, + { + "include": "sexp" + } + ], + "sexp": [ + { + "token": "punctuation.definition.sexp.begin.ion", + "regex": "\\(", + "push": [ + { + "token": "punctuation.definition.sexp.end.ion", + "regex": "\\)", + "next": "pop" + }, + { + "include": "comment" + }, + { + "include": "value" + }, + { + "token": "storage.type.symbol.operator.ion", + "regex": "[\\!\\#\\%\\&\\*\\+\\-\\./\\;\\<\\=\\>\\?\\@\\^\\`\\|\\~]+" + } + ] + } + ], + "comment": [ + { + "token": "comment.line.ion", + "regex": "//[^\\n]*" + }, + { + "token": "comment.block.ion", + "regex": "/\\*", + "push": [ + { + "token": "comment.block.ion", + "regex": "[*]/", + "next": "pop" + }, + { + "token": "comment.block.ion", + "regex": "[^*/]+" + }, + { + "token": "comment.block.ion", + "regex": "[*/]+" + } + ] + } + ], + "list": [ + { + "token": "punctuation.definition.list.begin.ion", + "regex": "\\[", + "push": [ + { + "token": "punctuation.definition.list.end.ion", + "regex": "\\]", + "next": "pop" + }, + { + "include": "comment" + }, + { + "include": "value" + }, + { + "token": "punctuation.definition.list.separator.ion", + "regex": "," + } + ] + } + ], + "struct": [ + { + "token": "punctuation.definition.struct.begin.ion", + "regex": "\\{", + "push": [ + { + "token": "punctuation.definition.struct.end.ion", + "regex": "\\}", + "next": "pop" + }, + { + "include": "comment" + }, + { + "include": "value" + }, + { + "token": "punctuation.definition.struct.separator.ion", + "regex": ",|:" + } + ] + } + ], + "blob": [ + { + "token": [ + "punctuation.definition.blob.begin.ion", + "string.other.blob.ion", + "punctuation.definition.blob.end.ion" + ], + "regex": "(\\{\\{)([^\"]*)(\\}\\})" + } + ], + "clob": [ + { + "token": [ + "punctuation.definition.clob.begin.ion", + "string.other.clob.ion", + "punctuation.definition.clob.end.ion" + ], + "regex": "(\\{\\{)(\"[^\"]*\")(\\}\\})" + } + ], + "symbol": [ + { + "token": "storage.type.symbol.quoted.ion", + "regex": "(['])((?:(?:\\\\')|(?:[^']))*?)(['])" + }, + { + "token": "storage.type.symbol.identifier.ion", + "regex": "[\\$_a-zA-Z][\\$_a-zA-Z0-9]*" + } + ], + "number": [ + { + "token": "constant.numeric.timestamp.ion", + "regex": "\\d{4}(?:-\\d{2})?(?:-\\d{2})?T(?:\\d{2}:\\d{2})(?::\\d{2})?(?:\\.\\d+)?(?:Z|[-+]\\d{2}:\\d{2})?" + }, + { + "token": "constant.numeric.timestamp.ion", + "regex": "\\d{4}-\\d{2}-\\d{2}T?" + }, + { + "token": "constant.numeric.integer.binary.ion", + "regex": "-?0[bB][01](?:_?[01])*" + }, + { + "token": "constant.numeric.integer.hex.ion", + "regex": "-?0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*" + }, + { + "token": "constant.numeric.float.ion", + "regex": "-?(?:0|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?(?:[eE][+-]?\\d+)" + }, + { + "token": "constant.numeric.float.ion", + "regex": "(?:[-+]inf)|(?:nan)" + }, + { + "token": "constant.numeric.decimal.ion", + "regex": "-?(?:0|[1-9](?:_?\\d)*)(?:(?:(?:\\.(?:\\d(?:_?\\d)*)?)(?:[dD][+-]?\\d+)|\\.(?:\\d(?:_?\\d)*)?)|(?:[dD][+-]?\\d+))" + }, + { + "token": "constant.numeric.integer.ion", + "regex": "-?(?:0|[1-9](?:_?\\d)*)" + } + ], + "string": [ + { + "token": [ + "punctuation.definition.string.begin.ion", + "string.quoted.double.ion", + "punctuation.definition.string.end.ion" + ], + "regex": "([\"])((?:(?:\\\\\")|(?:[^\"]))*?)([\"])" + }, + { + "token": "punctuation.definition.string.begin.ion", + "regex": "'{3}", + "push": [ + { + "token": "punctuation.definition.string.end.ion", + "regex": "'{3}", + "next": "pop" + }, + { + "token": "string.quoted.triple.ion", + "regex": "(?:\\\\'|[^'])+" + }, + { + "token": "string.quoted.triple.ion", + "regex": "'" + } + ] + } + ], + "annotation": [ + { + "token": [ + "variable.language.annotation.ion", + "punctuation.definition.annotation.ion" + ], + "regex": /('(?:[^'\\]|\\.)*')\s*(::)/ + }, + { + "token": [ + "variable.language.annotation.ion", + "punctuation.definition.annotation.ion" + ], + "regex": "([\\$_a-zA-Z][\\$_a-zA-Z0-9]*)\\s*(::)" + } + ], + "whitespace": [ + { + "token": "text.ion", + "regex": "\\s+" + } + ] + }; + this.$rules["keywords"] = [keywordMapperRule]; + this.normalizeRules(); +}; +oop.inherits(IonHighlightRules, TextHighlightRules); +exports.IonHighlightRules = IonHighlightRules; + +}); + +define("ace/mode/partiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ion_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS GENERATED BY 'ligand' USING 'mode_highlight_rules.js' +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var IonHighlightRules = require("./ion_highlight_rules").IonHighlightRules; +var PartiqlHighlightRules = function () { + var k_partiql_constant = "MISSING"; + var k_sql_constant = "FALSE|NULL|TRUE"; + var k_constant = k_partiql_constant + "|" + k_sql_constant; + var k_partiql_keyword = "PIVOT|UNPIVOT|LIMIT|TUPLE|REMOVE|INDEX|CONFLICT|DO|NOTHING|RETURNING|" + + "MODIFIED|NEW|OLD|LET"; + var k_sql_keyword = "ABSOLUTE|ACTION|ADD|ALL|ALLOCATE|ALTER|AND|ANY|ARE|AS|" + + "ASC|ASSERTION|AT|AUTHORIZATION|BEGIN|BETWEEN|BIT_LENGTH|BY|CASCADE|CASCADED|" + + "CASE|CATALOG|CHAR|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CLOSE|COLLATE|COLLATION|COLUMN|" + + "COMMIT|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONTINUE|CONVERT|CORRESPONDING|CREATE|CROSS|" + + "CURRENT|CURSOR|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DESC|" + + "DESCRIBE|DESCRIPTOR|DIAGNOSTICS|DISCONNECT|DISTINCT|DOMAIN|DROP|ELSE|END|END-EXEC|" + + "ESCAPE|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXTERNAL|EXTRACT|FETCH|FIRST|FOR|" + + "FOREIGN|FOUND|FROM|FULL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|" + + "HAVING|IDENTITY|IMMEDIATE|IN|INDICATOR|INITIALLY|INNER|INPUT|INSENSITIVE|INSERT|" + + "INTERSECT|INTERVAL|INTO|IS|ISOLATION|JOIN|KEY|LANGUAGE|LAST|LEFT|" + + "LEVEL|LIKE|LOCAL|LOWER|MATCH|MODULE|NAMES|NATIONAL|NATURAL|NCHAR|" + + "NEXT|NO|NOT|OCTET_LENGTH|OF|ON|ONLY|OPEN|OPTION|OR|" + + "ORDER|OUTER|OUTPUT|OVERLAPS|PAD|PARTIAL|POSITION|PRECISION|PREPARE|PRESERVE|" + + "PRIMARY|PRIOR|PRIVILEGES|PROCEDURE|PUBLIC|READ|REAL|REFERENCES|RELATIVE|RESTRICT|" + + "REVOKE|RIGHT|ROLLBACK|ROWS|SCHEMA|SCROLL|SECTION|SELECT|SESSION|SET|" + + "SIZE|SOME|SPACE|SQL|SQLCODE|SQLERROR|SQLSTATE|TABLE|TEMPORARY|THEN|" + + "TIME|TO|TRANSACTION|TRANSLATE|TRANSLATION|UNION|UNIQUE|UNKNOWN|UPDATE|UPPER|" + + "USAGE|USER|USING|VALUE|VALUES|VIEW|WHEN|WHENEVER|WHERE|WITH|" + + "WORK|WRITE|ZONE"; + var k_keyword = k_partiql_keyword + "|" + k_sql_keyword; + var k_partiql_type = "BOOL|BOOLEAN|STRING|SYMBOL|CLOB|BLOB|STRUCT|LIST|SEXP|BAG"; + var k_sql_type = "CHARACTER|DATE|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|NUMERIC|SMALLINT|TIMESTAMP|" + + "VARCHAR|VARYING"; + var k_type = k_partiql_type + "|" + k_sql_type; + var k_sql_aggfn = "AVG|COUNT|MAX|MIN|SUM"; + var k_aggfn = k_sql_aggfn; + var k_sql_fn = "CAST|COALESCE|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|EXISTS|DATE_ADD|DATE_DIFF|NULLIF|" + + "SESSION_USER|SUBSTRING|SYSTEM_USER|TRIM"; + var k_fn = k_sql_fn; + var keywordMapper = this.createKeywordMapper({ + "constant.language.partiql": k_constant, + "keyword.other.partiql": k_keyword, + "storage.type.partiql": k_type, + "support.function.aggregation.partiql": k_aggfn, + "support.function.partiql": k_fn + }, "variable.language.identifier.partiql", true); + var keywordMapperRule = { + token: keywordMapper, + regex: "\\b\\w+\\b" + }; + this.$rules = { + "start": [ + { + "include": "whitespace" + }, + { + "include": "comment" + }, + { + "include": "value" + } + ], + "value": [ + { + "include": "whitespace" + }, + { + "include": "comment" + }, + { + "include": "tuple_value" + }, + { + "include": "collection_value" + }, + { + "include": "scalar_value" + } + ], + "scalar_value": [ + { + "include": "string" + }, + { + "include": "number" + }, + { + "include": "keywords" + }, + { + "include": "identifier" + }, + { + "include": "embed-ion" + }, + { + "include": "operator" + }, + { + "include": "punctuation" + } + ], + "punctuation": [ + { + "token": "punctuation.partiql", + "regex": "[;:()\\[\\]\\{\\},.]" + } + ], + "operator": [ + { + "token": "keyword.operator.partiql", + "regex": "[+*/<>=~!@#%&|?^-]+" + } + ], + "identifier": [ + { + "token": "variable.language.identifier.quoted.partiql", + "regex": "([\"])((?:(?:\\\\.)|(?:[^\"\\\\]))*?)([\"])" + }, + { + "token": "variable.language.identifier.at.partiql", + "regex": "@\\w+" + }, + { + "token": "variable.language.identifier.partiql", + "regex": "\\b\\w+(?:\\.\\w+)?\\b" + } + ], + "number": [ + { + "token": "constant.numeric.partiql", + "regex": "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + } + ], + "string": [ + { + "token": [ + "punctuation.definition.string.begin.partiql", + "string.quoted.single.partiql", + "punctuation.definition.string.end.partiql" + ], + "regex": "(['])((?:(?:\\\\.)|(?:[^'\\\\]))*?)(['])" + } + ], + "collection_value": [ + { + "include": "array_value" + }, + { + "include": "bag_value" + } + ], + "bag_value": [ + { + "token": "punctuation.definition.bag.begin.partiql", + "regex": "<<", + "push": [ + { + "token": "punctuation.definition.bag.end.partiql", + "regex": ">>", + "next": "pop" + }, + { + "include": "comment" + }, + { + "token": "punctuation.definition.bag.separator.partiql", + "regex": "," + }, + { + "include": "value" + } + ] + } + ], + "comment": [ + { + "token": "comment.line.partiql", + "regex": "--.*" + }, + { + "token": "comment.block.partiql", + "regex": "/\\*", + "push": "comment__1" + } + ], + "comment__1": [ + { + "token": "comment.block.partiql", + "regex": "[*]/", + "next": "pop" + }, + { + "token": "comment.block.partiql", + "regex": "[^*/]+" + }, + { + "token": "comment.block.partiql", + "regex": "/\\*", + "push": "comment__1" + }, + { + "token": "comment.block.partiql", + "regex": "[*/]+" + } + ], + "array_value": [ + { + "token": "punctuation.definition.array.begin.partiql", + "regex": "\\[", + "push": [ + { + "token": "punctuation.definition.array.end.partiql", + "regex": "\\]", + "next": "pop" + }, + { + "include": "comment" + }, + { + "token": "punctuation.definition.array.separator.partiql", + "regex": "," + }, + { + "include": "value" + } + ] + } + ], + "tuple_value": [ + { + "token": "punctuation.definition.tuple.begin.partiql", + "regex": "\\{", + "push": [ + { + "token": "punctuation.definition.tuple.end.partiql", + "regex": "\\}", + "next": "pop" + }, + { + "include": "comment" + }, + { + "token": "punctuation.definition.tuple.separator.partiql", + "regex": ",|:" + }, + { + "include": "value" + } + ] + } + ], + "whitespace": [ + { + "token": "text.partiql", + "regex": "\\s+" + } + ] + }; + this.$rules["keywords"] = [keywordMapperRule]; + this.$rules["embed-ion"] = [{ token: "punctuation.definition.ion.begin.partiql", regex: "`", next: "ion-start" }]; + this.embedRules(IonHighlightRules, "ion-", [{ token: "punctuation.definition.ion.end.partiql", regex: "`", next: "start" }]); + this.normalizeRules(); +}; +oop.inherits(PartiqlHighlightRules, TextHighlightRules); +exports.PartiqlHighlightRules = PartiqlHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/partiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/partiql_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS GENERATED BY 'ligand' USING 'mode.js' +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./partiql_highlight_rules").PartiqlHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { + start: "/*", + end: "*/", + nestable: true + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/partiql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/partiql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-pascal.js b/ui/base1/ace/mode-pascal.js new file mode 100644 index 0000000..6cda957 --- /dev/null +++ b/ui/base1/ace/mode-pascal.js @@ -0,0 +1,204 @@ +define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PascalHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword.control": "absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class" + + "|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization" + + "|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is" + + "|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private" + + "|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr" + + "|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor" + }, "identifier", true); + this.$rules = { + start: [{ + caseInsensitive: true, + token: ['variable', "text", + 'storage.type.prototype', + 'entity.name.function.prototype' + ], + regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' + }, { + caseInsensitive: true, + token: ['variable', "text", 'storage.type.function', 'entity.name.function'], + regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' + }, { + caseInsensitive: true, + token: keywordMapper, + regex: /\b[a-z_]+\b/ + }, { + token: 'constant.numeric', + regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' + }, { + token: 'punctuation.definition.comment', + regex: '--.*$' + }, { + token: 'punctuation.definition.comment', + regex: '//.*$' + }, { + token: 'punctuation.definition.comment', + regex: '\\(\\*', + push: [{ + token: 'punctuation.definition.comment', + regex: '\\*\\)', + next: 'pop' + }, + { defaultToken: 'comment.block.one' } + ] + }, { + token: 'punctuation.definition.comment', + regex: '\\{', + push: [{ + token: 'punctuation.definition.comment', + regex: '\\}', + next: 'pop' + }, + { defaultToken: 'comment.block.two' } + ] + }, { + token: 'punctuation.definition.string.begin', + regex: '"', + push: [{ token: 'constant.character.escape', regex: '\\\\.' }, + { + token: 'punctuation.definition.string.end', + regex: '"', + next: 'pop' + }, + { defaultToken: 'string.quoted.double' } + ] + }, { + token: 'punctuation.definition.string.begin', + regex: '\'', + push: [{ + token: 'constant.character.escape.apostrophe', + regex: '\'\'' + }, + { + token: 'punctuation.definition.string.end', + regex: '\'', + next: 'pop' + }, + { defaultToken: 'string.quoted.single' } + ] + }, { + token: 'keyword.operator', + regex: '[+\\-;,/*%]|:=|=' + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(PascalHighlightRules, TextHighlightRules); +exports.PascalHighlightRules = PascalHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = PascalHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["--", "//"]; + this.blockComment = [ + { start: "(*", end: "*)" }, + { start: "{", end: "}" } + ]; + this.$id = "ace/mode/pascal"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/pascal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-perl.js b/ui/base1/ace/mode-perl.js new file mode 100644 index 0000000..8d39aa4 --- /dev/null +++ b/ui/base1/ace/mode-perl.js @@ -0,0 +1,318 @@ +define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PerlHighlightRules = function () { + var keywords = ("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" + + "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"); + var buildinConstants = ("ARGV|ENV|INC|SIG"); + var builtinFunctions = ("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" + + "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" + + "getpeername|setpriority|getprotoent|setprotoent|getpriority|" + + "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" + + "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" + + "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" + + "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" + + "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" + + "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" + + "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" + + "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" + + "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" + + "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" + + "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" + + "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" + + "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" + + "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" + + "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" + + "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" + + "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" + + "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" + + "map|die|uc|lc|do"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": builtinFunctions + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment.doc", + regex: "^=(?:begin|item)\\b", + next: "block_comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", // hex + regex: "0x[0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)" + }, { + token: "comment", + regex: "#.*$" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "block_comment": [ + { + token: "comment.doc", + regex: "^=cut\\b", + next: "start" + }, + { + defaultToken: "comment.doc" + } + ] + }; +}; +oop.inherits(PerlHighlightRules, TextHighlightRules); +exports.PerlHighlightRules = PerlHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = PerlHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode({ start: "^=(begin|item)\\b", end: "^=(cut)\\b" }); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = [ + { start: "=begin", end: "=cut", lineStartOnly: true }, + { start: "=item", end: "=cut", lineStartOnly: true } + ]; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/perl"; + this.snippetFileId = "ace/snippets/perl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/perl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-pgsql.js b/ui/base1/ace/mode-pgsql.js new file mode 100644 index 0000000..9776fb8 --- /dev/null +++ b/ui/base1/ace/mode-pgsql.js @@ -0,0 +1,1860 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PerlHighlightRules = function () { + var keywords = ("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" + + "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"); + var buildinConstants = ("ARGV|ENV|INC|SIG"); + var builtinFunctions = ("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" + + "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" + + "getpeername|setpriority|getprotoent|setprotoent|getpriority|" + + "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" + + "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" + + "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" + + "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" + + "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" + + "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" + + "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" + + "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" + + "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" + + "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" + + "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" + + "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" + + "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" + + "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" + + "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" + + "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" + + "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" + + "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" + + "map|die|uc|lc|do"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": builtinFunctions + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment.doc", + regex: "^=(?:begin|item)\\b", + next: "block_comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", // hex + regex: "0x[0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)" + }, { + token: "comment", + regex: "#.*$" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "block_comment": [ + { + token: "comment.doc", + regex: "^=cut\\b", + next: "start" + }, + { + defaultToken: "comment.doc" + } + ] + }; +}; +oop.inherits(PerlHighlightRules, TextHighlightRules); +exports.PerlHighlightRules = PerlHighlightRules; + +}); + +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * TODO: python delimiters + */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PythonHighlightRules = function () { + var keywords = ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield|async|await|nonlocal"); + var builtinConstants = ("True|False|None|NotImplemented|Ellipsis|__debug__"); + var builtinFunctions = ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes"); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "variable.language": "self|cls", + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + this.$rules = { + "start": [{ + token: "comment", + regex: "#.*$" + }, { + token: "string", // multi line """ string start + regex: strPre + '"{3}', + next: "qqstring3" + }, { + token: "string", // " string + regex: strPre + '"(?=.)', + next: "qqstring" + }, { + token: "string", // multi line ''' string start + regex: strPre + "'{3}", + next: "qstring3" + }, { + token: "string", // ' string + regex: strPre + "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" + }, { + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" + }, { + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" + }, { + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" + }, { + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" + }, { + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" + }, { + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" + }, { + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + }, { + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" + }, { + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" + }, { + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" + }, { + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: ["keyword", "text", "entity.name.function"], + regex: "(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{ + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'[^']*'" + }, { + token: "string", + regex: '"[^"]*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + }, { + token: 'paren.rparen', + regex: "}", + next: 'pop' + }, { + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"], // method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; +oop.inherits(PythonHighlightRules, TextHighlightRules); +exports.PythonHighlightRules = PythonHighlightRules; + +}); + +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "variable", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "text", // single quoted strings are not allowed + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "comment", // comments are not allowed, but who cares? + regex: "\\/\\/.*$" + }, { + token: "comment.start", // comments are not allowed, but who cares? + regex: "\\/\\*", + next: "comment" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "punctuation.operator", + regex: /[,]/ + }, { + token: "text", + regex: "\\s+" + } + ], + "string": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + } + ], + "comment": [ + { + token: "comment.end", // comments are not allowed, but who cares? + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; +}; +oop.inherits(JsonHighlightRules, TextHighlightRules); +exports.JsonHighlightRules = JsonHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules; +var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; +var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var PgsqlHighlightRules = function () { + var keywords = ("abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" + + "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|" + + "assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|" + + "bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" + + "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" + + "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" + + "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" + + "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" + + "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" + + "date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|" + + "definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|" + + "domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|" + + "except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|" + + "family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|" + + "freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|" + + "having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|" + + "increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|" + + "insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|" + + "internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|" + + "language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|" + + "like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|" + + "mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|" + + "national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|" + + "numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|" + + "options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|" + + "password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|" + + "pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|" + + "preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|" + + "reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|" + + "regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|" + + "reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|" + + "right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|" + + "sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|" + + "simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|" + + "stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|" + + "template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|" + + "transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|" + + "txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" + + "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" + + "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" + + "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" + + "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone|ties"); + var builtinFunctions = ("RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" + + "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" + + "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" + + "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" + + "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|" + + "aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|" + + "anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|" + + "anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|" + + "anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|" + + "array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|" + + "array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|" + + "array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|" + + "array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|" + + "arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|" + + "ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|" + + "bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|" + + "bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|" + + "bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|" + + "boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|" + + "box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|" + + "box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|" + + "box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|" + + "box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|" + + "bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|" + + "bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|" + + "bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|" + + "bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|" + + "btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|" + + "btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|" + + "btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|" + + "btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|" + + "btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|" + + "btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|" + + "btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|" + + "bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|" + + "bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|" + + "byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|" + + "cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|" + + "cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|" + + "cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|" + + "cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|" + + "charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|" + + "cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|" + + "circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|" + + "circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|" + + "circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|" + + "circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|" + + "circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|" + + "close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|" + + "contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|" + + "covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|" + + "current_query|current_schema|current_schemas|current_setting|current_user|currtid|" + + "currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|" + + "database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|" + + "date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|" + + "date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|" + + "date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|" + + "date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|" + + "date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|" + + "date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|" + + "daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|" + + "dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|" + + "dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|" + + "dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|" + + "dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|" + + "enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|" + + "enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|" + + "euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|" + + "euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|" + + "euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|" + + "family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|" + + "float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|" + + "float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|" + + "float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|" + + "float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|" + + "float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|" + + "float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|" + + "float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|" + + "float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|" + + "float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|" + + "float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|" + + "float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|" + + "fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|" + + "gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|" + + "get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|" + + "gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|" + + "ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|" + + "gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|" + + "ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|" + + "gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|" + + "gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|" + + "gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|" + + "gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|" + + "gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|" + + "gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|" + + "gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|" + + "gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|" + + "gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|" + + "gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" + + "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" + + "has_function_privilege|has_language_privilege|has_schema_privilege|" + + "has_sequence_privilege|has_server_privilege|has_table_privilege|" + + "has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|" + + "hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|" + + "hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|" + + "hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|" + + "hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|" + + "hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|" + + "icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|" + + "inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|" + + "inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|" + + "initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|" + + "int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|" + + "int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|" + + "int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|" + + "int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|" + + "int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|" + + "int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|" + + "int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|" + + "int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|" + + "int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|" + + "int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|" + + "int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|" + + "int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|" + + "int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|" + + "int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|" + + "int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|" + + "int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|" + + "int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|" + + "internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|" + + "interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|" + + "interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|" + + "interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|" + + "interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|" + + "interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|" + + "ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|" + + "iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|" + + "json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|" + + "json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|" + + "json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|" + + "json_object_field|json_object_field_text|json_object_keys|json_out|" + + "json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|" + + "justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|" + + "koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|" + + "language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|" + + "latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|" + + "line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|" + + "line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|" + + "lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|" + + "lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|" + + "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" + + "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" + + "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|" + + "macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|" + + "macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|" + + "mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|" + + "mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|" + + "mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|" + + "name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|" + + "namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|" + + "neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|" + + "network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|" + + "nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|" + + "numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|" + + "numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|" + + "numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|" + + "numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|" + + "numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|" + + "numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|" + + "numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|" + + "octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|" + + "oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|" + + "oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|" + + "on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|" + + "path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|" + + "path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|" + + "path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" + + "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" + + "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" + + "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" + + "pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|" + + "pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|" + + "pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" + + "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" + + "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" + + "pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|" + + "pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|" + + "pg_get_function_arguments|pg_get_function_identity_arguments|" + + "pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|" + + "pg_get_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|" + + "pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|" + + "pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" + + "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" + + "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" + + "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" + + "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" + + "pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|" + + "pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|" + + "pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|" + + "pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|" + + "pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|" + + "pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|" + + "pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|" + + "pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|" + + "pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|" + + "pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|" + + "pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|" + + "pg_stat_get_bgwriter_buf_written_checkpoints|" + + "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" + + "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" + + "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" + + "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" + + "pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|" + + "pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|" + + "pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|" + + "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" + + "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" + + "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" + + "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|" + + "pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|" + + "pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|" + + "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" + + "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" + + "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" + + "pg_stat_get_function_calls|pg_stat_get_function_self_time|" + + "pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|" + + "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" + + "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" + + "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" + + "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" + + "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" + + "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" + + "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" + + "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|" + + "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" + + "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" + + "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" + + "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" + + "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" + + "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" + + "pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|" + + "pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|" + + "pg_trigger_depth|pg_try_advisory_lock|pg_try_advisory_lock_shared|" + + "pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|" + + "pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|" + + "pg_type_is_visible|pg_typeof|pg_xlog_location_diff|pg_xlog_replay_pause|" + + "pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|" + + "plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|" + + "point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|" + + "point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|" + + "poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|" + + "poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|" + + "poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|" + + "polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|" + + "prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|" + + "pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|" + + "querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|" + + "range_after|range_before|range_cmp|range_contained_by|range_contains|" + + "range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|" + + "range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|" + + "range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|" + + "range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|" + + "range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|" + + "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" + + "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" + + "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" + + "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" + + "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" + + "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" + + "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" + + "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" + + "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" + + "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" + + "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|" + + "rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" + + "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" + + "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" + + "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" + + "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" + + "smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|" + + "spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|" + + "spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|" + + "spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|" + + "spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|" + + "spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|" + + "spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|" + + "spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|" + + "statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|" + + "string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" + + "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" + + "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" + + "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" + + "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" + + "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" + + "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" + + "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" + + "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" + + "time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" + + "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" + + "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" + + "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" + + "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" + + "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" + + "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" + + "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" + + "timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|" + + "timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|" + + "timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" + + "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" + + "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" + + "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" + + "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" + + "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" + + "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" + + "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" + + "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" + + "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" + + "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" + + "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" + + "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" + + "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" + + "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" + + "to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" + + "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" + + "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" + + "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" + + "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" + + "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|" + + "tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|" + + "tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|" + + "tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|" + + "txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|" + + "txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|" + + "txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|" + + "unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|" + + "utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|" + + "utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|" + + "utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|" + + "utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|" + + "uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|" + + "varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" + + "varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|" + + "varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|" + + "void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|" + + "win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|" + + "win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|" + + "xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|" + + "xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|" + + "xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords + }, "identifier", true); + var sqlRules = [{ + token: "string", // single line string -- assume dollar strings if multi-line for now + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "variable.language", // pg identifier + regex: '".*?"' + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers + }, { + token: "keyword.operator", + regex: "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" + + "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" + + "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" + + "~=|~>=~|~>~|~~|~~\\*" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + } + ]; + this.$rules = { + "start": [{ + token: "comment", + regex: "--.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi-line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "keyword.statementBegin", + regex: "[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. + next: "statement" + }, { + token: "support.buildin", // psql directive + regex: "^\\\\[\\S]+.*$" + } + ], + "statement": [{ + token: "comment", + regex: "--.*$" + }, { + token: "comment", // multi-line comment + regex: "\\/\\*", + next: "commentStatement" + }, { + token: "statementEnd", + regex: ";", + next: "start" + }, { + token: "string", + regex: "\\$perl\\$", + next: "perl-start" + }, { + token: "string", + regex: "\\$python\\$", + next: "python-start" + }, { + token: "string", + regex: "\\$json\\$", + next: "json-start" + }, { + token: "string", + regex: "\\$(js|javascript)\\$", + next: "javascript-start" + }, { + token: "string", + regex: "\\$\\$$", + next: "dollarSql" + }, { + token: "string", + regex: "\\$[\\w_0-9]*\\$", + next: "dollarStatementString" + } + ].concat(sqlRules), + "dollarSql": [{ + token: "comment", + regex: "--.*$" + }, { + token: "comment", // multi-line comment + regex: "\\/\\*", + next: "commentDollarSql" + }, { + token: ["keyword", "statementEnd", "text", "string"], // end quoting with dollar at the start of a line + regex: "(^|END)(;)?(\\s*)(\\$\\$)", + next: "statement" + }, { + token: "string", + regex: "\\$[\\w_0-9]*\\$", + next: "dollarSqlString" + } + ].concat(sqlRules), + "comment": [{ + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "commentStatement": [{ + token: "comment", // closing comment + regex: "\\*\\/", + next: "statement" + }, { + defaultToken: "comment" + } + ], + "commentDollarSql": [{ + token: "comment", // closing comment + regex: "\\*\\/", + next: "dollarSql" + }, { + defaultToken: "comment" + } + ], + "dollarStatementString": [{ + token: "string", // closing dollarstring + regex: ".*?\\$[\\w_0-9]*\\$", + next: "statement" + }, { + token: "string", // dollarstring spanning whole line + regex: ".+" + } + ], + "dollarSqlString": [{ + token: "string", // closing dollarstring + regex: ".*?\\$[\\w_0-9]*\\$", + next: "dollarSql" + }, { + token: "string", // dollarstring spanning whole line + regex: ".+" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.embedRules(PerlHighlightRules, "perl-", [{ token: "string", regex: "\\$perl\\$", next: "statement" }]); + this.embedRules(PythonHighlightRules, "python-", [{ token: "string", regex: "\\$python\\$", next: "statement" }]); + this.embedRules(JsonHighlightRules, "json-", [{ token: "string", regex: "\\$json\\$", next: "statement" }]); + this.embedRules(JavaScriptHighlightRules, "javascript-", [{ token: "string", regex: "\\$(js|javascript)\\$", next: "statement" }]); +}; +oop.inherits(PgsqlHighlightRules, TextHighlightRules); +exports.PgsqlHighlightRules = PgsqlHighlightRules; + +}); + +define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("../mode/text").Mode; +var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules; +var Mode = function () { + this.HighlightRules = PgsqlHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + if (state == "start" || state == "keyword.statementEnd") { + return ""; + } + else { + return this.$getIndent(line); // Keep whatever indent the previous line has + } + }; + this.$id = "ace/mode/pgsql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/pgsql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-php.js b/ui/base1/ace/mode-php.js new file mode 100644 index 0000000..f9f044b --- /dev/null +++ b/ui/base1/ace/mode-php.js @@ -0,0 +1,14071 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var PhpLangHighlightRules = function () { + var docComment = DocCommentHighlightRules; + var builtinFunctions = lang.arrayToMap('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|\ +aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|\ +apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|\ +apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|\ +apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|\ +apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|\ +apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|\ +apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_column|array_combine|\ +array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|\ +array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|\ +array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|\ +array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|\ +array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|\ +array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|\ +atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|\ +bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|\ +bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|\ +bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|\ +bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|\ +bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|\ +cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|\ +cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|\ +cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|\ +cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|\ +cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|\ +cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|\ +cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|\ +cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|\ +cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|\ +cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|\ +cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|\ +cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|\ +cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|\ +cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|\ +cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|\ +cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|\ +cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|\ +cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|\ +cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|\ +cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|\ +cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|\ +cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|\ +cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|\ +cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|\ +cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|\ +cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|\ +cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|\ +cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|\ +chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|\ +class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|\ +classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|\ +com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|\ +com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|\ +convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|\ +counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|\ +crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|\ +ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|\ +cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|\ +cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|\ +cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|\ +cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|\ +cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|\ +cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|\ +cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|\ +cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|\ +cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|\ +cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|\ +cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|\ +curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|\ +curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|\ +curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|\ +date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|\ +date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|\ +date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|\ +dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|\ +db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|\ +db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|\ +db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|\ +db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|\ +db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|\ +db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|\ +dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|\ +dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|\ +dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|\ +dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|\ +dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|\ +dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|\ +dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|\ +dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|\ +dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|\ +define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|\ +dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|\ +dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|\ +domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|\ +domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|\ +domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|\ +domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|\ +domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|\ +domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|\ +domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|\ +domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|\ +domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|\ +domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|\ +domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|\ +domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|\ +domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|\ +domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|\ +domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|\ +domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|\ +domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|\ +enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|\ +enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|\ +enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|\ +enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|\ +eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|\ +event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|\ +event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|\ +event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|\ +event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|\ +expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|\ +fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|\ +fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|\ +fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|\ +fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|\ +fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|\ +fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|\ +fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|\ +fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|\ +fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|\ +fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|\ +fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|\ +fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|\ +fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|\ +file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|\ +filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|\ +filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|\ +finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|\ +forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|\ +ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|\ +ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|\ +ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|\ +func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|\ +gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|\ +geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|\ +geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|\ +get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|\ +get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|\ +get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|\ +get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|\ +getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|\ +gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|\ +getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|\ +getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|\ +gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|\ +gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|\ +gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|\ +gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|\ +gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|\ +gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|\ +gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|\ +grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|\ +gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|\ +gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|\ +gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|\ +gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|\ +gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|\ +gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|\ +gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|\ +gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|\ +gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|\ +gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|\ +halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|\ +haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|\ +harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|\ +harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|\ +harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|\ +harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|\ +harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|\ +harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|\ +harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|\ +harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|\ +haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|\ +harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|\ +harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|\ +haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|\ +haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|\ +harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|\ +harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|\ +harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|\ +harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|\ +harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|\ +harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|\ +harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|\ +harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|\ +harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|\ +harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|\ +harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|\ +harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|\ +harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|\ +harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|\ +hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|\ +header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|\ +html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|\ +http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|\ +http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|\ +http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|\ +http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|\ +http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|\ +http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|\ +http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|\ +http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|\ +httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|\ +httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|\ +httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|\ +httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|\ +httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|\ +httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|\ +httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|\ +httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|\ +httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|\ +httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|\ +httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|\ +httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|\ +httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|\ +httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|\ +httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|\ +httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|\ +httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|\ +httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|\ +httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|\ +httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|\ +httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|\ +httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|\ +httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|\ +httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|\ +httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|\ +httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|\ +httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|\ +httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|\ +httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|\ +hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|\ +hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|\ +hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|\ +hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|\ +hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|\ +hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|\ +hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|\ +hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|\ +hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|\ +hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|\ +hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|\ +hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|\ +hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|\ +hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|\ +ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|\ +ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|\ +ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|\ +ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|\ +ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|\ +ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|\ +ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|\ +iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|\ +id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|\ +idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|\ +ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|\ +ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|\ +ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|\ +ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|\ +iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|\ +iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|\ +iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|\ +imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|\ +imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|\ +imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|\ +imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|\ +imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|\ +imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|\ +imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|\ +imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|\ +imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|\ +imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|\ +imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|\ +imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|\ +imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|\ +imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|\ +imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|\ +imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|\ +imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|\ +imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|\ +imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|\ +imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|\ +imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|\ +imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|\ +imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|\ +imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|\ +imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|\ +imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|\ +imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|\ +imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|\ +imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|\ +imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|\ +imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|\ +imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|\ +imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|\ +imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|\ +imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|\ +imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|\ +imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|\ +imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|\ +imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|\ +imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|\ +imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|\ +imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|\ +imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|\ +imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|\ +imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|\ +imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|\ +imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|\ +imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|\ +imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|\ +imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|\ +imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|\ +imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|\ +imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|\ +imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|\ +imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|\ +imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|\ +imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|\ +imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|\ +imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|\ +imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|\ +imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|\ +imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|\ +imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|\ +imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|\ +imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|\ +imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|\ +imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|\ +imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|\ +imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|\ +imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|\ +imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|\ +imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|\ +imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|\ +imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|\ +imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|\ +imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|\ +imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|\ +imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|\ +imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|\ +imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|\ +imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|\ +imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|\ +imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|\ +imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|\ +imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|\ +imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|\ +imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|\ +imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|\ +imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|\ +imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|\ +imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|\ +imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|\ +imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|\ +imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|\ +imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|\ +imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|\ +imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|\ +imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|\ +imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|\ +imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|\ +imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|\ +imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|\ +imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|\ +imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|\ +imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|\ +imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|\ +imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|\ +imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|\ +imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|\ +imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|\ +include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|\ +ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|\ +ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|\ +ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|\ +ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|\ +ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|\ +inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|\ +intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|\ +is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|\ +is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|\ +iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|\ +iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|\ +jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|\ +json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|\ +kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|\ +kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|\ +ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|\ +ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|\ +ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|\ +ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|\ +ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|\ +libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|\ +limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|\ +lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|\ +m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|\ +m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|\ +m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|\ +m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|\ +mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|\ +mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|\ +mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|\ +maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|\ +maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|\ +maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|\ +maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|\ +maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|\ +maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|\ +maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|\ +maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|\ +maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|\ +maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|\ +maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|\ +maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|\ +maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|\ +maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|\ +maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|\ +mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|\ +mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|\ +mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|\ +mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|\ +mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|\ +mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|\ +mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|\ +mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|\ +mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|\ +mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|\ +mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|\ +mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|\ +mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|\ +mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|\ +mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|\ +ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|\ +mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|\ +mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|\ +mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|\ +mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|\ +mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|\ +msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|\ +msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|\ +msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|\ +msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|\ +msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|\ +msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|\ +msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|\ +mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|\ +mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|\ +mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|\ +mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|\ +mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|\ +mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|\ +mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|\ +mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|\ +mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|\ +mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|\ +mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|\ +mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|\ +mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|\ +mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|\ +mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|\ +mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|\ +mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|\ +mysqli_free_result|mysqli_get_charset|mysqli_get_client_info|mysqli_get_client_stats|mysqli_get_client_version|mysqli_get_connection_stats|\ +mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|\ +mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|\ +mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|\ +mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|\ +mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|\ +mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|\ +mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|\ +mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|\ +mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|\ +mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|\ +mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|\ +mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|\ +mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|\ +mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|\ +ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|\ +ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|\ +ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|\ +ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|\ +ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|\ +ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|\ +ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|\ +ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|\ +ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|\ +ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|\ +ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|\ +ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|\ +ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|\ +ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|\ +ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|\ +ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|\ +ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|\ +ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|\ +ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|\ +ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|\ +ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|\ +ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|\ +newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|\ +newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|\ +newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|\ +newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|\ +newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|\ +newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|\ +newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|\ +newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|\ +newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|\ +newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|\ +newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|\ +newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|\ +newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|\ +newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|\ +newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|\ +newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|\ +newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|\ +newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|\ +newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|\ +notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|\ +notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|\ +numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|\ +ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|\ +ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|\ +oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|\ +oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|\ +oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|\ +oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|\ +oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|\ +oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|\ +oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|\ +oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|\ +oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|\ +ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|\ +ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|\ +ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|\ +ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|\ +ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|\ +octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|\ +odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|\ +odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|\ +odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|\ +odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|\ +odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|\ +openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|\ +openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|\ +openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|\ +openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|\ +openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|\ +openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|\ +openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|\ +openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|\ +openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|\ +openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|\ +openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|\ +outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|\ +ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|\ +ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|\ +ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|\ +parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|\ +pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|\ +pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|\ +pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|\ +pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|\ +pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|\ +pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|\ +pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|\ +pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|\ +pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|\ +pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|\ +pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|\ +pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|\ +pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|\ +pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|\ +pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|\ +pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|\ +pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|\ +pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|\ +pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|\ +pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|\ +pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|\ +pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|\ +pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|\ +pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|\ +pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|\ +pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|\ +pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|\ +pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|\ +pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|\ +pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|\ +pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|\ +pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|\ +pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|\ +pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|\ +pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|\ +php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|\ +png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|\ +posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|\ +posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|\ +posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|\ +preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|\ +printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|\ +printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|\ +printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|\ +printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|\ +printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|\ +ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|\ +ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|\ +ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|\ +ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|\ +ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|\ +ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|\ +ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|\ +ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|\ +ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|\ +pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|\ +pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|\ +pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|\ +px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|\ +px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|\ +px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|\ +radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|\ +radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|\ +radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|\ +radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|\ +rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|\ +readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|\ +readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|\ +readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|\ +recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|\ +recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|\ +reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|\ +regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|\ +resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|\ +rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|\ +rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|\ +runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|\ +runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|\ +runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|\ +runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|\ +samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|\ +samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|\ +sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|\ +sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|\ +sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|\ +sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|\ +sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|\ +sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|\ +sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|\ +sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|\ +sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|\ +sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|\ +sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|\ +sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|\ +sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|\ +sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|\ +sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|\ +sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|\ +sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|\ +sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|\ +sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|\ +sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|\ +session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|\ +session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|\ +session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|\ +session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|\ +set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|\ +setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|\ +shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|\ +similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|\ +snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|\ +snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|\ +snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|\ +soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|\ +socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|\ +socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|\ +socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|\ +solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|\ +solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|\ +solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|\ +spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|\ +splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|\ +splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|\ +sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|\ +sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|\ +sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|\ +sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|\ +sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|\ +sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|\ +ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|\ +ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|\ +ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|\ +ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|\ +stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|\ +stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|\ +stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|\ +stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|\ +stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|\ +stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|\ +stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|\ +stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|\ +stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|\ +stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|\ +stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|\ +stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|\ +str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|\ +stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|\ +stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|\ +stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|\ +stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|\ +stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|\ +stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|\ +stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|\ +stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|\ +stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|\ +strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|\ +svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|\ +svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|\ +svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|\ +svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|\ +svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|\ +svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|\ +swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|\ +swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|\ +swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|\ +swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|\ +swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|\ +swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|\ +swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|\ +swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|\ +swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|\ +swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|\ +swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|\ +swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|\ +swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|\ +sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|\ +sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|\ +sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|\ +sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|\ +tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|\ +tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|\ +time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|\ +timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|\ +tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|\ +ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|\ +udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|\ +udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|\ +uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|\ +urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|\ +variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|\ +variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|\ +variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|\ +vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|\ +vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|\ +vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|\ +w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|\ +wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|\ +win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|\ +win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|\ +wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|\ +wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|\ +wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|\ +wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|\ +xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|\ +xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|\ +xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|\ +xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|\ +xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|\ +xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|\ +xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|\ +xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|\ +xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|\ +xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|\ +xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|\ +xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|\ +xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|\ +xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|\ +xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|\ +xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|\ +xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|\ +xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|\ +xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|\ +xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|\ +xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|\ +xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|\ +yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|\ +yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|\ +yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|\ +yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|\ +zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|\ +ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|\ +ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|\ +ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|\ +ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|\ +ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|\ +ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type'.split('|')); + var keywords = lang.arrayToMap('abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|\ +endif|endswitch|endwhile|extends|final|finally|for|foreach|function|global|goto|if|implements|instanceof|insteadof|interface|namespace|new|or|private|protected|\ +public|static|switch|throw|trait|try|use|var|while|xor|yield'.split('|')); + var languageConstructs = lang.arrayToMap(('__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|')); + var builtinConstants = lang.arrayToMap(('true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__').split('|')); + var builtinVariables = lang.arrayToMap('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|\ +$http_response_header|$argc|$argv'.split('|')); + var builtinFunctionsDeprecated = lang.arrayToMap('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|\ +com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|\ +cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|\ +hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|\ +maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|\ +mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|\ +mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|\ +mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|\ +mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|\ +mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|\ +mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|\ +ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|\ +ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|\ +ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|\ +ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|\ +ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|\ +PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|\ +PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|\ +PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|\ +PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|\ +PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|\ +PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|\ +PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|\ +PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|\ +px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister\ +set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|\ +sql_regcase'.split('|')); + var keywordsDeprecated = lang.arrayToMap(('cfunction|old_function').split('|')); + var futureReserved = lang.arrayToMap([]); + this.$rules = { + "start": [ + { + token: "comment", + regex: /(?:#|\/\/)(?:[^?]|\?[^>])*/ + }, + docComment.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)" + }, { + token: "string", // " string start + regex: '"', + next: "qqstring" + }, { + token: "string", // ' string start + regex: "'", + next: "qstring" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language", // constants + regex: "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" + + "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" + + "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" + + "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" + + "VERSION))|__COMPILER_HALT_OFFSET__)\\b" + }, { + token: ["keyword", "text", "support.class"], + regex: "\\b(new)(\\s+)(\\w+)" + }, { + token: ["support.class", "keyword.operator"], + regex: "\\b(\\w+)(::)" + }, { + token: "constant.language", // constants + regex: "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" + + "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" + + "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" + + "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" + + "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" + + "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" + + "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" + + "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" + + "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" + + "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" + + "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" + + "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" + + "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" + + "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b" + }, { + token: function (value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (futureReserved.hasOwnProperty(value)) + return "invalid.illegal"; + else if (builtinFunctions.hasOwnProperty(value)) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else if (value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)) + return "variable"; + return "identifier"; + }, + regex: /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ + }, { + onMatch: function (value, currentSate, state) { + value = value.substr(3); + if (value[0] == "'" || value[0] == '"') + value = value.slice(1, -1); + state.unshift(this.next, value); + return "markup.list"; + }, + regex: /<<<(?:\w+|'\w+'|"\w+")$/, + next: "heredoc" + }, { + token: "keyword.operator", + regex: "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|\\.=|=|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "punctuation.operator", + regex: /[,;]/ + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "heredoc": [ + { + onMatch: function (value, currentState, stack) { + if (stack[1] != value) { + this.next = ""; + return "string"; + } + stack.shift(); + stack.shift(); + this.next = this.nextState; + return "markup.list"; + }, + regex: "^\\w+(?=;?$)", + nextState: "start" + }, { + token: "string", + regex: ".*" + } + ], + "comment": [ + { + token: "comment", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, { + token: "variable", + regex: /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/ + }, { + token: "variable", + regex: /\$\{[^"\}]+\}?/ // this is wrong but ok for now + }, + { token: "string", regex: '"', next: "start" }, + { defaultToken: "string" } + ], + "qstring": [ + { token: "constant.language.escape", regex: /\\['\\]/ }, + { token: "string", regex: "'", next: "start" }, + { defaultToken: "string" } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(PhpLangHighlightRules, TextHighlightRules); +var PhpHighlightRules = function () { + HtmlHighlightRules.call(this); + var startRules = [ + { + token: "support.php_tag", // php open tag + regex: "<\\?(?:php|=)?", + push: "php-start" + } + ]; + var endRules = [ + { + token: "support.php_tag", // php close tag + regex: "\\?>", + next: "pop" + } + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]); + this.normalizeRules(); +}; +oop.inherits(PhpHighlightRules, HtmlHighlightRules); +exports.PhpHighlightRules = PhpHighlightRules; +exports.PhpLangHighlightRules = PhpLangHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/php_completions",["require","exports","module"], function(require, exports, module){/** + * ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** + */ +"use strict"; +var functionMap = { + "abs": [ + "int abs(int number)", + "Return the absolute value of the number" + ], + "acos": [ + "float acos(float number)", + "Return the arc cosine of the number in radians" + ], + "acosh": [ + "float acosh(float number)", + "Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number" + ], + "addGlob": [ + "bool addGlob(string pattern[,int flags [, array options]])", + "Add files matching the glob pattern. See php's glob for the pattern syntax." + ], + "addPattern": [ + "bool addPattern(string pattern[, string path [, array options]])", + "Add files matching the pcre pattern. See php's pcre for the pattern syntax." + ], + "addcslashes": [ + "string addcslashes(string str, string charlist)", + "Escapes all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\\n', '\\r', '\\t' etc...)" + ], + "addslashes": [ + "string addslashes(string str)", + "Escapes single quote, double quotes and backslash characters in a string with backslashes" + ], + "apache_child_terminate": [ + "bool apache_child_terminate()", + "Terminate apache process after this request" + ], + "apache_get_modules": [ + "array apache_get_modules()", + "Get a list of loaded Apache modules" + ], + "apache_get_version": [ + "string apache_get_version()", + "Fetch Apache version" + ], + "apache_getenv": [ + "bool apache_getenv(string variable [, bool walk_to_top])", + "Get an Apache subprocess_env variable" + ], + "apache_lookup_uri": [ + "object apache_lookup_uri(string URI)", + "Perform a partial request of the given URI to obtain information about it" + ], + "apache_note": [ + "string apache_note(string note_name [, string note_value])", + "Get and set Apache request notes" + ], + "apache_request_auth_name": [ + "string apache_request_auth_name()", + "" + ], + "apache_request_auth_type": [ + "string apache_request_auth_type()", + "" + ], + "apache_request_discard_request_body": [ + "long apache_request_discard_request_body()", + "" + ], + "apache_request_err_headers_out": [ + "array apache_request_err_headers_out([{string name|array list} [, string value [, bool replace = false]]])", + "* fetch all headers that go out in case of an error or a subrequest" + ], + "apache_request_headers": [ + "array apache_request_headers()", + "Fetch all HTTP request headers" + ], + "apache_request_headers_in": [ + "array apache_request_headers_in()", + "* fetch all incoming request headers" + ], + "apache_request_headers_out": [ + "array apache_request_headers_out([{string name|array list} [, string value [, bool replace = false]]])", + "* fetch all outgoing request headers" + ], + "apache_request_is_initial_req": [ + "bool apache_request_is_initial_req()", + "" + ], + "apache_request_log_error": [ + "bool apache_request_log_error(string message, [long facility])", + "" + ], + "apache_request_meets_conditions": [ + "long apache_request_meets_conditions()", + "" + ], + "apache_request_remote_host": [ + "int apache_request_remote_host([int type])", + "" + ], + "apache_request_run": [ + "long apache_request_run()", + "This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status." + ], + "apache_request_satisfies": [ + "long apache_request_satisfies()", + "" + ], + "apache_request_server_port": [ + "int apache_request_server_port()", + "" + ], + "apache_request_set_etag": [ + "void apache_request_set_etag()", + "" + ], + "apache_request_set_last_modified": [ + "void apache_request_set_last_modified()", + "" + ], + "apache_request_some_auth_required": [ + "bool apache_request_some_auth_required()", + "" + ], + "apache_request_sub_req_lookup_file": [ + "object apache_request_sub_req_lookup_file(string file)", + "Returns sub-request for the specified file. You would need to run it yourself with run()." + ], + "apache_request_sub_req_lookup_uri": [ + "object apache_request_sub_req_lookup_uri(string uri)", + "Returns sub-request for the specified uri. You would need to run it yourself with run()" + ], + "apache_request_sub_req_method_uri": [ + "object apache_request_sub_req_method_uri(string method, string uri)", + "Returns sub-request for the specified file. You would need to run it yourself with run()." + ], + "apache_request_update_mtime": [ + "long apache_request_update_mtime([int dependency_mtime])", + "" + ], + "apache_reset_timeout": [ + "bool apache_reset_timeout()", + "Reset the Apache write timer" + ], + "apache_response_headers": [ + "array apache_response_headers()", + "Fetch all HTTP response headers" + ], + "apache_setenv": [ + "bool apache_setenv(string variable, string value [, bool walk_to_top])", + "Set an Apache subprocess_env variable" + ], + "array_change_key_case": [ + "array array_change_key_case(array input [, int case=CASE_LOWER])", + "Retuns an array with all string keys lowercased [or uppercased]" + ], + "array_chunk": [ + "array array_chunk(array input, int size [, bool preserve_keys])", + "Split array into chunks" + ], + "array_combine": [ + "array array_combine(array keys, array values)", + "Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values" + ], + "array_count_values": [ + "array array_count_values(array input)", + "Return the value as key and the frequency of that value in input as value" + ], + "array_diff": [ + "array array_diff(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are not present in any of the others arguments." + ], + "array_diff_assoc": [ + "array array_diff_assoc(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal" + ], + "array_diff_key": [ + "array array_diff_key(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have keys which are not present in any of the others arguments. This function is like array_diff() but works on the keys instead of the values. The associativity is preserved." + ], + "array_diff_uassoc": [ + "array array_diff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Elements are compared by user supplied function." + ], + "array_diff_ukey": [ + "array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)", + "Returns the entries of arr1 that have keys which are not present in any of the others arguments. User supplied function is used for comparing the keys. This function is like array_udiff() but works on the keys instead of the values. The associativity is preserved." + ], + "array_fill": [ + "array array_fill(int start_key, int num, mixed val)", + "Create an array containing num elements starting with index start_key each initialized to val" + ], + "array_fill_keys": [ + "array array_fill_keys(array keys, mixed val)", + "Create an array using the elements of the first parameter as keys each initialized to val" + ], + "array_filter": [ + "array array_filter(array input [, mixed callback])", + "Filters elements from the array via the callback." + ], + "array_flip": [ + "array array_flip(array input)", + "Return array with key <-> value flipped" + ], + "array_intersect": [ + "array array_intersect(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are present in all the other arguments" + ], + "array_intersect_assoc": [ + "array array_intersect_assoc(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check" + ], + "array_intersect_key": [ + "array array_intersect_key(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). Equivalent of array_intersect_assoc() but does not do compare of the data." + ], + "array_intersect_uassoc": [ + "array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check and they are compared by using an user-supplied callback." + ], + "array_intersect_ukey": [ + "array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)", + "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). The comparison of the keys is performed by a user supplied function. Equivalent of array_intersect_uassoc() but does not do compare of the data." + ], + "array_key_exists": [ + "bool array_key_exists(mixed key, array search)", + "Checks if the given key or index exists in the array" + ], + "array_keys": [ + "array array_keys(array input [, mixed search_value[, bool strict]])", + "Return just the keys from the input array, optionally only for the specified search_value" + ], + "array_key_first": [ + "mixed array_key_first(array arr)", + "Returns the first key of arr if the array is not empty; NULL otherwise" + ], + "array_key_last": [ + "mixed array_key_last(array arr)", + "Returns the last key of arr if the array is not empty; NULL otherwise" + ], + "array_map": [ + "array array_map(mixed callback, array input1 [, array input2 ,...])", + "Applies the callback to the elements in given arrays." + ], + "array_merge": [ + "array array_merge(array arr1, array arr2 [, array ...])", + "Merges elements from passed arrays into one array" + ], + "array_merge_recursive": [ + "array array_merge_recursive(array arr1, array arr2 [, array ...])", + "Recursively merges elements from passed arrays into one array" + ], + "array_multisort": [ + "bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])", + "Sort multiple arrays at once similar to how ORDER BY clause works in SQL" + ], + "array_pad": [ + "array array_pad(array input, int pad_size, mixed pad_value)", + "Returns a copy of input array padded with pad_value to size pad_size" + ], + "array_pop": [ + "mixed array_pop(array stack)", + "Pops an element off the end of the array" + ], + "array_product": [ + "mixed array_product(array input)", + "Returns the product of the array entries" + ], + "array_push": [ + "int array_push(array stack, mixed var [, mixed ...])", + "Pushes elements onto the end of the array" + ], + "array_rand": [ + "mixed array_rand(array input [, int num_req])", + "Return key/keys for random entry/entries in the array" + ], + "array_reduce": [ + "mixed array_reduce(array input, mixed callback [, mixed initial])", + "Iteratively reduce the array to a single value via the callback." + ], + "array_replace": [ + "array array_replace(array arr1, array arr2 [, array ...])", + "Replaces elements from passed arrays into one array" + ], + "array_replace_recursive": [ + "array array_replace_recursive(array arr1, array arr2 [, array ...])", + "Recursively replaces elements from passed arrays into one array" + ], + "array_reverse": [ + "array array_reverse(array input [, bool preserve keys])", + "Return input as a new array with the order of the entries reversed" + ], + "array_search": [ + "mixed array_search(mixed needle, array haystack [, bool strict])", + "Searches the array for a given value and returns the corresponding key if successful" + ], + "array_shift": [ + "mixed array_shift(array stack)", + "Pops an element off the beginning of the array" + ], + "array_slice": [ + "array array_slice(array input, int offset [, int length [, bool preserve_keys]])", + "Returns elements specified by offset and length" + ], + "array_splice": [ + "array array_splice(array input, int offset [, int length [, array replacement]])", + "Removes the elements designated by offset and length and replace them with supplied array" + ], + "array_sum": [ + "mixed array_sum(array input)", + "Returns the sum of the array entries" + ], + "array_udiff": [ + "array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function." + ], + "array_udiff_assoc": [ + "array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function." + ], + "array_udiff_uassoc": [ + "array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions." + ], + "array_uintersect": [ + "array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback." + ], + "array_uintersect_assoc": [ + "array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Data is compared by using an user-supplied callback." + ], + "array_uintersect_uassoc": [ + "array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks." + ], + "array_unique": [ + "array array_unique(array input [, int sort_flags])", + "Removes duplicate values from array" + ], + "array_unshift": [ + "int array_unshift(array stack, mixed var [, mixed ...])", + "Pushes elements onto the beginning of the array" + ], + "array_values": [ + "array array_values(array input)", + "Return just the values from the input array" + ], + "array_walk": [ + "bool array_walk(array input, string funcname [, mixed userdata])", + "Apply a user function to every member of an array" + ], + "array_walk_recursive": [ + "bool array_walk_recursive(array input, string funcname [, mixed userdata])", + "Apply a user function recursively to every member of an array" + ], + "arsort": [ + "bool arsort(array &array_arg [, int sort_flags])", + "Sort an array in reverse order and maintain index association" + ], + "asin": [ + "float asin(float number)", + "Returns the arc sine of the number in radians" + ], + "asinh": [ + "float asinh(float number)", + "Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number" + ], + "asort": [ + "bool asort(array &array_arg [, int sort_flags])", + "Sort an array and maintain index association" + ], + "assert": [ + "int assert(string|bool assertion)", + "Checks if assertion is false" + ], + "assert_options": [ + "mixed assert_options(int what [, mixed value])", + "Set/get the various assert flags" + ], + "atan": [ + "float atan(float number)", + "Returns the arc tangent of the number in radians" + ], + "atan2": [ + "float atan2(float y, float x)", + "Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x" + ], + "atanh": [ + "float atanh(float number)", + "Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number" + ], + "attachIterator": [ + "void attachIterator(Iterator iterator[, mixed info])", + "Attach a new iterator" + ], + "base64_decode": [ + "string base64_decode(string str[, bool strict])", + "Decodes string using MIME base64 algorithm" + ], + "base64_encode": [ + "string base64_encode(string str)", + "Encodes string using MIME base64 algorithm" + ], + "base_convert": [ + "string base_convert(string number, int frombase, int tobase)", + "Converts a number in a string from any base <= 36 to any base <= 36" + ], + "basename": [ + "string basename(string path [, string suffix])", + "Returns the filename component of the path" + ], + "bcadd": [ + "string bcadd(string left_operand, string right_operand [, int scale])", + "Returns the sum of two arbitrary precision numbers" + ], + "bccomp": [ + "int bccomp(string left_operand, string right_operand [, int scale])", + "Compares two arbitrary precision numbers" + ], + "bcdiv": [ + "string bcdiv(string left_operand, string right_operand [, int scale])", + "Returns the quotient of two arbitrary precision numbers (division)" + ], + "bcmod": [ + "string bcmod(string left_operand, string right_operand)", + "Returns the modulus of the two arbitrary precision operands" + ], + "bcmul": [ + "string bcmul(string left_operand, string right_operand [, int scale])", + "Returns the multiplication of two arbitrary precision numbers" + ], + "bcpow": [ + "string bcpow(string x, string y [, int scale])", + "Returns the value of an arbitrary precision number raised to the power of another" + ], + "bcpowmod": [ + "string bcpowmod(string x, string y, string mod [, int scale])", + "Returns the value of an arbitrary precision number raised to the power of another reduced by a modulous" + ], + "bcscale": [ + "bool bcscale(int scale)", + "Sets default scale parameter for all bc math functions" + ], + "bcsqrt": [ + "string bcsqrt(string operand [, int scale])", + "Returns the square root of an arbitray precision number" + ], + "bcsub": [ + "string bcsub(string left_operand, string right_operand [, int scale])", + "Returns the difference between two arbitrary precision numbers" + ], + "bin2hex": [ + "string bin2hex(string data)", + "Converts the binary representation of data to hex" + ], + "bind_textdomain_codeset": [ + "string bind_textdomain_codeset (string domain, string codeset)", + "Specify the character encoding in which the messages from the DOMAIN message catalog will be returned." + ], + "bindec": [ + "int bindec(string binary_number)", + "Returns the decimal equivalent of the binary number" + ], + "bindtextdomain": [ + "string bindtextdomain(string domain_name, string dir)", + "Bind to the text domain domain_name, looking for translations in dir. Returns the current domain" + ], + "birdstep_autocommit": [ + "bool birdstep_autocommit(int index)", + "" + ], + "birdstep_close": [ + "bool birdstep_close(int id)", + "" + ], + "birdstep_commit": [ + "bool birdstep_commit(int index)", + "" + ], + "birdstep_connect": [ + "int birdstep_connect(string server, string user, string pass)", + "" + ], + "birdstep_exec": [ + "int birdstep_exec(int index, string exec_str)", + "" + ], + "birdstep_fetch": [ + "bool birdstep_fetch(int index)", + "" + ], + "birdstep_fieldname": [ + "string birdstep_fieldname(int index, int col)", + "" + ], + "birdstep_fieldnum": [ + "int birdstep_fieldnum(int index)", + "" + ], + "birdstep_freeresult": [ + "bool birdstep_freeresult(int index)", + "" + ], + "birdstep_off_autocommit": [ + "bool birdstep_off_autocommit(int index)", + "" + ], + "birdstep_result": [ + "mixed birdstep_result(int index, mixed col)", + "" + ], + "birdstep_rollback": [ + "bool birdstep_rollback(int index)", + "" + ], + "bzcompress": [ + "string bzcompress(string source [, int blocksize100k [, int workfactor]])", + "Compresses a string into BZip2 encoded data" + ], + "bzdecompress": [ + "string bzdecompress(string source [, int small])", + "Decompresses BZip2 compressed data" + ], + "bzerrno": [ + "int bzerrno(resource bz)", + "Returns the error number" + ], + "bzerror": [ + "array bzerror(resource bz)", + "Returns the error number and error string in an associative array" + ], + "bzerrstr": [ + "string bzerrstr(resource bz)", + "Returns the error string" + ], + "bzopen": [ + "resource bzopen(string|int file|fp, string mode)", + "Opens a new BZip2 stream" + ], + "bzread": [ + "string bzread(resource bz[, int length])", + "Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified" + ], + "cal_days_in_month": [ + "int cal_days_in_month(int calendar, int month, int year)", + "Returns the number of days in a month for a given year and calendar" + ], + "cal_from_jd": [ + "array cal_from_jd(int jd, int calendar)", + "Converts from Julian Day Count to a supported calendar and return extended information" + ], + "cal_info": [ + "array cal_info([int calendar])", + "Returns information about a particular calendar" + ], + "cal_to_jd": [ + "int cal_to_jd(int calendar, int month, int day, int year)", + "Converts from a supported calendar to Julian Day Count" + ], + "call_user_func": [ + "mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])", + "Call a user function which is the first parameter" + ], + "call_user_func_array": [ + "mixed call_user_func_array(string function_name, array parameters)", + "Call a user function which is the first parameter with the arguments contained in array" + ], + "call_user_method": [ + "mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])", + "Call a user method on a specific object or class" + ], + "call_user_method_array": [ + "mixed call_user_method_array(string method_name, mixed object, array params)", + "Call a user method on a specific object or class using a parameter array" + ], + "ceil": [ + "float ceil(float number)", + "Returns the next highest integer value of the number" + ], + "chdir": [ + "bool chdir(string directory)", + "Change the current directory" + ], + "checkdate": [ + "bool checkdate(int month, int day, int year)", + "Returns true(1) if it is a valid date in gregorian calendar" + ], + "chgrp": [ + "bool chgrp(string filename, mixed group)", + "Change file group" + ], + "chmod": [ + "bool chmod(string filename, int mode)", + "Change file mode" + ], + "chown": [ + "bool chown(string filename, mixed user)", + "Change file owner" + ], + "chr": [ + "string chr(int ascii)", + "Converts ASCII code to a character" + ], + "chroot": [ + "bool chroot(string directory)", + "Change root directory" + ], + "chunk_split": [ + "string chunk_split(string str [, int chunklen [, string ending]])", + "Returns split line" + ], + "class_alias": [ + "bool class_alias(string user_class_name , string alias_name [, bool autoload])", + "Creates an alias for user defined class" + ], + "class_exists": [ + "bool class_exists(string classname [, bool autoload])", + "Checks if the class exists" + ], + "class_implements": [ + "array class_implements(mixed what [, bool autoload ])", + "Return all classes and interfaces implemented by SPL" + ], + "class_parents": [ + "array class_parents(object instance [, bool autoload = true])", + "Return an array containing the names of all parent classes" + ], + "clearstatcache": [ + "void clearstatcache([bool clear_realpath_cache[, string filename]])", + "Clear file stat cache" + ], + "closedir": [ + "void closedir([resource dir_handle])", + "Close directory connection identified by the dir_handle" + ], + "closelog": [ + "bool closelog()", + "Close connection to system logger" + ], + "collator_asort": [ + "bool collator_asort( Collator $coll, array(string) $arr )", + "* Sort array using specified collator, maintaining index association." + ], + "collator_compare": [ + "int collator_compare( Collator $coll, string $str1, string $str2 )", + "* Compare two strings." + ], + "collator_create": [ + "Collator collator_create( string $locale )", + "* Create collator." + ], + "collator_get_attribute": [ + "int collator_get_attribute( Collator $coll, int $attr )", + "* Get collation attribute value." + ], + "collator_get_error_code": [ + "int collator_get_error_code( Collator $coll )", + "* Get collator's last error code." + ], + "collator_get_error_message": [ + "string collator_get_error_message( Collator $coll )", + "* Get text description for collator's last error code." + ], + "collator_get_locale": [ + "string collator_get_locale( Collator $coll, int $type )", + "* Gets the locale name of the collator." + ], + "collator_get_sort_key": [ + "bool collator_get_sort_key( Collator $coll, string $str )", + "* Get a sort key for a string from a Collator. }}}" + ], + "collator_get_strength": [ + "int collator_get_strength(Collator coll)", + "* Returns the current collation strength." + ], + "collator_set_attribute": [ + "bool collator_set_attribute( Collator $coll, int $attr, int $val )", + "* Set collation attribute." + ], + "collator_set_strength": [ + "bool collator_set_strength(Collator coll, int strength)", + "* Set the collation strength." + ], + "collator_sort": [ + "bool collator_sort( Collator $coll, array(string) $arr [, int $sort_flags] )", + "* Sort array using specified collator." + ], + "collator_sort_with_sort_keys": [ + "bool collator_sort_with_sort_keys( Collator $coll, array(string) $arr )", + "* Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance." + ], + "com_create_guid": [ + "string com_create_guid()", + "Generate a globally unique identifier (GUID)" + ], + "com_event_sink": [ + "bool com_event_sink(object comobject, object sinkobject [, mixed sinkinterface])", + "Connect events from a COM object to a PHP object" + ], + "com_get_active_object": [ + "object com_get_active_object(string progid [, int code_page ])", + "Returns a handle to an already running instance of a COM object" + ], + "com_load_typelib": [ + "bool com_load_typelib(string typelib_name [, int case_insensitive])", + "Loads a Typelibrary and registers its constants" + ], + "com_message_pump": [ + "bool com_message_pump([int timeoutms])", + "Process COM messages, sleeping for up to timeoutms milliseconds" + ], + "com_print_typeinfo": [ + "bool com_print_typeinfo(object comobject | string typelib, string dispinterface, bool wantsink)", + "Print out a PHP class definition for a dispatchable interface" + ], + "compact": [ + "array compact(mixed var_names [, mixed ...])", + "Creates a hash containing variables and their values" + ], + "compose_locale": [ + "static string compose_locale($array)", + "* Creates a locale by combining the parts of locale-ID passed * }}}" + ], + "confirm_extname_compiled": [ + "string confirm_extname_compiled(string arg)", + "Return a string to confirm that the module is compiled in" + ], + "connection_aborted": [ + "int connection_aborted()", + "Returns true if client disconnected" + ], + "connection_status": [ + "int connection_status()", + "Returns the connection status bitfield" + ], + "constant": [ + "mixed constant(string const_name)", + "Given the name of a constant this function will return the constant's associated value" + ], + "convert_cyr_string": [ + "string convert_cyr_string(string str, string from, string to)", + "Convert from one Cyrillic character set to another" + ], + "convert_uudecode": [ + "string convert_uudecode(string data)", + "decode a uuencoded string" + ], + "convert_uuencode": [ + "string convert_uuencode(string data)", + "uuencode a string" + ], + "copy": [ + "bool copy(string source_file, string destination_file [, resource context])", + "Copy a file" + ], + "cos": [ + "float cos(float number)", + "Returns the cosine of the number in radians" + ], + "cosh": [ + "float cosh(float number)", + "Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2" + ], + "count": [ + "int count(mixed var [, int mode])", + "Count the number of elements in a variable (usually an array)" + ], + "count_chars": [ + "mixed count_chars(string input [, int mode])", + "Returns info about what characters are used in input" + ], + "crc32": [ + "string crc32(string str)", + "Calculate the crc32 polynomial of a string" + ], + "create_function": [ + "string create_function(string args, string code)", + "Creates an anonymous function, and returns its name" + ], + "crypt": [ + "string crypt(string str [, string salt])", + "Hash a string" + ], + "ctype_alnum": [ + "bool ctype_alnum(mixed c)", + "Checks for alphanumeric character(s)" + ], + "ctype_alpha": [ + "bool ctype_alpha(mixed c)", + "Checks for alphabetic character(s)" + ], + "ctype_cntrl": [ + "bool ctype_cntrl(mixed c)", + "Checks for control character(s)" + ], + "ctype_digit": [ + "bool ctype_digit(mixed c)", + "Checks for numeric character(s)" + ], + "ctype_graph": [ + "bool ctype_graph(mixed c)", + "Checks for any printable character(s) except space" + ], + "ctype_lower": [ + "bool ctype_lower(mixed c)", + "Checks for lowercase character(s)" + ], + "ctype_print": [ + "bool ctype_print(mixed c)", + "Checks for printable character(s)" + ], + "ctype_punct": [ + "bool ctype_punct(mixed c)", + "Checks for any printable character which is not whitespace or an alphanumeric character" + ], + "ctype_space": [ + "bool ctype_space(mixed c)", + "Checks for whitespace character(s)" + ], + "ctype_upper": [ + "bool ctype_upper(mixed c)", + "Checks for uppercase character(s)" + ], + "ctype_xdigit": [ + "bool ctype_xdigit(mixed c)", + "Checks for character(s) representing a hexadecimal digit" + ], + "curl_close": [ + "void curl_close(resource ch)", + "Close a cURL session" + ], + "curl_copy_handle": [ + "resource curl_copy_handle(resource ch)", + "Copy a cURL handle along with all of it's preferences" + ], + "curl_errno": [ + "int curl_errno(resource ch)", + "Return an integer containing the last error number" + ], + "curl_error": [ + "string curl_error(resource ch)", + "Return a string contain the last error for the current session" + ], + "curl_exec": [ + "bool curl_exec(resource ch)", + "Perform a cURL session" + ], + "curl_getinfo": [ + "mixed curl_getinfo(resource ch [, int option])", + "Get information regarding a specific transfer" + ], + "curl_init": [ + "resource curl_init([string url])", + "Initialize a cURL session" + ], + "curl_multi_add_handle": [ + "int curl_multi_add_handle(resource mh, resource ch)", + "Add a normal cURL handle to a cURL multi handle" + ], + "curl_multi_close": [ + "void curl_multi_close(resource mh)", + "Close a set of cURL handles" + ], + "curl_multi_exec": [ + "int curl_multi_exec(resource mh, int &still_running)", + "Run the sub-connections of the current cURL handle" + ], + "curl_multi_getcontent": [ + "string curl_multi_getcontent(resource ch)", + "Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set" + ], + "curl_multi_info_read": [ + "array curl_multi_info_read(resource mh [, long msgs_in_queue])", + "Get information about the current transfers" + ], + "curl_multi_init": [ + "resource curl_multi_init()", + "Returns a new cURL multi handle" + ], + "curl_multi_remove_handle": [ + "int curl_multi_remove_handle(resource mh, resource ch)", + "Remove a multi handle from a set of cURL handles" + ], + "curl_multi_select": [ + "int curl_multi_select(resource mh[, double timeout])", + "Get all the sockets associated with the cURL extension, which can then be \"selected\"" + ], + "curl_setopt": [ + "bool curl_setopt(resource ch, int option, mixed value)", + "Set an option for a cURL transfer" + ], + "curl_setopt_array": [ + "bool curl_setopt_array(resource ch, array options)", + "Set an array of option for a cURL transfer" + ], + "curl_version": [ + "array curl_version([int version])", + "Return cURL version information." + ], + "current": [ + "mixed current(array array_arg)", + "Return the element currently pointed to by the internal array pointer" + ], + "date": [ + "string date(string format [, long timestamp])", + "Format a local date/time" + ], + "date_add": [ + "DateTime date_add(DateTime object, DateInterval interval)", + "Adds an interval to the current date in object." + ], + "date_create": [ + "DateTime date_create([string time[, DateTimeZone object]])", + "Returns new DateTime object" + ], + "date_create_from_format": [ + "DateTime date_create_from_format(string format, string time[, DateTimeZone object])", + "Returns new DateTime object formatted according to the specified format" + ], + "date_date_set": [ + "DateTime date_date_set(DateTime object, long year, long month, long day)", + "Sets the date." + ], + "date_default_timezone_get": [ + "string date_default_timezone_get()", + "Gets the default timezone used by all date/time functions in a script" + ], + "date_default_timezone_set": [ + "bool date_default_timezone_set(string timezone_identifier)", + "Sets the default timezone used by all date/time functions in a script" + ], + "date_diff": [ + "DateInterval date_diff(DateTime object [, bool absolute])", + "Returns the difference between two DateTime objects." + ], + "date_format": [ + "string date_format(DateTime object, string format)", + "Returns date formatted according to given format" + ], + "date_get_last_errors": [ + "array date_get_last_errors()", + "Returns the warnings and errors found while parsing a date/time string." + ], + "date_interval_create_from_date_string": [ + "DateInterval date_interval_create_from_date_string(string time)", + "Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string" + ], + "date_interval_format": [ + "string date_interval_format(DateInterval object, string format)", + "Formats the interval." + ], + "date_isodate_set": [ + "DateTime date_isodate_set(DateTime object, long year, long week[, long day])", + "Sets the ISO date." + ], + "date_modify": [ + "DateTime date_modify(DateTime object, string modify)", + "Alters the timestamp." + ], + "date_offset_get": [ + "long date_offset_get(DateTime object)", + "Returns the DST offset." + ], + "date_parse": [ + "array date_parse(string date)", + "Returns associative array with detailed info about given date" + ], + "date_parse_from_format": [ + "array date_parse_from_format(string format, string date)", + "Returns associative array with detailed info about given date" + ], + "date_sub": [ + "DateTime date_sub(DateTime object, DateInterval interval)", + "Subtracts an interval to the current date in object." + ], + "date_sun_info": [ + "array date_sun_info(long time, float latitude, float longitude)", + "Returns an array with information about sun set/rise and twilight begin/end" + ], + "date_sunrise": [ + "mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])", + "Returns time of sunrise for a given day and location" + ], + "date_sunset": [ + "mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])", + "Returns time of sunset for a given day and location" + ], + "date_time_set": [ + "DateTime date_time_set(DateTime object, long hour, long minute[, long second])", + "Sets the time." + ], + "date_timestamp_get": [ + "long date_timestamp_get(DateTime object)", + "Gets the Unix timestamp." + ], + "date_timestamp_set": [ + "DateTime date_timestamp_set(DateTime object, long unixTimestamp)", + "Sets the date and time based on an Unix timestamp." + ], + "date_timezone_get": [ + "DateTimeZone date_timezone_get(DateTime object)", + "Return new DateTimeZone object relative to give DateTime" + ], + "date_timezone_set": [ + "DateTime date_timezone_set(DateTime object, DateTimeZone object)", + "Sets the timezone for the DateTime object." + ], + "datefmt_create": [ + "IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )", + "* Create formatter." + ], + "datefmt_format": [ + "string datefmt_format( [mixed]int $args or array $args )", + "* Format the time value as a string. }}}" + ], + "datefmt_get_calendar": [ + "string datefmt_get_calendar( IntlDateFormatter $mf )", + "* Get formatter calendar." + ], + "datefmt_get_datetype": [ + "string datefmt_get_datetype( IntlDateFormatter $mf )", + "* Get formatter datetype." + ], + "datefmt_get_error_code": [ + "int datefmt_get_error_code( IntlDateFormatter $nf )", + "* Get formatter's last error code." + ], + "datefmt_get_error_message": [ + "string datefmt_get_error_message( IntlDateFormatter $coll )", + "* Get text description for formatter's last error code." + ], + "datefmt_get_locale": [ + "string datefmt_get_locale(IntlDateFormatter $mf)", + "* Get formatter locale." + ], + "datefmt_get_pattern": [ + "string datefmt_get_pattern( IntlDateFormatter $mf )", + "* Get formatter pattern." + ], + "datefmt_get_timetype": [ + "string datefmt_get_timetype( IntlDateFormatter $mf )", + "* Get formatter timetype." + ], + "datefmt_get_timezone_id": [ + "string datefmt_get_timezone_id( IntlDateFormatter $mf )", + "* Get formatter timezone_id." + ], + "datefmt_isLenient": [ + "string datefmt_isLenient(IntlDateFormatter $mf)", + "* Get formatter locale." + ], + "datefmt_localtime": [ + "integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse[, int $parse_pos ])", + "* Parse the string $value to a localtime array }}}" + ], + "datefmt_parse": [ + "integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse [, int $parse_pos] )", + "* Parse the string $value starting at parse_pos to a Unix timestamp -int }}}" + ], + "datefmt_setLenient": [ + "string datefmt_setLenient(IntlDateFormatter $mf)", + "* Set formatter lenient." + ], + "datefmt_set_calendar": [ + "bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )", + "* Set formatter calendar." + ], + "datefmt_set_pattern": [ + "bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern )", + "* Set formatter pattern." + ], + "datefmt_set_timezone_id": [ + "bool datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)", + "* Set formatter timezone_id." + ], + "dba_close": [ + "void dba_close(resource handle)", + "Closes database" + ], + "dba_delete": [ + "bool dba_delete(string key, resource handle)", + "Deletes the entry associated with key If inifile: remove all other key lines" + ], + "dba_exists": [ + "bool dba_exists(string key, resource handle)", + "Checks, if the specified key exists" + ], + "dba_fetch": [ + "string dba_fetch(string key, [int skip ,] resource handle)", + "Fetches the data associated with key" + ], + "dba_firstkey": [ + "string dba_firstkey(resource handle)", + "Resets the internal key pointer and returns the first key" + ], + "dba_handlers": [ + "array dba_handlers([bool full_info])", + "List configured database handlers" + ], + "dba_insert": [ + "bool dba_insert(string key, string value, resource handle)", + "If not inifile: Insert value as key, return false, if key exists already If inifile: Add vakue as key (next instance of key)" + ], + "dba_key_split": [ + "array|false dba_key_split(string key)", + "Splits an inifile key into an array of the form array(0=>group,1=>value_name) but returns false if input is false or null" + ], + "dba_list": [ + "array dba_list()", + "List opened databases" + ], + "dba_nextkey": [ + "string dba_nextkey(resource handle)", + "Returns the next key" + ], + "dba_open": [ + "resource dba_open(string path, string mode [, string handlername, string ...])", + "Opens path using the specified handler in mode" + ], + "dba_optimize": [ + "bool dba_optimize(resource handle)", + "Optimizes (e.g. clean up, vacuum) database" + ], + "dba_popen": [ + "resource dba_popen(string path, string mode [, string handlername, string ...])", + "Opens path using the specified handler in mode persistently" + ], + "dba_replace": [ + "bool dba_replace(string key, string value, resource handle)", + "Inserts value as key, replaces key, if key exists already If inifile: remove all other key lines" + ], + "dba_sync": [ + "bool dba_sync(resource handle)", + "Synchronizes database" + ], + "dcgettext": [ + "string dcgettext(string domain_name, string msgid, long category)", + "Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist" + ], + "dcngettext": [ + "string dcngettext(string domain, string msgid1, string msgid2, int n, int category)", + "Plural version of dcgettext()" + ], + "debug_backtrace": [ + "array debug_backtrace([bool provide_object])", + "Return backtrace as array" + ], + "debug_print_backtrace": [ + "void debug_print_backtrace()", + "Prints a PHP backtrace" + ], + "debug_zval_dump": [ + "void debug_zval_dump(mixed var)", + "Dumps a string representation of an internal Zend value to output" + ], + "decbin": [ + "string decbin(int decimal_number)", + "Returns a string containing a binary representation of the number" + ], + "dechex": [ + "string dechex(int decimal_number)", + "Returns a string containing a hexadecimal representation of the given number" + ], + "decoct": [ + "string decoct(int decimal_number)", + "Returns a string containing an octal representation of the given number" + ], + "define": [ + "bool define(string constant_name, mixed value, bool case_insensitive=false)", + "Define a new constant" + ], + "define_syslog_variables": [ + "void define_syslog_variables()", + "Initializes all syslog-related variables" + ], + "defined": [ + "bool defined(string constant_name)", + "Check whether a constant exists" + ], + "deg2rad": [ + "float deg2rad(float number)", + "Converts the number in degrees to the radian equivalent" + ], + "dgettext": [ + "string dgettext(string domain_name, string msgid)", + "Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist" + ], + "die": [ + "void die([mixed status])", + "Output a message and terminate the current script" + ], + "dir": [ + "object dir(string directory[, resource context])", + "Directory class with properties, handle and class and methods read, rewind and close" + ], + "dirname": [ + "string dirname(string path)", + "Returns the directory name component of the path" + ], + "disk_free_space": [ + "float disk_free_space(string path)", + "Get free disk space for filesystem that path is on" + ], + "disk_total_space": [ + "float disk_total_space(string path)", + "Get total disk space for filesystem that path is on" + ], + "display_disabled_function": [ + "void display_disabled_function()", + "Dummy function which displays an error when a disabled function is called." + ], + "dl": [ + "int dl(string extension_filename)", + "Load a PHP extension at runtime" + ], + "dngettext": [ + "string dngettext(string domain, string msgid1, string msgid2, int count)", + "Plural version of dgettext()" + ], + "dns_check_record": [ + "bool dns_check_record(string host [, string type])", + "Check DNS records corresponding to a given Internet host name or IP address" + ], + "dns_get_mx": [ + "bool dns_get_mx(string hostname, array mxhosts [, array weight])", + "Get MX records corresponding to a given Internet host name" + ], + "dns_get_record": [ + "array|false dns_get_record(string hostname [, int type[, array authns, array addtl]])", + "Get any Resource Record corresponding to a given Internet host name" + ], + "dom_attr_is_id": [ + "bool dom_attr_is_id()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-isId Since: DOM Level 3" + ], + "dom_characterdata_append_data": [ + "void dom_characterdata_append_data(string arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-32791A2F Since:" + ], + "dom_characterdata_delete_data": [ + "void dom_characterdata_delete_data(int offset, int count)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7C603781 Since:" + ], + "dom_characterdata_insert_data": [ + "void dom_characterdata_insert_data(int offset, string arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3EDB695F Since:" + ], + "dom_characterdata_replace_data": [ + "void dom_characterdata_replace_data(int offset, int count, string arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-E5CBA7FB Since:" + ], + "dom_characterdata_substring_data": [ + "string dom_characterdata_substring_data(int offset, int count)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6531BCCF Since:" + ], + "dom_document_adopt_node": [ + "DOMNode dom_document_adopt_node(DOMNode source)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-adoptNode Since: DOM Level 3" + ], + "dom_document_create_attribute": [ + "DOMAttr dom_document_create_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198 Since:" + ], + "dom_document_create_attribute_ns": [ + "DOMAttr dom_document_create_attribute_ns(string namespaceURI, string qualifiedName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrAttrNS Since: DOM Level 2" + ], + "dom_document_create_cdatasection": [ + "DOMCdataSection dom_document_create_cdatasection(string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8 Since:" + ], + "dom_document_create_comment": [ + "DOMComment dom_document_create_comment(string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328 Since:" + ], + "dom_document_create_document_fragment": [ + "DOMDocumentFragment dom_document_create_document_fragment()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5 Since:" + ], + "dom_document_create_element": [ + "DOMElement dom_document_create_element(string tagName [, string value])", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547 Since:" + ], + "dom_document_create_element_ns": [ + "DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value])", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS Since: DOM Level 2" + ], + "dom_document_create_entity_reference": [ + "DOMEntityReference dom_document_create_entity_reference(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE Since:" + ], + "dom_document_create_processing_instruction": [ + "DOMProcessingInstruction dom_document_create_processing_instruction(string target, string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439 Since:" + ], + "dom_document_create_text_node": [ + "DOMText dom_document_create_text_node(string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127 Since:" + ], + "dom_document_get_element_by_id": [ + "DOMElement dom_document_get_element_by_id(string elementId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBId Since: DOM Level 2" + ], + "dom_document_get_elements_by_tag_name": [ + "DOMNodeList dom_document_get_elements_by_tag_name(string tagname)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094 Since:" + ], + "dom_document_get_elements_by_tag_name_ns": [ + "DOMNodeList dom_document_get_elements_by_tag_name_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBTNNS Since: DOM Level 2" + ], + "dom_document_import_node": [ + "DOMNode dom_document_import_node(DOMNode importedNode, bool deep)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Core-Document-importNode Since: DOM Level 2" + ], + "dom_document_load": [ + "DOMNode dom_document_load(string source [, int options])", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load Since: DOM Level 3" + ], + "dom_document_load_html": [ + "DOMNode dom_document_load_html(string source)", + "Since: DOM extended" + ], + "dom_document_load_html_file": [ + "DOMNode dom_document_load_html_file(string source)", + "Since: DOM extended" + ], + "dom_document_loadxml": [ + "DOMNode dom_document_loadxml(string source [, int options])", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-loadXML Since: DOM Level 3" + ], + "dom_document_normalize_document": [ + "void dom_document_normalize_document()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-normalizeDocument Since: DOM Level 3" + ], + "dom_document_relaxNG_validate_file": [ + "bool dom_document_relaxNG_validate_file(string filename); */", + "PHP_FUNCTION(dom_document_relaxNG_validate_file) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file" + ], + "dom_document_relaxNG_validate_xml": [ + "bool dom_document_relaxNG_validate_xml(string source); */", + "PHP_FUNCTION(dom_document_relaxNG_validate_xml) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_relaxNG_validate_xml" + ], + "dom_document_rename_node": [ + "DOMNode dom_document_rename_node(node n, string namespaceURI, string qualifiedName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-renameNode Since: DOM Level 3" + ], + "dom_document_save": [ + "int dom_document_save(string file)", + "Convenience method to save to file" + ], + "dom_document_save_html": [ + "string dom_document_save_html()", + "Convenience method to output as html" + ], + "dom_document_save_html_file": [ + "int dom_document_save_html_file(string file)", + "Convenience method to save to file as html" + ], + "dom_document_savexml": [ + "string dom_document_savexml([node n])", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3" + ], + "dom_document_schema_validate": [ + "bool dom_document_schema_validate(string source); */", + "PHP_FUNCTION(dom_document_schema_validate_xml) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_schema_validate" + ], + "dom_document_schema_validate_file": [ + "bool dom_document_schema_validate_file(string filename); */", + "PHP_FUNCTION(dom_document_schema_validate_file) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file" + ], + "dom_document_validate": [ + "bool dom_document_validate()", + "Since: DOM extended" + ], + "dom_document_xinclude": [ + "int dom_document_xinclude([int options])", + "Substitutues xincludes in a DomDocument" + ], + "dom_domconfiguration_can_set_parameter": [ + "bool dom_domconfiguration_can_set_parameter(string name, domuserdata value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter Since:" + ], + "dom_domconfiguration_get_parameter": [ + "domdomuserdata dom_domconfiguration_get_parameter(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:" + ], + "dom_domconfiguration_set_parameter": [ + "dom_void dom_domconfiguration_set_parameter(string name, domuserdata value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:" + ], + "dom_domerrorhandler_handle_error": [ + "dom_bool dom_domerrorhandler_handle_error(domerror error)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:" + ], + "dom_domimplementation_create_document": [ + "DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2" + ], + "dom_domimplementation_create_document_type": [ + "DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2" + ], + "dom_domimplementation_get_feature": [ + "DOMNode dom_domimplementation_get_feature(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3" + ], + "dom_domimplementation_has_feature": [ + "bool dom_domimplementation_has_feature(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:" + ], + "dom_domimplementationlist_item": [ + "domdomimplementation dom_domimplementationlist_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:" + ], + "dom_domimplementationsource_get_domimplementation": [ + "domdomimplementation dom_domimplementationsource_get_domimplementation(string features)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:" + ], + "dom_domimplementationsource_get_domimplementations": [ + "domimplementationlist dom_domimplementationsource_get_domimplementations(string features)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:" + ], + "dom_domstringlist_item": [ + "domstring dom_domstringlist_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:" + ], + "dom_element_get_attribute": [ + "string dom_element_get_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:" + ], + "dom_element_get_attribute_node": [ + "DOMAttr dom_element_get_attribute_node(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-217A91B8 Since:" + ], + "dom_element_get_attribute_node_ns": [ + "DOMAttr dom_element_get_attribute_node_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAtNodeNS Since: DOM Level 2" + ], + "dom_element_get_attribute_ns": [ + "string dom_element_get_attribute_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAttrNS Since: DOM Level 2" + ], + "dom_element_get_elements_by_tag_name": [ + "DOMNodeList dom_element_get_elements_by_tag_name(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D Since:" + ], + "dom_element_get_elements_by_tag_name_ns": [ + "DOMNodeList dom_element_get_elements_by_tag_name_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C90942 Since: DOM Level 2" + ], + "dom_element_has_attribute": [ + "bool dom_element_has_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttr Since: DOM Level 2" + ], + "dom_element_has_attribute_ns": [ + "bool dom_element_has_attribute_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttrNS Since: DOM Level 2" + ], + "dom_element_remove_attribute": [ + "void dom_element_remove_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D6AC0F9 Since:" + ], + "dom_element_remove_attribute_node": [ + "DOMAttr dom_element_remove_attribute_node(DOMAttr oldAttr)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D589198 Since:" + ], + "dom_element_remove_attribute_ns": [ + "void dom_element_remove_attribute_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElRemAtNS Since: DOM Level 2" + ], + "dom_element_set_attribute": [ + "void dom_element_set_attribute(string name, string value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68F082 Since:" + ], + "dom_element_set_attribute_node": [ + "DOMAttr dom_element_set_attribute_node(DOMAttr newAttr)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-887236154 Since:" + ], + "dom_element_set_attribute_node_ns": [ + "DOMAttr dom_element_set_attribute_node_ns(DOMAttr newAttr)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAtNodeNS Since: DOM Level 2" + ], + "dom_element_set_attribute_ns": [ + "void dom_element_set_attribute_ns(string namespaceURI, string qualifiedName, string value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAttrNS Since: DOM Level 2" + ], + "dom_element_set_id_attribute": [ + "void dom_element_set_id_attribute(string name, bool isId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttr Since: DOM Level 3" + ], + "dom_element_set_id_attribute_node": [ + "void dom_element_set_id_attribute_node(attr idAttr, bool isId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNode Since: DOM Level 3" + ], + "dom_element_set_id_attribute_ns": [ + "void dom_element_set_id_attribute_ns(string namespaceURI, string localName, bool isId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNS Since: DOM Level 3" + ], + "dom_import_simplexml": [ + "somNode dom_import_simplexml(sxeobject node)", + "Get a simplexml_element object from dom to allow for processing" + ], + "dom_namednodemap_get_named_item": [ + "DOMNode dom_namednodemap_get_named_item(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549 Since:" + ], + "dom_namednodemap_get_named_item_ns": [ + "DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS Since: DOM Level 2" + ], + "dom_namednodemap_item": [ + "DOMNode dom_namednodemap_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9 Since:" + ], + "dom_namednodemap_remove_named_item": [ + "DOMNode dom_namednodemap_remove_named_item(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193 Since:" + ], + "dom_namednodemap_remove_named_item_ns": [ + "DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS Since: DOM Level 2" + ], + "dom_namednodemap_set_named_item": [ + "DOMNode dom_namednodemap_set_named_item(DOMNode arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788 Since:" + ], + "dom_namednodemap_set_named_item_ns": [ + "DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS Since: DOM Level 2" + ], + "dom_namelist_get_name": [ + "string dom_namelist_get_name(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName Since:" + ], + "dom_namelist_get_namespace_uri": [ + "string dom_namelist_get_namespace_uri(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI Since:" + ], + "dom_node_append_child": [ + "DomNode dom_node_append_child(DomNode newChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107 Since:" + ], + "dom_node_clone_node": [ + "DomNode dom_node_clone_node(bool deep)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4 Since:" + ], + "dom_node_compare_document_position": [ + "short dom_node_compare_document_position(DomNode other)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition Since: DOM Level 3" + ], + "dom_node_get_feature": [ + "DomNode dom_node_get_feature(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature Since: DOM Level 3" + ], + "dom_node_get_user_data": [ + "mixed dom_node_get_user_data(string key)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData Since: DOM Level 3" + ], + "dom_node_has_attributes": [ + "bool dom_node_has_attributes()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs Since: DOM Level 2" + ], + "dom_node_has_child_nodes": [ + "bool dom_node_has_child_nodes()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187 Since:" + ], + "dom_node_insert_before": [ + "domnode dom_node_insert_before(DomNode newChild, DomNode refChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727 Since:" + ], + "dom_node_is_default_namespace": [ + "bool dom_node_is_default_namespace(string namespaceURI)", + "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace Since: DOM Level 3" + ], + "dom_node_is_equal_node": [ + "bool dom_node_is_equal_node(DomNode arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode Since: DOM Level 3" + ], + "dom_node_is_same_node": [ + "bool dom_node_is_same_node(DomNode other)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode Since: DOM Level 3" + ], + "dom_node_is_supported": [ + "bool dom_node_is_supported(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Level-2-Core-Node-supports Since: DOM Level 2" + ], + "dom_node_lookup_namespace_uri": [ + "string dom_node_lookup_namespace_uri(string prefix)", + "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI Since: DOM Level 3" + ], + "dom_node_lookup_prefix": [ + "string dom_node_lookup_prefix(string namespaceURI)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix Since: DOM Level 3" + ], + "dom_node_normalize": [ + "void dom_node_normalize()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize Since:" + ], + "dom_node_remove_child": [ + "DomNode dom_node_remove_child(DomNode oldChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066 Since:" + ], + "dom_node_replace_child": [ + "DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307 Since:" + ], + "dom_node_set_user_data": [ + "mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData Since: DOM Level 3" + ], + "dom_nodelist_item": [ + "DOMNode dom_nodelist_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-844377136 Since:" + ], + "dom_string_extend_find_offset16": [ + "int dom_string_extend_find_offset16(int offset32)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16 Since:" + ], + "dom_string_extend_find_offset32": [ + "int dom_string_extend_find_offset32(int offset16)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32 Since:" + ], + "dom_text_is_whitespace_in_element_content": [ + "bool dom_text_is_whitespace_in_element_content()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3" + ], + "dom_text_replace_whole_text": [ + "DOMText dom_text_replace_whole_text(string content)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3" + ], + "dom_text_split_text": [ + "DOMText dom_text_split_text(int offset)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since:" + ], + "dom_userdatahandler_handle": [ + "dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent Since:" + ], + "dom_xpath_evaluate": [ + "mixed dom_xpath_evaluate(string expr [,DOMNode context])", + "" + ], + "dom_xpath_query": [ + "DOMNodeList dom_xpath_query(string expr [,DOMNode context])", + "" + ], + "dom_xpath_register_ns": [ + "bool dom_xpath_register_ns(string prefix, string uri)", + "" + ], + "dom_xpath_register_php_functions": [ + "void dom_xpath_register_php_functions()", + "" + ], + "each": [ + "array each(array arr)", + "Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element" + ], + "easter_date": [ + "int easter_date([int year])", + "Return the timestamp of midnight on Easter of a given year (defaults to current year)" + ], + "easter_days": [ + "int easter_days([int year, [int method]])", + "Return the number of days after March 21 that Easter falls on for a given year (defaults to current year)" + ], + "echo": [ + "void echo(string arg1 [, string ...])", + "Output one or more strings" + ], + "empty": [ + "bool empty(mixed var)", + "Determine whether a variable is empty" + ], + "enchant_broker_describe": [ + "array enchant_broker_describe(resource broker)", + "Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo()" + ], + "enchant_broker_dict_exists": [ + "bool enchant_broker_dict_exists(resource broker, string tag)", + "Whether a dictionary exists or not. Using non-empty tag" + ], + "enchant_broker_free": [ + "bool enchant_broker_free(resource broker)", + "Destroys the broker object and its dictionnaries" + ], + "enchant_broker_free_dict": [ + "resource enchant_broker_free_dict(resource dict)", + "Free the dictionary resource" + ], + "enchant_broker_get_dict_path": [ + "string enchant_broker_get_dict_path(resource broker, int dict_type)", + "Get the directory path for a given backend, works with ispell and myspell" + ], + "enchant_broker_get_error": [ + "string enchant_broker_get_error(resource broker)", + "Returns the last error of the broker" + ], + "enchant_broker_init": [ + "resource enchant_broker_init()", + "create a new broker object capable of requesting" + ], + "enchant_broker_list_dicts": [ + "string enchant_broker_list_dicts(resource broker)", + "Lists the dictionaries available for the given broker" + ], + "enchant_broker_request_dict": [ + "resource enchant_broker_request_dict(resource broker, string tag)", + "create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for (\"en_US\", \"de_DE\", ...)" + ], + "enchant_broker_request_pwl_dict": [ + "resource enchant_broker_request_pwl_dict(resource broker, string filename)", + "creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call." + ], + "enchant_broker_set_dict_path": [ + "bool enchant_broker_set_dict_path(resource broker, int dict_type, string value)", + "Set the directory path for a given backend, works with ispell and myspell" + ], + "enchant_broker_set_ordering": [ + "bool enchant_broker_set_ordering(resource broker, string tag, string ordering)", + "Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the \"*\" tag can be used as a language tag to declare a default ordering for any language that does not explictly declare an ordering." + ], + "enchant_dict_add_to_personal": [ + "void enchant_dict_add_to_personal(resource dict, string word)", + "add 'word' to personal word list" + ], + "enchant_dict_add_to_session": [ + "void enchant_dict_add_to_session(resource dict, string word)", + "add 'word' to this spell-checking session" + ], + "enchant_dict_check": [ + "bool enchant_dict_check(resource dict, string word)", + "If the word is correctly spelled return true, otherwise return false" + ], + "enchant_dict_describe": [ + "array enchant_dict_describe(resource dict)", + "Describes an individual dictionary 'dict'" + ], + "enchant_dict_get_error": [ + "string enchant_dict_get_error(resource dict)", + "Returns the last error of the current spelling-session" + ], + "enchant_dict_is_in_session": [ + "bool enchant_dict_is_in_session(resource dict, string word)", + "whether or not 'word' exists in this spelling-session" + ], + "enchant_dict_quick_check": [ + "bool enchant_dict_quick_check(resource dict, string word [, array &suggestions])", + "If the word is correctly spelled return true, otherwise return false, if suggestions variable is provided, fill it with spelling alternatives." + ], + "enchant_dict_store_replacement": [ + "void enchant_dict_store_replacement(resource dict, string mis, string cor)", + "add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list." + ], + "enchant_dict_suggest": [ + "array enchant_dict_suggest(resource dict, string word)", + "Will return a list of values if any of those pre-conditions are not met." + ], + "end": [ + "mixed end(array array_arg)", + "Advances array argument's internal pointer to the last element and return it" + ], + "ereg": [ + "int ereg(string pattern, string string [, array registers])", + "Regular expression match" + ], + "ereg_replace": [ + "string ereg_replace(string pattern, string replacement, string string)", + "Replace regular expression" + ], + "eregi": [ + "int eregi(string pattern, string string [, array registers])", + "Case-insensitive regular expression match" + ], + "eregi_replace": [ + "string eregi_replace(string pattern, string replacement, string string)", + "Case insensitive replace regular expression" + ], + "error_get_last": [ + "array error_get_last()", + "Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet." + ], + "error_log": [ + "bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])", + "Send an error message somewhere" + ], + "error_reporting": [ + "int error_reporting([int new_error_level])", + "Return the current error_reporting level, and if an argument was passed - change to the new level" + ], + "escapeshellarg": [ + "string escapeshellarg(string arg)", + "Quote and escape an argument for use in a shell command" + ], + "escapeshellcmd": [ + "string escapeshellcmd(string command)", + "Escape shell metacharacters" + ], + "exec": [ + "string exec(string command [, array &output [, int &return_value]])", + "Execute an external program" + ], + "exif_imagetype": [ + "int exif_imagetype(string imagefile)", + "Get the type of an image" + ], + "exif_read_data": [ + "array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])", + "Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails" + ], + "exif_tagname": [ + "string exif_tagname(index)", + "Get headername for index or false if not defined" + ], + "exif_thumbnail": [ + "string exif_thumbnail(string filename [, &width, &height [, &imagetype]])", + "Reads the embedded thumbnail" + ], + "exit": [ + "void exit([mixed status])", + "Output a message and terminate the current script" + ], + "exp": [ + "float exp(float number)", + "Returns e raised to the power of the number" + ], + "explode": [ + "array explode(string separator, string str [, int limit])", + "Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned." + ], + "expm1": [ + "float expm1(float number)", + "Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero" + ], + "extension_loaded": [ + "bool extension_loaded(string extension_name)", + "Returns true if the named extension is loaded" + ], + "extract": [ + "int extract(array var_array [, int extract_type [, string prefix]])", + "Imports variables into symbol table from an array" + ], + "ezmlm_hash": [ + "int ezmlm_hash(string addr)", + "Calculate EZMLM list hash value." + ], + "fclose": [ + "bool fclose(resource fp)", + "Close an open file pointer" + ], + "feof": [ + "bool feof(resource fp)", + "Test for end-of-file on a file pointer" + ], + "fflush": [ + "bool fflush(resource fp)", + "Flushes output" + ], + "fgetc": [ + "string fgetc(resource fp)", + "Get a character from file pointer" + ], + "fgetcsv": [ + "array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])", + "Get line from file pointer and parse for CSV fields" + ], + "fgets": [ + "string fgets(resource fp[, int length])", + "Get a line from file pointer" + ], + "fgetss": [ + "string fgetss(resource fp [, int length [, string allowable_tags]])", + "Get a line from file pointer and strip HTML tags" + ], + "file": [ + "array file(string filename [, int flags[, resource context]])", + "Read entire file into an array" + ], + "file_exists": [ + "bool file_exists(string filename)", + "Returns true if filename exists" + ], + "file_get_contents": [ + "string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])", + "Read the entire file into a string" + ], + "file_put_contents": [ + "int file_put_contents(string file, mixed data [, int flags [, resource context]])", + "Write/Create a file with contents data and return the number of bytes written" + ], + "fileatime": [ + "int fileatime(string filename)", + "Get last access time of file" + ], + "filectime": [ + "int filectime(string filename)", + "Get inode modification time of file" + ], + "filegroup": [ + "int filegroup(string filename)", + "Get file group" + ], + "fileinode": [ + "int fileinode(string filename)", + "Get file inode" + ], + "filemtime": [ + "int filemtime(string filename)", + "Get last modification time of file" + ], + "fileowner": [ + "int fileowner(string filename)", + "Get file owner" + ], + "fileperms": [ + "int fileperms(string filename)", + "Get file permissions" + ], + "filesize": [ + "int filesize(string filename)", + "Get file size" + ], + "filetype": [ + "string filetype(string filename)", + "Get file type" + ], + "filter_has_var": [ + "mixed filter_has_var(constant type, string variable_name)", + "* Returns true if the variable with the name 'name' exists in source." + ], + "filter_input": [ + "mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])", + "* Returns the filtered variable 'name'* from source `type`." + ], + "filter_input_array": [ + "mixed filter_input_array(constant type, [, mixed options]])", + "* Returns an array with all arguments defined in 'definition'." + ], + "filter_var": [ + "mixed filter_var(mixed variable [, long filter [, mixed options]])", + "* Returns the filtered version of the vriable." + ], + "filter_var_array": [ + "mixed filter_var_array(array data, [, mixed options]])", + "* Returns an array with all arguments defined in 'definition'." + ], + "finfo_buffer": [ + "string finfo_buffer(resource finfo, char *string [, int options [, resource context]])", + "Return infromation about a string buffer." + ], + "finfo_close": [ + "resource finfo_close(resource finfo)", + "Close fileinfo resource." + ], + "finfo_file": [ + "string finfo_file(resource finfo, char *file_name [, int options [, resource context]])", + "Return information about a file." + ], + "finfo_open": [ + "resource finfo_open([int options [, string arg]])", + "Create a new fileinfo resource." + ], + "finfo_set_flags": [ + "bool finfo_set_flags(resource finfo, int options)", + "Set libmagic configuration options." + ], + "floatval": [ + "float floatval(mixed var)", + "Get the float value of a variable" + ], + "flock": [ + "bool flock(resource fp, int operation [, int &wouldblock])", + "Portable file locking" + ], + "floor": [ + "float floor(float number)", + "Returns the next lowest integer value from the number" + ], + "flush": [ + "void flush()", + "Flush the output buffer" + ], + "fmod": [ + "float fmod(float x, float y)", + "Returns the remainder of dividing x by y as a float" + ], + "fnmatch": [ + "bool fnmatch(string pattern, string filename [, int flags])", + "Match filename against pattern" + ], + "fopen": [ + "resource fopen(string filename, string mode [, bool use_include_path [, resource context]])", + "Open a file or a URL and return a file pointer" + ], + "forward_static_call": [ + "mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...])", + "Call a user function which is the first parameter" + ], + "fpassthru": [ + "int fpassthru(resource fp)", + "Output all remaining data from a file pointer" + ], + "fprintf": [ + "int fprintf(resource stream, string format [, mixed arg1 [, mixed ...]])", + "Output a formatted string into a stream" + ], + "fputcsv": [ + "int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]])", + "Format line as CSV and write to file pointer" + ], + "fread": [ + "string fread(resource fp, int length)", + "Binary-safe file read" + ], + "frenchtojd": [ + "int frenchtojd(int month, int day, int year)", + "Converts a french republic calendar date to julian day count" + ], + "fscanf": [ + "mixed fscanf(resource stream, string format [, string ...])", + "Implements a mostly ANSI compatible fscanf()" + ], + "fseek": [ + "int fseek(resource fp, int offset [, int whence])", + "Seek on a file pointer" + ], + "fsockopen": [ + "resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])", + "Open Internet or Unix domain socket connection" + ], + "fstat": [ + "array fstat(resource fp)", + "Stat() on a filehandle" + ], + "ftell": [ + "int ftell(resource fp)", + "Get file pointer's read/write position" + ], + "ftok": [ + "int ftok(string pathname, string proj)", + "Convert a pathname and a project identifier to a System V IPC key" + ], + "ftp_alloc": [ + "bool ftp_alloc(resource stream, int size[, &response])", + "Attempt to allocate space on the remote FTP server" + ], + "ftp_cdup": [ + "bool ftp_cdup(resource stream)", + "Changes to the parent directory" + ], + "ftp_chdir": [ + "bool ftp_chdir(resource stream, string directory)", + "Changes directories" + ], + "ftp_chmod": [ + "int ftp_chmod(resource stream, int mode, string filename)", + "Sets permissions on a file" + ], + "ftp_close": [ + "bool ftp_close(resource stream)", + "Closes the FTP stream" + ], + "ftp_connect": [ + "resource ftp_connect(string host [, int port [, int timeout]])", + "Opens a FTP stream" + ], + "ftp_delete": [ + "bool ftp_delete(resource stream, string file)", + "Deletes a file" + ], + "ftp_exec": [ + "bool ftp_exec(resource stream, string command)", + "Requests execution of a program on the FTP server" + ], + "ftp_fget": [ + "bool ftp_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])", + "Retrieves a file from the FTP server and writes it to an open file" + ], + "ftp_fput": [ + "bool ftp_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])", + "Stores a file from an open file to the FTP server" + ], + "ftp_get": [ + "bool ftp_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])", + "Retrieves a file from the FTP server and writes it to a local file" + ], + "ftp_get_option": [ + "mixed ftp_get_option(resource stream, int option)", + "Gets an FTP option" + ], + "ftp_login": [ + "bool ftp_login(resource stream, string username, string password)", + "Logs into the FTP server" + ], + "ftp_mdtm": [ + "int ftp_mdtm(resource stream, string filename)", + "Returns the last modification time of the file, or -1 on error" + ], + "ftp_mkdir": [ + "string ftp_mkdir(resource stream, string directory)", + "Creates a directory and returns the absolute path for the new directory or false on error" + ], + "ftp_nb_continue": [ + "int ftp_nb_continue(resource stream)", + "Continues retrieving/sending a file nbronously" + ], + "ftp_nb_fget": [ + "int ftp_nb_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])", + "Retrieves a file from the FTP server asynchronly and writes it to an open file" + ], + "ftp_nb_fput": [ + "int ftp_nb_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])", + "Stores a file from an open file to the FTP server nbronly" + ], + "ftp_nb_get": [ + "int ftp_nb_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])", + "Retrieves a file from the FTP server nbhronly and writes it to a local file" + ], + "ftp_nb_put": [ + "int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])", + "Stores a file on the FTP server" + ], + "ftp_nlist": [ + "array ftp_nlist(resource stream, string directory)", + "Returns an array of filenames in the given directory" + ], + "ftp_pasv": [ + "bool ftp_pasv(resource stream, bool pasv)", + "Turns passive mode on or off" + ], + "ftp_put": [ + "bool ftp_put(resource stream, string remote_file, string local_file, int mode[, int startpos])", + "Stores a file on the FTP server" + ], + "ftp_pwd": [ + "string ftp_pwd(resource stream)", + "Returns the present working directory" + ], + "ftp_raw": [ + "array ftp_raw(resource stream, string command)", + "Sends a literal command to the FTP server" + ], + "ftp_rawlist": [ + "array ftp_rawlist(resource stream, string directory [, bool recursive])", + "Returns a detailed listing of a directory as an array of output lines" + ], + "ftp_rename": [ + "bool ftp_rename(resource stream, string src, string dest)", + "Renames the given file to a new path" + ], + "ftp_rmdir": [ + "bool ftp_rmdir(resource stream, string directory)", + "Removes a directory" + ], + "ftp_set_option": [ + "bool ftp_set_option(resource stream, int option, mixed value)", + "Sets an FTP option" + ], + "ftp_site": [ + "bool ftp_site(resource stream, string cmd)", + "Sends a SITE command to the server" + ], + "ftp_size": [ + "int ftp_size(resource stream, string filename)", + "Returns the size of the file, or -1 on error" + ], + "ftp_ssl_connect": [ + "resource ftp_ssl_connect(string host [, int port [, int timeout]])", + "Opens a FTP-SSL stream" + ], + "ftp_systype": [ + "string ftp_systype(resource stream)", + "Returns the system type identifier" + ], + "ftruncate": [ + "bool ftruncate(resource fp, int size)", + "Truncate file to 'size' length" + ], + "func_get_arg": [ + "mixed func_get_arg(int arg_num)", + "Get the $arg_num'th argument that was passed to the function" + ], + "func_get_args": [ + "array func_get_args()", + "Get an array of the arguments that were passed to the function" + ], + "func_num_args": [ + "int func_num_args()", + "Get the number of arguments that were passed to the function" + ], + "function ": ["", ""], + "foreach ": ["", ""], + "function_exists": [ + "bool function_exists(string function_name)", + "Checks if the function exists" + ], + "fwrite": [ + "int fwrite(resource fp, string str [, int length])", + "Binary-safe file write" + ], + "gc_collect_cycles": [ + "int gc_collect_cycles()", + "Forces collection of any existing garbage cycles. Returns number of freed zvals" + ], + "gc_disable": [ + "void gc_disable()", + "Deactivates the circular reference collector" + ], + "gc_enable": [ + "void gc_enable()", + "Activates the circular reference collector" + ], + "gc_enabled": [ + "void gc_enabled()", + "Returns status of the circular reference collector" + ], + "gd_info": [ + "array gd_info()", + "" + ], + "getKeywords": [ + "static array getKeywords(string $locale) {", + "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array * }}}" + ], + "get_browser": [ + "mixed get_browser([string browser_name [, bool return_array]])", + "Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array." + ], + "get_called_class": [ + "string get_called_class()", + "Retrieves the \"Late Static Binding\" class name" + ], + "get_cfg_var": [ + "mixed get_cfg_var(string option_name)", + "Get the value of a PHP configuration option" + ], + "get_class": [ + "string get_class([object object])", + "Retrieves the class name" + ], + "get_class_methods": [ + "array get_class_methods(mixed class)", + "Returns an array of method names for class or class instance." + ], + "get_class_vars": [ + "array get_class_vars(string class_name)", + "Returns an array of default properties of the class." + ], + "get_current_user": [ + "string get_current_user()", + "Get the name of the owner of the current PHP script" + ], + "get_declared_classes": [ + "array get_declared_classes()", + "Returns an array of all declared classes." + ], + "get_declared_interfaces": [ + "array get_declared_interfaces()", + "Returns an array of all declared interfaces." + ], + "get_defined_constants": [ + "array get_defined_constants([bool categorize])", + "Return an array containing the names and values of all defined constants" + ], + "get_defined_functions": [ + "array get_defined_functions()", + "Returns an array of all defined functions" + ], + "get_defined_vars": [ + "array get_defined_vars()", + "Returns an associative array of names and values of all currently defined variable names (variables in the current scope)" + ], + "get_display_language": [ + "static string get_display_language($locale[, $in_locale = null])", + "* gets the language for the $locale in $in_locale or default_locale" + ], + "get_display_name": [ + "static string get_display_name($locale[, $in_locale = null])", + "* gets the name for the $locale in $in_locale or default_locale" + ], + "get_display_region": [ + "static string get_display_region($locale, $in_locale = null)", + "* gets the region for the $locale in $in_locale or default_locale" + ], + "get_display_script": [ + "static string get_display_script($locale, $in_locale = null)", + "* gets the script for the $locale in $in_locale or default_locale" + ], + "get_extension_funcs": [ + "array get_extension_funcs(string extension_name)", + "Returns an array with the names of functions belonging to the named extension" + ], + "get_headers": [ + "array get_headers(string url[, int format])", + "fetches all the headers sent by the server in response to a HTTP request" + ], + "get_html_translation_table": [ + "array get_html_translation_table([int table [, int quote_style]])", + "Returns the internal translation table used by htmlspecialchars and htmlentities" + ], + "get_include_path": [ + "string get_include_path()", + "Get the current include_path configuration option" + ], + "get_included_files": [ + "array get_included_files()", + "Returns an array with the file names that were include_once()'d" + ], + "get_loaded_extensions": [ + "array get_loaded_extensions([bool zend_extensions])", + "Return an array containing names of loaded extensions" + ], + "get_magic_quotes_gpc": [ + "int get_magic_quotes_gpc()", + "Get the current active configuration setting of magic_quotes_gpc" + ], + "get_magic_quotes_runtime": [ + "int get_magic_quotes_runtime()", + "Get the current active configuration setting of magic_quotes_runtime" + ], + "get_meta_tags": [ + "array get_meta_tags(string filename [, bool use_include_path])", + "Extracts all meta tag content attributes from a file and returns an array" + ], + "get_object_vars": [ + "array get_object_vars(object obj)", + "Returns an array of object properties" + ], + "get_parent_class": [ + "string get_parent_class([mixed object])", + "Retrieves the parent class name for object or class or current scope." + ], + "get_resource_type": [ + "string get_resource_type(resource res)", + "Get the resource type name for a given resource" + ], + "getallheaders": [ + "array getallheaders()", + "" + ], + "getcwd": [ + "mixed getcwd()", + "Gets the current directory" + ], + "getdate": [ + "array getdate([int timestamp])", + "Get date/time information" + ], + "getenv": [ + "string getenv(string varname)", + "Get the value of an environment variable" + ], + "gethostbyaddr": [ + "string gethostbyaddr(string ip_address)", + "Get the Internet host name corresponding to a given IP address" + ], + "gethostbyname": [ + "string gethostbyname(string hostname)", + "Get the IP address corresponding to a given Internet host name" + ], + "gethostbynamel": [ + "array gethostbynamel(string hostname)", + "Return a list of IP addresses that a given hostname resolves to." + ], + "gethostname": [ + "string gethostname()", + "Get the host name of the current machine" + ], + "getimagesize": [ + "array getimagesize(string imagefile [, array info])", + "Get the size of an image as 4-element array" + ], + "getlastmod": [ + "int getlastmod()", + "Get time of last page modification" + ], + "getmygid": [ + "int getmygid()", + "Get PHP script owner's GID" + ], + "getmyinode": [ + "int getmyinode()", + "Get the inode of the current script being parsed" + ], + "getmypid": [ + "int getmypid()", + "Get current process ID" + ], + "getmyuid": [ + "int getmyuid()", + "Get PHP script owner's UID" + ], + "getopt": [ + "array getopt(string options [, array longopts])", + "Get options from the command line argument list" + ], + "getprotobyname": [ + "int getprotobyname(string name)", + "Returns protocol number associated with name as per /etc/protocols" + ], + "getprotobynumber": [ + "string getprotobynumber(int proto)", + "Returns protocol name associated with protocol number proto" + ], + "getrandmax": [ + "int getrandmax()", + "Returns the maximum value a random number can have" + ], + "getrusage": [ + "array getrusage([int who])", + "Returns an array of usage statistics" + ], + "getservbyname": [ + "int getservbyname(string service, string protocol)", + "Returns port associated with service. Protocol must be \"tcp\" or \"udp\"" + ], + "getservbyport": [ + "string getservbyport(int port, string protocol)", + "Returns service name associated with port. Protocol must be \"tcp\" or \"udp\"" + ], + "gettext": [ + "string gettext(string msgid)", + "Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist" + ], + "gettimeofday": [ + "array gettimeofday([bool get_as_float])", + "Returns the current time as array" + ], + "gettype": [ + "string gettype(mixed var)", + "Returns the type of the variable" + ], + "glob": [ + "array glob(string pattern [, int flags])", + "Find pathnames matching a pattern" + ], + "gmdate": [ + "string gmdate(string format [, long timestamp])", + "Format a GMT date/time" + ], + "gmmktime": [ + "int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])", + "Get UNIX timestamp for a GMT date" + ], + "gmp_abs": [ + "resource gmp_abs(resource a)", + "Calculates absolute value" + ], + "gmp_add": [ + "resource gmp_add(resource a, resource b)", + "Add a and b" + ], + "gmp_and": [ + "resource gmp_and(resource a, resource b)", + "Calculates logical AND of a and b" + ], + "gmp_clrbit": [ + "void gmp_clrbit(resource &a, int index)", + "Clears bit in a" + ], + "gmp_cmp": [ + "int gmp_cmp(resource a, resource b)", + "Compares two numbers" + ], + "gmp_com": [ + "resource gmp_com(resource a)", + "Calculates one's complement of a" + ], + "gmp_div_q": [ + "resource gmp_div_q(resource a, resource b [, int round])", + "Divide a by b, returns quotient only" + ], + "gmp_div_qr": [ + "array gmp_div_qr(resource a, resource b [, int round])", + "Divide a by b, returns quotient and reminder" + ], + "gmp_div_r": [ + "resource gmp_div_r(resource a, resource b [, int round])", + "Divide a by b, returns reminder only" + ], + "gmp_divexact": [ + "resource gmp_divexact(resource a, resource b)", + "Divide a by b using exact division algorithm" + ], + "gmp_fact": [ + "resource gmp_fact(int a)", + "Calculates factorial function" + ], + "gmp_gcd": [ + "resource gmp_gcd(resource a, resource b)", + "Computes greatest common denominator (gcd) of a and b" + ], + "gmp_gcdext": [ + "array gmp_gcdext(resource a, resource b)", + "Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)" + ], + "gmp_hamdist": [ + "int gmp_hamdist(resource a, resource b)", + "Calculates hamming distance between a and b" + ], + "gmp_init": [ + "resource gmp_init(mixed number [, int base])", + "Initializes GMP number" + ], + "gmp_intval": [ + "int gmp_intval(resource gmpnumber)", + "Gets signed long value of GMP number" + ], + "gmp_invert": [ + "resource gmp_invert(resource a, resource b)", + "Computes the inverse of a modulo b" + ], + "gmp_jacobi": [ + "int gmp_jacobi(resource a, resource b)", + "Computes Jacobi symbol" + ], + "gmp_legendre": [ + "int gmp_legendre(resource a, resource b)", + "Computes Legendre symbol" + ], + "gmp_mod": [ + "resource gmp_mod(resource a, resource b)", + "Computes a modulo b" + ], + "gmp_mul": [ + "resource gmp_mul(resource a, resource b)", + "Multiply a and b" + ], + "gmp_neg": [ + "resource gmp_neg(resource a)", + "Negates a number" + ], + "gmp_nextprime": [ + "resource gmp_nextprime(resource a)", + "Finds next prime of a" + ], + "gmp_or": [ + "resource gmp_or(resource a, resource b)", + "Calculates logical OR of a and b" + ], + "gmp_perfect_square": [ + "bool gmp_perfect_square(resource a)", + "Checks if a is an exact square" + ], + "gmp_popcount": [ + "int gmp_popcount(resource a)", + "Calculates the population count of a" + ], + "gmp_pow": [ + "resource gmp_pow(resource base, int exp)", + "Raise base to power exp" + ], + "gmp_powm": [ + "resource gmp_powm(resource base, resource exp, resource mod)", + "Raise base to power exp and take result modulo mod" + ], + "gmp_prob_prime": [ + "int gmp_prob_prime(resource a[, int reps])", + "Checks if a is \"probably prime\"" + ], + "gmp_random": [ + "resource gmp_random([int limiter])", + "Gets random number" + ], + "gmp_scan0": [ + "int gmp_scan0(resource a, int start)", + "Finds first zero bit" + ], + "gmp_scan1": [ + "int gmp_scan1(resource a, int start)", + "Finds first non-zero bit" + ], + "gmp_setbit": [ + "void gmp_setbit(resource &a, int index[, bool set_clear])", + "Sets or clear bit in a" + ], + "gmp_sign": [ + "int gmp_sign(resource a)", + "Gets the sign of the number" + ], + "gmp_sqrt": [ + "resource gmp_sqrt(resource a)", + "Takes integer part of square root of a" + ], + "gmp_sqrtrem": [ + "array gmp_sqrtrem(resource a)", + "Square root with remainder" + ], + "gmp_strval": [ + "string gmp_strval(resource gmpnumber [, int base])", + "Gets string representation of GMP number" + ], + "gmp_sub": [ + "resource gmp_sub(resource a, resource b)", + "Subtract b from a" + ], + "gmp_testbit": [ + "bool gmp_testbit(resource a, int index)", + "Tests if bit is set in a" + ], + "gmp_xor": [ + "resource gmp_xor(resource a, resource b)", + "Calculates logical exclusive OR of a and b" + ], + "gmstrftime": [ + "string gmstrftime(string format [, int timestamp])", + "Format a GMT/UCT time/date according to locale settings" + ], + "grapheme_extract": [ + "string grapheme_extract(string str, int size[, int extract_type[, int start[, int next]]])", + "Function to extract a sequence of default grapheme clusters" + ], + "grapheme_stripos": [ + "int grapheme_stripos(string haystack, string needle [, int offset ])", + "Find position of first occurrence of a string within another, ignoring case differences" + ], + "grapheme_stristr": [ + "string grapheme_stristr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "grapheme_strlen": [ + "int grapheme_strlen(string str)", + "Get number of graphemes in a string" + ], + "grapheme_strpos": [ + "int grapheme_strpos(string haystack, string needle [, int offset ])", + "Find position of first occurrence of a string within another" + ], + "grapheme_strripos": [ + "int grapheme_strripos(string haystack, string needle [, int offset])", + "Find position of last occurrence of a string within another, ignoring case" + ], + "grapheme_strrpos": [ + "int grapheme_strrpos(string haystack, string needle [, int offset])", + "Find position of last occurrence of a string within another" + ], + "grapheme_strstr": [ + "string grapheme_strstr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "grapheme_substr": [ + "string grapheme_substr(string str, int start [, int length])", + "Returns part of a string" + ], + "gregoriantojd": [ + "int gregoriantojd(int month, int day, int year)", + "Converts a gregorian calendar date to julian day count" + ], + "gzcompress": [ + "string gzcompress(string data [, int level])", + "Gzip-compress a string" + ], + "gzdeflate": [ + "string gzdeflate(string data [, int level])", + "Gzip-compress a string" + ], + "gzencode": [ + "string gzencode(string data [, int level [, int encoding_mode]])", + "GZ encode a string" + ], + "gzfile": [ + "array gzfile(string filename [, int use_include_path])", + "Read und uncompress entire .gz-file into an array" + ], + "gzinflate": [ + "string gzinflate(string data [, int length])", + "Unzip a gzip-compressed string" + ], + "gzopen": [ + "resource gzopen(string filename, string mode [, int use_include_path])", + "Open a .gz-file and return a .gz-file pointer" + ], + "gzuncompress": [ + "string gzuncompress(string data [, int length])", + "Unzip a gzip-compressed string" + ], + "hash": [ + "string hash(string algo, string data[, bool raw_output = false])", + "Generate a hash of a given input string Returns lowercase hexits by default" + ], + "hash_algos": [ + "array hash_algos()", + "Return a list of registered hashing algorithms" + ], + "hash_copy": [ + "resource hash_copy(resource context)", + "Copy hash resource" + ], + "hash_file": [ + "string hash_file(string algo, string filename[, bool raw_output = false])", + "Generate a hash of a given file Returns lowercase hexits by default" + ], + "hash_final": [ + "string hash_final(resource context[, bool raw_output=false])", + "Output resulting digest" + ], + "hash_hmac": [ + "string hash_hmac(string algo, string data, string key[, bool raw_output = false])", + "Generate a hash of a given input string with a key using HMAC Returns lowercase hexits by default" + ], + "hash_hmac_file": [ + "string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])", + "Generate a hash of a given file with a key using HMAC Returns lowercase hexits by default" + ], + "hash_init": [ + "resource hash_init(string algo[, int options, string key])", + "Initialize a hashing context" + ], + "hash_update": [ + "bool hash_update(resource context, string data)", + "Pump data into the hashing algorithm" + ], + "hash_update_file": [ + "bool hash_update_file(resource context, string filename[, resource context])", + "Pump data into the hashing algorithm from a file" + ], + "hash_update_stream": [ + "int hash_update_stream(resource context, resource handle[, integer length])", + "Pump data into the hashing algorithm from an open stream" + ], + "header": [ + "void header(string header [, bool replace, [int http_response_code]])", + "Sends a raw HTTP header" + ], + "header_remove": [ + "void header_remove([string name])", + "Removes an HTTP header previously set using header()" + ], + "headers_list": [ + "array headers_list()", + "Return list of headers to be sent / already sent" + ], + "headers_sent": [ + "bool headers_sent([string &$file [, int &$line]])", + "Returns true if headers have already been sent, false otherwise" + ], + "hebrev": [ + "string hebrev(string str [, int max_chars_per_line])", + "Converts logical Hebrew text to visual text" + ], + "hebrevc": [ + "string hebrevc(string str [, int max_chars_per_line])", + "Converts logical Hebrew text to visual text with newline conversion" + ], + "hexdec": [ + "int hexdec(string hexadecimal_number)", + "Returns the decimal equivalent of the hexadecimal number" + ], + "highlight_file": [ + "bool highlight_file(string file_name [, bool return] )", + "Syntax highlight a source file" + ], + "highlight_string": [ + "bool highlight_string(string string [, bool return] )", + "Syntax highlight a string or optionally return it" + ], + "html_entity_decode": [ + "string html_entity_decode(string string [, int quote_style][, string charset])", + "Convert all HTML entities to their applicable characters" + ], + "htmlentities": [ + "string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])", + "Convert all applicable characters to HTML entities" + ], + "htmlspecialchars": [ + "string htmlspecialchars(string string [, int quote_style[, string charset[, bool double_encode]]])", + "Convert special characters to HTML entities" + ], + "htmlspecialchars_decode": [ + "string htmlspecialchars_decode(string string [, int quote_style])", + "Convert special HTML entities back to characters" + ], + "http_build_query": [ + "string http_build_query(mixed formdata [, string prefix [, string arg_separator]])", + "Generates a form-encoded query string from an associative array or object." + ], + "hypot": [ + "float hypot(float num1, float num2)", + "Returns sqrt(num1*num1 + num2*num2)" + ], + "ibase_add_user": [ + "bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Add a user to security database" + ], + "ibase_affected_rows": [ + "int ibase_affected_rows( [ resource link_identifier ] )", + "Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement" + ], + "ibase_backup": [ + "mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]])", + "Initiates a backup task in the service manager and returns immediately" + ], + "ibase_blob_add": [ + "bool ibase_blob_add(resource blob_handle, string data)", + "Add data into created blob" + ], + "ibase_blob_cancel": [ + "bool ibase_blob_cancel(resource blob_handle)", + "Cancel creating blob" + ], + "ibase_blob_close": [ + "string ibase_blob_close(resource blob_handle)", + "Close blob" + ], + "ibase_blob_create": [ + "resource ibase_blob_create([resource link_identifier])", + "Create blob for adding data" + ], + "ibase_blob_echo": [ + "bool ibase_blob_echo([ resource link_identifier, ] string blob_id)", + "Output blob contents to browser" + ], + "ibase_blob_get": [ + "string ibase_blob_get(resource blob_handle, int len)", + "Get len bytes data from open blob" + ], + "ibase_blob_import": [ + "string ibase_blob_import([ resource link_identifier, ] resource file)", + "Create blob, copy file in it, and close it" + ], + "ibase_blob_info": [ + "array ibase_blob_info([ resource link_identifier, ] string blob_id)", + "Return blob length and other useful info" + ], + "ibase_blob_open": [ + "resource ibase_blob_open([ resource link_identifier, ] string blob_id)", + "Open blob for retrieving data parts" + ], + "ibase_close": [ + "bool ibase_close([resource link_identifier])", + "Close an InterBase connection" + ], + "ibase_commit": [ + "bool ibase_commit( resource link_identifier )", + "Commit transaction" + ], + "ibase_commit_ret": [ + "bool ibase_commit_ret( resource link_identifier )", + "Commit transaction and retain the transaction context" + ], + "ibase_connect": [ + "resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])", + "Open a connection to an InterBase database" + ], + "ibase_db_info": [ + "string ibase_db_info(resource service_handle, string db, int action [, int argument])", + "Request statistics about a database" + ], + "ibase_delete_user": [ + "bool ibase_delete_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Delete a user from security database" + ], + "ibase_drop_db": [ + "bool ibase_drop_db([resource link_identifier])", + "Drop an InterBase database" + ], + "ibase_errcode": [ + "int ibase_errcode()", + "Return error code" + ], + "ibase_errmsg": [ + "string ibase_errmsg()", + "Return error message" + ], + "ibase_execute": [ + "mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]])", + "Execute a previously prepared query" + ], + "ibase_fetch_assoc": [ + "array ibase_fetch_assoc(resource result [, int fetch_flags])", + "Fetch a row from the results of a query" + ], + "ibase_fetch_object": [ + "object ibase_fetch_object(resource result [, int fetch_flags])", + "Fetch a object from the results of a query" + ], + "ibase_fetch_row": [ + "array ibase_fetch_row(resource result [, int fetch_flags])", + "Fetch a row from the results of a query" + ], + "ibase_field_info": [ + "array ibase_field_info(resource query_result, int field_number)", + "Get information about a field" + ], + "ibase_free_event_handler": [ + "bool ibase_free_event_handler(resource event)", + "Frees the event handler set by ibase_set_event_handler()" + ], + "ibase_free_query": [ + "bool ibase_free_query(resource query)", + "Free memory used by a query" + ], + "ibase_free_result": [ + "bool ibase_free_result(resource result)", + "Free the memory used by a result" + ], + "ibase_gen_id": [ + "int ibase_gen_id(string generator [, int increment [, resource link_identifier ]])", + "Increments the named generator and returns its new value" + ], + "ibase_maintain_db": [ + "bool ibase_maintain_db(resource service_handle, string db, int action [, int argument])", + "Execute a maintenance command on the database server" + ], + "ibase_modify_user": [ + "bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Modify a user in security database" + ], + "ibase_name_result": [ + "bool ibase_name_result(resource result, string name)", + "Assign a name to a result for use with ... WHERE CURRENT OF statements" + ], + "ibase_num_fields": [ + "int ibase_num_fields(resource query_result)", + "Get the number of fields in result" + ], + "ibase_num_params": [ + "int ibase_num_params(resource query)", + "Get the number of params in a prepared query" + ], + "ibase_num_rows": [ + "int ibase_num_rows( resource result_identifier )", + "Return the number of rows that are available in a result" + ], + "ibase_param_info": [ + "array ibase_param_info(resource query, int field_number)", + "Get information about a parameter" + ], + "ibase_pconnect": [ + "resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])", + "Open a persistent connection to an InterBase database" + ], + "ibase_prepare": [ + "resource ibase_prepare(resource link_identifier[, string query [, resource trans_identifier ]])", + "Prepare a query for later execution" + ], + "ibase_query": [ + "mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]])", + "Execute a query" + ], + "ibase_restore": [ + "mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]])", + "Initiates a restore task in the service manager and returns immediately" + ], + "ibase_rollback": [ + "bool ibase_rollback( resource link_identifier )", + "Rollback transaction" + ], + "ibase_rollback_ret": [ + "bool ibase_rollback_ret( resource link_identifier )", + "Rollback transaction and retain the transaction context" + ], + "ibase_server_info": [ + "string ibase_server_info(resource service_handle, int action)", + "Request information about a database server" + ], + "ibase_service_attach": [ + "resource ibase_service_attach(string host, string dba_username, string dba_password)", + "Connect to the service manager" + ], + "ibase_service_detach": [ + "bool ibase_service_detach(resource service_handle)", + "Disconnect from the service manager" + ], + "ibase_set_event_handler": [ + "resource ibase_set_event_handler([resource link_identifier,] callback handler, string event [, string event [, ...]])", + "Register the callback for handling each of the named events" + ], + "ibase_trans": [ + "resource ibase_trans([int trans_args [, resource link_identifier [, ... ], int trans_args [, resource link_identifier [, ... ]] [, ...]]])", + "Start a transaction over one or several databases" + ], + "ibase_wait_event": [ + "string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]])", + "Waits for any one of the passed Interbase events to be posted by the database, and returns its name" + ], + "iconv": [ + "string iconv(string in_charset, string out_charset, string str)", + "Returns str converted to the out_charset character set" + ], + "iconv_get_encoding": [ + "mixed iconv_get_encoding([string type])", + "Get internal encoding and output encoding for ob_iconv_handler()" + ], + "iconv_mime_decode": [ + "string iconv_mime_decode(string encoded_string [, int mode, string charset])", + "Decodes a mime header field" + ], + "iconv_mime_decode_headers": [ + "array iconv_mime_decode_headers(string headers [, int mode, string charset])", + "Decodes multiple mime header fields" + ], + "iconv_mime_encode": [ + "string iconv_mime_encode(string field_name, string field_value [, array preference])", + "Composes a mime header field with field_name and field_value in a specified scheme" + ], + "iconv_set_encoding": [ + "bool iconv_set_encoding(string type, string charset)", + "Sets internal encoding and output encoding for ob_iconv_handler()" + ], + "iconv_strlen": [ + "int iconv_strlen(string str [, string charset])", + "Returns the character count of str" + ], + "iconv_strpos": [ + "int iconv_strpos(string haystack, string needle [, int offset [, string charset]])", + "Finds position of first occurrence of needle within part of haystack beginning with offset" + ], + "iconv_strrpos": [ + "int iconv_strrpos(string haystack, string needle [, string charset])", + "Finds position of last occurrence of needle within part of haystack beginning with offset" + ], + "iconv_substr": [ + "string iconv_substr(string str, int offset, [int length, string charset])", + "Returns specified part of a string" + ], + "idate": [ + "int idate(string format [, int timestamp])", + "Format a local time/date as integer" + ], + "idn_to_ascii": [ + "int idn_to_ascii(string domain[, int options])", + "Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC" + ], + "idn_to_utf8": [ + "int idn_to_utf8(string domain[, int options])", + "Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC" + ], + "ignore_user_abort": [ + "int ignore_user_abort([string value])", + "Set whether we want to ignore a user abort event or not" + ], + "image2wbmp": [ + "bool image2wbmp(resource im [, string filename [, int threshold]])", + "Output WBMP image to browser or file" + ], + "image_type_to_extension": [ + "string image_type_to_extension(int imagetype [, bool include_dot])", + "Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype" + ], + "image_type_to_mime_type": [ + "string image_type_to_mime_type(int imagetype)", + "Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype" + ], + "imagealphablending": [ + "bool imagealphablending(resource im, bool on)", + "Turn alpha blending mode on or off for the given image" + ], + "imageantialias": [ + "bool imageantialias(resource im, bool on)", + "Should antialiased functions used or not" + ], + "imagearc": [ + "bool imagearc(resource im, int cx, int cy, int w, int h, int s, int e, int col)", + "Draw a partial ellipse" + ], + "imagechar": [ + "bool imagechar(resource im, int font, int x, int y, string c, int col)", + "Draw a character" + ], + "imagecharup": [ + "bool imagecharup(resource im, int font, int x, int y, string c, int col)", + "Draw a character rotated 90 degrees counter-clockwise" + ], + "imagecolorallocate": [ + "int imagecolorallocate(resource im, int red, int green, int blue)", + "Allocate a color for an image" + ], + "imagecolorallocatealpha": [ + "int imagecolorallocatealpha(resource im, int red, int green, int blue, int alpha)", + "Allocate a color with an alpha level. Works for true color and palette based images" + ], + "imagecolorat": [ + "int imagecolorat(resource im, int x, int y)", + "Get the index of the color of a pixel" + ], + "imagecolorclosest": [ + "int imagecolorclosest(resource im, int red, int green, int blue)", + "Get the index of the closest color to the specified color" + ], + "imagecolorclosestalpha": [ + "int imagecolorclosestalpha(resource im, int red, int green, int blue, int alpha)", + "Find the closest matching colour with alpha transparency" + ], + "imagecolorclosesthwb": [ + "int imagecolorclosesthwb(resource im, int red, int green, int blue)", + "Get the index of the color which has the hue, white and blackness nearest to the given color" + ], + "imagecolordeallocate": [ + "bool imagecolordeallocate(resource im, int index)", + "De-allocate a color for an image" + ], + "imagecolorexact": [ + "int imagecolorexact(resource im, int red, int green, int blue)", + "Get the index of the specified color" + ], + "imagecolorexactalpha": [ + "int imagecolorexactalpha(resource im, int red, int green, int blue, int alpha)", + "Find exact match for colour with transparency" + ], + "imagecolormatch": [ + "bool imagecolormatch(resource im1, resource im2)", + "Makes the colors of the palette version of an image more closely match the true color version" + ], + "imagecolorresolve": [ + "int imagecolorresolve(resource im, int red, int green, int blue)", + "Get the index of the specified color or its closest possible alternative" + ], + "imagecolorresolvealpha": [ + "int imagecolorresolvealpha(resource im, int red, int green, int blue, int alpha)", + "Resolve/Allocate a colour with an alpha level. Works for true colour and palette based images" + ], + "imagecolorset": [ + "void imagecolorset(resource im, int col, int red, int green, int blue)", + "Set the color for the specified palette index" + ], + "imagecolorsforindex": [ + "array imagecolorsforindex(resource im, int col)", + "Get the colors for an index" + ], + "imagecolorstotal": [ + "int imagecolorstotal(resource im)", + "Find out the number of colors in an image's palette" + ], + "imagecolortransparent": [ + "int imagecolortransparent(resource im [, int col])", + "Define a color as transparent" + ], + "imageconvolution": [ + "resource imageconvolution(resource src_im, array matrix3x3, double div, double offset)", + "Apply a 3x3 convolution matrix, using coefficient div and offset" + ], + "imagecopy": [ + "bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)", + "Copy part of an image" + ], + "imagecopymerge": [ + "bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)", + "Merge one part of an image with another" + ], + "imagecopymergegray": [ + "bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)", + "Merge one part of an image with another" + ], + "imagecopyresampled": [ + "bool imagecopyresampled(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)", + "Copy and resize part of an image using resampling to help ensure clarity" + ], + "imagecopyresized": [ + "bool imagecopyresized(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)", + "Copy and resize part of an image" + ], + "imagecreate": [ + "resource imagecreate(int x_size, int y_size)", + "Create a new image" + ], + "imagecreatefromgd": [ + "resource imagecreatefromgd(string filename)", + "Create a new image from GD file or URL" + ], + "imagecreatefromgd2": [ + "resource imagecreatefromgd2(string filename)", + "Create a new image from GD2 file or URL" + ], + "imagecreatefromgd2part": [ + "resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height)", + "Create a new image from a given part of GD2 file or URL" + ], + "imagecreatefromgif": [ + "resource imagecreatefromgif(string filename)", + "Create a new image from GIF file or URL" + ], + "imagecreatefromjpeg": [ + "resource imagecreatefromjpeg(string filename)", + "Create a new image from JPEG file or URL" + ], + "imagecreatefrompng": [ + "resource imagecreatefrompng(string filename)", + "Create a new image from PNG file or URL" + ], + "imagecreatefromstring": [ + "resource imagecreatefromstring(string image)", + "Create a new image from the image stream in the string" + ], + "imagecreatefromwbmp": [ + "resource imagecreatefromwbmp(string filename)", + "Create a new image from WBMP file or URL" + ], + "imagecreatefromxbm": [ + "resource imagecreatefromxbm(string filename)", + "Create a new image from XBM file or URL" + ], + "imagecreatefromxpm": [ + "resource imagecreatefromxpm(string filename)", + "Create a new image from XPM file or URL" + ], + "imagecreatetruecolor": [ + "resource imagecreatetruecolor(int x_size, int y_size)", + "Create a new true color image" + ], + "imagedashedline": [ + "bool imagedashedline(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a dashed line" + ], + "imagedestroy": [ + "bool imagedestroy(resource im)", + "Destroy an image" + ], + "imageellipse": [ + "bool imageellipse(resource im, int cx, int cy, int w, int h, int color)", + "Draw an ellipse" + ], + "imagefill": [ + "bool imagefill(resource im, int x, int y, int col)", + "Flood fill" + ], + "imagefilledarc": [ + "bool imagefilledarc(resource im, int cx, int cy, int w, int h, int s, int e, int col, int style)", + "Draw a filled partial ellipse" + ], + "imagefilledellipse": [ + "bool imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)", + "Draw an ellipse" + ], + "imagefilledpolygon": [ + "bool imagefilledpolygon(resource im, array point, int num_points, int col)", + "Draw a filled polygon" + ], + "imagefilledrectangle": [ + "bool imagefilledrectangle(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a filled rectangle" + ], + "imagefilltoborder": [ + "bool imagefilltoborder(resource im, int x, int y, int border, int col)", + "Flood fill to specific color" + ], + "imagefilter": [ + "bool imagefilter(resource src_im, int filtertype, [args] )", + "Applies Filter an image using a custom angle" + ], + "imagefontheight": [ + "int imagefontheight(int font)", + "Get font height" + ], + "imagefontwidth": [ + "int imagefontwidth(int font)", + "Get font width" + ], + "imageftbbox": [ + "array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])", + "Give the bounding box of a text using fonts via freetype2" + ], + "imagefttext": [ + "array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])", + "Write text to the image using fonts via freetype2" + ], + "imagegammacorrect": [ + "bool imagegammacorrect(resource im, float inputgamma, float outputgamma)", + "Apply a gamma correction to a GD image" + ], + "imagegd": [ + "bool imagegd(resource im [, string filename])", + "Output GD image to browser or file" + ], + "imagegd2": [ + "bool imagegd2(resource im [, string filename, [, int chunk_size, [, int type]]])", + "Output GD2 image to browser or file" + ], + "imagegif": [ + "bool imagegif(resource im [, string filename])", + "Output GIF image to browser or file" + ], + "imagegrabscreen": [ + "resource imagegrabscreen()", + "Grab a screenshot" + ], + "imagegrabwindow": [ + "resource imagegrabwindow(int window_handle [, int client_area])", + "Grab a window or its client area using a windows handle (HWND property in COM instance)" + ], + "imageinterlace": [ + "int imageinterlace(resource im [, int interlace])", + "Enable or disable interlace" + ], + "imageistruecolor": [ + "bool imageistruecolor(resource im)", + "return true if the image uses truecolor" + ], + "imagejpeg": [ + "bool imagejpeg(resource im [, string filename [, int quality]])", + "Output JPEG image to browser or file" + ], + "imagelayereffect": [ + "bool imagelayereffect(resource im, int effect)", + "Set the alpha blending flag to use the bundled libgd layering effects" + ], + "imageline": [ + "bool imageline(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a line" + ], + "imageloadfont": [ + "int imageloadfont(string filename)", + "Load a new font" + ], + "imagepalettecopy": [ + "void imagepalettecopy(resource dst, resource src)", + "Copy the palette from the src image onto the dst image" + ], + "imagepng": [ + "bool imagepng(resource im [, string filename])", + "Output PNG image to browser or file" + ], + "imagepolygon": [ + "bool imagepolygon(resource im, array point, int num_points, int col)", + "Draw a polygon" + ], + "imagepsbbox": [ + "array imagepsbbox(string text, resource font, int size [, int space, int tightness, float angle])", + "Return the bounding box needed by a string if rasterized" + ], + "imagepscopyfont": [ + "int imagepscopyfont(int font_index)", + "Make a copy of a font for purposes like extending or reenconding" + ], + "imagepsencodefont": [ + "bool imagepsencodefont(resource font_index, string filename)", + "To change a fonts character encoding vector" + ], + "imagepsextendfont": [ + "bool imagepsextendfont(resource font_index, float extend)", + "Extend or or condense if (extend < 1) a font" + ], + "imagepsfreefont": [ + "bool imagepsfreefont(resource font_index)", + "Free memory used by a font" + ], + "imagepsloadfont": [ + "resource imagepsloadfont(string pathname)", + "Load a new font from specified file" + ], + "imagepsslantfont": [ + "bool imagepsslantfont(resource font_index, float slant)", + "Slant a font" + ], + "imagepstext": [ + "array imagepstext(resource image, string text, resource font, int size, int foreground, int background, int xcoord, int ycoord [, int space [, int tightness [, float angle [, int antialias])", + "Rasterize a string over an image" + ], + "imagerectangle": [ + "bool imagerectangle(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a rectangle" + ], + "imagerotate": [ + "resource imagerotate(resource src_im, float angle, int bgdcolor [, int ignoretransparent])", + "Rotate an image using a custom angle" + ], + "imagesavealpha": [ + "bool imagesavealpha(resource im, bool on)", + "Include alpha channel to a saved image" + ], + "imagesetbrush": [ + "bool imagesetbrush(resource image, resource brush)", + "Set the brush image to $brush when filling $image with the \"IMG_COLOR_BRUSHED\" color" + ], + "imagesetpixel": [ + "bool imagesetpixel(resource im, int x, int y, int col)", + "Set a single pixel" + ], + "imagesetstyle": [ + "bool imagesetstyle(resource im, array styles)", + "Set the line drawing styles for use with imageline and IMG_COLOR_STYLED." + ], + "imagesetthickness": [ + "bool imagesetthickness(resource im, int thickness)", + "Set line thickness for drawing lines, ellipses, rectangles, polygons etc." + ], + "imagesettile": [ + "bool imagesettile(resource image, resource tile)", + "Set the tile image to $tile when filling $image with the \"IMG_COLOR_TILED\" color" + ], + "imagestring": [ + "bool imagestring(resource im, int font, int x, int y, string str, int col)", + "Draw a string horizontally" + ], + "imagestringup": [ + "bool imagestringup(resource im, int font, int x, int y, string str, int col)", + "Draw a string vertically - rotated 90 degrees counter-clockwise" + ], + "imagesx": [ + "int imagesx(resource im)", + "Get image width" + ], + "imagesy": [ + "int imagesy(resource im)", + "Get image height" + ], + "imagetruecolortopalette": [ + "void imagetruecolortopalette(resource im, bool ditherFlag, int colorsWanted)", + "Convert a true colour image to a palette based image with a number of colours, optionally using dithering." + ], + "imagettfbbox": [ + "array imagettfbbox(float size, float angle, string font_file, string text)", + "Give the bounding box of a text using TrueType fonts" + ], + "imagettftext": [ + "array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)", + "Write text to the image using a TrueType font" + ], + "imagetypes": [ + "int imagetypes()", + "Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM" + ], + "imagewbmp": [ + "bool imagewbmp(resource im [, string filename, [, int foreground]])", + "Output WBMP image to browser or file" + ], + "imagexbm": [ + "int imagexbm(int im, string filename [, int foreground])", + "Output XBM image to browser or file" + ], + "imap_8bit": [ + "string imap_8bit(string text)", + "Convert an 8-bit string to a quoted-printable string" + ], + "imap_alerts": [ + "array imap_alerts()", + "Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called." + ], + "imap_append": [ + "bool imap_append(resource stream_id, string folder, string message [, string options [, string internal_date]])", + "Append a new message to a specified mailbox" + ], + "imap_base64": [ + "string imap_base64(string text)", + "Decode BASE64 encoded text" + ], + "imap_binary": [ + "string imap_binary(string text)", + "Convert an 8bit string to a base64 string" + ], + "imap_body": [ + "string imap_body(resource stream_id, int msg_no [, int options])", + "Read the message body" + ], + "imap_bodystruct": [ + "object imap_bodystruct(resource stream_id, int msg_no, string section)", + "Read the structure of a specified body section of a specific message" + ], + "imap_check": [ + "object imap_check(resource stream_id)", + "Get mailbox properties" + ], + "imap_clearflag_full": [ + "bool imap_clearflag_full(resource stream_id, string sequence, string flag [, int options])", + "Clears flags on messages" + ], + "imap_close": [ + "bool imap_close(resource stream_id [, int options])", + "Close an IMAP stream" + ], + "imap_createmailbox": [ + "bool imap_createmailbox(resource stream_id, string mailbox)", + "Create a new mailbox" + ], + "imap_delete": [ + "bool imap_delete(resource stream_id, int msg_no [, int options])", + "Mark a message for deletion" + ], + "imap_deletemailbox": [ + "bool imap_deletemailbox(resource stream_id, string mailbox)", + "Delete a mailbox" + ], + "imap_errors": [ + "array imap_errors()", + "Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called." + ], + "imap_expunge": [ + "bool imap_expunge(resource stream_id)", + "Permanently delete all messages marked for deletion" + ], + "imap_fetch_overview": [ + "array imap_fetch_overview(resource stream_id, string sequence [, int options])", + "Read an overview of the information in the headers of the given message sequence" + ], + "imap_fetchbody": [ + "string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])", + "Get a specific body section" + ], + "imap_fetchheader": [ + "string imap_fetchheader(resource stream_id, int msg_no [, int options])", + "Get the full unfiltered header for a message" + ], + "imap_fetchstructure": [ + "object imap_fetchstructure(resource stream_id, int msg_no [, int options])", + "Read the full structure of a message" + ], + "imap_gc": [ + "bool imap_gc(resource stream_id, int flags)", + "This function garbage collects (purges) the cache of entries of a specific type." + ], + "imap_get_quota": [ + "array imap_get_quota(resource stream_id, string qroot)", + "Returns the quota set to the mailbox account qroot" + ], + "imap_get_quotaroot": [ + "array imap_get_quotaroot(resource stream_id, string mbox)", + "Returns the quota set to the mailbox account mbox" + ], + "imap_getacl": [ + "array imap_getacl(resource stream_id, string mailbox)", + "Gets the ACL for a given mailbox" + ], + "imap_getmailboxes": [ + "array imap_getmailboxes(resource stream_id, string ref, string pattern)", + "Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter" + ], + "imap_getsubscribed": [ + "array imap_getsubscribed(resource stream_id, string ref, string pattern)", + "Return a list of subscribed mailboxes, in the same format as imap_getmailboxes()" + ], + "imap_headerinfo": [ + "object imap_headerinfo(resource stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])", + "Read the headers of the message" + ], + "imap_headers": [ + "array imap_headers(resource stream_id)", + "Returns headers for all messages in a mailbox" + ], + "imap_last_error": [ + "string imap_last_error()", + "Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call." + ], + "imap_list": [ + "array imap_list(resource stream_id, string ref, string pattern)", + "Read the list of mailboxes" + ], + "imap_listscan": [ + "array imap_listscan(resource stream_id, string ref, string pattern, string content)", + "Read list of mailboxes containing a certain string" + ], + "imap_lsub": [ + "array imap_lsub(resource stream_id, string ref, string pattern)", + "Return a list of subscribed mailboxes" + ], + "imap_mail": [ + "bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])", + "Send an email message" + ], + "imap_mail_compose": [ + "string imap_mail_compose(array envelope, array body)", + "Create a MIME message based on given envelope and body sections" + ], + "imap_mail_copy": [ + "bool imap_mail_copy(resource stream_id, string msglist, string mailbox [, int options])", + "Copy specified message to a mailbox" + ], + "imap_mail_move": [ + "bool imap_mail_move(resource stream_id, string sequence, string mailbox [, int options])", + "Move specified message to a mailbox" + ], + "imap_mailboxmsginfo": [ + "object imap_mailboxmsginfo(resource stream_id)", + "Returns info about the current mailbox" + ], + "imap_mime_header_decode": [ + "array imap_mime_header_decode(string str)", + "Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text'" + ], + "imap_msgno": [ + "int imap_msgno(resource stream_id, int unique_msg_id)", + "Get the sequence number associated with a UID" + ], + "imap_mutf7_to_utf8": [ + "string imap_mutf7_to_utf8(string in)", + "Decode a modified UTF-7 string to UTF-8" + ], + "imap_num_msg": [ + "int imap_num_msg(resource stream_id)", + "Gives the number of messages in the current mailbox" + ], + "imap_num_recent": [ + "int imap_num_recent(resource stream_id)", + "Gives the number of recent messages in current mailbox" + ], + "imap_open": [ + "resource imap_open(string mailbox, string user, string password [, int options [, int n_retries]])", + "Open an IMAP stream to a mailbox" + ], + "imap_ping": [ + "bool imap_ping(resource stream_id)", + "Check if the IMAP stream is still active" + ], + "imap_qprint": [ + "string imap_qprint(string text)", + "Convert a quoted-printable string to an 8-bit string" + ], + "imap_renamemailbox": [ + "bool imap_renamemailbox(resource stream_id, string old_name, string new_name)", + "Rename a mailbox" + ], + "imap_reopen": [ + "bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]])", + "Reopen an IMAP stream to a new mailbox" + ], + "imap_rfc822_parse_adrlist": [ + "array imap_rfc822_parse_adrlist(string address_string, string default_host)", + "Parses an address string" + ], + "imap_rfc822_parse_headers": [ + "object imap_rfc822_parse_headers(string headers [, string default_host])", + "Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo()" + ], + "imap_rfc822_write_address": [ + "string imap_rfc822_write_address(string mailbox, string host, string personal)", + "Returns a properly formatted email address given the mailbox, host, and personal info" + ], + "imap_savebody": [ + "bool imap_savebody(resource stream_id, string|resource file, int msg_no[, string section = \"\"[, int options = 0]])", + "Save a specific body section to a file" + ], + "imap_search": [ + "array imap_search(resource stream_id, string criteria [, int options [, string charset]])", + "Return a list of messages matching the given criteria" + ], + "imap_set_quota": [ + "bool imap_set_quota(resource stream_id, string qroot, int mailbox_size)", + "Will set the quota for qroot mailbox" + ], + "imap_setacl": [ + "bool imap_setacl(resource stream_id, string mailbox, string id, string rights)", + "Sets the ACL for a given mailbox" + ], + "imap_setflag_full": [ + "bool imap_setflag_full(resource stream_id, string sequence, string flag [, int options])", + "Sets flags on messages" + ], + "imap_sort": [ + "array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]])", + "Sort an array of message headers, optionally including only messages that meet specified criteria." + ], + "imap_status": [ + "object imap_status(resource stream_id, string mailbox, int options)", + "Get status info from a mailbox" + ], + "imap_subscribe": [ + "bool imap_subscribe(resource stream_id, string mailbox)", + "Subscribe to a mailbox" + ], + "imap_thread": [ + "array imap_thread(resource stream_id [, int options])", + "Return threaded by REFERENCES tree" + ], + "imap_timeout": [ + "mixed imap_timeout(int timeout_type [, int timeout])", + "Set or fetch imap timeout" + ], + "imap_uid": [ + "int imap_uid(resource stream_id, int msg_no)", + "Get the unique message id associated with a standard sequential message number" + ], + "imap_undelete": [ + "bool imap_undelete(resource stream_id, int msg_no [, int flags])", + "Remove the delete flag from a message" + ], + "imap_unsubscribe": [ + "bool imap_unsubscribe(resource stream_id, string mailbox)", + "Unsubscribe from a mailbox" + ], + "imap_utf7_decode": [ + "string imap_utf7_decode(string buf)", + "Decode a modified UTF-7 string" + ], + "imap_utf7_encode": [ + "string imap_utf7_encode(string buf)", + "Encode a string in modified UTF-7" + ], + "imap_utf8": [ + "string imap_utf8(string mime_encoded_text)", + "Convert a mime-encoded text to UTF-8" + ], + "imap_utf8_to_mutf7": [ + "string imap_utf8_to_mutf7(string in)", + "Encode a UTF-8 string to modified UTF-7" + ], + "implode": [ + "string implode([string glue,] array pieces)", + "Joins array elements placing glue string between items and return one string" + ], + "import_request_variables": [ + "bool import_request_variables(string types [, string prefix])", + "Import GET/POST/Cookie variables into the global scope" + ], + "in_array": [ + "bool in_array(mixed needle, array haystack [, bool strict])", + "Checks if the given value exists in the array" + ], + "include": [ + "bool include(string path)", + "Includes and evaluates the specified file" + ], + "include_once": [ + "bool include_once(string path)", + "Includes and evaluates the specified file" + ], + "inet_ntop": [ + "string inet_ntop(string in_addr)", + "Converts a packed inet address to a human readable IP address string" + ], + "inet_pton": [ + "string inet_pton(string ip_address)", + "Converts a human readable IP address to a packed binary string" + ], + "ini_get": [ + "string ini_get(string varname)", + "Get a configuration option" + ], + "ini_get_all": [ + "array ini_get_all([string extension[, bool details = true]])", + "Get all configuration options" + ], + "ini_restore": [ + "void ini_restore(string varname)", + "Restore the value of a configuration option specified by varname" + ], + "ini_set": [ + "string ini_set(string varname, string newvalue)", + "Set a configuration option, returns false on error and the old value of the configuration option on success" + ], + "interface_exists": [ + "bool interface_exists(string classname [, bool autoload])", + "Checks if the class exists" + ], + "intl_error_name": [ + "string intl_error_name()", + "* Return a string for a given error code. * The string will be the same as the name of the error code constant." + ], + "intl_get_error_code": [ + "int intl_get_error_code()", + "* Get code of the last occured error." + ], + "intl_get_error_message": [ + "string intl_get_error_message()", + "* Get text description of the last occured error." + ], + "intl_is_failure": [ + "bool intl_is_failure()", + "* Check whether the given error code indicates a failure. * Returns true if it does, and false if the code * indicates success or a warning." + ], + "intval": [ + "int intval(mixed var [, int base])", + "Get the integer value of a variable using the optional base for the conversion" + ], + "ip2long": [ + "int ip2long(string ip_address)", + "Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address" + ], + "iptcembed": [ + "array iptcembed(string iptcdata, string jpeg_file_name [, int spool])", + "Embed binary IPTC data into a JPEG image." + ], + "iptcparse": [ + "array iptcparse(string iptcdata)", + "Parse binary IPTC-data into associative array" + ], + "is_a": [ + "bool is_a(object object, string class_name)", + "Returns true if the object is of this class or has this class as one of its parents" + ], + "is_array": [ + "bool is_array(mixed var)", + "Returns true if variable is an array" + ], + "is_bool": [ + "bool is_bool(mixed var)", + "Returns true if variable is a boolean" + ], + "is_callable": [ + "bool is_callable(mixed var [, bool syntax_only [, string callable_name]])", + "Returns true if var is callable." + ], + "is_countable": [ + "bool is_countable(mixed var)", + "Returns true if var is countable, false otherwise" + ], + "is_dir": [ + "bool is_dir(string filename)", + "Returns true if file is directory" + ], + "is_executable": [ + "bool is_executable(string filename)", + "Returns true if file is executable" + ], + "is_file": [ + "bool is_file(string filename)", + "Returns true if file is a regular file" + ], + "is_finite": [ + "bool is_finite(float val)", + "Returns whether argument is finite" + ], + "is_float": [ + "bool is_float(mixed var)", + "Returns true if variable is float point" + ], + "is_infinite": [ + "bool is_infinite(float val)", + "Returns whether argument is infinite" + ], + "is_link": [ + "bool is_link(string filename)", + "Returns true if file is symbolic link" + ], + "is_long": [ + "bool is_long(mixed var)", + "Returns true if variable is a long (integer)" + ], + "is_nan": [ + "bool is_nan(float val)", + "Returns whether argument is not a number" + ], + "is_null": [ + "bool is_null(mixed var)", + "Returns true if variable is null" + ], + "is_numeric": [ + "bool is_numeric(mixed value)", + "Returns true if value is a number or a numeric string" + ], + "is_object": [ + "bool is_object(mixed var)", + "Returns true if variable is an object" + ], + "is_readable": [ + "bool is_readable(string filename)", + "Returns true if file can be read" + ], + "is_resource": [ + "bool is_resource(mixed var)", + "Returns true if variable is a resource" + ], + "is_scalar": [ + "bool is_scalar(mixed value)", + "Returns true if value is a scalar" + ], + "is_string": [ + "bool is_string(mixed var)", + "Returns true if variable is a string" + ], + "is_subclass_of": [ + "bool is_subclass_of(object object, string class_name)", + "Returns true if the object has this class as one of its parents" + ], + "is_uploaded_file": [ + "bool is_uploaded_file(string path)", + "Check if file was created by rfc1867 upload" + ], + "is_writable": [ + "bool is_writable(string filename)", + "Returns true if file can be written" + ], + "isset": [ + "bool isset(mixed var [, mixed var])", + "Determine whether a variable is set" + ], + "iterator_apply": [ + "int iterator_apply(Traversable iterator, callable function [, array args = null)", + "Calls a function for every element in an iterator" + ], + "iterator_count": [ + "int iterator_count(Traversable iterator)", + "Count the elements in an iterator" + ], + "iterator_to_array": [ + "array iterator_to_array(Traversable iterator [, bool use_keys = true])", + "Copy the iterator into an array" + ], + "jddayofweek": [ + "mixed jddayofweek(int juliandaycount [, int mode])", + "Returns name or number of day of week from julian day count" + ], + "jdmonthname": [ + "string jdmonthname(int juliandaycount, int mode)", + "Returns name of month for julian day count" + ], + "jdtofrench": [ + "string jdtofrench(int juliandaycount)", + "Converts a julian day count to a french republic calendar date" + ], + "jdtogregorian": [ + "string jdtogregorian(int juliandaycount)", + "Converts a julian day count to a gregorian calendar date" + ], + "jdtojewish": [ + "string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])", + "Converts a julian day count to a jewish calendar date" + ], + "jdtojulian": [ + "string jdtojulian(int juliandaycount)", + "Convert a julian day count to a julian calendar date" + ], + "jdtounix": [ + "int jdtounix(int jday)", + "Convert Julian Day to UNIX timestamp" + ], + "jewishtojd": [ + "int jewishtojd(int month, int day, int year)", + "Converts a jewish calendar date to a julian day count" + ], + "join": [ + "string join([string glue,] array pieces)", + "Returns a string containing a string representation of all the arrayelements in the same order, with the glue string between each element" + ], + "jpeg2wbmp": [ + "bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)", + "Convert JPEG image to WBMP image" + ], + "json_decode": [ + "mixed json_decode(string json [, bool assoc [, long depth]])", + "Decodes the JSON representation into a PHP value" + ], + "json_encode": [ + "string json_encode(mixed data [, int options])", + "Returns the JSON representation of a value" + ], + "json_last_error": [ + "int json_last_error()", + "Returns the error code of the last json_decode()." + ], + "juliantojd": [ + "int juliantojd(int month, int day, int year)", + "Converts a julian calendar date to julian day count" + ], + "key": [ + "mixed key(array array_arg)", + "Return the key of the element currently pointed to by the internal array pointer" + ], + "krsort": [ + "bool krsort(array &array_arg [, int sort_flags])", + "Sort an array by key value in reverse order" + ], + "ksort": [ + "bool ksort(array &array_arg [, int sort_flags])", + "Sort an array by key" + ], + "lcfirst": [ + "string lcfirst(string str)", + "Make a string's first character lowercase" + ], + "lcg_value": [ + "float lcg_value()", + "Returns a value from the combined linear congruential generator" + ], + "lchgrp": [ + "bool lchgrp(string filename, mixed group)", + "Change symlink group" + ], + "ldap_8859_to_t61": [ + "string ldap_8859_to_t61(string value)", + "Translate 8859 characters to t61 characters" + ], + "ldap_add": [ + "bool ldap_add(resource link, string dn, array entry)", + "Add entries to LDAP directory" + ], + "ldap_bind": [ + "bool ldap_bind(resource link [, string dn [, string password]])", + "Bind to LDAP directory" + ], + "ldap_compare": [ + "bool ldap_compare(resource link, string dn, string attr, string value)", + "Determine if an entry has a specific value for one of its attributes" + ], + "ldap_connect": [ + "resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])", + "Connect to an LDAP server" + ], + "ldap_count_entries": [ + "int ldap_count_entries(resource link, resource result)", + "Count the number of entries in a search result" + ], + "ldap_delete": [ + "bool ldap_delete(resource link, string dn)", + "Delete an entry from a directory" + ], + "ldap_dn2ufn": [ + "string ldap_dn2ufn(string dn)", + "Convert DN to User Friendly Naming format" + ], + "ldap_err2str": [ + "string ldap_err2str(int errno)", + "Convert error number to error string" + ], + "ldap_errno": [ + "int ldap_errno(resource link)", + "Get the current ldap error number" + ], + "ldap_error": [ + "string ldap_error(resource link)", + "Get the current ldap error string" + ], + "ldap_explode_dn": [ + "array ldap_explode_dn(string dn, int with_attrib)", + "Splits DN into its component parts" + ], + "ldap_first_attribute": [ + "string ldap_first_attribute(resource link, resource result_entry)", + "Return first attribute" + ], + "ldap_first_entry": [ + "resource ldap_first_entry(resource link, resource result)", + "Return first result id" + ], + "ldap_first_reference": [ + "resource ldap_first_reference(resource link, resource result)", + "Return first reference" + ], + "ldap_free_result": [ + "bool ldap_free_result(resource result)", + "Free result memory" + ], + "ldap_get_attributes": [ + "array ldap_get_attributes(resource link, resource result_entry)", + "Get attributes from a search result entry" + ], + "ldap_get_dn": [ + "string ldap_get_dn(resource link, resource result_entry)", + "Get the DN of a result entry" + ], + "ldap_get_entries": [ + "array ldap_get_entries(resource link, resource result)", + "Get all result entries" + ], + "ldap_get_option": [ + "bool ldap_get_option(resource link, int option, mixed retval)", + "Get the current value of various session-wide parameters" + ], + "ldap_get_values_len": [ + "array ldap_get_values_len(resource link, resource result_entry, string attribute)", + "Get all values with lengths from a result entry" + ], + "ldap_list": [ + "resource ldap_list(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Single-level search" + ], + "ldap_mod_add": [ + "bool ldap_mod_add(resource link, string dn, array entry)", + "Add attribute values to current" + ], + "ldap_mod_del": [ + "bool ldap_mod_del(resource link, string dn, array entry)", + "Delete attribute values" + ], + "ldap_mod_replace": [ + "bool ldap_mod_replace(resource link, string dn, array entry)", + "Replace attribute values with new ones" + ], + "ldap_next_attribute": [ + "string ldap_next_attribute(resource link, resource result_entry)", + "Get the next attribute in result" + ], + "ldap_next_entry": [ + "resource ldap_next_entry(resource link, resource result_entry)", + "Get next result entry" + ], + "ldap_next_reference": [ + "resource ldap_next_reference(resource link, resource reference_entry)", + "Get next reference" + ], + "ldap_parse_reference": [ + "bool ldap_parse_reference(resource link, resource reference_entry, array referrals)", + "Extract information from reference entry" + ], + "ldap_parse_result": [ + "bool ldap_parse_result(resource link, resource result, int errcode, string matcheddn, string errmsg, array referrals)", + "Extract information from result" + ], + "ldap_read": [ + "resource ldap_read(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Read an entry" + ], + "ldap_rename": [ + "bool ldap_rename(resource link, string dn, string newrdn, string newparent, bool deleteoldrdn)", + "Modify the name of an entry" + ], + "ldap_sasl_bind": [ + "bool ldap_sasl_bind(resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, string sasl_authz_id [, string props]]]]]]])", + "Bind to LDAP directory using SASL" + ], + "ldap_search": [ + "resource ldap_search(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Search LDAP tree under base_dn" + ], + "ldap_set_option": [ + "bool ldap_set_option(resource link, int option, mixed newval)", + "Set the value of various session-wide parameters" + ], + "ldap_set_rebind_proc": [ + "bool ldap_set_rebind_proc(resource link, string callback)", + "Set a callback function to do re-binds on referral chasing." + ], + "ldap_sort": [ + "bool ldap_sort(resource link, resource result, string sortfilter)", + "Sort LDAP result entries" + ], + "ldap_start_tls": [ + "bool ldap_start_tls(resource link)", + "Start TLS" + ], + "ldap_t61_to_8859": [ + "string ldap_t61_to_8859(string value)", + "Translate t61 characters to 8859 characters" + ], + "ldap_unbind": [ + "bool ldap_unbind(resource link)", + "Unbind from LDAP directory" + ], + "leak": [ + "void leak(int num_bytes=3)", + "Cause an intentional memory leak, for testing/debugging purposes" + ], + "levenshtein": [ + "int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])", + "Calculate Levenshtein distance between two strings" + ], + "libxml_clear_errors": [ + "void libxml_clear_errors()", + "Clear last error from libxml" + ], + "libxml_disable_entity_loader": [ + "bool libxml_disable_entity_loader([bool disable])", + "Disable/Enable ability to load external entities" + ], + "libxml_get_errors": [ + "object libxml_get_errors()", + "Retrieve array of errors" + ], + "libxml_get_last_error": [ + "object libxml_get_last_error()", + "Retrieve last error from libxml" + ], + "libxml_set_streams_context": [ + "void libxml_set_streams_context(resource streams_context)", + "Set the streams context for the next libxml document load or write" + ], + "libxml_use_internal_errors": [ + "bool libxml_use_internal_errors([bool use_errors])", + "Disable libxml errors and allow user to fetch error information as needed" + ], + "link": [ + "int link(string target, string link)", + "Create a hard link" + ], + "linkinfo": [ + "int linkinfo(string filename)", + "Returns the st_dev field of the UNIX C stat structure describing the link" + ], + "litespeed_request_headers": [ + "array litespeed_request_headers()", + "Fetch all HTTP request headers" + ], + "litespeed_response_headers": [ + "array litespeed_response_headers()", + "Fetch all HTTP response headers" + ], + "locale_accept_from_http": [ + "string locale_accept_from_http(string $http_accept)", + null + ], + "locale_canonicalize": [ + "static string locale_canonicalize(Locale $loc, string $locale)", + "* @param string $locale The locale string to canonicalize" + ], + "locale_filter_matches": [ + "bool locale_filter_matches(string $langtag, string $locale[, bool $canonicalize])", + "* Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm" + ], + "locale_get_all_variants": [ + "static array locale_get_all_variants($locale)", + "* gets an array containing the list of variants, or null" + ], + "locale_get_default": [ + "static string locale_get_default( )", + "Get default locale" + ], + "locale_get_keywords": [ + "static array locale_get_keywords(string $locale) {", + "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array" + ], + "locale_get_primary_language": [ + "static string locale_get_primary_language($locale)", + "* gets the primary language for the $locale" + ], + "locale_get_region": [ + "static string locale_get_region($locale)", + "* gets the region for the $locale" + ], + "locale_get_script": [ + "static string locale_get_script($locale)", + "* gets the script for the $locale" + ], + "locale_lookup": [ + "string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])", + "* Searchs the items in $langtag for the best match to the language * range" + ], + "locale_set_default": [ + "static string locale_set_default( string $locale )", + "Set default locale" + ], + "localeconv": [ + "array localeconv()", + "Returns numeric formatting information based on the current locale" + ], + "localtime": [ + "array localtime([int timestamp [, bool associative_array]])", + "Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array" + ], + "log": [ + "float log(float number, [float base])", + "Returns the natural logarithm of the number, or the base log if base is specified" + ], + "log10": [ + "float log10(float number)", + "Returns the base-10 logarithm of the number" + ], + "log1p": [ + "float log1p(float number)", + "Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero" + ], + "long2ip": [ + "string long2ip(int proper_address)", + "Converts an (IPv4) Internet network address into a string in Internet standard dotted format" + ], + "lstat": [ + "array lstat(string filename)", + "Give information about a file or symbolic link" + ], + "ltrim": [ + "string ltrim(string str [, string character_mask])", + "Strips whitespace from the beginning of a string" + ], + "mail": [ + "int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])", + "Send an email message" + ], + "max": [ + "mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])", + "Return the highest value in an array or a series of arguments" + ], + "mb_check_encoding": [ + "bool mb_check_encoding([string var[, string encoding]])", + "Check if the string is valid for the specified encoding" + ], + "mb_convert_case": [ + "string mb_convert_case(string sourcestring, int mode [, string encoding])", + "Returns a case-folded version of sourcestring" + ], + "mb_convert_encoding": [ + "string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])", + "Returns converted string in desired encoding" + ], + "mb_convert_kana": [ + "string mb_convert_kana(string str [, string option] [, string encoding])", + "Conversion between full-width character and half-width character (Japanese)" + ], + "mb_convert_variables": [ + "string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...])", + "Converts the string resource in variables to desired encoding" + ], + "mb_decode_mimeheader": [ + "string mb_decode_mimeheader(string string)", + "Decodes the MIME \"encoded-word\" in the string" + ], + "mb_decode_numericentity": [ + "string mb_decode_numericentity(string string, array convmap [, string encoding])", + "Converts HTML numeric entities to character code" + ], + "mb_detect_encoding": [ + "string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]])", + "Encodings of the given string is returned (as a string)" + ], + "mb_detect_order": [ + "bool|array mb_detect_order([mixed encoding-list])", + "Sets the current detect_order or Return the current detect_order as a array" + ], + "mb_encode_mimeheader": [ + "string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])", + "Converts the string to MIME \"encoded-word\" in the format of =?charset?(B|Q)?encoded_string?=" + ], + "mb_encode_numericentity": [ + "string mb_encode_numericentity(string string, array convmap [, string encoding])", + "Converts specified characters to HTML numeric entities" + ], + "mb_encoding_aliases": [ + "array mb_encoding_aliases(string encoding)", + "Returns an array of the aliases of a given encoding name" + ], + "mb_ereg": [ + "int mb_ereg(string pattern, string string [, array registers])", + "Regular expression match for multibyte string" + ], + "mb_ereg_match": [ + "bool mb_ereg_match(string pattern, string string [,string option])", + "Regular expression match for multibyte string" + ], + "mb_ereg_replace": [ + "string mb_ereg_replace(string pattern, string replacement, string string [, string option])", + "Replace regular expression for multibyte string" + ], + "mb_ereg_search": [ + "bool mb_ereg_search([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_getpos": [ + "int mb_ereg_search_getpos()", + "Get search start position" + ], + "mb_ereg_search_getregs": [ + "array mb_ereg_search_getregs()", + "Get matched substring of the last time" + ], + "mb_ereg_search_init": [ + "bool mb_ereg_search_init(string string [, string pattern[, string option]])", + "Initialize string and regular expression for search." + ], + "mb_ereg_search_pos": [ + "array mb_ereg_search_pos([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_regs": [ + "array mb_ereg_search_regs([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_setpos": [ + "bool mb_ereg_search_setpos(int position)", + "Set search start position" + ], + "mb_eregi": [ + "int mb_eregi(string pattern, string string [, array registers])", + "Case-insensitive regular expression match for multibyte string" + ], + "mb_eregi_replace": [ + "string mb_eregi_replace(string pattern, string replacement, string string)", + "Case insensitive replace regular expression for multibyte string" + ], + "mb_get_info": [ + "mixed mb_get_info([string type])", + "Returns the current settings of mbstring" + ], + "mb_http_input": [ + "mixed mb_http_input([string type])", + "Returns the input encoding" + ], + "mb_http_output": [ + "string mb_http_output([string encoding])", + "Sets the current output_encoding or returns the current output_encoding as a string" + ], + "mb_internal_encoding": [ + "string mb_internal_encoding([string encoding])", + "Sets the current internal encoding or Returns the current internal encoding as a string" + ], + "mb_language": [ + "string mb_language([string language])", + "Sets the current language or Returns the current language as a string" + ], + "mb_list_encodings": [ + "mixed mb_list_encodings()", + "Returns an array of all supported entity encodings" + ], + "mb_output_handler": [ + "string mb_output_handler(string contents, int status)", + "Returns string in output buffer converted to the http_output encoding" + ], + "mb_parse_str": [ + "bool mb_parse_str(string encoded_string [, array result])", + "Parses GET/POST/COOKIE data and sets global variables" + ], + "mb_preferred_mime_name": [ + "string mb_preferred_mime_name(string encoding)", + "Return the preferred MIME name (charset) as a string" + ], + "mb_regex_encoding": [ + "string mb_regex_encoding([string encoding])", + "Returns the current encoding for regex as a string." + ], + "mb_regex_set_options": [ + "string mb_regex_set_options([string options])", + "Set or get the default options for mbregex functions" + ], + "mb_send_mail": [ + "int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])", + "* Sends an email message with MIME scheme" + ], + "mb_split": [ + "array mb_split(string pattern, string string [, int limit])", + "split multibyte string into array by regular expression" + ], + "mb_strcut": [ + "string mb_strcut(string str, int start [, int length [, string encoding]])", + "Returns part of a string" + ], + "mb_strimwidth": [ + "string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])", + "Trim the string in terminal width" + ], + "mb_stripos": [ + "int mb_stripos(string haystack, string needle [, int offset [, string encoding]])", + "Finds position of first occurrence of a string within another, case insensitive" + ], + "mb_stristr": [ + "string mb_stristr(string haystack, string needle[, bool part[, string encoding]])", + "Finds first occurrence of a string within another, case insensitive" + ], + "mb_strlen": [ + "int mb_strlen(string str [, string encoding])", + "Get character numbers of a string" + ], + "mb_strpos": [ + "int mb_strpos(string haystack, string needle [, int offset [, string encoding]])", + "Find position of first occurrence of a string within another" + ], + "mb_strrchr": [ + "string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])", + "Finds the last occurrence of a character in a string within another" + ], + "mb_strrichr": [ + "string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])", + "Finds the last occurrence of a character in a string within another, case insensitive" + ], + "mb_strripos": [ + "int mb_strripos(string haystack, string needle [, int offset [, string encoding]])", + "Finds position of last occurrence of a string within another, case insensitive" + ], + "mb_strrpos": [ + "int mb_strrpos(string haystack, string needle [, int offset [, string encoding]])", + "Find position of last occurrence of a string within another" + ], + "mb_strstr": [ + "string mb_strstr(string haystack, string needle[, bool part[, string encoding]])", + "Finds first occurrence of a string within another" + ], + "mb_strtolower": [ + "string mb_strtolower(string sourcestring [, string encoding])", + "* Returns a lowercased version of sourcestring" + ], + "mb_strtoupper": [ + "string mb_strtoupper(string sourcestring [, string encoding])", + "* Returns a uppercased version of sourcestring" + ], + "mb_strwidth": [ + "int mb_strwidth(string str [, string encoding])", + "Gets terminal width of a string" + ], + "mb_substitute_character": [ + "mixed mb_substitute_character([mixed substchar])", + "Sets the current substitute_character or returns the current substitute_character" + ], + "mb_substr": [ + "string mb_substr(string str, int start [, int length [, string encoding]])", + "Returns part of a string" + ], + "mb_substr_count": [ + "int mb_substr_count(string haystack, string needle [, string encoding])", + "Count the number of substring occurrences" + ], + "mcrypt_cbc": [ + "string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)", + "CBC crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_cfb": [ + "string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)", + "CFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_create_iv": [ + "string mcrypt_create_iv(int size, int source)", + "Create an initialization vector (IV)" + ], + "mcrypt_decrypt": [ + "string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_ecb": [ + "string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)", + "ECB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_enc_get_algorithms_name": [ + "string mcrypt_enc_get_algorithms_name(resource td)", + "Returns the name of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_block_size": [ + "int mcrypt_enc_get_block_size(resource td)", + "Returns the block size of the cipher specified by the descriptor td" + ], + "mcrypt_enc_get_iv_size": [ + "int mcrypt_enc_get_iv_size(resource td)", + "Returns the size of the IV in bytes of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_key_size": [ + "int mcrypt_enc_get_key_size(resource td)", + "Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_modes_name": [ + "string mcrypt_enc_get_modes_name(resource td)", + "Returns the name of the mode specified by the descriptor td" + ], + "mcrypt_enc_get_supported_key_sizes": [ + "array mcrypt_enc_get_supported_key_sizes(resource td)", + "This function decrypts the crypttext" + ], + "mcrypt_enc_is_block_algorithm": [ + "bool mcrypt_enc_is_block_algorithm(resource td)", + "Returns TRUE if the alrogithm is a block algorithms" + ], + "mcrypt_enc_is_block_algorithm_mode": [ + "bool mcrypt_enc_is_block_algorithm_mode(resource td)", + "Returns TRUE if the mode is for use with block algorithms" + ], + "mcrypt_enc_is_block_mode": [ + "bool mcrypt_enc_is_block_mode(resource td)", + "Returns TRUE if the mode outputs blocks" + ], + "mcrypt_enc_self_test": [ + "int mcrypt_enc_self_test(resource td)", + "This function runs the self test on the algorithm specified by the descriptor td" + ], + "mcrypt_encrypt": [ + "string mcrypt_encrypt(string cipher, string key, string data, string mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_generic": [ + "string mcrypt_generic(resource td, string data)", + "This function encrypts the plaintext" + ], + "mcrypt_generic_deinit": [ + "bool mcrypt_generic_deinit(resource td)", + "This function terminates encrypt specified by the descriptor td" + ], + "mcrypt_generic_init": [ + "int mcrypt_generic_init(resource td, string key, string iv)", + "This function initializes all buffers for the specific module" + ], + "mcrypt_get_block_size": [ + "int mcrypt_get_block_size(string cipher, string module)", + "Get the key size of cipher" + ], + "mcrypt_get_cipher_name": [ + "string mcrypt_get_cipher_name(string cipher)", + "Get the key size of cipher" + ], + "mcrypt_get_iv_size": [ + "int mcrypt_get_iv_size(string cipher, string module)", + "Get the IV size of cipher (Usually the same as the blocksize)" + ], + "mcrypt_get_key_size": [ + "int mcrypt_get_key_size(string cipher, string module)", + "Get the key size of cipher" + ], + "mcrypt_list_algorithms": [ + "array mcrypt_list_algorithms([string lib_dir])", + "List all algorithms in \"module_dir\"" + ], + "mcrypt_list_modes": [ + "array mcrypt_list_modes([string lib_dir])", + "List all modes \"module_dir\"" + ], + "mcrypt_module_close": [ + "bool mcrypt_module_close(resource td)", + "Free the descriptor td" + ], + "mcrypt_module_get_algo_block_size": [ + "int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir])", + "Returns the block size of the algorithm" + ], + "mcrypt_module_get_algo_key_size": [ + "int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir])", + "Returns the maximum supported key size of the algorithm" + ], + "mcrypt_module_get_supported_key_sizes": [ + "array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir])", + "This function decrypts the crypttext" + ], + "mcrypt_module_is_block_algorithm": [ + "bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir])", + "Returns TRUE if the algorithm is a block algorithm" + ], + "mcrypt_module_is_block_algorithm_mode": [ + "bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir])", + "Returns TRUE if the mode is for use with block algorithms" + ], + "mcrypt_module_is_block_mode": [ + "bool mcrypt_module_is_block_mode(string mode [, string lib_dir])", + "Returns TRUE if the mode outputs blocks of bytes" + ], + "mcrypt_module_open": [ + "resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory)", + "Opens the module of the algorithm and the mode to be used" + ], + "mcrypt_module_self_test": [ + "bool mcrypt_module_self_test(string algorithm [, string lib_dir])", + "Does a self test of the module \"module\"" + ], + "mcrypt_ofb": [ + "string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "md5": [ + "string md5(string str, [ bool raw_output])", + "Calculate the md5 hash of a string" + ], + "md5_file": [ + "string md5_file(string filename [, bool raw_output])", + "Calculate the md5 hash of given filename" + ], + "mdecrypt_generic": [ + "string mdecrypt_generic(resource td, string data)", + "This function decrypts the plaintext" + ], + "memory_get_peak_usage": [ + "int memory_get_peak_usage([real_usage])", + "Returns the peak allocated by PHP memory" + ], + "memory_get_usage": [ + "int memory_get_usage([real_usage])", + "Returns the allocated by PHP memory" + ], + "metaphone": [ + "string metaphone(string text[, int phones])", + "Break english phrases down into their phonemes" + ], + "method_exists": [ + "bool method_exists(object object, string method)", + "Checks if the class method exists" + ], + "mhash": [ + "string mhash(int hash, string data [, string key])", + "Hash data with hash" + ], + "mhash_count": [ + "int mhash_count()", + "Gets the number of available hashes" + ], + "mhash_get_block_size": [ + "int mhash_get_block_size(int hash)", + "Gets the block size of hash" + ], + "mhash_get_hash_name": [ + "string mhash_get_hash_name(int hash)", + "Gets the name of hash" + ], + "mhash_keygen_s2k": [ + "string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)", + "Generates a key using hash functions" + ], + "microtime": [ + "mixed microtime([bool get_as_float])", + "Returns either a string or a float containing the current time in seconds and microseconds" + ], + "mime_content_type": [ + "string mime_content_type(string filename|resource stream)", + "Return content-type for file" + ], + "min": [ + "mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])", + "Return the lowest value in an array or a series of arguments" + ], + "mkdir": [ + "bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])", + "Create a directory" + ], + "mktime": [ + "int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])", + "Get UNIX timestamp for a date" + ], + "money_format": [ + "string money_format(string format , float value)", + "Convert monetary value(s) to string" + ], + "move_uploaded_file": [ + "bool move_uploaded_file(string path, string new_path)", + "Move a file if and only if it was created by an upload" + ], + "msg_get_queue": [ + "resource msg_get_queue(int key [, int perms])", + "Attach to a message queue" + ], + "msg_queue_exists": [ + "bool msg_queue_exists(int key)", + "Check whether a message queue exists" + ], + "msg_receive": [ + "mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])", + "Send a message of type msgtype (must be > 0) to a message queue" + ], + "msg_remove_queue": [ + "bool msg_remove_queue(resource queue)", + "Destroy the queue" + ], + "msg_send": [ + "bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])", + "Send a message of type msgtype (must be > 0) to a message queue" + ], + "msg_set_queue": [ + "bool msg_set_queue(resource queue, array data)", + "Set information for a message queue" + ], + "msg_stat_queue": [ + "array msg_stat_queue(resource queue)", + "Returns information about a message queue" + ], + "msgfmt_create": [ + "MessageFormatter msgfmt_create( string $locale, string $pattern )", + "* Create formatter." + ], + "msgfmt_format": [ + "mixed msgfmt_format( MessageFormatter $nf, array $args )", + "* Format a message." + ], + "msgfmt_format_message": [ + "mixed msgfmt_format_message( string $locale, string $pattern, array $args )", + "* Format a message." + ], + "msgfmt_get_error_code": [ + "int msgfmt_get_error_code( MessageFormatter $nf )", + "* Get formatter's last error code." + ], + "msgfmt_get_error_message": [ + "string msgfmt_get_error_message( MessageFormatter $coll )", + "* Get text description for formatter's last error code." + ], + "msgfmt_get_locale": [ + "string msgfmt_get_locale(MessageFormatter $mf)", + "* Get formatter locale." + ], + "msgfmt_get_pattern": [ + "string msgfmt_get_pattern( MessageFormatter $mf )", + "* Get formatter pattern." + ], + "msgfmt_parse": [ + "array msgfmt_parse( MessageFormatter $nf, string $source )", + "* Parse a message." + ], + "msgfmt_set_pattern": [ + "bool msgfmt_set_pattern( MessageFormatter $mf, string $pattern )", + "* Set formatter pattern." + ], + "mssql_bind": [ + "bool mssql_bind(resource stmt, string param_name, mixed var, int type [, bool is_output [, bool is_null [, int maxlen]]])", + "Adds a parameter to a stored procedure or a remote stored procedure" + ], + "mssql_close": [ + "bool mssql_close([resource conn_id])", + "Closes a connection to a MS-SQL server" + ], + "mssql_connect": [ + "int mssql_connect([string servername [, string username [, string password [, bool new_link]]]])", + "Establishes a connection to a MS-SQL server" + ], + "mssql_data_seek": [ + "bool mssql_data_seek(resource result_id, int offset)", + "Moves the internal row pointer of the MS-SQL result associated with the specified result identifier to pointer to the specified row number" + ], + "mssql_execute": [ + "mixed mssql_execute(resource stmt [, bool skip_results = false])", + "Executes a stored procedure on a MS-SQL server database" + ], + "mssql_fetch_array": [ + "array mssql_fetch_array(resource result_id [, int result_type])", + "Returns an associative array of the current row in the result set specified by result_id" + ], + "mssql_fetch_assoc": [ + "array mssql_fetch_assoc(resource result_id)", + "Returns an associative array of the current row in the result set specified by result_id" + ], + "mssql_fetch_batch": [ + "int mssql_fetch_batch(resource result_index)", + "Returns the next batch of records" + ], + "mssql_fetch_field": [ + "object mssql_fetch_field(resource result_id [, int offset])", + "Gets information about certain fields in a query result" + ], + "mssql_fetch_object": [ + "object mssql_fetch_object(resource result_id)", + "Returns a pseudo-object of the current row in the result set specified by result_id" + ], + "mssql_fetch_row": [ + "array mssql_fetch_row(resource result_id)", + "Returns an array of the current row in the result set specified by result_id" + ], + "mssql_field_length": [ + "int mssql_field_length(resource result_id [, int offset])", + "Get the length of a MS-SQL field" + ], + "mssql_field_name": [ + "string mssql_field_name(resource result_id [, int offset])", + "Returns the name of the field given by offset in the result set given by result_id" + ], + "mssql_field_seek": [ + "bool mssql_field_seek(resource result_id, int offset)", + "Seeks to the specified field offset" + ], + "mssql_field_type": [ + "string mssql_field_type(resource result_id [, int offset])", + "Returns the type of a field" + ], + "mssql_free_result": [ + "bool mssql_free_result(resource result_index)", + "Free a MS-SQL result index" + ], + "mssql_free_statement": [ + "bool mssql_free_statement(resource result_index)", + "Free a MS-SQL statement index" + ], + "mssql_get_last_message": [ + "string mssql_get_last_message()", + "Gets the last message from the MS-SQL server" + ], + "mssql_guid_string": [ + "string mssql_guid_string(string binary [,bool short_format])", + "Converts a 16 byte binary GUID to a string" + ], + "mssql_init": [ + "int mssql_init(string sp_name [, resource conn_id])", + "Initializes a stored procedure or a remote stored procedure" + ], + "mssql_min_error_severity": [ + "void mssql_min_error_severity(int severity)", + "Sets the lower error severity" + ], + "mssql_min_message_severity": [ + "void mssql_min_message_severity(int severity)", + "Sets the lower message severity" + ], + "mssql_next_result": [ + "bool mssql_next_result(resource result_id)", + "Move the internal result pointer to the next result" + ], + "mssql_num_fields": [ + "int mssql_num_fields(resource mssql_result_index)", + "Returns the number of fields fetched in from the result id specified" + ], + "mssql_num_rows": [ + "int mssql_num_rows(resource mssql_result_index)", + "Returns the number of rows fetched in from the result id specified" + ], + "mssql_pconnect": [ + "int mssql_pconnect([string servername [, string username [, string password [, bool new_link]]]])", + "Establishes a persistent connection to a MS-SQL server" + ], + "mssql_query": [ + "resource mssql_query(string query [, resource conn_id [, int batch_size]])", + "Perform an SQL query on a MS-SQL server database" + ], + "mssql_result": [ + "string mssql_result(resource result_id, int row, mixed field)", + "Returns the contents of one cell from a MS-SQL result set" + ], + "mssql_rows_affected": [ + "int mssql_rows_affected(resource conn_id)", + "Returns the number of records affected by the query" + ], + "mssql_select_db": [ + "bool mssql_select_db(string database_name [, resource conn_id])", + "Select a MS-SQL database" + ], + "mt_getrandmax": [ + "int mt_getrandmax()", + "Returns the maximum value a random number from Mersenne Twister can have" + ], + "mt_rand": [ + "int mt_rand([int min, int max])", + "Returns a random number from Mersenne Twister" + ], + "mt_srand": [ + "void mt_srand([int seed])", + "Seeds Mersenne Twister random number generator" + ], + "mysql_affected_rows": [ + "int mysql_affected_rows([int link_identifier])", + "Gets number of affected rows in previous MySQL operation" + ], + "mysql_client_encoding": [ + "string mysql_client_encoding([int link_identifier])", + "Returns the default character set for the current connection" + ], + "mysql_close": [ + "bool mysql_close([int link_identifier])", + "Close a MySQL connection" + ], + "mysql_connect": [ + "resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])", + "Opens a connection to a MySQL Server" + ], + "mysql_create_db": [ + "bool mysql_create_db(string database_name [, int link_identifier])", + "Create a MySQL database" + ], + "mysql_data_seek": [ + "bool mysql_data_seek(resource result, int row_number)", + "Move internal result pointer" + ], + "mysql_db_query": [ + "resource mysql_db_query(string database_name, string query [, int link_identifier])", + "Sends an SQL query to MySQL" + ], + "mysql_drop_db": [ + "bool mysql_drop_db(string database_name [, int link_identifier])", + "Drops (delete) a MySQL database" + ], + "mysql_errno": [ + "int mysql_errno([int link_identifier])", + "Returns the number of the error message from previous MySQL operation" + ], + "mysql_error": [ + "string mysql_error([int link_identifier])", + "Returns the text of the error message from previous MySQL operation" + ], + "mysql_escape_string": [ + "string mysql_escape_string(string to_be_escaped)", + "Escape string for mysql query" + ], + "mysql_fetch_array": [ + "array mysql_fetch_array(resource result [, int result_type])", + "Fetch a result row as an array (associative, numeric or both)" + ], + "mysql_fetch_assoc": [ + "array mysql_fetch_assoc(resource result)", + "Fetch a result row as an associative array" + ], + "mysql_fetch_field": [ + "object mysql_fetch_field(resource result [, int field_offset])", + "Gets column information from a result and return as an object" + ], + "mysql_fetch_lengths": [ + "array mysql_fetch_lengths(resource result)", + "Gets max data size of each column in a result" + ], + "mysql_fetch_object": [ + "object mysql_fetch_object(resource result [, string class_name [, NULL|array ctor_params]])", + "Fetch a result row as an object" + ], + "mysql_fetch_row": [ + "array mysql_fetch_row(resource result)", + "Gets a result row as an enumerated array" + ], + "mysql_field_flags": [ + "string mysql_field_flags(resource result, int field_offset)", + "Gets the flags associated with the specified field in a result" + ], + "mysql_field_len": [ + "int mysql_field_len(resource result, int field_offset)", + "Returns the length of the specified field" + ], + "mysql_field_name": [ + "string mysql_field_name(resource result, int field_index)", + "Gets the name of the specified field in a result" + ], + "mysql_field_seek": [ + "bool mysql_field_seek(resource result, int field_offset)", + "Sets result pointer to a specific field offset" + ], + "mysql_field_table": [ + "string mysql_field_table(resource result, int field_offset)", + "Gets name of the table the specified field is in" + ], + "mysql_field_type": [ + "string mysql_field_type(resource result, int field_offset)", + "Gets the type of the specified field in a result" + ], + "mysql_free_result": [ + "bool mysql_free_result(resource result)", + "Free result memory" + ], + "mysql_get_client_info": [ + "string mysql_get_client_info()", + "Returns a string that represents the client library version" + ], + "mysql_get_host_info": [ + "string mysql_get_host_info([int link_identifier])", + "Returns a string describing the type of connection in use, including the server host name" + ], + "mysql_get_proto_info": [ + "int mysql_get_proto_info([int link_identifier])", + "Returns the protocol version used by current connection" + ], + "mysql_get_server_info": [ + "string mysql_get_server_info([int link_identifier])", + "Returns a string that represents the server version number" + ], + "mysql_info": [ + "string mysql_info([int link_identifier])", + "Returns a string containing information about the most recent query" + ], + "mysql_insert_id": [ + "int mysql_insert_id([int link_identifier])", + "Gets the ID generated from the previous INSERT operation" + ], + "mysql_list_dbs": [ + "resource mysql_list_dbs([int link_identifier])", + "List databases available on a MySQL server" + ], + "mysql_list_fields": [ + "resource mysql_list_fields(string database_name, string table_name [, int link_identifier])", + "List MySQL result fields" + ], + "mysql_list_processes": [ + "resource mysql_list_processes([int link_identifier])", + "Returns a result set describing the current server threads" + ], + "mysql_list_tables": [ + "resource mysql_list_tables(string database_name [, int link_identifier])", + "List tables in a MySQL database" + ], + "mysql_num_fields": [ + "int mysql_num_fields(resource result)", + "Gets number of fields in a result" + ], + "mysql_num_rows": [ + "int mysql_num_rows(resource result)", + "Gets number of rows in a result" + ], + "mysql_pconnect": [ + "resource mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])", + "Opens a persistent connection to a MySQL Server" + ], + "mysql_ping": [ + "bool mysql_ping([int link_identifier])", + "Ping a server connection. If no connection then reconnect." + ], + "mysql_query": [ + "resource mysql_query(string query [, int link_identifier])", + "Sends an SQL query to MySQL" + ], + "mysql_real_escape_string": [ + "string mysql_real_escape_string(string to_be_escaped [, int link_identifier])", + "Escape special characters in a string for use in a SQL statement, taking into account the current charset of the connection" + ], + "mysql_result": [ + "mixed mysql_result(resource result, int row [, mixed field])", + "Gets result data" + ], + "mysql_select_db": [ + "bool mysql_select_db(string database_name [, int link_identifier])", + "Selects a MySQL database" + ], + "mysql_set_charset": [ + "bool mysql_set_charset(string csname [, int link_identifier])", + "sets client character set" + ], + "mysql_stat": [ + "string mysql_stat([int link_identifier])", + "Returns a string containing status information" + ], + "mysql_thread_id": [ + "int mysql_thread_id([int link_identifier])", + "Returns the thread id of current connection" + ], + "mysql_unbuffered_query": [ + "resource mysql_unbuffered_query(string query [, int link_identifier])", + "Sends an SQL query to MySQL, without fetching and buffering the result rows" + ], + "mysqli_affected_rows": [ + "mixed mysqli_affected_rows(object link)", + "Get number of affected rows in previous MySQL operation" + ], + "mysqli_autocommit": [ + "bool mysqli_autocommit(object link, bool mode)", + "Turn auto commit on or of" + ], + "mysqli_cache_stats": [ + "array mysqli_cache_stats()", + "Returns statistics about the zval cache" + ], + "mysqli_change_user": [ + "bool mysqli_change_user(object link, string user, string password, string database)", + "Change logged-in user of the active connection" + ], + "mysqli_character_set_name": [ + "string mysqli_character_set_name(object link)", + "Returns the name of the character set used for this connection" + ], + "mysqli_close": [ + "bool mysqli_close(object link)", + "Close connection" + ], + "mysqli_commit": [ + "bool mysqli_commit(object link)", + "Commit outstanding actions and close transaction" + ], + "mysqli_connect": [ + "object mysqli_connect([string hostname [,string username [,string passwd [,string dbname [,int port [,string socket]]]]]])", + "Open a connection to a mysql server" + ], + "mysqli_connect_errno": [ + "int mysqli_connect_errno()", + "Returns the numerical value of the error message from last connect command" + ], + "mysqli_connect_error": [ + "string mysqli_connect_error()", + "Returns the text of the error message from previous MySQL operation" + ], + "mysqli_data_seek": [ + "bool mysqli_data_seek(object result, int offset)", + "Move internal result pointer" + ], + "mysqli_debug": [ + "void mysqli_debug(string debug)", + "" + ], + "mysqli_dump_debug_info": [ + "bool mysqli_dump_debug_info(object link)", + "" + ], + "mysqli_embedded_server_end": [ + "void mysqli_embedded_server_end()", + "" + ], + "mysqli_embedded_server_start": [ + "bool mysqli_embedded_server_start(bool start, array arguments, array groups)", + "initialize and start embedded server" + ], + "mysqli_errno": [ + "int mysqli_errno(object link)", + "Returns the numerical value of the error message from previous MySQL operation" + ], + "mysqli_error": [ + "string mysqli_error(object link)", + "Returns the text of the error message from previous MySQL operation" + ], + "mysqli_fetch_all": [ + "mixed mysqli_fetch_all(object result [,int resulttype])", + "Fetches all result rows as an associative array, a numeric array, or both" + ], + "mysqli_fetch_array": [ + "mixed mysqli_fetch_array(object result [,int resulttype])", + "Fetch a result row as an associative array, a numeric array, or both" + ], + "mysqli_fetch_assoc": [ + "mixed mysqli_fetch_assoc(object result)", + "Fetch a result row as an associative array" + ], + "mysqli_fetch_field": [ + "mixed mysqli_fetch_field(object result)", + "Get column information from a result and return as an object" + ], + "mysqli_fetch_field_direct": [ + "mixed mysqli_fetch_field_direct(object result, int offset)", + "Fetch meta-data for a single field" + ], + "mysqli_fetch_fields": [ + "mixed mysqli_fetch_fields(object result)", + "Return array of objects containing field meta-data" + ], + "mysqli_fetch_lengths": [ + "mixed mysqli_fetch_lengths(object result)", + "Get the length of each output in a result" + ], + "mysqli_fetch_object": [ + "mixed mysqli_fetch_object(object result [, string class_name [, NULL|array ctor_params]])", + "Fetch a result row as an object" + ], + "mysqli_fetch_row": [ + "array mysqli_fetch_row(object result)", + "Get a result row as an enumerated array" + ], + "mysqli_field_count": [ + "int mysqli_field_count(object link)", + "Fetch the number of fields returned by the last query for the given link" + ], + "mysqli_field_seek": [ + "int mysqli_field_seek(object result, int fieldnr)", + "Set result pointer to a specified field offset" + ], + "mysqli_field_tell": [ + "int mysqli_field_tell(object result)", + "Get current field offset of result pointer" + ], + "mysqli_free_result": [ + "void mysqli_free_result(object result)", + "Free query result memory for the given result handle" + ], + "mysqli_get_charset": [ + "object mysqli_get_charset(object link)", + "returns a character set object" + ], + "mysqli_get_client_info": [ + "string mysqli_get_client_info()", + "Get MySQL client info" + ], + "mysqli_get_client_stats": [ + "array mysqli_get_client_stats()", + "Returns statistics about the zval cache" + ], + "mysqli_get_client_version": [ + "int mysqli_get_client_version()", + "Get MySQL client info" + ], + "mysqli_get_connection_stats": [ + "array mysqli_get_connection_stats()", + "Returns statistics about the zval cache" + ], + "mysqli_get_host_info": [ + "string mysqli_get_host_info(object link)", + "Get MySQL host info" + ], + "mysqli_get_proto_info": [ + "int mysqli_get_proto_info(object link)", + "Get MySQL protocol information" + ], + "mysqli_get_server_info": [ + "string mysqli_get_server_info(object link)", + "Get MySQL server info" + ], + "mysqli_get_server_version": [ + "int mysqli_get_server_version(object link)", + "Return the MySQL version for the server referenced by the given link" + ], + "mysqli_get_warnings": [ + "object mysqli_get_warnings(object link)", + "" + ], + "mysqli_info": [ + "string mysqli_info(object link)", + "Get information about the most recent query" + ], + "mysqli_init": [ + "resource mysqli_init()", + "Initialize mysqli and return a resource for use with mysql_real_connect" + ], + "mysqli_insert_id": [ + "mixed mysqli_insert_id(object link)", + "Get the ID generated from the previous INSERT operation" + ], + "mysqli_kill": [ + "bool mysqli_kill(object link, int processid)", + "Kill a mysql process on the server" + ], + "mysqli_link_construct": [ + "object mysqli_link_construct()", + "" + ], + "mysqli_more_results": [ + "bool mysqli_more_results(object link)", + "check if there any more query results from a multi query" + ], + "mysqli_multi_query": [ + "bool mysqli_multi_query(object link, string query)", + "allows to execute multiple queries" + ], + "mysqli_next_result": [ + "bool mysqli_next_result(object link)", + "read next result from multi_query" + ], + "mysqli_num_fields": [ + "int mysqli_num_fields(object result)", + "Get number of fields in result" + ], + "mysqli_num_rows": [ + "mixed mysqli_num_rows(object result)", + "Get number of rows in result" + ], + "mysqli_options": [ + "bool mysqli_options(object link, int flags, mixed values)", + "Set options" + ], + "mysqli_ping": [ + "bool mysqli_ping(object link)", + "Ping a server connection or reconnect if there is no connection" + ], + "mysqli_poll": [ + "int mysqli_poll(array read, array write, array error, long sec [, long usec])", + "Poll connections" + ], + "mysqli_prepare": [ + "mixed mysqli_prepare(object link, string query)", + "Prepare a SQL statement for execution" + ], + "mysqli_query": [ + "mixed mysqli_query(object link, string query [,int resultmode])", + "" + ], + "mysqli_real_connect": [ + "bool mysqli_real_connect(object link [,string hostname [,string username [,string passwd [,string dbname [,int port [,string socket [,int flags]]]]]]])", + "Open a connection to a mysql server" + ], + "mysqli_real_escape_string": [ + "string mysqli_real_escape_string(object link, string escapestr)", + "Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection" + ], + "mysqli_real_query": [ + "bool mysqli_real_query(object link, string query)", + "Binary-safe version of mysql_query()" + ], + "mysqli_reap_async_query": [ + "int mysqli_reap_async_query(object link)", + "Poll connections" + ], + "mysqli_refresh": [ + "bool mysqli_refresh(object link, long options)", + "Flush tables or caches, or reset replication server information" + ], + "mysqli_report": [ + "bool mysqli_report(int flags)", + "sets report level" + ], + "mysqli_rollback": [ + "bool mysqli_rollback(object link)", + "Undo actions from current transaction" + ], + "mysqli_select_db": [ + "bool mysqli_select_db(object link, string dbname)", + "Select a MySQL database" + ], + "mysqli_set_charset": [ + "bool mysqli_set_charset(object link, string csname)", + "sets client character set" + ], + "mysqli_set_local_infile_default": [ + "void mysqli_set_local_infile_default(object link)", + "unsets user defined handler for load local infile command" + ], + "mysqli_set_local_infile_handler": [ + "bool mysqli_set_local_infile_handler(object link, callback read_func)", + "Set callback functions for LOAD DATA LOCAL INFILE" + ], + "mysqli_sqlstate": [ + "string mysqli_sqlstate(object link)", + "Returns the SQLSTATE error from previous MySQL operation" + ], + "mysqli_ssl_set": [ + "bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])", + "" + ], + "mysqli_stat": [ + "mixed mysqli_stat(object link)", + "Get current system status" + ], + "mysqli_stmt_affected_rows": [ + "mixed mysqli_stmt_affected_rows(object stmt)", + "Return the number of rows affected in the last query for the given link" + ], + "mysqli_stmt_attr_get": [ + "int mysqli_stmt_attr_get(object stmt, long attr)", + "" + ], + "mysqli_stmt_attr_set": [ + "int mysqli_stmt_attr_set(object stmt, long attr, long mode)", + "" + ], + "mysqli_stmt_bind_param": [ + "bool mysqli_stmt_bind_param(object stmt, string types, mixed variable [,mixed,....])", + "Bind variables to a prepared statement as parameters" + ], + "mysqli_stmt_bind_result": [ + "bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])", + "Bind variables to a prepared statement for result storage" + ], + "mysqli_stmt_close": [ + "bool mysqli_stmt_close(object stmt)", + "Close statement" + ], + "mysqli_stmt_data_seek": [ + "void mysqli_stmt_data_seek(object stmt, int offset)", + "Move internal result pointer" + ], + "mysqli_stmt_errno": [ + "int mysqli_stmt_errno(object stmt)", + "" + ], + "mysqli_stmt_error": [ + "string mysqli_stmt_error(object stmt)", + "" + ], + "mysqli_stmt_execute": [ + "bool mysqli_stmt_execute(object stmt)", + "Execute a prepared statement" + ], + "mysqli_stmt_fetch": [ + "mixed mysqli_stmt_fetch(object stmt)", + "Fetch results from a prepared statement into the bound variables" + ], + "mysqli_stmt_field_count": [ + "int mysqli_stmt_field_count(object stmt) {", + "Return the number of result columns for the given statement" + ], + "mysqli_stmt_free_result": [ + "void mysqli_stmt_free_result(object stmt)", + "Free stored result memory for the given statement handle" + ], + "mysqli_stmt_get_result": [ + "object mysqli_stmt_get_result(object link)", + "Buffer result set on client" + ], + "mysqli_stmt_get_warnings": [ + "object mysqli_stmt_get_warnings(object link)", + "" + ], + "mysqli_stmt_init": [ + "mixed mysqli_stmt_init(object link)", + "Initialize statement object" + ], + "mysqli_stmt_insert_id": [ + "mixed mysqli_stmt_insert_id(object stmt)", + "Get the ID generated from the previous INSERT operation" + ], + "mysqli_stmt_next_result": [ + "bool mysqli_stmt_next_result(object link)", + "read next result from multi_query" + ], + "mysqli_stmt_num_rows": [ + "mixed mysqli_stmt_num_rows(object stmt)", + "Return the number of rows in statements result set" + ], + "mysqli_stmt_param_count": [ + "int mysqli_stmt_param_count(object stmt)", + "Return the number of parameter for the given statement" + ], + "mysqli_stmt_prepare": [ + "bool mysqli_stmt_prepare(object stmt, string query)", + "prepare server side statement with query" + ], + "mysqli_stmt_reset": [ + "bool mysqli_stmt_reset(object stmt)", + "reset a prepared statement" + ], + "mysqli_stmt_result_metadata": [ + "mixed mysqli_stmt_result_metadata(object stmt)", + "return result set from statement" + ], + "mysqli_stmt_send_long_data": [ + "bool mysqli_stmt_send_long_data(object stmt, int param_nr, string data)", + "" + ], + "mysqli_stmt_sqlstate": [ + "string mysqli_stmt_sqlstate(object stmt)", + "" + ], + "mysqli_stmt_store_result": [ + "bool mysqli_stmt_store_result(stmt)", + "" + ], + "mysqli_store_result": [ + "object mysqli_store_result(object link)", + "Buffer result set on client" + ], + "mysqli_thread_id": [ + "int mysqli_thread_id(object link)", + "Return the current thread ID" + ], + "mysqli_thread_safe": [ + "bool mysqli_thread_safe()", + "Return whether thread safety is given or not" + ], + "mysqli_use_result": [ + "mixed mysqli_use_result(object link)", + "Directly retrieve query results - do not buffer results on client side" + ], + "mysqli_warning_count": [ + "int mysqli_warning_count(object link)", + "Return number of warnings from the last query for the given link" + ], + "natcasesort": [ + "void natcasesort(array &array_arg)", + "Sort an array using case-insensitive natural sort" + ], + "natsort": [ + "void natsort(array &array_arg)", + "Sort an array using natural sort" + ], + "next": [ + "mixed next(array array_arg)", + "Move array argument's internal pointer to the next element and return it" + ], + "ngettext": [ + "string ngettext(string MSGID1, string MSGID2, int N)", + "Plural version of gettext()" + ], + "nl2br": [ + "string nl2br(string str [, bool is_xhtml])", + "Converts newlines to HTML line breaks" + ], + "nl_langinfo": [ + "string nl_langinfo(int item)", + "Query language and locale information" + ], + "normalizer_is_normalize": [ + "bool normalizer_is_normalize( string $input [, string $form = FORM_C] )", + "* Test if a string is in a given normalization form." + ], + "normalizer_normalize": [ + "string normalizer_normalize( string $input [, string $form = FORM_C] )", + "* Normalize a string." + ], + "nsapi_request_headers": [ + "array nsapi_request_headers()", + "Get all headers from the request" + ], + "nsapi_response_headers": [ + "array nsapi_response_headers()", + "Get all headers from the response" + ], + "nsapi_virtual": [ + "bool nsapi_virtual(string uri)", + "Perform an NSAPI sub-request" + ], + "number_format": [ + "string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])", + "Formats a number with grouped thousands" + ], + "numfmt_create": [ + "NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )", + "* Create number formatter." + ], + "numfmt_format": [ + "mixed numfmt_format( NumberFormatter $nf, mixed $num[, int type] )", + "* Format a number." + ], + "numfmt_format_currency": [ + "mixed numfmt_format_currency( NumberFormatter $nf, double $num, string $currency )", + "* Format a number as currency." + ], + "numfmt_get_attribute": [ + "mixed numfmt_get_attribute( NumberFormatter $nf, int $attr )", + "* Get formatter attribute value." + ], + "numfmt_get_error_code": [ + "int numfmt_get_error_code( NumberFormatter $nf )", + "* Get formatter's last error code." + ], + "numfmt_get_error_message": [ + "string numfmt_get_error_message( NumberFormatter $nf )", + "* Get text description for formatter's last error code." + ], + "numfmt_get_locale": [ + "string numfmt_get_locale( NumberFormatter $nf[, int type] )", + "* Get formatter locale." + ], + "numfmt_get_pattern": [ + "string numfmt_get_pattern( NumberFormatter $nf )", + "* Get formatter pattern." + ], + "numfmt_get_symbol": [ + "string numfmt_get_symbol( NumberFormatter $nf, int $attr )", + "* Get formatter symbol value." + ], + "numfmt_get_text_attribute": [ + "string numfmt_get_text_attribute( NumberFormatter $nf, int $attr )", + "* Get formatter attribute value." + ], + "numfmt_parse": [ + "mixed numfmt_parse( NumberFormatter $nf, string $str[, int $type, int &$position ])", + "* Parse a number." + ], + "numfmt_parse_currency": [ + "double numfmt_parse_currency( NumberFormatter $nf, string $str, string $¤cy[, int $&position] )", + "* Parse a number as currency." + ], + "numfmt_parse_message": [ + "array numfmt_parse_message( string $locale, string $pattern, string $source )", + "* Parse a message." + ], + "numfmt_set_attribute": [ + "bool numfmt_set_attribute( NumberFormatter $nf, int $attr, mixed $value )", + "* Get formatter attribute value." + ], + "numfmt_set_pattern": [ + "bool numfmt_set_pattern( NumberFormatter $nf, string $pattern )", + "* Set formatter pattern." + ], + "numfmt_set_symbol": [ + "bool numfmt_set_symbol( NumberFormatter $nf, int $attr, string $symbol )", + "* Set formatter symbol value." + ], + "numfmt_set_text_attribute": [ + "bool numfmt_set_text_attribute( NumberFormatter $nf, int $attr, string $value )", + "* Get formatter attribute value." + ], + "ob_clean": [ + "bool ob_clean()", + "Clean (delete) the current output buffer" + ], + "ob_end_clean": [ + "bool ob_end_clean()", + "Clean the output buffer, and delete current output buffer" + ], + "ob_end_flush": [ + "bool ob_end_flush()", + "Flush (send) the output buffer, and delete current output buffer" + ], + "ob_flush": [ + "bool ob_flush()", + "Flush (send) contents of the output buffer. The last buffer content is sent to next buffer" + ], + "ob_get_clean": [ + "bool ob_get_clean()", + "Get current buffer contents and delete current output buffer" + ], + "ob_get_contents": [ + "string ob_get_contents()", + "Return the contents of the output buffer" + ], + "ob_get_flush": [ + "bool ob_get_flush()", + "Get current buffer contents, flush (send) the output buffer, and delete current output buffer" + ], + "ob_get_length": [ + "int ob_get_length()", + "Return the length of the output buffer" + ], + "ob_get_level": [ + "int ob_get_level()", + "Return the nesting level of the output buffer" + ], + "ob_get_status": [ + "false|array ob_get_status([bool full_status])", + "Return the status of the active or all output buffers" + ], + "ob_gzhandler": [ + "string ob_gzhandler(string str, int mode)", + "Encode str based on accept-encoding setting - designed to be called from ob_start()" + ], + "ob_iconv_handler": [ + "string ob_iconv_handler(string contents, int status)", + "Returns str in output buffer converted to the iconv.output_encoding character set" + ], + "ob_implicit_flush": [ + "void ob_implicit_flush([int flag])", + "Turn implicit flush on/off and is equivalent to calling flush() after every output call" + ], + "ob_list_handlers": [ + "false|array ob_list_handlers()", + "* List all output_buffers in an array" + ], + "ob_start": [ + "bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])", + "Turn on Output Buffering (specifying an optional output handler)." + ], + "oci_bind_array_by_name": [ + "bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]])", + "Bind a PHP array to an Oracle PL/SQL type by name" + ], + "oci_bind_by_name": [ + "bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]])", + "Bind a PHP variable to an Oracle placeholder by name" + ], + "oci_cancel": [ + "bool oci_cancel(resource stmt)", + "Cancel reading from a cursor" + ], + "oci_close": [ + "bool oci_close(resource connection)", + "Disconnect from database" + ], + "oci_collection_append": [ + "bool oci_collection_append(string value)", + "Append an object to the collection" + ], + "oci_collection_assign": [ + "bool oci_collection_assign(object from)", + "Assign a collection from another existing collection" + ], + "oci_collection_element_assign": [ + "bool oci_collection_element_assign(int index, string val)", + "Assign element val to collection at index ndx" + ], + "oci_collection_element_get": [ + "string oci_collection_element_get(int ndx)", + "Retrieve the value at collection index ndx" + ], + "oci_collection_max": [ + "int oci_collection_max()", + "Return the max value of a collection. For a varray this is the maximum length of the array" + ], + "oci_collection_size": [ + "int oci_collection_size()", + "Return the size of a collection" + ], + "oci_collection_trim": [ + "bool oci_collection_trim(int num)", + "Trim num elements from the end of a collection" + ], + "oci_commit": [ + "bool oci_commit(resource connection)", + "Commit the current context" + ], + "oci_connect": [ + "resource oci_connect(string user, string pass [, string db [, string charset [, int session_mode ]])", + "Connect to an Oracle database and log on. Returns a new session." + ], + "oci_define_by_name": [ + "bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])", + "Define a PHP variable to an Oracle column by name" + ], + "oci_error": [ + "array oci_error([resource stmt|connection|global])", + "Return the last error of stmt|connection|global. If no error happened returns false." + ], + "oci_execute": [ + "bool oci_execute(resource stmt [, int mode])", + "Execute a parsed statement" + ], + "oci_fetch": [ + "bool oci_fetch(resource stmt)", + "Prepare a new row of data for reading" + ], + "oci_fetch_all": [ + "int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]])", + "Fetch all rows of result data into an array" + ], + "oci_fetch_array": [ + "array oci_fetch_array( resource stmt [, int mode ])", + "Fetch a result row as an array" + ], + "oci_fetch_assoc": [ + "array oci_fetch_assoc( resource stmt )", + "Fetch a result row as an associative array" + ], + "oci_fetch_object": [ + "object oci_fetch_object( resource stmt )", + "Fetch a result row as an object" + ], + "oci_fetch_row": [ + "array oci_fetch_row( resource stmt )", + "Fetch a result row as an enumerated array" + ], + "oci_field_is_null": [ + "bool oci_field_is_null(resource stmt, int col)", + "Tell whether a column is NULL" + ], + "oci_field_name": [ + "string oci_field_name(resource stmt, int col)", + "Tell the name of a column" + ], + "oci_field_precision": [ + "int oci_field_precision(resource stmt, int col)", + "Tell the precision of a column" + ], + "oci_field_scale": [ + "int oci_field_scale(resource stmt, int col)", + "Tell the scale of a column" + ], + "oci_field_size": [ + "int oci_field_size(resource stmt, int col)", + "Tell the maximum data size of a column" + ], + "oci_field_type": [ + "mixed oci_field_type(resource stmt, int col)", + "Tell the data type of a column" + ], + "oci_field_type_raw": [ + "int oci_field_type_raw(resource stmt, int col)", + "Tell the raw oracle data type of a column" + ], + "oci_free_collection": [ + "bool oci_free_collection()", + "Deletes collection object" + ], + "oci_free_descriptor": [ + "bool oci_free_descriptor()", + "Deletes large object description" + ], + "oci_free_statement": [ + "bool oci_free_statement(resource stmt)", + "Free all resources associated with a statement" + ], + "oci_internal_debug": [ + "void oci_internal_debug(int onoff)", + "Toggle internal debugging output for the OCI extension" + ], + "oci_lob_append": [ + "bool oci_lob_append( object lob )", + "Appends data from a LOB to another LOB" + ], + "oci_lob_close": [ + "bool oci_lob_close()", + "Closes lob descriptor" + ], + "oci_lob_copy": [ + "bool oci_lob_copy( object lob_to, object lob_from [, int length ] )", + "Copies data from a LOB to another LOB" + ], + "oci_lob_eof": [ + "bool oci_lob_eof()", + "Checks if EOF is reached" + ], + "oci_lob_erase": [ + "int oci_lob_erase( [ int offset [, int length ] ] )", + "Erases a specified portion of the internal LOB, starting at a specified offset" + ], + "oci_lob_export": [ + "bool oci_lob_export([string filename [, int start [, int length]]])", + "Writes a large object into a file" + ], + "oci_lob_flush": [ + "bool oci_lob_flush( [ int flag ] )", + "Flushes the LOB buffer" + ], + "oci_lob_import": [ + "bool oci_lob_import( string filename )", + "Loads file into a LOB" + ], + "oci_lob_is_equal": [ + "bool oci_lob_is_equal( object lob1, object lob2 )", + "Tests to see if two LOB/FILE locators are equal" + ], + "oci_lob_load": [ + "string oci_lob_load()", + "Loads a large object" + ], + "oci_lob_read": [ + "string oci_lob_read( int length )", + "Reads particular part of a large object" + ], + "oci_lob_rewind": [ + "bool oci_lob_rewind()", + "Rewind pointer of a LOB" + ], + "oci_lob_save": [ + "bool oci_lob_save( string data [, int offset ])", + "Saves a large object" + ], + "oci_lob_seek": [ + "bool oci_lob_seek( int offset [, int whence ])", + "Moves the pointer of a LOB" + ], + "oci_lob_size": [ + "int oci_lob_size()", + "Returns size of a large object" + ], + "oci_lob_tell": [ + "int oci_lob_tell()", + "Tells LOB pointer position" + ], + "oci_lob_truncate": [ + "bool oci_lob_truncate( [ int length ])", + "Truncates a LOB" + ], + "oci_lob_write": [ + "int oci_lob_write( string string [, int length ])", + "Writes data to current position of a LOB" + ], + "oci_lob_write_temporary": [ + "bool oci_lob_write_temporary(string var [, int lob_type])", + "Writes temporary blob" + ], + "oci_new_collection": [ + "object oci_new_collection(resource connection, string tdo [, string schema])", + "Initialize a new collection" + ], + "oci_new_connect": [ + "resource oci_new_connect(string user, string pass [, string db])", + "Connect to an Oracle database and log on. Returns a new session." + ], + "oci_new_cursor": [ + "resource oci_new_cursor(resource connection)", + "Return a new cursor (Statement-Handle) - use this to bind ref-cursors!" + ], + "oci_new_descriptor": [ + "object oci_new_descriptor(resource connection [, int type])", + "Initialize a new empty descriptor LOB/FILE (LOB is default)" + ], + "oci_num_fields": [ + "int oci_num_fields(resource stmt)", + "Return the number of result columns in a statement" + ], + "oci_num_rows": [ + "int oci_num_rows(resource stmt)", + "Return the row count of an OCI statement" + ], + "oci_parse": [ + "resource oci_parse(resource connection, string query)", + "Parse a query and return a statement" + ], + "oci_password_change": [ + "bool oci_password_change(resource connection, string username, string old_password, string new_password)", + "Changes the password of an account" + ], + "oci_pconnect": [ + "resource oci_pconnect(string user, string pass [, string db [, string charset ]])", + "Connect to an Oracle database using a persistent connection and log on. Returns a new session." + ], + "oci_result": [ + "string oci_result(resource stmt, mixed column)", + "Return a single column of result data" + ], + "oci_rollback": [ + "bool oci_rollback(resource connection)", + "Rollback the current context" + ], + "oci_server_version": [ + "string oci_server_version(resource connection)", + "Return a string containing server version information" + ], + "oci_set_action": [ + "bool oci_set_action(resource connection, string value)", + "Sets the action attribute on the connection" + ], + "oci_set_client_identifier": [ + "bool oci_set_client_identifier(resource connection, string value)", + "Sets the client identifier attribute on the connection" + ], + "oci_set_client_info": [ + "bool oci_set_client_info(resource connection, string value)", + "Sets the client info attribute on the connection" + ], + "oci_set_edition": [ + "bool oci_set_edition(string value)", + "Sets the edition attribute for all subsequent connections created" + ], + "oci_set_module_name": [ + "bool oci_set_module_name(resource connection, string value)", + "Sets the module attribute on the connection" + ], + "oci_set_prefetch": [ + "bool oci_set_prefetch(resource stmt, int prefetch_rows)", + "Sets the number of rows to be prefetched on execute to prefetch_rows for stmt" + ], + "oci_statement_type": [ + "string oci_statement_type(resource stmt)", + "Return the query type of an OCI statement" + ], + "ocifetchinto": [ + "int ocifetchinto(resource stmt, array &output [, int mode])", + "Fetch a row of result data into an array" + ], + "ocigetbufferinglob": [ + "bool ocigetbufferinglob()", + "Returns current state of buffering for a LOB" + ], + "ocisetbufferinglob": [ + "bool ocisetbufferinglob( bool flag )", + "Enables/disables buffering for a LOB" + ], + "octdec": [ + "int octdec(string octal_number)", + "Returns the decimal equivalent of an octal string" + ], + "odbc_autocommit": [ + "mixed odbc_autocommit(resource connection_id [, int OnOff])", + "Toggle autocommit mode or get status" + ], + "odbc_binmode": [ + "bool odbc_binmode(int result_id, int mode)", + "Handle binary column data" + ], + "odbc_close": [ + "void odbc_close(resource connection_id)", + "Close an ODBC connection" + ], + "odbc_close_all": [ + "void odbc_close_all()", + "Close all ODBC connections" + ], + "odbc_columnprivileges": [ + "resource odbc_columnprivileges(resource connection_id, string catalog, string schema, string table, string column)", + "Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table" + ], + "odbc_columns": [ + "resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])", + "Returns a result identifier that can be used to fetch a list of column names in specified tables" + ], + "odbc_commit": [ + "bool odbc_commit(resource connection_id)", + "Commit an ODBC transaction" + ], + "odbc_connect": [ + "resource odbc_connect(string DSN, string user, string password [, int cursor_option])", + "Connect to a datasource" + ], + "odbc_cursor": [ + "string odbc_cursor(resource result_id)", + "Get cursor name" + ], + "odbc_data_source": [ + "array odbc_data_source(resource connection_id, int fetch_type)", + "Return information about the currently connected data source" + ], + "odbc_error": [ + "string odbc_error([resource connection_id])", + "Get the last error code" + ], + "odbc_errormsg": [ + "string odbc_errormsg([resource connection_id])", + "Get the last error message" + ], + "odbc_exec": [ + "resource odbc_exec(resource connection_id, string query [, int flags])", + "Prepare and execute an SQL statement" + ], + "odbc_execute": [ + "bool odbc_execute(resource result_id [, array parameters_array])", + "Execute a prepared statement" + ], + "odbc_fetch_array": [ + "array odbc_fetch_array(int result [, int rownumber])", + "Fetch a result row as an associative array" + ], + "odbc_fetch_into": [ + "int odbc_fetch_into(resource result_id, array &result_array, [, int rownumber])", + "Fetch one result row into an array" + ], + "odbc_fetch_object": [ + "object odbc_fetch_object(int result [, int rownumber])", + "Fetch a result row as an object" + ], + "odbc_fetch_row": [ + "bool odbc_fetch_row(resource result_id [, int row_number])", + "Fetch a row" + ], + "odbc_field_len": [ + "int odbc_field_len(resource result_id, int field_number)", + "Get the length (precision) of a column" + ], + "odbc_field_name": [ + "string odbc_field_name(resource result_id, int field_number)", + "Get a column name" + ], + "odbc_field_num": [ + "int odbc_field_num(resource result_id, string field_name)", + "Return column number" + ], + "odbc_field_scale": [ + "int odbc_field_scale(resource result_id, int field_number)", + "Get the scale of a column" + ], + "odbc_field_type": [ + "string odbc_field_type(resource result_id, int field_number)", + "Get the datatype of a column" + ], + "odbc_foreignkeys": [ + "resource odbc_foreignkeys(resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)", + "Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table" + ], + "odbc_free_result": [ + "bool odbc_free_result(resource result_id)", + "Free resources associated with a result" + ], + "odbc_gettypeinfo": [ + "resource odbc_gettypeinfo(resource connection_id [, int data_type])", + "Returns a result identifier containing information about data types supported by the data source" + ], + "odbc_longreadlen": [ + "bool odbc_longreadlen(int result_id, int length)", + "Handle LONG columns" + ], + "odbc_next_result": [ + "bool odbc_next_result(resource result_id)", + "Checks if multiple results are avaiable" + ], + "odbc_num_fields": [ + "int odbc_num_fields(resource result_id)", + "Get number of columns in a result" + ], + "odbc_num_rows": [ + "int odbc_num_rows(resource result_id)", + "Get number of rows in a result" + ], + "odbc_pconnect": [ + "resource odbc_pconnect(string DSN, string user, string password [, int cursor_option])", + "Establish a persistent connection to a datasource" + ], + "odbc_prepare": [ + "resource odbc_prepare(resource connection_id, string query)", + "Prepares a statement for execution" + ], + "odbc_primarykeys": [ + "resource odbc_primarykeys(resource connection_id, string qualifier, string owner, string table)", + "Returns a result identifier listing the column names that comprise the primary key for a table" + ], + "odbc_procedurecolumns": [ + "resource odbc_procedurecolumns(resource connection_id [, string qualifier, string owner, string proc, string column])", + "Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures" + ], + "odbc_procedures": [ + "resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])", + "Returns a result identifier containg the list of procedure names in a datasource" + ], + "odbc_result": [ + "mixed odbc_result(resource result_id, mixed field)", + "Get result data" + ], + "odbc_result_all": [ + "int odbc_result_all(resource result_id [, string format])", + "Print result as HTML table" + ], + "odbc_rollback": [ + "bool odbc_rollback(resource connection_id)", + "Rollback a transaction" + ], + "odbc_setoption": [ + "bool odbc_setoption(resource conn_id|result_id, int which, int option, int value)", + "Sets connection or statement options" + ], + "odbc_specialcolumns": [ + "resource odbc_specialcolumns(resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)", + "Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction" + ], + "odbc_statistics": [ + "resource odbc_statistics(resource connection_id, string qualifier, string owner, string name, int unique, int accuracy)", + "Returns a result identifier that contains statistics about a single table and the indexes associated with the table" + ], + "odbc_tableprivileges": [ + "resource odbc_tableprivileges(resource connection_id, string qualifier, string owner, string name)", + "Returns a result identifier containing a list of tables and the privileges associated with each table" + ], + "odbc_tables": [ + "resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])", + "Call the SQLTables function" + ], + "opendir": [ + "mixed opendir(string path[, resource context])", + "Open a directory and return a dir_handle" + ], + "openlog": [ + "bool openlog(string ident, int option, int facility)", + "Open connection to system logger" + ], + "openssl_csr_export": [ + "bool openssl_csr_export(resource csr, string &out [, bool notext=true])", + "Exports a CSR to file or a var" + ], + "openssl_csr_export_to_file": [ + "bool openssl_csr_export_to_file(resource csr, string outfilename [, bool notext=true])", + "Exports a CSR to file" + ], + "openssl_csr_get_public_key": [ + "mixed openssl_csr_get_public_key(mixed csr)", + "Returns the subject of a CERT or FALSE on error" + ], + "openssl_csr_get_subject": [ + "mixed openssl_csr_get_subject(mixed csr)", + "Returns the subject of a CERT or FALSE on error" + ], + "openssl_csr_new": [ + "bool openssl_csr_new(array dn, resource &privkey [, array configargs [, array extraattribs]])", + "Generates a privkey and CSR" + ], + "openssl_csr_sign": [ + "resource openssl_csr_sign(mixed csr, mixed x509, mixed priv_key, long days [, array config_args [, long serial]])", + "Signs a cert with another CERT" + ], + "openssl_decrypt": [ + "string openssl_decrypt(string data, string method, string password [, bool raw_input=false])", + "Takes raw or base64 encoded string and dectupt it using given method and key" + ], + "openssl_dh_compute_key": [ + "string openssl_dh_compute_key(string pub_key, resource dh_key)", + "Computes shared sicret for public value of remote DH key and local DH key" + ], + "openssl_digest": [ + "string openssl_digest(string data, string method [, bool raw_output=false])", + "Computes digest hash value for given data using given method, returns raw or binhex encoded string" + ], + "openssl_encrypt": [ + "string openssl_encrypt(string data, string method, string password [, bool raw_output=false])", + "Encrypts given data with given method and key, returns raw or base64 encoded string" + ], + "openssl_error_string": [ + "mixed openssl_error_string()", + "Returns a description of the last error, and alters the index of the error messages. Returns false when the are no more messages" + ], + "openssl_get_cipher_methods": [ + "array openssl_get_cipher_methods([bool aliases = false])", + "Return array of available cipher methods" + ], + "openssl_get_md_methods": [ + "array openssl_get_md_methods([bool aliases = false])", + "Return array of available digest methods" + ], + "openssl_open": [ + "bool openssl_open(string data, &string opendata, string ekey, mixed privkey)", + "Opens data" + ], + "openssl_pkcs12_export": [ + "bool openssl_pkcs12_export(mixed x509, string &out, mixed priv_key, string pass[, array args])", + "Creates and exports a PKCS12 to a var" + ], + "openssl_pkcs12_export_to_file": [ + "bool openssl_pkcs12_export_to_file(mixed x509, string filename, mixed priv_key, string pass[, array args])", + "Creates and exports a PKCS to file" + ], + "openssl_pkcs12_read": [ + "bool openssl_pkcs12_read(string PKCS12, array &certs, string pass)", + "Parses a PKCS12 to an array" + ], + "openssl_pkcs7_decrypt": [ + "bool openssl_pkcs7_decrypt(string infilename, string outfilename, mixed recipcert [, mixed recipkey])", + "Decrypts the S/MIME message in the file name infilename and output the results to the file name outfilename. recipcert is a CERT for one of the recipients. recipkey specifies the private key matching recipcert, if recipcert does not include the key" + ], + "openssl_pkcs7_encrypt": [ + "bool openssl_pkcs7_encrypt(string infile, string outfile, mixed recipcerts, array headers [, long flags [, long cipher]])", + "Encrypts the message in the file named infile with the certificates in recipcerts and output the result to the file named outfile" + ], + "openssl_pkcs7_sign": [ + "bool openssl_pkcs7_sign(string infile, string outfile, mixed signcert, mixed signkey, array headers [, long flags [, string extracertsfilename]])", + "Signs the MIME message in the file named infile with signcert/signkey and output the result to file name outfile. headers lists plain text headers to exclude from the signed portion of the message, and should include to, from and subject as a minimum" + ], + "openssl_pkcs7_verify": [ + "bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])", + "Verifys that the data block is intact, the signer is who they say they are, and returns the CERTs of the signers" + ], + "openssl_pkey_export": [ + "bool openssl_pkey_export(mixed key, &mixed out [, string passphrase [, array config_args]])", + "Gets an exportable representation of a key into a string or file" + ], + "openssl_pkey_export_to_file": [ + "bool openssl_pkey_export_to_file(mixed key, string outfilename [, string passphrase, array config_args)", + "Gets an exportable representation of a key into a file" + ], + "openssl_pkey_free": [ + "void openssl_pkey_free(int key)", + "Frees a key" + ], + "openssl_pkey_get_details": [ + "resource openssl_pkey_get_details(resource key)", + "returns an array with the key details (bits, pkey, type)" + ], + "openssl_pkey_get_private": [ + "int openssl_pkey_get_private(string key [, string passphrase])", + "Gets private keys" + ], + "openssl_pkey_get_public": [ + "int openssl_pkey_get_public(mixed cert)", + "Gets public key from X.509 certificate" + ], + "openssl_pkey_new": [ + "resource openssl_pkey_new([array configargs])", + "Generates a new private key" + ], + "openssl_private_decrypt": [ + "bool openssl_private_decrypt(string data, string &decrypted, mixed key [, int padding])", + "Decrypts data with private key" + ], + "openssl_private_encrypt": [ + "bool openssl_private_encrypt(string data, string &crypted, mixed key [, int padding])", + "Encrypts data with private key" + ], + "openssl_public_decrypt": [ + "bool openssl_public_decrypt(string data, string &crypted, resource key [, int padding])", + "Decrypts data with public key" + ], + "openssl_public_encrypt": [ + "bool openssl_public_encrypt(string data, string &crypted, mixed key [, int padding])", + "Encrypts data with public key" + ], + "openssl_random_pseudo_bytes": [ + "string openssl_random_pseudo_bytes(integer length [, &bool returned_strong_result])", + "Returns a string of the length specified filled with random pseudo bytes" + ], + "openssl_seal": [ + "int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys)", + "Seals data" + ], + "openssl_sign": [ + "bool openssl_sign(string data, &string signature, mixed key[, mixed method])", + "Signs data" + ], + "openssl_verify": [ + "int openssl_verify(string data, string signature, mixed key[, mixed method])", + "Verifys data" + ], + "openssl_x509_check_private_key": [ + "bool openssl_x509_check_private_key(mixed cert, mixed key)", + "Checks if a private key corresponds to a CERT" + ], + "openssl_x509_checkpurpose": [ + "int openssl_x509_checkpurpose(mixed x509cert, int purpose, array cainfo [, string untrustedfile])", + "Checks the CERT to see if it can be used for the purpose in purpose. cainfo holds information about trusted CAs" + ], + "openssl_x509_export": [ + "bool openssl_x509_export(mixed x509, string &out [, bool notext = true])", + "Exports a CERT to file or a var" + ], + "openssl_x509_export_to_file": [ + "bool openssl_x509_export_to_file(mixed x509, string outfilename [, bool notext = true])", + "Exports a CERT to file or a var" + ], + "openssl_x509_free": [ + "void openssl_x509_free(resource x509)", + "Frees X.509 certificates" + ], + "openssl_x509_parse": [ + "array openssl_x509_parse(mixed x509 [, bool shortnames=true])", + "Returns an array of the fields/values of the CERT" + ], + "openssl_x509_read": [ + "resource openssl_x509_read(mixed cert)", + "Reads X.509 certificates" + ], + "ord": [ + "int ord(string character)", + "Returns ASCII value of character" + ], + "output_add_rewrite_var": [ + "bool output_add_rewrite_var(string name, string value)", + "Add URL rewriter values" + ], + "output_reset_rewrite_vars": [ + "bool output_reset_rewrite_vars()", + "Reset(clear) URL rewriter values" + ], + "pack": [ + "string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])", + "Takes one or more arguments and packs them into a binary string according to the format argument" + ], + "parse_ini_file": [ + "array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])", + "Parse configuration file" + ], + "parse_ini_string": [ + "array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])", + "Parse configuration string" + ], + "parse_locale": [ + "static array parse_locale($locale)", + "* parses a locale-id into an array the different parts of it" + ], + "parse_str": [ + "void parse_str(string encoded_string [, array result])", + "Parses GET/POST/COOKIE data and sets global variables" + ], + "parse_url": [ + "mixed parse_url(string url, [int url_component])", + "Parse a URL and return its components" + ], + "passthru": [ + "void passthru(string command [, int &return_value])", + "Execute an external program and display raw output" + ], + "pathinfo": [ + "array pathinfo(string path[, int options])", + "Returns information about a certain string" + ], + "pclose": [ + "int pclose(resource fp)", + "Close a file pointer opened by popen()" + ], + "pcnlt_sigwaitinfo": [ + "int pcnlt_sigwaitinfo(array set[, array &siginfo])", + "Synchronously wait for queued signals" + ], + "pcntl_alarm": [ + "int pcntl_alarm(int seconds)", + "Set an alarm clock for delivery of a signal" + ], + "pcntl_exec": [ + "bool pcntl_exec(string path [, array args [, array envs]])", + "Executes specified program in current process space as defined by exec(2)" + ], + "pcntl_fork": [ + "int pcntl_fork()", + "Forks the currently running process following the same behavior as the UNIX fork() system call" + ], + "pcntl_getpriority": [ + "int pcntl_getpriority([int pid [, int process_identifier]])", + "Get the priority of any process" + ], + "pcntl_setpriority": [ + "bool pcntl_setpriority(int priority [, int pid [, int process_identifier]])", + "Change the priority of any process" + ], + "pcntl_signal": [ + "bool pcntl_signal(int signo, callback handle [, bool restart_syscalls])", + "Assigns a system signal handler to a PHP function" + ], + "pcntl_signal_dispatch": [ + "bool pcntl_signal_dispatch()", + "Dispatch signals to signal handlers" + ], + "pcntl_sigprocmask": [ + "bool pcntl_sigprocmask(int how, array set[, array &oldset])", + "Examine and change blocked signals" + ], + "pcntl_sigtimedwait": [ + "int pcntl_sigtimedwait(array set[, array &siginfo[, int seconds[, int nanoseconds]]])", + "Wait for queued signals" + ], + "pcntl_wait": [ + "int pcntl_wait(int &status)", + "Waits on or returns the status of a forked child as defined by the waitpid() system call" + ], + "pcntl_waitpid": [ + "int pcntl_waitpid(int pid, int &status, int options)", + "Waits on or returns the status of a forked child as defined by the waitpid() system call" + ], + "pcntl_wexitstatus": [ + "int pcntl_wexitstatus(int status)", + "Returns the status code of a child's exit" + ], + "pcntl_wifexited": [ + "bool pcntl_wifexited(int status)", + "Returns true if the child status code represents a successful exit" + ], + "pcntl_wifsignaled": [ + "bool pcntl_wifsignaled(int status)", + "Returns true if the child status code represents a process that was terminated due to a signal" + ], + "pcntl_wifstopped": [ + "bool pcntl_wifstopped(int status)", + "Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid)" + ], + "pcntl_wstopsig": [ + "int pcntl_wstopsig(int status)", + "Returns the number of the signal that caused the process to stop who's status code is passed" + ], + "pcntl_wtermsig": [ + "int pcntl_wtermsig(int status)", + "Returns the number of the signal that terminated the process who's status code is passed" + ], + "pdo_drivers": [ + "array pdo_drivers()", + "Return array of available PDO drivers" + ], + "pfsockopen": [ + "resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])", + "Open persistent Internet or Unix domain socket connection" + ], + "pg_affected_rows": [ + "int pg_affected_rows(resource result)", + "Returns the number of affected tuples" + ], + "pg_cancel_query": [ + "bool pg_cancel_query(resource connection)", + "Cancel request" + ], + "pg_client_encoding": [ + "string pg_client_encoding([resource connection])", + "Get the current client encoding" + ], + "pg_close": [ + "bool pg_close([resource connection])", + "Close a PostgreSQL connection" + ], + "pg_connect": [ + "resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database)", + "Open a PostgreSQL connection" + ], + "pg_connection_busy": [ + "bool pg_connection_busy(resource connection)", + "Get connection is busy or not" + ], + "pg_connection_reset": [ + "bool pg_connection_reset(resource connection)", + "Reset connection (reconnect)" + ], + "pg_connection_status": [ + "int pg_connection_status(resource connnection)", + "Get connection status" + ], + "pg_convert": [ + "array pg_convert(resource db, string table, array values[, int options])", + "Check and convert values for PostgreSQL SQL statement" + ], + "pg_copy_from": [ + "bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]])", + "Copy table from array" + ], + "pg_copy_to": [ + "array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]])", + "Copy table to array" + ], + "pg_dbname": [ + "string pg_dbname([resource connection])", + "Get the database name" + ], + "pg_delete": [ + "mixed pg_delete(resource db, string table, array ids[, int options])", + "Delete records has ids (id => value)" + ], + "pg_end_copy": [ + "bool pg_end_copy([resource connection])", + "Sync with backend. Completes the Copy command" + ], + "pg_escape_bytea": [ + "string pg_escape_bytea([resource connection,] string data)", + "Escape binary for bytea type" + ], + "pg_escape_string": [ + "string pg_escape_string([resource connection,] string data)", + "Escape string for text/char type" + ], + "pg_execute": [ + "resource pg_execute([resource connection,] string stmtname, array params)", + "Execute a prepared query" + ], + "pg_fetch_all": [ + "array pg_fetch_all(resource result)", + "Fetch all rows into array" + ], + "pg_fetch_all_columns": [ + "array pg_fetch_all_columns(resource result [, int column_number])", + "Fetch all rows into array" + ], + "pg_fetch_array": [ + "array pg_fetch_array(resource result [, int row [, int result_type]])", + "Fetch a row as an array" + ], + "pg_fetch_assoc": [ + "array pg_fetch_assoc(resource result [, int row])", + "Fetch a row as an assoc array" + ], + "pg_fetch_object": [ + "object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]])", + "Fetch a row as an object" + ], + "pg_fetch_result": [ + "mixed pg_fetch_result(resource result, [int row_number,] mixed field_name)", + "Returns values from a result identifier" + ], + "pg_fetch_row": [ + "array pg_fetch_row(resource result [, int row [, int result_type]])", + "Get a row as an enumerated array" + ], + "pg_field_is_null": [ + "int pg_field_is_null(resource result, [int row,] mixed field_name_or_number)", + "Test if a field is NULL" + ], + "pg_field_name": [ + "string pg_field_name(resource result, int field_number)", + "Returns the name of the field" + ], + "pg_field_num": [ + "int pg_field_num(resource result, string field_name)", + "Returns the field number of the named field" + ], + "pg_field_prtlen": [ + "int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number)", + "Returns the printed length" + ], + "pg_field_size": [ + "int pg_field_size(resource result, int field_number)", + "Returns the internal size of the field" + ], + "pg_field_table": [ + "mixed pg_field_table(resource result, int field_number[, bool oid_only])", + "Returns the name of the table field belongs to, or table's oid if oid_only is true" + ], + "pg_field_type": [ + "string pg_field_type(resource result, int field_number)", + "Returns the type name for the given field" + ], + "pg_field_type_oid": [ + "string pg_field_type_oid(resource result, int field_number)", + "Returns the type oid for the given field" + ], + "pg_free_result": [ + "bool pg_free_result(resource result)", + "Free result memory" + ], + "pg_get_notify": [ + "array pg_get_notify([resource connection[, result_type]])", + "Get asynchronous notification" + ], + "pg_get_pid": [ + "int pg_get_pid([resource connection)", + "Get backend(server) pid" + ], + "pg_get_result": [ + "resource pg_get_result(resource connection)", + "Get asynchronous query result" + ], + "pg_host": [ + "string pg_host([resource connection])", + "Returns the host name associated with the connection" + ], + "pg_insert": [ + "mixed pg_insert(resource db, string table, array values[, int options])", + "Insert values (filed => value) to table" + ], + "pg_last_error": [ + "string pg_last_error([resource connection])", + "Get the error message string" + ], + "pg_last_notice": [ + "string pg_last_notice(resource connection)", + "Returns the last notice set by the backend" + ], + "pg_last_oid": [ + "string pg_last_oid(resource result)", + "Returns the last object identifier" + ], + "pg_lo_close": [ + "bool pg_lo_close(resource large_object)", + "Close a large object" + ], + "pg_lo_create": [ + "mixed pg_lo_create([resource connection],[mixed large_object_oid])", + "Create a large object" + ], + "pg_lo_export": [ + "bool pg_lo_export([resource connection, ] int objoid, string filename)", + "Export large object direct to filesystem" + ], + "pg_lo_import": [ + "int pg_lo_import([resource connection, ] string filename [, mixed oid])", + "Import large object direct from filesystem" + ], + "pg_lo_open": [ + "resource pg_lo_open([resource connection,] int large_object_oid, string mode)", + "Open a large object and return fd" + ], + "pg_lo_read": [ + "string pg_lo_read(resource large_object [, int len])", + "Read a large object" + ], + "pg_lo_read_all": [ + "int pg_lo_read_all(resource large_object)", + "Read a large object and send straight to browser" + ], + "pg_lo_seek": [ + "bool pg_lo_seek(resource large_object, int offset [, int whence])", + "Seeks position of large object" + ], + "pg_lo_tell": [ + "int pg_lo_tell(resource large_object)", + "Returns current position of large object" + ], + "pg_lo_unlink": [ + "bool pg_lo_unlink([resource connection,] string large_object_oid)", + "Delete a large object" + ], + "pg_lo_write": [ + "int pg_lo_write(resource large_object, string buf [, int len])", + "Write a large object" + ], + "pg_meta_data": [ + "array pg_meta_data(resource db, string table)", + "Get meta_data" + ], + "pg_num_fields": [ + "int pg_num_fields(resource result)", + "Return the number of fields in the result" + ], + "pg_num_rows": [ + "int pg_num_rows(resource result)", + "Return the number of rows in the result" + ], + "pg_options": [ + "string pg_options([resource connection])", + "Get the options associated with the connection" + ], + "pg_parameter_status": [ + "string|false pg_parameter_status([resource connection,] string param_name)", + "Returns the value of a server parameter" + ], + "pg_pconnect": [ + "resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database)", + "Open a persistent PostgreSQL connection" + ], + "pg_ping": [ + "bool pg_ping([resource connection])", + "Ping database. If connection is bad, try to reconnect." + ], + "pg_port": [ + "int pg_port([resource connection])", + "Return the port number associated with the connection" + ], + "pg_prepare": [ + "resource pg_prepare([resource connection,] string stmtname, string query)", + "Prepare a query for future execution" + ], + "pg_put_line": [ + "bool pg_put_line([resource connection,] string query)", + "Send null-terminated string to backend server" + ], + "pg_query": [ + "resource pg_query([resource connection,] string query)", + "Execute a query" + ], + "pg_query_params": [ + "resource pg_query_params([resource connection,] string query, array params)", + "Execute a query" + ], + "pg_result_error": [ + "string pg_result_error(resource result)", + "Get error message associated with result" + ], + "pg_result_error_field": [ + "string pg_result_error_field(resource result, int fieldcode)", + "Get error message field associated with result" + ], + "pg_result_seek": [ + "bool pg_result_seek(resource result, int offset)", + "Set internal row offset" + ], + "pg_result_status": [ + "mixed pg_result_status(resource result[, long result_type])", + "Get status of query result" + ], + "pg_select": [ + "mixed pg_select(resource db, string table, array ids[, int options])", + "Select records that has ids (id => value)" + ], + "pg_send_execute": [ + "bool pg_send_execute(resource connection, string stmtname, array params)", + "Executes prevriously prepared stmtname asynchronously" + ], + "pg_send_prepare": [ + "bool pg_send_prepare(resource connection, string stmtname, string query)", + "Asynchronously prepare a query for future execution" + ], + "pg_send_query": [ + "bool pg_send_query(resource connection, string query)", + "Send asynchronous query" + ], + "pg_send_query_params": [ + "bool pg_send_query_params(resource connection, string query, array params)", + "Send asynchronous parameterized query" + ], + "pg_set_client_encoding": [ + "int pg_set_client_encoding([resource connection,] string encoding)", + "Set client encoding" + ], + "pg_set_error_verbosity": [ + "int pg_set_error_verbosity([resource connection,] int verbosity)", + "Set error verbosity" + ], + "pg_trace": [ + "bool pg_trace(string filename [, string mode [, resource connection]])", + "Enable tracing a PostgreSQL connection" + ], + "pg_transaction_status": [ + "int pg_transaction_status(resource connnection)", + "Get transaction status" + ], + "pg_tty": [ + "string pg_tty([resource connection])", + "Return the tty name associated with the connection" + ], + "pg_unescape_bytea": [ + "string pg_unescape_bytea(string data)", + "Unescape binary for bytea type" + ], + "pg_untrace": [ + "bool pg_untrace([resource connection])", + "Disable tracing of a PostgreSQL connection" + ], + "pg_update": [ + "mixed pg_update(resource db, string table, array fields, array ids[, int options])", + "Update table using values (field => value) and ids (id => value)" + ], + "pg_version": [ + "array pg_version([resource connection])", + "Returns an array with client, protocol and server version (when available)" + ], + "php_egg_logo_guid": [ + "string php_egg_logo_guid()", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_ini_loaded_file": [ + "string php_ini_loaded_file()", + "Return the actual loaded ini filename" + ], + "php_ini_scanned_files": [ + "string php_ini_scanned_files()", + "Return comma-separated string of .ini files parsed from the additional ini dir" + ], + "php_logo_guid": [ + "string php_logo_guid()", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_real_logo_guid": [ + "string php_real_logo_guid()", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_sapi_name": [ + "string php_sapi_name()", + "Return the current SAPI module name" + ], + "php_snmpv3": [ + "void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st)", + "* * Generic SNMPv3 object fetcher * From here is passed on the the common internal object fetcher. * * st=SNMP_CMD_GET snmp3_get() - query an agent and return a single value. * st=SNMP_CMD_GETNEXT snmp3_getnext() - query an agent and return the next single value. * st=SNMP_CMD_WALK snmp3_walk() - walk the mib and return a single dimensional array * containing the values. * st=SNMP_CMD_REALWALK snmp3_real_walk() - walk the mib and return an * array of oid,value pairs. * st=SNMP_CMD_SET snmp3_set() - query an agent and set a single value *" + ], + "php_strip_whitespace": [ + "string php_strip_whitespace(string file_name)", + "Return source with stripped comments and whitespace" + ], + "php_uname": [ + "string php_uname()", + "Return information about the system PHP was built on" + ], + "phpcredits": [ + "void phpcredits([int flag])", + "Prints the list of people who've contributed to the PHP project" + ], + "phpinfo": [ + "void phpinfo([int what])", + "Output a page of useful information about PHP and the current request" + ], + "phpversion": [ + "string phpversion([string extension])", + "Return the current PHP version" + ], + "pi": [ + "float pi()", + "Returns an approximation of pi" + ], + "png2wbmp": [ + "bool png2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)", + "Convert PNG image to WBMP image" + ], + "popen": [ + "resource popen(string command, string mode)", + "Execute a command and open either a read or a write pipe to it" + ], + "posix_access": [ + "bool posix_access(string file [, int mode])", + "Determine accessibility of a file (POSIX.1 5.6.3)" + ], + "posix_ctermid": [ + "string posix_ctermid()", + "Generate terminal path name (POSIX.1, 4.7.1)" + ], + "posix_get_last_error": [ + "int posix_get_last_error()", + "Retrieve the error number set by the last posix function which failed." + ], + "posix_getcwd": [ + "string posix_getcwd()", + "Get working directory pathname (POSIX.1, 5.2.2)" + ], + "posix_getegid": [ + "int posix_getegid()", + "Get the current effective group id (POSIX.1, 4.2.1)" + ], + "posix_geteuid": [ + "int posix_geteuid()", + "Get the current effective user id (POSIX.1, 4.2.1)" + ], + "posix_getgid": [ + "int posix_getgid()", + "Get the current group id (POSIX.1, 4.2.1)" + ], + "posix_getgrgid": [ + "array posix_getgrgid(long gid)", + "Group database access (POSIX.1, 9.2.1)" + ], + "posix_getgrnam": [ + "array posix_getgrnam(string groupname)", + "Group database access (POSIX.1, 9.2.1)" + ], + "posix_getgroups": [ + "array posix_getgroups()", + "Get supplementary group id's (POSIX.1, 4.2.3)" + ], + "posix_getlogin": [ + "string posix_getlogin()", + "Get user name (POSIX.1, 4.2.4)" + ], + "posix_getpgid": [ + "int posix_getpgid()", + "Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)" + ], + "posix_getpgrp": [ + "int posix_getpgrp()", + "Get current process group id (POSIX.1, 4.3.1)" + ], + "posix_getpid": [ + "int posix_getpid()", + "Get the current process id (POSIX.1, 4.1.1)" + ], + "posix_getppid": [ + "int posix_getppid()", + "Get the parent process id (POSIX.1, 4.1.1)" + ], + "posix_getpwnam": [ + "array posix_getpwnam(string groupname)", + "User database access (POSIX.1, 9.2.2)" + ], + "posix_getpwuid": [ + "array posix_getpwuid(long uid)", + "User database access (POSIX.1, 9.2.2)" + ], + "posix_getrlimit": [ + "array posix_getrlimit()", + "Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally)" + ], + "posix_getsid": [ + "int posix_getsid()", + "Get process group id of session leader (This is not a POSIX function, but a SVR4ism, so be compile conditionally)" + ], + "posix_getuid": [ + "int posix_getuid()", + "Get the current user id (POSIX.1, 4.2.1)" + ], + "posix_initgroups": [ + "bool posix_initgroups(string name, int base_group_id)", + "Calculate the group access list for the user specified in name." + ], + "posix_isatty": [ + "bool posix_isatty(int fd)", + "Determine if filedesc is a tty (POSIX.1, 4.7.1)" + ], + "posix_kill": [ + "bool posix_kill(int pid, int sig)", + "Send a signal to a process (POSIX.1, 3.3.2)" + ], + "posix_mkfifo": [ + "bool posix_mkfifo(string pathname, int mode)", + "Make a FIFO special file (POSIX.1, 5.4.2)" + ], + "posix_mknod": [ + "bool posix_mknod(string pathname, int mode [, int major [, int minor]])", + "Make a special or ordinary file (POSIX.1)" + ], + "posix_setegid": [ + "bool posix_setegid(long uid)", + "Set effective group id" + ], + "posix_seteuid": [ + "bool posix_seteuid(long uid)", + "Set effective user id" + ], + "posix_setgid": [ + "bool posix_setgid(int uid)", + "Set group id (POSIX.1, 4.2.2)" + ], + "posix_setpgid": [ + "bool posix_setpgid(int pid, int pgid)", + "Set process group id for job control (POSIX.1, 4.3.3)" + ], + "posix_setsid": [ + "int posix_setsid()", + "Create session and set process group id (POSIX.1, 4.3.2)" + ], + "posix_setuid": [ + "bool posix_setuid(long uid)", + "Set user id (POSIX.1, 4.2.2)" + ], + "posix_strerror": [ + "string posix_strerror(int errno)", + "Retrieve the system error message associated with the given errno." + ], + "posix_times": [ + "array posix_times()", + "Get process times (POSIX.1, 4.5.2)" + ], + "posix_ttyname": [ + "string posix_ttyname(int fd)", + "Determine terminal device name (POSIX.1, 4.7.2)" + ], + "posix_uname": [ + "array posix_uname()", + "Get system name (POSIX.1, 4.4.1)" + ], + "pow": [ + "number pow(number base, number exponent)", + "Returns base raised to the power of exponent. Returns integer result when possible" + ], + "preg_filter": [ + "mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement and only return matches." + ], + "preg_grep": [ + "array preg_grep(string regex, array input [, int flags])", + "Searches array and returns entries which match regex" + ], + "preg_last_error": [ + "int preg_last_error()", + "Returns the error code of the last regexp execution." + ], + "preg_match": [ + "int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])", + "Perform a Perl-style regular expression match" + ], + "preg_match_all": [ + "int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]])", + "Perform a Perl-style global regular expression match" + ], + "preg_quote": [ + "string preg_quote(string str [, string delim_char])", + "Quote regular expression characters plus an optional character" + ], + "preg_replace": [ + "mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement." + ], + "preg_replace_callback": [ + "mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement using replacement callback." + ], + "preg_split": [ + "array preg_split(string pattern, string subject [, int limit [, int flags]])", + "Split string into an array using a perl-style regular expression as a delimiter" + ], + "prev": [ + "mixed prev(array array_arg)", + "Move array argument's internal pointer to the previous element and return it" + ], + "print": [ + "int print(string arg)", + "Output a string" + ], + "print_r": [ + "mixed print_r(mixed var [, bool return])", + "Prints out or returns information about the specified variable" + ], + "printf": [ + "int printf(string format [, mixed arg1 [, mixed ...]])", + "Output a formatted string" + ], + "proc_close": [ + "int proc_close(resource process)", + "close a process opened by proc_open" + ], + "proc_get_status": [ + "array proc_get_status(resource process)", + "get information about a process opened by proc_open" + ], + "proc_nice": [ + "bool proc_nice(int priority)", + "Change the priority of the current process" + ], + "proc_open": [ + "resource proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]])", + "Run a process with more control over it's file descriptors" + ], + "proc_terminate": [ + "bool proc_terminate(resource process [, long signal])", + "kill a process opened by proc_open" + ], + "property_exists": [ + "bool property_exists(mixed object_or_class, string property_name)", + "Checks if the object or class has a property" + ], + "pspell_add_to_personal": [ + "bool pspell_add_to_personal(int pspell, string word)", + "Adds a word to a personal list" + ], + "pspell_add_to_session": [ + "bool pspell_add_to_session(int pspell, string word)", + "Adds a word to the current session" + ], + "pspell_check": [ + "bool pspell_check(int pspell, string word)", + "Returns true if word is valid" + ], + "pspell_clear_session": [ + "bool pspell_clear_session(int pspell)", + "Clears the current session" + ], + "pspell_config_create": [ + "int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])", + "Create a new config to be used later to create a manager" + ], + "pspell_config_data_dir": [ + "bool pspell_config_data_dir(int conf, string directory)", + "location of language data files" + ], + "pspell_config_dict_dir": [ + "bool pspell_config_dict_dir(int conf, string directory)", + "location of the main word list" + ], + "pspell_config_ignore": [ + "bool pspell_config_ignore(int conf, int ignore)", + "Ignore words <= n chars" + ], + "pspell_config_mode": [ + "bool pspell_config_mode(int conf, long mode)", + "Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS)" + ], + "pspell_config_personal": [ + "bool pspell_config_personal(int conf, string personal)", + "Use a personal dictionary for this config" + ], + "pspell_config_repl": [ + "bool pspell_config_repl(int conf, string repl)", + "Use a personal dictionary with replacement pairs for this config" + ], + "pspell_config_runtogether": [ + "bool pspell_config_runtogether(int conf, bool runtogether)", + "Consider run-together words as valid components" + ], + "pspell_config_save_repl": [ + "bool pspell_config_save_repl(int conf, bool save)", + "Save replacement pairs when personal list is saved for this config" + ], + "pspell_new": [ + "int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])", + "Load a dictionary" + ], + "pspell_new_config": [ + "int pspell_new_config(int config)", + "Load a dictionary based on the given config" + ], + "pspell_new_personal": [ + "int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])", + "Load a dictionary with a personal wordlist" + ], + "pspell_save_wordlist": [ + "bool pspell_save_wordlist(int pspell)", + "Saves the current (personal) wordlist" + ], + "pspell_store_replacement": [ + "bool pspell_store_replacement(int pspell, string misspell, string correct)", + "Notify the dictionary of a user-selected replacement" + ], + "pspell_suggest": [ + "array pspell_suggest(int pspell, string word)", + "Returns array of suggestions" + ], + "putenv": [ + "bool putenv(string setting)", + "Set the value of an environment variable" + ], + "quoted_printable_decode": [ + "string quoted_printable_decode(string str)", + "Convert a quoted-printable string to an 8 bit string" + ], + "quoted_printable_encode": [ + "string quoted_printable_encode(string str)", + "" + ], + "quotemeta": [ + "string quotemeta(string str)", + "Quotes meta characters" + ], + "rad2deg": [ + "float rad2deg(float number)", + "Converts the radian number to the equivalent number in degrees" + ], + "rand": [ + "int rand([int min, int max])", + "Returns a random number" + ], + "range": [ + "array range(mixed low, mixed high[, int step])", + "Create an array containing the range of integers or characters from low to high (inclusive)" + ], + "rawurldecode": [ + "string rawurldecode(string str)", + "Decodes URL-encodes string" + ], + "rawurlencode": [ + "string rawurlencode(string str)", + "URL-encodes string" + ], + "readdir": [ + "string readdir([resource dir_handle])", + "Read directory entry from dir_handle" + ], + "readfile": [ + "int readfile(string filename [, bool use_include_path[, resource context]])", + "Output a file or a URL" + ], + "readgzfile": [ + "int readgzfile(string filename [, int use_include_path])", + "Output a .gz-file" + ], + "readline": [ + "string readline([string prompt])", + "Reads a line" + ], + "readline_add_history": [ + "bool readline_add_history(string prompt)", + "Adds a line to the history" + ], + "readline_callback_handler_install": [ + "void readline_callback_handler_install(string prompt, mixed callback)", + "Initializes the readline callback interface and terminal, prints the prompt and returns immediately" + ], + "readline_callback_handler_remove": [ + "bool readline_callback_handler_remove()", + "Removes a previously installed callback handler and restores terminal settings" + ], + "readline_callback_read_char": [ + "void readline_callback_read_char()", + "Informs the readline callback interface that a character is ready for input" + ], + "readline_clear_history": [ + "bool readline_clear_history()", + "Clears the history" + ], + "readline_completion_function": [ + "bool readline_completion_function(string funcname)", + "Readline completion function?" + ], + "readline_info": [ + "mixed readline_info([string varname [, string newvalue]])", + "Gets/sets various internal readline variables." + ], + "readline_list_history": [ + "array readline_list_history()", + "Lists the history" + ], + "readline_on_new_line": [ + "void readline_on_new_line()", + "Inform readline that the cursor has moved to a new line" + ], + "readline_read_history": [ + "bool readline_read_history([string filename])", + "Reads the history" + ], + "readline_redisplay": [ + "void readline_redisplay()", + "Ask readline to redraw the display" + ], + "readline_write_history": [ + "bool readline_write_history([string filename])", + "Writes the history" + ], + "readlink": [ + "string readlink(string filename)", + "Return the target of a symbolic link" + ], + "realpath": [ + "string realpath(string path)", + "Return the resolved path" + ], + "realpath_cache_get": [ + "bool realpath_cache_get()", + "Get current size of realpath cache" + ], + "realpath_cache_size": [ + "bool realpath_cache_size()", + "Get current size of realpath cache" + ], + "recode_file": [ + "bool recode_file(string request, resource input, resource output)", + "Recode file input into file output according to request" + ], + "recode_string": [ + "string recode_string(string request, string str)", + "Recode string str according to request string" + ], + "register_shutdown_function": [ + "void register_shutdown_function(string function_name)", + "Register a user-level function to be called on request termination" + ], + "register_tick_function": [ + "bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])", + "Registers a tick callback function" + ], + "rename": [ + "bool rename(string old_name, string new_name[, resource context])", + "Rename a file" + ], + "require": [ + "bool require(string path)", + "Includes and evaluates the specified file, erroring if the file cannot be included" + ], + "require_once": [ + "bool require_once(string path)", + "Includes and evaluates the specified file, erroring if the file cannot be included" + ], + "reset": [ + "mixed reset(array array_arg)", + "Set array argument's internal pointer to the first element and return it" + ], + "restore_error_handler": [ + "void restore_error_handler()", + "Restores the previously defined error handler function" + ], + "restore_exception_handler": [ + "void restore_exception_handler()", + "Restores the previously defined exception handler function" + ], + "restore_include_path": [ + "void restore_include_path()", + "Restore the value of the include_path configuration option" + ], + "rewind": [ + "bool rewind(resource fp)", + "Rewind the position of a file pointer" + ], + "rewinddir": [ + "void rewinddir([resource dir_handle])", + "Rewind dir_handle back to the start" + ], + "rmdir": [ + "bool rmdir(string dirname[, resource context])", + "Remove a directory" + ], + "round": [ + "float round(float number [, int precision [, int mode]])", + "Returns the number rounded to specified precision" + ], + "rsort": [ + "bool rsort(array &array_arg [, int sort_flags])", + "Sort an array in reverse order" + ], + "rtrim": [ + "string rtrim(string str [, string character_mask])", + "Removes trailing whitespace" + ], + "scandir": [ + "array scandir(string dir [, int sorting_order [, resource context]])", + "List files & directories inside the specified path" + ], + "sem_acquire": [ + "bool sem_acquire(resource id)", + "Acquires the semaphore with the given id, blocking if necessary" + ], + "sem_get": [ + "resource sem_get(int key [, int max_acquire [, int perm [, int auto_release]])", + "Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously" + ], + "sem_release": [ + "bool sem_release(resource id)", + "Releases the semaphore with the given id" + ], + "sem_remove": [ + "bool sem_remove(resource id)", + "Removes semaphore from Unix systems" + ], + "serialize": [ + "string serialize(mixed variable)", + "Returns a string representation of variable (which can later be unserialized)" + ], + "session_cache_expire": [ + "int session_cache_expire([int new_cache_expire])", + "Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire" + ], + "session_cache_limiter": [ + "string session_cache_limiter([string new_cache_limiter])", + "Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter" + ], + "session_decode": [ + "bool session_decode(string data)", + "Deserializes data and reinitializes the variables" + ], + "session_destroy": [ + "bool session_destroy()", + "Destroy the current session and all data associated with it" + ], + "session_encode": [ + "string session_encode()", + "Serializes the current setup and returns the serialized representation" + ], + "session_get_cookie_params": [ + "array session_get_cookie_params()", + "Return the session cookie parameters" + ], + "session_id": [ + "string session_id([string newid])", + "Return the current session id. If newid is given, the session id is replaced with newid" + ], + "session_is_registered": [ + "bool session_is_registered(string varname)", + "Checks if a variable is registered in session" + ], + "session_module_name": [ + "string session_module_name([string newname])", + "Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname" + ], + "session_name": [ + "string session_name([string newname])", + "Return the current session name. If newname is given, the session name is replaced with newname" + ], + "session_regenerate_id": [ + "bool session_regenerate_id([bool delete_old_session])", + "Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session." + ], + "session_register": [ + "bool session_register(mixed var_names [, mixed ...])", + "Adds varname(s) to the list of variables which are freezed at the session end" + ], + "session_save_path": [ + "string session_save_path([string newname])", + "Return the current save path passed to module_name. If newname is given, the save path is replaced with newname" + ], + "session_set_cookie_params": [ + "void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])", + "Set session cookie parameters" + ], + "session_set_save_handler": [ + "void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc)", + "Sets user-level functions" + ], + "session_start": [ + "bool session_start()", + "Begin session - reinitializes freezed variables, registers browsers etc" + ], + "session_unregister": [ + "bool session_unregister(string varname)", + "Removes varname from the list of variables which are freezed at the session end" + ], + "session_unset": [ + "void session_unset()", + "Unset all registered variables" + ], + "session_write_close": [ + "void session_write_close()", + "Write session data and end session" + ], + "set_error_handler": [ + "string set_error_handler(string error_handler [, int error_types])", + "Sets a user-defined error handler function. Returns the previously defined error handler, or false on error" + ], + "set_exception_handler": [ + "string set_exception_handler(callable exception_handler)", + "Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error" + ], + "set_include_path": [ + "string set_include_path(string new_include_path)", + "Sets the include_path configuration option" + ], + "set_magic_quotes_runtime": [ + "bool set_magic_quotes_runtime(int new_setting)", + "Set the current active configuration setting of magic_quotes_runtime and return previous" + ], + "set_time_limit": [ + "bool set_time_limit(int seconds)", + "Sets the maximum time a script can run" + ], + "setcookie": [ + "bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])", + "Send a cookie" + ], + "setlocale": [ + "string setlocale(mixed category, string locale [, string ...])", + "Set locale information" + ], + "setrawcookie": [ + "bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])", + "Send a cookie with no url encoding of the value" + ], + "settype": [ + "bool settype(mixed var, string type)", + "Set the type of the variable" + ], + "sha1": [ + "string sha1(string str [, bool raw_output])", + "Calculate the sha1 hash of a string" + ], + "sha1_file": [ + "string sha1_file(string filename [, bool raw_output])", + "Calculate the sha1 hash of given filename" + ], + "shell_exec": [ + "string shell_exec(string cmd)", + "Execute command via shell and return complete output as string" + ], + "shm_attach": [ + "int shm_attach(int key [, int memsize [, int perm]])", + "Creates or open a shared memory segment" + ], + "shm_detach": [ + "bool shm_detach(resource shm_identifier)", + "Disconnects from shared memory segment" + ], + "shm_get_var": [ + "mixed shm_get_var(resource id, int variable_key)", + "Returns a variable from shared memory" + ], + "shm_has_var": [ + "bool shm_has_var(resource id, int variable_key)", + "Checks whether a specific entry exists" + ], + "shm_put_var": [ + "bool shm_put_var(resource shm_identifier, int variable_key, mixed variable)", + "Inserts or updates a variable in shared memory" + ], + "shm_remove": [ + "bool shm_remove(resource shm_identifier)", + "Removes shared memory from Unix systems" + ], + "shm_remove_var": [ + "bool shm_remove_var(resource id, int variable_key)", + "Removes variable from shared memory" + ], + "shmop_close": [ + "void shmop_close(int shmid)", + "closes a shared memory segment" + ], + "shmop_delete": [ + "bool shmop_delete(int shmid)", + "mark segment for deletion" + ], + "shmop_open": [ + "int shmop_open(int key, string flags, int mode, int size)", + "gets and attaches a shared memory segment" + ], + "shmop_read": [ + "string shmop_read(int shmid, int start, int count)", + "reads from a shm segment" + ], + "shmop_size": [ + "int shmop_size(int shmid)", + "returns the shm size" + ], + "shmop_write": [ + "int shmop_write(int shmid, string data, int offset)", + "writes to a shared memory segment" + ], + "shuffle": [ + "bool shuffle(array array_arg)", + "Randomly shuffle the contents of an array" + ], + "similar_text": [ + "int similar_text(string str1, string str2 [, float percent])", + "Calculates the similarity between two strings" + ], + "simplexml_import_dom": [ + "simplemxml_element simplexml_import_dom(domNode node [, string class_name])", + "Get a simplexml_element object from dom to allow for processing" + ], + "simplexml_load_file": [ + "simplemxml_element simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]])", + "Load a filename and return a simplexml_element object to allow for processing" + ], + "simplexml_load_string": [ + "simplemxml_element simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]])", + "Load a string and return a simplexml_element object to allow for processing" + ], + "sin": [ + "float sin(float number)", + "Returns the sine of the number in radians" + ], + "sinh": [ + "float sinh(float number)", + "Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2" + ], + "sleep": [ + "void sleep(int seconds)", + "Delay for a given number of seconds" + ], + "smfi_addheader": [ + "bool smfi_addheader(string headerf, string headerv)", + "Adds a header to the current message." + ], + "smfi_addrcpt": [ + "bool smfi_addrcpt(string rcpt)", + "Add a recipient to the message envelope." + ], + "smfi_chgheader": [ + "bool smfi_chgheader(string headerf, string headerv)", + "Changes a header's value for the current message." + ], + "smfi_delrcpt": [ + "bool smfi_delrcpt(string rcpt)", + "Removes the named recipient from the current message's envelope." + ], + "smfi_getsymval": [ + "string smfi_getsymval(string macro)", + "Returns the value of the given macro or NULL if the macro is not defined." + ], + "smfi_replacebody": [ + "bool smfi_replacebody(string body)", + "Replaces the body of the current message. If called more than once, subsequent calls result in data being appended to the new body." + ], + "smfi_setflags": [ + "void smfi_setflags(long flags)", + "Sets the flags describing the actions the filter may take." + ], + "smfi_setreply": [ + "bool smfi_setreply(string rcode, string xcode, string message)", + "Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter." + ], + "smfi_settimeout": [ + "void smfi_settimeout(long timeout)", + "Sets the number of seconds libmilter will wait for an MTA connection before timing out a socket." + ], + "snmp2_get": [ + "string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmp2_getnext": [ + "string snmp2_getnext(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmp2_real_walk": [ + "array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects including their respective object id withing the specified one" + ], + "snmp2_set": [ + "int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Set the value of a SNMP object" + ], + "snmp2_walk": [ + "array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects under the specified object id" + ], + "snmp3_get": [ + "int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_getnext": [ + "int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_real_walk": [ + "int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_set": [ + "int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_walk": [ + "int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp_get_quick_print": [ + "bool snmp_get_quick_print()", + "Return the current status of quick_print" + ], + "snmp_get_valueretrieval": [ + "int snmp_get_valueretrieval()", + "Return the method how the SNMP values will be returned" + ], + "snmp_read_mib": [ + "int snmp_read_mib(string filename)", + "Reads and parses a MIB file into the active MIB tree." + ], + "snmp_set_enum_print": [ + "void snmp_set_enum_print(int enum_print)", + "Return all values that are enums with their enum value instead of the raw integer" + ], + "snmp_set_oid_output_format": [ + "void snmp_set_oid_output_format(int oid_format)", + "Set the OID output format." + ], + "snmp_set_quick_print": [ + "void snmp_set_quick_print(int quick_print)", + "Return all objects including their respective object id withing the specified one" + ], + "snmp_set_valueretrieval": [ + "void snmp_set_valueretrieval(int method)", + "Specify the method how the SNMP values will be returned" + ], + "snmpget": [ + "string snmpget(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmpgetnext": [ + "string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmprealwalk": [ + "array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects including their respective object id withing the specified one" + ], + "snmpset": [ + "int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Set the value of a SNMP object" + ], + "snmpwalk": [ + "array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects under the specified object id" + ], + "socket_accept": [ + "resource socket_accept(resource socket)", + "Accepts a connection on the listening socket fd" + ], + "socket_bind": [ + "bool socket_bind(resource socket, string addr [, int port])", + "Binds an open socket to a listening port, port is only specified in AF_INET family." + ], + "socket_clear_error": [ + "void socket_clear_error([resource socket])", + "Clears the error on the socket or the last error code." + ], + "socket_close": [ + "void socket_close(resource socket)", + "Closes a file descriptor" + ], + "socket_connect": [ + "bool socket_connect(resource socket, string addr [, int port])", + "Opens a connection to addr:port on the socket specified by socket" + ], + "socket_create": [ + "resource socket_create(int domain, int type, int protocol)", + "Creates an endpoint for communication in the domain specified by domain, of type specified by type" + ], + "socket_create_listen": [ + "resource socket_create_listen(int port[, int backlog])", + "Opens a socket on port to accept connections" + ], + "socket_create_pair": [ + "bool socket_create_pair(int domain, int type, int protocol, array &fd)", + "Creates a pair of indistinguishable sockets and stores them in fds." + ], + "socket_get_option": [ + "mixed socket_get_option(resource socket, int level, int optname)", + "Gets socket options for the socket" + ], + "socket_getpeername": [ + "bool socket_getpeername(resource socket, string &addr[, int &port])", + "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type." + ], + "socket_getsockname": [ + "bool socket_getsockname(resource socket, string &addr[, int &port])", + "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type." + ], + "socket_last_error": [ + "int socket_last_error([resource socket])", + "Returns the last socket error (either the last used or the provided socket resource)" + ], + "socket_listen": [ + "bool socket_listen(resource socket[, int backlog])", + "Sets the maximum number of connections allowed to be waited for on the socket specified by fd" + ], + "socket_read": [ + "string socket_read(resource socket, int length [, int type])", + "Reads a maximum of length bytes from socket" + ], + "socket_recv": [ + "int socket_recv(resource socket, string &buf, int len, int flags)", + "Receives data from a connected socket" + ], + "socket_recvfrom": [ + "int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name [, int &port])", + "Receives data from a socket, connected or not" + ], + "socket_select": [ + "int socket_select(array &read_fds, array &write_fds, array &except_fds, int tv_sec[, int tv_usec])", + "Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and tv_usec" + ], + "socket_send": [ + "int socket_send(resource socket, string buf, int len, int flags)", + "Sends data to a connected socket" + ], + "socket_sendto": [ + "int socket_sendto(resource socket, string buf, int len, int flags, string addr [, int port])", + "Sends a message to a socket, whether it is connected or not" + ], + "socket_set_block": [ + "bool socket_set_block(resource socket)", + "Sets blocking mode on a socket resource" + ], + "socket_set_nonblock": [ + "bool socket_set_nonblock(resource socket)", + "Sets nonblocking mode on a socket resource" + ], + "socket_set_option": [ + "bool socket_set_option(resource socket, int level, int optname, int|array optval)", + "Sets socket options for the socket" + ], + "socket_shutdown": [ + "bool socket_shutdown(resource socket[, int how])", + "Shuts down a socket for receiving, sending, or both." + ], + "socket_strerror": [ + "string socket_strerror(int errno)", + "Returns a string describing an error" + ], + "socket_write": [ + "int socket_write(resource socket, string buf[, int length])", + "Writes the buffer to the socket resource, length is optional" + ], + "solid_fetch_prev": [ + "bool solid_fetch_prev(resource result_id)", + "" + ], + "sort": [ + "bool sort(array &array_arg [, int sort_flags])", + "Sort an array" + ], + "soundex": [ + "string soundex(string str)", + "Calculate the soundex key of a string" + ], + "spl_autoload": [ + "void spl_autoload(string class_name [, string file_extensions])", + "Default implementation for __autoload()" + ], + "spl_autoload_call": [ + "void spl_autoload_call(string class_name)", + "Try all registerd autoload function to load the requested class" + ], + "spl_autoload_extensions": [ + "string spl_autoload_extensions([string file_extensions])", + "Register and return default file extensions for spl_autoload" + ], + "spl_autoload_functions": [ + "false|array spl_autoload_functions()", + "Return all registered __autoload() functionns" + ], + "spl_autoload_register": [ + "bool spl_autoload_register([mixed autoload_function = \"spl_autoload\" [, throw = true [, prepend]]])", + "Register given function as __autoload() implementation" + ], + "spl_autoload_unregister": [ + "bool spl_autoload_unregister(mixed autoload_function)", + "Unregister given function as __autoload() implementation" + ], + "spl_classes": [ + "array spl_classes()", + "Return an array containing the names of all clsses and interfaces defined in SPL" + ], + "spl_object_hash": [ + "string spl_object_hash(object obj)", + "Return hash id for given object" + ], + "split": [ + "array split(string pattern, string string [, int limit])", + "Split string into array by regular expression" + ], + "spliti": [ + "array spliti(string pattern, string string [, int limit])", + "Split string into array by regular expression case-insensitive" + ], + "sprintf": [ + "string sprintf(string format [, mixed arg1 [, mixed ...]])", + "Return a formatted string" + ], + "sql_regcase": [ + "string sql_regcase(string string)", + "Make regular expression for case insensitive match" + ], + "sqlite_array_query": [ + "array sqlite_array_query(resource db, string query [ , int result_type [, bool decode_binary]])", + "Executes a query against a given database and returns an array of arrays." + ], + "sqlite_busy_timeout": [ + "void sqlite_busy_timeout(resource db, int ms)", + "Set busy timeout duration. If ms <= 0, all busy handlers are disabled." + ], + "sqlite_changes": [ + "int sqlite_changes(resource db)", + "Returns the number of rows that were changed by the most recent SQL statement." + ], + "sqlite_close": [ + "void sqlite_close(resource db)", + "Closes an open sqlite database." + ], + "sqlite_column": [ + "mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary])", + "Fetches a column from the current row of a result set." + ], + "sqlite_create_aggregate": [ + "bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args])", + "Registers an aggregate function for queries." + ], + "sqlite_create_function": [ + "bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args])", + "Registers a \"regular\" function for queries." + ], + "sqlite_current": [ + "array sqlite_current(resource result [, int result_type [, bool decode_binary]])", + "Fetches the current row from a result set as an array." + ], + "sqlite_error_string": [ + "string sqlite_error_string(int error_code)", + "Returns the textual description of an error code." + ], + "sqlite_escape_string": [ + "string sqlite_escape_string(string item)", + "Escapes a string for use as a query parameter." + ], + "sqlite_exec": [ + "bool sqlite_exec(string query, resource db[, string &error_message])", + "Executes a result-less query against a given database" + ], + "sqlite_factory": [ + "object sqlite_factory(string filename [, int mode [, string &error_message]])", + "Opens a SQLite database and creates an object for it. Will create the database if it does not exist." + ], + "sqlite_fetch_all": [ + "array sqlite_fetch_all(resource result [, int result_type [, bool decode_binary]])", + "Fetches all rows from a result set as an array of arrays." + ], + "sqlite_fetch_array": [ + "array sqlite_fetch_array(resource result [, int result_type [, bool decode_binary]])", + "Fetches the next row from a result set as an array." + ], + "sqlite_fetch_column_types": [ + "resource sqlite_fetch_column_types(string table_name, resource db [, int result_type])", + "Return an array of column types from a particular table." + ], + "sqlite_fetch_object": [ + "object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]])", + "Fetches the next row from a result set as an object." + ], + "sqlite_fetch_single": [ + "string sqlite_fetch_single(resource result [, bool decode_binary])", + "Fetches the first column of a result set as a string." + ], + "sqlite_field_name": [ + "string sqlite_field_name(resource result, int field_index)", + "Returns the name of a particular field of a result set." + ], + "sqlite_has_prev": [ + "bool sqlite_has_prev(resource result)", + "* Returns whether a previous row is available." + ], + "sqlite_key": [ + "int sqlite_key(resource result)", + "Return the current row index of a buffered result." + ], + "sqlite_last_error": [ + "int sqlite_last_error(resource db)", + "Returns the error code of the last error for a database." + ], + "sqlite_last_insert_rowid": [ + "int sqlite_last_insert_rowid(resource db)", + "Returns the rowid of the most recently inserted row." + ], + "sqlite_libencoding": [ + "string sqlite_libencoding()", + "Returns the encoding (iso8859 or UTF-8) of the linked SQLite library." + ], + "sqlite_libversion": [ + "string sqlite_libversion()", + "Returns the version of the linked SQLite library." + ], + "sqlite_next": [ + "bool sqlite_next(resource result)", + "Seek to the next row number of a result set." + ], + "sqlite_num_fields": [ + "int sqlite_num_fields(resource result)", + "Returns the number of fields in a result set." + ], + "sqlite_num_rows": [ + "int sqlite_num_rows(resource result)", + "Returns the number of rows in a buffered result set." + ], + "sqlite_open": [ + "resource sqlite_open(string filename [, int mode [, string &error_message]])", + "Opens a SQLite database. Will create the database if it does not exist." + ], + "sqlite_popen": [ + "resource sqlite_popen(string filename [, int mode [, string &error_message]])", + "Opens a persistent handle to a SQLite database. Will create the database if it does not exist." + ], + "sqlite_prev": [ + "bool sqlite_prev(resource result)", + "* Seek to the previous row number of a result set." + ], + "sqlite_query": [ + "resource sqlite_query(string query, resource db [, int result_type [, string &error_message]])", + "Executes a query against a given database and returns a result handle." + ], + "sqlite_rewind": [ + "bool sqlite_rewind(resource result)", + "Seek to the first row number of a buffered result set." + ], + "sqlite_seek": [ + "bool sqlite_seek(resource result, int row)", + "Seek to a particular row number of a buffered result set." + ], + "sqlite_single_query": [ + "array sqlite_single_query(resource db, string query [, bool first_row_only [, bool decode_binary]])", + "Executes a query and returns either an array for one single column or the value of the first row." + ], + "sqlite_udf_decode_binary": [ + "string sqlite_udf_decode_binary(string data)", + "Decode binary encoding on a string parameter passed to an UDF." + ], + "sqlite_udf_encode_binary": [ + "string sqlite_udf_encode_binary(string data)", + "Apply binary encoding (if required) to a string to return from an UDF." + ], + "sqlite_unbuffered_query": [ + "resource sqlite_unbuffered_query(string query, resource db [ , int result_type [, string &error_message]])", + "Executes a query that does not prefetch and buffer all data." + ], + "sqlite_valid": [ + "bool sqlite_valid(resource result)", + "Returns whether more rows are available." + ], + "sqrt": [ + "float sqrt(float number)", + "Returns the square root of the number" + ], + "srand": [ + "void srand([int seed])", + "Seeds random number generator" + ], + "sscanf": [ + "mixed sscanf(string str, string format [, string ...])", + "Implements an ANSI C compatible sscanf" + ], + "stat": [ + "array stat(string filename)", + "Give information about a file" + ], + "str_getcsv": [ + "array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])", + "Parse a CSV string into an array" + ], + "str_ireplace": [ + "mixed str_ireplace(mixed search, mixed replace, mixed subject [, int &replace_count])", + "Replaces all occurrences of search in haystack with replace / case-insensitive" + ], + "str_pad": [ + "string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])", + "Returns input string padded on the left or right to specified length with pad_string" + ], + "str_repeat": [ + "string str_repeat(string input, int mult)", + "Returns the input string repeat mult times" + ], + "str_replace": [ + "mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count])", + "Replaces all occurrences of search in haystack with replace" + ], + "str_rot13": [ + "string str_rot13(string str)", + "Perform the rot13 transform on a string" + ], + "str_shuffle": [ + "void str_shuffle(string str)", + "Shuffles string. One permutation of all possible is created" + ], + "str_split": [ + "array str_split(string str [, int split_length])", + "Convert a string to an array. If split_length is specified, break the string down into chunks each split_length characters long." + ], + "str_word_count": [ + "mixed str_word_count(string str, [int format [, string charlist]])", + "Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with \"'\" and \"-\" characters." + ], + "strcasecmp": [ + "int strcasecmp(string str1, string str2)", + "Binary safe case-insensitive string comparison" + ], + "strchr": [ + "string strchr(string haystack, string needle)", + "An alias for strstr" + ], + "strcmp": [ + "int strcmp(string str1, string str2)", + "Binary safe string comparison" + ], + "strcoll": [ + "int strcoll(string str1, string str2)", + "Compares two strings using the current locale" + ], + "strcspn": [ + "int strcspn(string str, string mask [, start [, len]])", + "Finds length of initial segment consisting entirely of characters not found in mask. If start or/and length is provide works like strcspn(substr($s,$start,$len),$bad_chars)" + ], + "stream_bucket_append": [ + "void stream_bucket_append(resource brigade, resource bucket)", + "Append bucket to brigade" + ], + "stream_bucket_make_writeable": [ + "object stream_bucket_make_writeable(resource brigade)", + "Return a bucket object from the brigade for operating on" + ], + "stream_bucket_new": [ + "resource stream_bucket_new(resource stream, string buffer)", + "Create a new bucket for use on the current stream" + ], + "stream_bucket_prepend": [ + "void stream_bucket_prepend(resource brigade, resource bucket)", + "Prepend bucket to brigade" + ], + "stream_context_create": [ + "resource stream_context_create([array options[, array params]])", + "Create a file context and optionally set parameters" + ], + "stream_context_get_default": [ + "resource stream_context_get_default([array options])", + "Get a handle on the default file/stream context and optionally set parameters" + ], + "stream_context_get_options": [ + "array stream_context_get_options(resource context|resource stream)", + "Retrieve options for a stream/wrapper/context" + ], + "stream_context_get_params": [ + "array stream_context_get_params(resource context|resource stream)", + "Get parameters of a file context" + ], + "stream_context_set_default": [ + "resource stream_context_set_default(array options)", + "Set default file/stream context, returns the context as a resource" + ], + "stream_context_set_option": [ + "bool stream_context_set_option(resource context|resource stream, string wrappername, string optionname, mixed value)", + "Set an option for a wrapper" + ], + "stream_context_set_params": [ + "bool stream_context_set_params(resource context|resource stream, array options)", + "Set parameters for a file context" + ], + "stream_copy_to_stream": [ + "long stream_copy_to_stream(resource source, resource dest [, long maxlen [, long pos]])", + "Reads up to maxlen bytes from source stream and writes them to dest stream." + ], + "stream_filter_append": [ + "resource stream_filter_append(resource stream, string filtername[, int read_write[, string filterparams]])", + "Append a filter to a stream" + ], + "stream_filter_prepend": [ + "resource stream_filter_prepend(resource stream, string filtername[, int read_write[, string filterparams]])", + "Prepend a filter to a stream" + ], + "stream_filter_register": [ + "bool stream_filter_register(string filtername, string classname)", + "Registers a custom filter handler class" + ], + "stream_filter_remove": [ + "bool stream_filter_remove(resource stream_filter)", + "Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource" + ], + "stream_get_contents": [ + "string stream_get_contents(resource source [, long maxlen [, long offset]])", + "Reads all remaining bytes (or up to maxlen bytes) from a stream and returns them as a string." + ], + "stream_get_filters": [ + "array stream_get_filters()", + "Returns a list of registered filters" + ], + "stream_get_line": [ + "string stream_get_line(resource stream, int maxlen [, string ending])", + "Read up to maxlen bytes from a stream or until the ending string is found" + ], + "stream_get_meta_data": [ + "array stream_get_meta_data(resource fp)", + "Retrieves header/meta data from streams/file pointers" + ], + "stream_get_transports": [ + "array stream_get_transports()", + "Retrieves list of registered socket transports" + ], + "stream_get_wrappers": [ + "array stream_get_wrappers()", + "Retrieves list of registered stream wrappers" + ], + "stream_is_local": [ + "bool stream_is_local(resource stream|string url)", + "" + ], + "stream_resolve_include_path": [ + "string stream_resolve_include_path(string filename)", + "Determine what file will be opened by calls to fopen() with a relative path" + ], + "stream_select": [ + "int stream_select(array &read_streams, array &write_streams, array &except_streams, int tv_sec[, int tv_usec])", + "Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec" + ], + "stream_set_blocking": [ + "bool stream_set_blocking(resource socket, int mode)", + "Set blocking/non-blocking mode on a socket or stream" + ], + "stream_set_timeout": [ + "bool stream_set_timeout(resource stream, int seconds [, int microseconds])", + "Set timeout on stream read to seconds + microseonds" + ], + "stream_set_write_buffer": [ + "int stream_set_write_buffer(resource fp, int buffer)", + "Set file write buffer" + ], + "stream_socket_accept": [ + "resource stream_socket_accept(resource serverstream, [ double timeout [, string &peername ]])", + "Accept a client connection from a server socket" + ], + "stream_socket_client": [ + "resource stream_socket_client(string remoteaddress [, long &errcode [, string &errstring [, double timeout [, long flags [, resource context]]]]])", + "Open a client connection to a remote address" + ], + "stream_socket_enable_crypto": [ + "int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]])", + "Enable or disable a specific kind of crypto on the stream" + ], + "stream_socket_get_name": [ + "string stream_socket_get_name(resource stream, bool want_peer)", + "Returns either the locally bound or remote name for a socket stream" + ], + "stream_socket_pair": [ + "array stream_socket_pair(int domain, int type, int protocol)", + "Creates a pair of connected, indistinguishable socket streams" + ], + "stream_socket_recvfrom": [ + "string stream_socket_recvfrom(resource stream, long amount [, long flags [, string &remote_addr]])", + "Receives data from a socket stream" + ], + "stream_socket_sendto": [ + "long stream_socket_sendto(resouce stream, string data [, long flags [, string target_addr]])", + "Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format" + ], + "stream_socket_server": [ + "resource stream_socket_server(string localaddress [, long &errcode [, string &errstring [, long flags [, resource context]]]])", + "Create a server socket bound to localaddress" + ], + "stream_socket_shutdown": [ + "int stream_socket_shutdown(resource stream, int how)", + "causes all or part of a full-duplex connection on the socket associated with stream to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed." + ], + "stream_supports_lock": [ + "bool stream_supports_lock(resource stream)", + "Tells whether the stream supports locking through flock()." + ], + "stream_wrapper_register": [ + "bool stream_wrapper_register(string protocol, string classname[, integer flags])", + "Registers a custom URL protocol handler class" + ], + "stream_wrapper_restore": [ + "bool stream_wrapper_restore(string protocol)", + "Restore the original protocol handler, overriding if necessary" + ], + "stream_wrapper_unregister": [ + "bool stream_wrapper_unregister(string protocol)", + "Unregister a wrapper for the life of the current request." + ], + "strftime": [ + "string strftime(string format [, int timestamp])", + "Format a local time/date according to locale settings" + ], + "strip_tags": [ + "string strip_tags(string str [, string allowable_tags])", + "Strips HTML and PHP tags from a string" + ], + "stripcslashes": [ + "string stripcslashes(string str)", + "Strips backslashes from a string. Uses C-style conventions" + ], + "stripos": [ + "int stripos(string haystack, string needle [, int offset])", + "Finds position of first occurrence of a string within another, case insensitive" + ], + "stripslashes": [ + "string stripslashes(string str)", + "Strips backslashes from a string" + ], + "stristr": [ + "string stristr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another, case insensitive" + ], + "strlen": [ + "int strlen(string str)", + "Get string length" + ], + "strnatcasecmp": [ + "int strnatcasecmp(string s1, string s2)", + "Returns the result of case-insensitive string comparison using 'natural' algorithm" + ], + "strnatcmp": [ + "int strnatcmp(string s1, string s2)", + "Returns the result of string comparison using 'natural' algorithm" + ], + "strncasecmp": [ + "int strncasecmp(string str1, string str2, int len)", + "Binary safe string comparison" + ], + "strncmp": [ + "int strncmp(string str1, string str2, int len)", + "Binary safe string comparison" + ], + "strpbrk": [ + "array strpbrk(string haystack, string char_list)", + "Search a string for any of a set of characters" + ], + "strpos": [ + "int strpos(string haystack, string needle [, int offset])", + "Finds position of first occurrence of a string within another" + ], + "strptime": [ + "string strptime(string timestamp, string format)", + "Parse a time/date generated with strftime()" + ], + "strrchr": [ + "string strrchr(string haystack, string needle)", + "Finds the last occurrence of a character in a string within another" + ], + "strrev": [ + "string strrev(string str)", + "Reverse a string" + ], + "strripos": [ + "int strripos(string haystack, string needle [, int offset])", + "Finds position of last occurrence of a string within another string" + ], + "strrpos": [ + "int strrpos(string haystack, string needle [, int offset])", + "Finds position of last occurrence of a string within another string" + ], + "strspn": [ + "int strspn(string str, string mask [, start [, len]])", + "Finds length of initial segment consisting entirely of characters found in mask. If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)" + ], + "strstr": [ + "string strstr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "strtok": [ + "string strtok([string str,] string token)", + "Tokenize a string" + ], + "strtolower": [ + "string strtolower(string str)", + "Makes a string lowercase" + ], + "strtotime": [ + "int strtotime(string time [, int now ])", + "Convert string representation of date and time to a timestamp" + ], + "strtoupper": [ + "string strtoupper(string str)", + "Makes a string uppercase" + ], + "strtr": [ + "string strtr(string str, string from[, string to])", + "Translates characters in str using given translation tables" + ], + "strval": [ + "string strval(mixed var)", + "Get the string value of a variable" + ], + "substr": [ + "string substr(string str, int start [, int length])", + "Returns part of a string" + ], + "substr_compare": [ + "int substr_compare(string main_str, string str, int offset [, int length [, bool case_sensitivity]])", + "Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters" + ], + "substr_count": [ + "int substr_count(string haystack, string needle [, int offset [, int length]])", + "Returns the number of times a substring occurs in the string" + ], + "substr_replace": [ + "mixed substr_replace(mixed str, mixed repl, mixed start [, mixed length])", + "Replaces part of a string with another string" + ], + "sybase_affected_rows": [ + "int sybase_affected_rows([resource link_id])", + "Get number of affected rows in last query" + ], + "sybase_close": [ + "bool sybase_close([resource link_id])", + "Close Sybase connection" + ], + "sybase_connect": [ + "int sybase_connect([string host [, string user [, string password [, string charset [, string appname [, bool new]]]]]])", + "Open Sybase server connection" + ], + "sybase_data_seek": [ + "bool sybase_data_seek(resource result, int offset)", + "Move internal row pointer" + ], + "sybase_deadlock_retry_count": [ + "void sybase_deadlock_retry_count(int retry_count)", + "Sets deadlock retry count" + ], + "sybase_fetch_array": [ + "array sybase_fetch_array(resource result)", + "Fetch row as array" + ], + "sybase_fetch_assoc": [ + "array sybase_fetch_assoc(resource result)", + "Fetch row as array without numberic indices" + ], + "sybase_fetch_field": [ + "object sybase_fetch_field(resource result [, int offset])", + "Get field information" + ], + "sybase_fetch_object": [ + "object sybase_fetch_object(resource result [, mixed object])", + "Fetch row as object" + ], + "sybase_fetch_row": [ + "array sybase_fetch_row(resource result)", + "Get row as enumerated array" + ], + "sybase_field_seek": [ + "bool sybase_field_seek(resource result, int offset)", + "Set field offset" + ], + "sybase_free_result": [ + "bool sybase_free_result(resource result)", + "Free result memory" + ], + "sybase_get_last_message": [ + "string sybase_get_last_message()", + "Returns the last message from server (over min_message_severity)" + ], + "sybase_min_client_severity": [ + "void sybase_min_client_severity(int severity)", + "Sets minimum client severity" + ], + "sybase_min_server_severity": [ + "void sybase_min_server_severity(int severity)", + "Sets minimum server severity" + ], + "sybase_num_fields": [ + "int sybase_num_fields(resource result)", + "Get number of fields in result" + ], + "sybase_num_rows": [ + "int sybase_num_rows(resource result)", + "Get number of rows in result" + ], + "sybase_pconnect": [ + "int sybase_pconnect([string host [, string user [, string password [, string charset [, string appname]]]]])", + "Open persistent Sybase connection" + ], + "sybase_query": [ + "int sybase_query(string query [, resource link_id])", + "Send Sybase query" + ], + "sybase_result": [ + "string sybase_result(resource result, int row, mixed field)", + "Get result data" + ], + "sybase_select_db": [ + "bool sybase_select_db(string database [, resource link_id])", + "Select Sybase database" + ], + "sybase_set_message_handler": [ + "bool sybase_set_message_handler(mixed error_func [, resource connection])", + "Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted" + ], + "sybase_unbuffered_query": [ + "int sybase_unbuffered_query(string query [, resource link_id])", + "Send Sybase query" + ], + "symlink": [ + "int symlink(string target, string link)", + "Create a symbolic link" + ], + "sys_get_temp_dir": [ + "string sys_get_temp_dir()", + "Returns directory path used for temporary files" + ], + "sys_getloadavg": [ + "array sys_getloadavg()", + "" + ], + "syslog": [ + "bool syslog(int priority, string message)", + "Generate a system log message" + ], + "system": [ + "int system(string command [, int &return_value])", + "Execute an external program and display output" + ], + "tan": [ + "float tan(float number)", + "Returns the tangent of the number in radians" + ], + "tanh": [ + "float tanh(float number)", + "Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number)" + ], + "tempnam": [ + "string tempnam(string dir, string prefix)", + "Create a unique filename in a directory" + ], + "textdomain": [ + "string textdomain(string domain)", + "Set the textdomain to \"domain\". Returns the current domain" + ], + "tidy_access_count": [ + "int tidy_access_count()", + "Returns the Number of Tidy accessibility warnings encountered for specified document." + ], + "tidy_clean_repair": [ + "bool tidy_clean_repair()", + "Execute configured cleanup and repair operations on parsed markup" + ], + "tidy_config_count": [ + "int tidy_config_count()", + "Returns the Number of Tidy configuration errors encountered for specified document." + ], + "tidy_diagnose": [ + "bool tidy_diagnose()", + "Run configured diagnostics on parsed and repaired markup." + ], + "tidy_error_count": [ + "int tidy_error_count()", + "Returns the Number of Tidy errors encountered for specified document." + ], + "tidy_get_body": [ + "TidyNode tidy_get_body(resource tidy)", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_config": [ + "array tidy_get_config()", + "Get current Tidy configuarion" + ], + "tidy_get_error_buffer": [ + "string tidy_get_error_buffer([bool detailed])", + "Return warnings and errors which occured parsing the specified document" + ], + "tidy_get_head": [ + "TidyNode tidy_get_head()", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_html": [ + "TidyNode tidy_get_html()", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_html_ver": [ + "int tidy_get_html_ver()", + "Get the Detected HTML version for the specified document." + ], + "tidy_get_opt_doc": [ + "string tidy_get_opt_doc(tidy resource, string optname)", + "Returns the documentation for the given option name" + ], + "tidy_get_output": [ + "string tidy_get_output()", + "Return a string representing the parsed tidy markup" + ], + "tidy_get_release": [ + "string tidy_get_release()", + "Get release date (version) for Tidy library" + ], + "tidy_get_root": [ + "TidyNode tidy_get_root()", + "Returns a TidyNode Object representing the root of the tidy parse tree" + ], + "tidy_get_status": [ + "int tidy_get_status()", + "Get status of specfied document." + ], + "tidy_getopt": [ + "mixed tidy_getopt(string option)", + "Returns the value of the specified configuration option for the tidy document." + ], + "tidy_is_xhtml": [ + "bool tidy_is_xhtml()", + "Indicates if the document is a XHTML document." + ], + "tidy_is_xml": [ + "bool tidy_is_xml()", + "Indicates if the document is a generic (non HTML/XHTML) XML document." + ], + "tidy_parse_file": [ + "bool tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])", + "Parse markup in file or URI" + ], + "tidy_parse_string": [ + "bool tidy_parse_string(string input [, mixed config_options [, string encoding]])", + "Parse a document stored in a string" + ], + "tidy_repair_file": [ + "bool tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])", + "Repair a file using an optionally provided configuration file" + ], + "tidy_repair_string": [ + "bool tidy_repair_string(string data [, mixed config_file [, string encoding]])", + "Repair a string using an optionally provided configuration file" + ], + "tidy_warning_count": [ + "int tidy_warning_count()", + "Returns the Number of Tidy warnings encountered for specified document." + ], + "time": [ + "int time()", + "Return current UNIX timestamp" + ], + "time_nanosleep": [ + "mixed time_nanosleep(long seconds, long nanoseconds)", + "Delay for a number of seconds and nano seconds" + ], + "time_sleep_until": [ + "mixed time_sleep_until(float timestamp)", + "Make the script sleep until the specified time" + ], + "timezone_abbreviations_list": [ + "array timezone_abbreviations_list()", + "Returns associative array containing dst, offset and the timezone name" + ], + "timezone_identifiers_list": [ + "array timezone_identifiers_list([long what[, string country]])", + "Returns numerically index array with all timezone identifiers." + ], + "timezone_location_get": [ + "array timezone_location_get()", + "Returns location information for a timezone, including country code, latitude/longitude and comments" + ], + "timezone_name_from_abbr": [ + "string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])", + "Returns the timezone name from abbrevation" + ], + "timezone_name_get": [ + "string timezone_name_get(DateTimeZone object)", + "Returns the name of the timezone." + ], + "timezone_offset_get": [ + "long timezone_offset_get(DateTimeZone object, DateTime object)", + "Returns the timezone offset." + ], + "timezone_open": [ + "DateTimeZone timezone_open(string timezone)", + "Returns new DateTimeZone object" + ], + "timezone_transitions_get": [ + "array timezone_transitions_get(DateTimeZone object [, long timestamp_begin [, long timestamp_end ]])", + "Returns numerically indexed array containing associative array for all transitions in the specified range for the timezone." + ], + "timezone_version_get": [ + "array timezone_version_get()", + "Returns the Olson database version number." + ], + "tmpfile": [ + "resource tmpfile()", + "Create a temporary file that will be deleted automatically after use" + ], + "token_get_all": [ + "array token_get_all(string source)", + "" + ], + "token_name": [ + "string token_name(int type)", + "" + ], + "touch": [ + "bool touch(string filename [, int time [, int atime]])", + "Set modification time of file" + ], + "trigger_error": [ + "void trigger_error(string messsage [, int error_type])", + "Generates a user-level error/warning/notice message" + ], + "trim": [ + "string trim(string str [, string character_mask])", + "Strips whitespace from the beginning and end of a string" + ], + "uasort": [ + "bool uasort(array array_arg, string cmp_function)", + "Sort an array with a user-defined comparison function and maintain index association" + ], + "ucfirst": [ + "string ucfirst(string str)", + "Make a string's first character lowercase" + ], + "ucwords": [ + "string ucwords(string str)", + "Uppercase the first character of every word in a string" + ], + "uksort": [ + "bool uksort(array array_arg, string cmp_function)", + "Sort an array by keys using a user-defined comparison function" + ], + "umask": [ + "int umask([int mask])", + "Return or change the umask" + ], + "uniqid": [ + "string uniqid([string prefix [, bool more_entropy]])", + "Generates a unique ID" + ], + "unixtojd": [ + "int unixtojd([int timestamp])", + "Convert UNIX timestamp to Julian Day" + ], + "unlink": [ + "bool unlink(string filename[, context context])", + "Delete a file" + ], + "unpack": [ + "array unpack(string format, string input)", + "Unpack binary string into named array elements according to format argument" + ], + "unregister_tick_function": [ + "void unregister_tick_function(string function_name)", + "Unregisters a tick callback function" + ], + "unserialize": [ + "mixed unserialize(string variable_representation)", + "Takes a string representation of variable and recreates it" + ], + "unset": [ + "void unset(mixed var [, mixed var])", + "Unset a given variable" + ], + "urldecode": [ + "string urldecode(string str)", + "Decodes URL-encoded string" + ], + "urlencode": [ + "string urlencode(string str)", + "URL-encodes string" + ], + "usleep": [ + "void usleep(int micro_seconds)", + "Delay for a given number of micro seconds" + ], + "usort": [ + "bool usort(array array_arg, string cmp_function)", + "Sort an array by values using a user-defined comparison function" + ], + "utf8_decode": [ + "string utf8_decode(string data)", + "Converts a UTF-8 encoded string to ISO-8859-1" + ], + "utf8_encode": [ + "string utf8_encode(string data)", + "Encodes an ISO-8859-1 string to UTF-8" + ], + "var_dump": [ + "void var_dump(mixed var)", + "Dumps a string representation of variable to output" + ], + "var_export": [ + "string var_export(mixed var [, bool return])", + "Outputs or returns a string representation of a variable" + ], + "variant_abs": [ + "mixed variant_abs(mixed left)", + "Returns the absolute value of a variant" + ], + "variant_add": [ + "mixed variant_add(mixed left, mixed right)", + "\"Adds\" two variant values together and returns the result" + ], + "variant_and": [ + "mixed variant_and(mixed left, mixed right)", + "performs a bitwise AND operation between two variants and returns the result" + ], + "variant_cast": [ + "object variant_cast(object variant, int type)", + "Convert a variant into a new variant object of another type" + ], + "variant_cat": [ + "mixed variant_cat(mixed left, mixed right)", + "concatenates two variant values together and returns the result" + ], + "variant_cmp": [ + "int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])", + "Compares two variants" + ], + "variant_date_from_timestamp": [ + "object variant_date_from_timestamp(int timestamp)", + "Returns a variant date representation of a unix timestamp" + ], + "variant_date_to_timestamp": [ + "int variant_date_to_timestamp(object variant)", + "Converts a variant date/time value to unix timestamp" + ], + "variant_div": [ + "mixed variant_div(mixed left, mixed right)", + "Returns the result from dividing two variants" + ], + "variant_eqv": [ + "mixed variant_eqv(mixed left, mixed right)", + "Performs a bitwise equivalence on two variants" + ], + "variant_fix": [ + "mixed variant_fix(mixed left)", + "Returns the integer part ? of a variant" + ], + "variant_get_type": [ + "int variant_get_type(object variant)", + "Returns the VT_XXX type code for a variant" + ], + "variant_idiv": [ + "mixed variant_idiv(mixed left, mixed right)", + "Converts variants to integers and then returns the result from dividing them" + ], + "variant_imp": [ + "mixed variant_imp(mixed left, mixed right)", + "Performs a bitwise implication on two variants" + ], + "variant_int": [ + "mixed variant_int(mixed left)", + "Returns the integer portion of a variant" + ], + "variant_mod": [ + "mixed variant_mod(mixed left, mixed right)", + "Divides two variants and returns only the remainder" + ], + "variant_mul": [ + "mixed variant_mul(mixed left, mixed right)", + "multiplies the values of the two variants and returns the result" + ], + "variant_neg": [ + "mixed variant_neg(mixed left)", + "Performs logical negation on a variant" + ], + "variant_not": [ + "mixed variant_not(mixed left)", + "Performs bitwise not negation on a variant" + ], + "variant_or": [ + "mixed variant_or(mixed left, mixed right)", + "Performs a logical disjunction on two variants" + ], + "variant_pow": [ + "mixed variant_pow(mixed left, mixed right)", + "Returns the result of performing the power function with two variants" + ], + "variant_round": [ + "mixed variant_round(mixed left, int decimals)", + "Rounds a variant to the specified number of decimal places" + ], + "variant_set": [ + "void variant_set(object variant, mixed value)", + "Assigns a new value for a variant object" + ], + "variant_set_type": [ + "void variant_set_type(object variant, int type)", + "Convert a variant into another type. Variant is modified \"in-place\"" + ], + "variant_sub": [ + "mixed variant_sub(mixed left, mixed right)", + "subtracts the value of the right variant from the left variant value and returns the result" + ], + "variant_xor": [ + "mixed variant_xor(mixed left, mixed right)", + "Performs a logical exclusion on two variants" + ], + "version_compare": [ + "int version_compare(string ver1, string ver2 [, string oper])", + "Compares two \"PHP-standardized\" version number strings" + ], + "vfprintf": [ + "int vfprintf(resource stream, string format, array args)", + "Output a formatted string into a stream" + ], + "virtual": [ + "bool virtual(string filename)", + "Perform an Apache sub-request" + ], + "vprintf": [ + "int vprintf(string format, array args)", + "Output a formatted string" + ], + "vsprintf": [ + "string vsprintf(string format, array args)", + "Return a formatted string" + ], + "wddx_add_vars": [ + "int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])", + "Serializes given variables and adds them to packet given by packet_id" + ], + "wddx_deserialize": [ + "mixed wddx_deserialize(mixed packet)", + "Deserializes given packet and returns a PHP value" + ], + "wddx_packet_end": [ + "string wddx_packet_end(resource packet_id)", + "Ends specified WDDX packet and returns the string containing the packet" + ], + "wddx_packet_start": [ + "resource wddx_packet_start([string comment])", + "Starts a WDDX packet with optional comment and returns the packet id" + ], + "wddx_serialize_value": [ + "string wddx_serialize_value(mixed var [, string comment])", + "Creates a new packet and serializes the given value" + ], + "wddx_serialize_vars": [ + "string wddx_serialize_vars(mixed var_name [, mixed ...])", + "Creates a new packet and serializes given variables into a struct" + ], + "wordwrap": [ + "string wordwrap(string str [, int width [, string break [, bool cut]]])", + "Wraps buffer to selected number of characters using string break char" + ], + "xml_error_string": [ + "string xml_error_string(int code)", + "Get XML parser error string" + ], + "xml_get_current_byte_index": [ + "int xml_get_current_byte_index(resource parser)", + "Get current byte index for an XML parser" + ], + "xml_get_current_column_number": [ + "int xml_get_current_column_number(resource parser)", + "Get current column number for an XML parser" + ], + "xml_get_current_line_number": [ + "int xml_get_current_line_number(resource parser)", + "Get current line number for an XML parser" + ], + "xml_get_error_code": [ + "int xml_get_error_code(resource parser)", + "Get XML parser error code" + ], + "xml_parse": [ + "int xml_parse(resource parser, string data [, int isFinal])", + "Start parsing an XML document" + ], + "xml_parse_into_struct": [ + "int xml_parse_into_struct(resource parser, string data, array &values [, array &index ])", + "Parsing a XML document" + ], + "xml_parser_create": [ + "resource xml_parser_create([string encoding])", + "Create an XML parser" + ], + "xml_parser_create_ns": [ + "resource xml_parser_create_ns([string encoding [, string sep]])", + "Create an XML parser" + ], + "xml_parser_free": [ + "int xml_parser_free(resource parser)", + "Free an XML parser" + ], + "xml_parser_get_option": [ + "int xml_parser_get_option(resource parser, int option)", + "Get options from an XML parser" + ], + "xml_parser_set_option": [ + "int xml_parser_set_option(resource parser, int option, mixed value)", + "Set options in an XML parser" + ], + "xml_set_character_data_handler": [ + "int xml_set_character_data_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_default_handler": [ + "int xml_set_default_handler(resource parser, string hdl)", + "Set up default handler" + ], + "xml_set_element_handler": [ + "int xml_set_element_handler(resource parser, string shdl, string ehdl)", + "Set up start and end element handlers" + ], + "xml_set_end_namespace_decl_handler": [ + "int xml_set_end_namespace_decl_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_external_entity_ref_handler": [ + "int xml_set_external_entity_ref_handler(resource parser, string hdl)", + "Set up external entity reference handler" + ], + "xml_set_notation_decl_handler": [ + "int xml_set_notation_decl_handler(resource parser, string hdl)", + "Set up notation declaration handler" + ], + "xml_set_object": [ + "int xml_set_object(resource parser, object &obj)", + "Set up object which should be used for callbacks" + ], + "xml_set_processing_instruction_handler": [ + "int xml_set_processing_instruction_handler(resource parser, string hdl)", + "Set up processing instruction (PI) handler" + ], + "xml_set_start_namespace_decl_handler": [ + "int xml_set_start_namespace_decl_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_unparsed_entity_decl_handler": [ + "int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)", + "Set up unparsed entity declaration handler" + ], + "xmlrpc_decode": [ + "array xmlrpc_decode(string xml [, string encoding])", + "Decodes XML into native PHP types" + ], + "xmlrpc_decode_request": [ + "array xmlrpc_decode_request(string xml, string& method [, string encoding])", + "Decodes XML into native PHP types" + ], + "xmlrpc_encode": [ + "string xmlrpc_encode(mixed value)", + "Generates XML for a PHP value" + ], + "xmlrpc_encode_request": [ + "string xmlrpc_encode_request(string method, mixed params [, array output_options])", + "Generates XML for a method request" + ], + "xmlrpc_get_type": [ + "string xmlrpc_get_type(mixed value)", + "Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings" + ], + "xmlrpc_is_fault": [ + "bool xmlrpc_is_fault(array)", + "Determines if an array value represents an XMLRPC fault." + ], + "xmlrpc_parse_method_descriptions": [ + "array xmlrpc_parse_method_descriptions(string xml)", + "Decodes XML into a list of method descriptions" + ], + "xmlrpc_server_add_introspection_data": [ + "int xmlrpc_server_add_introspection_data(resource server, array desc)", + "Adds introspection documentation" + ], + "xmlrpc_server_call_method": [ + "mixed xmlrpc_server_call_method(resource server, string xml, mixed user_data [, array output_options])", + "Parses XML requests and call methods" + ], + "xmlrpc_server_create": [ + "resource xmlrpc_server_create()", + "Creates an xmlrpc server" + ], + "xmlrpc_server_destroy": [ + "int xmlrpc_server_destroy(resource server)", + "Destroys server resources" + ], + "xmlrpc_server_register_introspection_callback": [ + "bool xmlrpc_server_register_introspection_callback(resource server, string function)", + "Register a PHP function to generate documentation" + ], + "xmlrpc_server_register_method": [ + "bool xmlrpc_server_register_method(resource server, string method_name, string function)", + "Register a PHP function to handle method matching method_name" + ], + "xmlrpc_set_type": [ + "bool xmlrpc_set_type(string value, string type)", + "Sets xmlrpc type, base64 or datetime, for a PHP string value" + ], + "xmlwriter_end_attribute": [ + "bool xmlwriter_end_attribute(resource xmlwriter)", + "End attribute - returns FALSE on error" + ], + "xmlwriter_end_cdata": [ + "bool xmlwriter_end_cdata(resource xmlwriter)", + "End current CDATA - returns FALSE on error" + ], + "xmlwriter_end_comment": [ + "bool xmlwriter_end_comment(resource xmlwriter)", + "Create end comment - returns FALSE on error" + ], + "xmlwriter_end_document": [ + "bool xmlwriter_end_document(resource xmlwriter)", + "End current document - returns FALSE on error" + ], + "xmlwriter_end_dtd": [ + "bool xmlwriter_end_dtd(resource xmlwriter)", + "End current DTD - returns FALSE on error" + ], + "xmlwriter_end_dtd_attlist": [ + "bool xmlwriter_end_dtd_attlist(resource xmlwriter)", + "End current DTD AttList - returns FALSE on error" + ], + "xmlwriter_end_dtd_element": [ + "bool xmlwriter_end_dtd_element(resource xmlwriter)", + "End current DTD element - returns FALSE on error" + ], + "xmlwriter_end_dtd_entity": [ + "bool xmlwriter_end_dtd_entity(resource xmlwriter)", + "End current DTD Entity - returns FALSE on error" + ], + "xmlwriter_end_element": [ + "bool xmlwriter_end_element(resource xmlwriter)", + "End current element - returns FALSE on error" + ], + "xmlwriter_end_pi": [ + "bool xmlwriter_end_pi(resource xmlwriter)", + "End current PI - returns FALSE on error" + ], + "xmlwriter_flush": [ + "mixed xmlwriter_flush(resource xmlwriter [,bool empty])", + "Output current buffer" + ], + "xmlwriter_full_end_element": [ + "bool xmlwriter_full_end_element(resource xmlwriter)", + "End current element - returns FALSE on error" + ], + "xmlwriter_open_memory": [ + "resource xmlwriter_open_memory()", + "Create new xmlwriter using memory for string output" + ], + "xmlwriter_open_uri": [ + "resource xmlwriter_open_uri(resource xmlwriter, string source)", + "Create new xmlwriter using source uri for output" + ], + "xmlwriter_output_memory": [ + "string xmlwriter_output_memory(resource xmlwriter [,bool flush])", + "Output current buffer as string" + ], + "xmlwriter_set_indent": [ + "bool xmlwriter_set_indent(resource xmlwriter, bool indent)", + "Toggle indentation on/off - returns FALSE on error" + ], + "xmlwriter_set_indent_string": [ + "bool xmlwriter_set_indent_string(resource xmlwriter, string indentString)", + "Set string used for indenting - returns FALSE on error" + ], + "xmlwriter_start_attribute": [ + "bool xmlwriter_start_attribute(resource xmlwriter, string name)", + "Create start attribute - returns FALSE on error" + ], + "xmlwriter_start_attribute_ns": [ + "bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri)", + "Create start namespaced attribute - returns FALSE on error" + ], + "xmlwriter_start_cdata": [ + "bool xmlwriter_start_cdata(resource xmlwriter)", + "Create start CDATA tag - returns FALSE on error" + ], + "xmlwriter_start_comment": [ + "bool xmlwriter_start_comment(resource xmlwriter)", + "Create start comment - returns FALSE on error" + ], + "xmlwriter_start_document": [ + "bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone)", + "Create document tag - returns FALSE on error" + ], + "xmlwriter_start_dtd": [ + "bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid)", + "Create start DTD tag - returns FALSE on error" + ], + "xmlwriter_start_dtd_attlist": [ + "bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)", + "Create start DTD AttList - returns FALSE on error" + ], + "xmlwriter_start_dtd_element": [ + "bool xmlwriter_start_dtd_element(resource xmlwriter, string name)", + "Create start DTD element - returns FALSE on error" + ], + "xmlwriter_start_dtd_entity": [ + "bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)", + "Create start DTD Entity - returns FALSE on error" + ], + "xmlwriter_start_element": [ + "bool xmlwriter_start_element(resource xmlwriter, string name)", + "Create start element tag - returns FALSE on error" + ], + "xmlwriter_start_element_ns": [ + "bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri)", + "Create start namespaced element tag - returns FALSE on error" + ], + "xmlwriter_start_pi": [ + "bool xmlwriter_start_pi(resource xmlwriter, string target)", + "Create start PI tag - returns FALSE on error" + ], + "xmlwriter_text": [ + "bool xmlwriter_text(resource xmlwriter, string content)", + "Write text - returns FALSE on error" + ], + "xmlwriter_write_attribute": [ + "bool xmlwriter_write_attribute(resource xmlwriter, string name, string content)", + "Write full attribute - returns FALSE on error" + ], + "xmlwriter_write_attribute_ns": [ + "bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content)", + "Write full namespaced attribute - returns FALSE on error" + ], + "xmlwriter_write_cdata": [ + "bool xmlwriter_write_cdata(resource xmlwriter, string content)", + "Write full CDATA tag - returns FALSE on error" + ], + "xmlwriter_write_comment": [ + "bool xmlwriter_write_comment(resource xmlwriter, string content)", + "Write full comment tag - returns FALSE on error" + ], + "xmlwriter_write_dtd": [ + "bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset)", + "Write full DTD tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_attlist": [ + "bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content)", + "Write full DTD AttList tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_element": [ + "bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content)", + "Write full DTD element tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_entity": [ + "bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])", + "Write full DTD Entity tag - returns FALSE on error" + ], + "xmlwriter_write_element": [ + "bool xmlwriter_write_element(resource xmlwriter, string name[, string content])", + "Write full element tag - returns FALSE on error" + ], + "xmlwriter_write_element_ns": [ + "bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])", + "Write full namespaced element tag - returns FALSE on error" + ], + "xmlwriter_write_pi": [ + "bool xmlwriter_write_pi(resource xmlwriter, string target, string content)", + "Write full PI tag - returns FALSE on error" + ], + "xmlwriter_write_raw": [ + "bool xmlwriter_write_raw(resource xmlwriter, string content)", + "Write text - returns FALSE on error" + ], + "xsl_xsltprocessor_get_parameter": [ + "string xsl_xsltprocessor_get_parameter(string namespace, string name)", + "" + ], + "xsl_xsltprocessor_has_exslt_support": [ + "bool xsl_xsltprocessor_has_exslt_support()", + "" + ], + "xsl_xsltprocessor_import_stylesheet": [ + "void xsl_xsltprocessor_import_stylesheet(domdocument doc)", + "" + ], + "xsl_xsltprocessor_register_php_functions": [ + "void xsl_xsltprocessor_register_php_functions([mixed $restrict])", + "" + ], + "xsl_xsltprocessor_remove_parameter": [ + "bool xsl_xsltprocessor_remove_parameter(string namespace, string name)", + "" + ], + "xsl_xsltprocessor_set_parameter": [ + "bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value])", + "" + ], + "xsl_xsltprocessor_set_profiling": [ + "bool xsl_xsltprocessor_set_profiling(string filename)", + "" + ], + "xsl_xsltprocessor_transform_to_doc": [ + "domdocument xsl_xsltprocessor_transform_to_doc(domnode doc)", + "" + ], + "xsl_xsltprocessor_transform_to_uri": [ + "int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri)", + "" + ], + "xsl_xsltprocessor_transform_to_xml": [ + "string xsl_xsltprocessor_transform_to_xml(domdocument doc)", + "" + ], + "zend_logo_guid": [ + "string zend_logo_guid()", + "Return the special ID used to request the Zend logo in phpinfo screens" + ], + "zend_version": [ + "string zend_version()", + "Get the version of the Zend Engine" + ], + "zip_close": [ + "void zip_close(resource zip)", + "Close a Zip archive" + ], + "zip_entry_close": [ + "void zip_entry_close(resource zip_ent)", + "Close a zip entry" + ], + "zip_entry_compressedsize": [ + "int zip_entry_compressedsize(resource zip_entry)", + "Return the compressed size of a ZZip entry" + ], + "zip_entry_compressionmethod": [ + "string zip_entry_compressionmethod(resource zip_entry)", + "Return a string containing the compression method used on a particular entry" + ], + "zip_entry_filesize": [ + "int zip_entry_filesize(resource zip_entry)", + "Return the actual filesize of a ZZip entry" + ], + "zip_entry_name": [ + "string zip_entry_name(resource zip_entry)", + "Return the name given a ZZip entry" + ], + "zip_entry_open": [ + "bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])", + "Open a Zip File, pointed by the resource entry" + ], + "zip_entry_read": [ + "mixed zip_entry_read(resource zip_entry [, int len])", + "Read from an open directory entry" + ], + "zip_open": [ + "resource zip_open(string filename)", + "Create new zip using source uri for output" + ], + "zip_read": [ + "resource zip_read(resource zip)", + "Returns the next file in the archive" + ], + "zlib_get_coding_type": [ + "string zlib_get_coding_type()", + "Returns the coding type used for output compression" + ], + "array_column": [ + "array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array", + "Return the values from a single column in the input array" + ], + "boolval": [ + "boolval(mixed $value): bool", + "Get the boolean value of a variable" + ], + "bzclose": [ + "bzclose(resource $bz): bool", + "Close a bzip2 file" + ], + "bzflush": [ + "bzflush(resource $bz): bool", + "Do nothing" + ], + "bzwrite": [ + "bzwrite(resource $bz, string $data, ?int $length = null): int|false", + "Binary safe bzip2 file write" + ], + "checkdnsrr": [ + "checkdnsrr(string $hostname, string $type = "MX"): bool", + "Check DNS records corresponding to a given Internet host name or IP address" + ], + "chop": [ + "chop()", + "Alias of rtrim()" + ], + "class_uses": [ + "class_uses(object|string $object_or_class, bool $autoload = true): array|false", + "" + ], + "curl_escape": [ + "curl_escape(CurlHandle $handle, string $string): string|false", + "URL encodes the given string" + ], + "curl_file_create": [ + "curl_file_create()", + "Create a CURLFile object" + ], + "curl_multi_errno": [ + "curl_multi_errno(CurlMultiHandle $multi_handle): int", + "Return the last multi curl error number" + ], + "curl_multi_setopt": [ + "curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value): bool", + "Set an option for the cURL multi handle" + ], + "curl_multi_strerror": [ + "curl_multi_strerror(int $error_code): ?string", + "Return string describing error code" + ], + "curl_pause": [ + "curl_pause(CurlHandle $handle, int $flags): int", + "Pause and unpause a connection" + ], + "curl_reset": [ + "curl_reset(CurlHandle $handle): void", + "Reset all options of a libcurl session handle" + ], + "curl_share_close": [ + "curl_share_close(CurlShareHandle $share_handle): void", + "Close a cURL share handle" + ], + "curl_share_errno": [ + "curl_share_errno(CurlShareHandle $share_handle): int", + "Return the last share curl error number" + ], + "curl_share_init": [ + "curl_share_init(): CurlShareHandle", + "Initialize a cURL share handle" + ], + "curl_share_setopt": [ + "curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool", + "Set an option for a cURL share handle" + ], + "curl_share_strerror": [ + "curl_share_strerror(int $error_code): ?string", + "Return string describing the given error code" + ], + "curl_strerror": [ + "curl_strerror(int $error_code): ?string", + "Return string describing the given error code" + ], + "curl_unescape": [ + "curl_unescape(CurlHandle $handle, string $string): string|false", + "Decodes the given URL encoded string" + ], + "date_create_immutable_from_format": [ + "date_create_immutable_from_format()", + "Alias of DateTimeImmutable::createFromFormat()" + ], + "date_create_immutable": [ + "date_create_immutable()", + "Alias of DateTimeImmutable::__construct()" + ], + "deflate_add": [ + "deflate_add(DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false", + "Incrementally deflate data" + ], + "deflate_init": [ + "deflate_init(int $encoding, array $options = []): DeflateContext|false", + "Initialize an incremental deflate context" + ], + "delete": [ + "delete()", + "See unlink()" + ], + "diskfreespace": [ + "diskfreespace()", + "Alias of disk_free_space()" + ], + "doubleval": [ + "doubleval()", + "Alias of floatval()" + ], + "enchant_dict_add": [ + "enchant_dict_add(EnchantDictionary $dictionary, string $word): void", + "Add a word to personal word list" + ], + "enchant_dict_is_added": [ + "enchant_dict_is_added(EnchantDictionary $dictionary, string $word): bool", + "Whether or not 'word' exists in this spelling-session" + ], + "error_clear_last": [ + "error_clear_last(): void", + "Clear the most recent error" + ], + "eval": [ + "eval(string $code): mixed", + "Evaluate a string as PHP code" + ], + "expect_expectl": [ + "expect_expectl(resource $expect, array $cases, array &$match = ?): int", + "" + ], + "expect_popen": [ + "expect_popen(string $command): resource", + "" + ], + "fdiv": [ + "fdiv(float $num1, float $num2): float", + "Divides two numbers, according to IEEE 754" + ], + "filter_id": [ + "filter_id(string $name): int|false", + "Returns the filter ID belonging to a named filter" + ], + "filter_list": [ + "filter_list(): array", + "Returns a list of all supported filters" + ], + "forward_static_call_array": [ + "forward_static_call_array(callable $callback, array $args): mixed", + "Call a static method and pass the arguments as array" + ], + "fputs": [ + "fputs()", + "Alias of fwrite()" + ], + "ftp_append": [ + "ftp_append(FTP\\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool", + "Append the contents of a file to another file on the FTP server" + ], + "ftp_mlsd": [ + "ftp_mlsd(FTP\\Connection $ftp, string $directory): array|false", + "Returns a list of files in the given directory" + ], + "ftp_quit": [ + "ftp_quit()", + "Alias of ftp_close()" + ], + "gc_mem_caches": [ + "gc_mem_caches(): int", + "" + ], + "gc_status": [ + "gc_status(): array", + "Gets information about the garbage collector" + ], + "get_debug_type": [ + "get_debug_type(mixed $value): string", + "Gets the type name of a variable in a way that is suitable for debugging" + ], + "get_declared_traits": [ + "get_declared_traits(): array", + "Returns an array of all declared traits" + ], + "get_required_files": [ + "get_required_files()", + "Alias of get_included_files()" + ], + "get_resource_id": [ + "get_resource_id(resource $resource): int", + "" + ], + "get_resources": [ + "get_resources(?string $type = null): array", + "Returns active resources" + ], + "getimagesizefromstring": [ + "getimagesizefromstring(string $string, array &$image_info = null): array|false", + "Get the size of an image from a string" + ], + "getmxrr": [ + "getmxrr(string $hostname, array &$hosts, array &$weights = null): bool", + "Get MX records corresponding to a given Internet host name" + ], + "gmp_binomial": [ + "gmp_binomial(GMP|int|string $n, int $k): GMP", + "Calculates binomial coefficient" + ], + "gmp_div": [ + "gmp_div()", + "Alias of gmp_div_q()" + ], + "gmp_export": [ + "gmp_export(GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string", + "Export to a binary string" + ], + "gmp_import": [ + "gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP", + "Import from a binary string" + ], + "gmp_kronecker": [ + "gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int", + "Kronecker symbol" + ], + "gmp_lcm": [ + "gmp_lcm(GMP|int|string $num1, GMP|int|string $num2): GMP", + "Calculate LCM" + ], + "gmp_perfect_power": [ + "gmp_perfect_power(GMP|int|string $num): bool", + "Perfect power check" + ], + "gmp_random_bits": [ + "gmp_random_bits(int $bits): GMP", + "Random number" + ], + "gmp_random_range": [ + "gmp_random_range(GMP|int|string $min, GMP|int|string $max): GMP", + "Random number" + ], + "gmp_random_seed": [ + "gmp_random_seed(GMP|int|string $seed): void", + "Sets the RNG seed" + ], + "gmp_root": [ + "gmp_root(GMP|int|string $num, int $nth): GMP", + "Take the integer part of nth root" + ], + "gmp_rootrem": [ + "gmp_rootrem(GMP|int|string $num, int $nth): array", + "Take the integer part and remainder of nth root" + ], + "gzclose": [ + "gzclose(resource $stream): bool", + "Close an open gz-file pointer" + ], + "gzdecode": [ + "gzdecode(string $data, int $max_length = 0): string|false", + "Decodes a gzip compressed string" + ], + "gzeof": [ + "gzeof(resource $stream): bool", + "Test for EOF on a gz-file pointer" + ], + "gzgetc": [ + "gzgetc(resource $stream): string|false", + "Get character from gz-file pointer" + ], + "gzgets": [ + "gzgets(resource $stream, ?int $length = null): string|false", + "Get line from file pointer" + ], + "gzgetss": [ + "gzgetss(resource $zp, int $length, string $allowable_tags = ?): string", + "" + ], + "gzpassthru": [ + "gzpassthru(resource $stream): int", + "" + ], + "gzputs": [ + "gzputs()", + "Alias of gzwrite()" + ], + "gzread": [ + "gzread(resource $stream, int $length): string|false", + "Binary-safe gz-file read" + ], + "gzrewind": [ + "gzrewind(resource $stream): bool", + "Rewind the position of a gz-file pointer" + ], + "gzseek": [ + "gzseek(resource $stream, int $offset, int $whence = SEEK_SET): int", + "Seek on a gz-file pointer" + ], + "gztell": [ + "gztell(resource $stream): int|false", + "Tell gz-file pointer read/write position" + ], + "gzwrite": [ + "gzwrite(resource $stream, string $data, ?int $length = null): int|false", + "Binary-safe gz-file write" + ], + "halt_compiler": [ + "__halt_compiler(): void", + "" + ], + "hash_equals": [ + "hash_equals(string $known_string, string $user_string): bool", + "Timing attack safe string comparison" + ], + "hash_hkdf": [ + "hash_hkdf(string $algo, string $key, int $length = 0, string $info = \"\", string $salt = \"\"): string", + "Generate a HKDF key derivation of a supplied key input" + ], + "hash_hmac_algos": [ + "hash_hmac_algos(): array", + "Return a list of registered hashing algorithms suitable for hash_hmac" + ], + "hash_pbkdf2": [ + "hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string", + "Generate a PBKDF2 key derivation of a supplied password" + ], + "header_register_callback": [ + "header_register_callback(callable $callback): bool", + "Call a header function" + ], + "hex2bin": [ + "hex2bin(string $string): string|false", + "Decodes a hexadecimally encoded binary string" + ], + "hrtime": [ + "hrtime(bool $as_number = false): array|int|float|false", + "Get the system's high resolution time" + ], + "http_response_code": [ + "http_response_code(int $response_code = 0): int|bool", + "Get or Set the HTTP response code" + ], + "imageaffine": [ + "imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false", + "Return an image containing the affine transformed src image, using an optional clipping area" + ], + "imageaffinematrixconcat": [ + "imageaffinematrixconcat(array $matrix1, array $matrix2): array|false", + "Concatenate two affine transformation matrices" + ], + "imageaffinematrixget": [ + "imageaffinematrixget(int $type, array|float $options): array|false", + "Get an affine transformation matrix" + ], + "imagebmp": [ + "imagebmp(GdImage $image, resource|string|null $file = null, bool $compressed = true): bool", + "Output a BMP image to browser or file" + ], + "imagecreatefrombmp": [ + "imagecreatefrombmp(string $filename): GdImage|false", + "Create a new image from file or URL" + ], + "imagecreatefromwebp": [ + "imagecreatefromwebp(string $filename): GdImage|false", + "Create a new image from file or URL" + ], + "imagecrop": [ + "imagecrop(GdImage $image, array $rectangle): GdImage|false", + "Crop an image to the given rectangle" + ], + "imagecropauto": [ + "imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false", + "Crop an image automatically using one of the available modes" + ], + "imageflip": [ + "imageflip(GdImage $image, int $mode): bool", + "Flips an image using a given mode" + ], + "imagegetclip": [ + "imagegetclip(GdImage $image): array", + "Get the clipping rectangle" + ], + "imagegetinterpolation": [ + "imagegetinterpolation(GdImage $image): int", + "Get the interpolation method" + ], + "imageopenpolygon": [ + "imageopenpolygon(GdImage $image, array $points, int $color): bool", + "Draws an open polygon" + ], + "imagepalettetotruecolor": [ + "imagepalettetotruecolor(GdImage $image): bool", + "Converts a palette based image to true color" + ], + "imageresolution": [ + "imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool", + "Get or set the resolution of the image" + ], + "imagescale": [ + "imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false", + "Scale an image using the given new width and height" + ], + "imagesetclip": [ + "imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool", + "Set the clipping rectangle" + ], + "imagesetinterpolation": [ + "imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool", + "Set the interpolation method" + ], + "imagewebp": [ + "imagewebp(GdImage $image, resource|string|null $file = null, int $quality = -1): bool", + "Output a WebP image to browser or file" + ], + "imap_create": [ + "", + "Alias of imap_createmailbox()" + ], + "imap_fetchmime": [ + "imap_fetchmime(IMAP\\Connection $imap, int $message_num, string $section, int $flags = 0): string|false", + "Fetch MIME headers for a particular section of the message" + ], + "imap_fetchtext": [ + "imap_fetchtext()", + "Alias of imap_body()" + ], + "imap_header": [ + "imap_header()", + "Alias of imap_headerinfo()" + ], + "imap_listmailbox": [ + "imap_listmailbox()", + "Alias of imap_list()" + ], + "imap_listsubscribed": [ + "imap_listsubscribed()", + "Alias of imap_lsub()" + ], + "imap_rename": [ + "imap_rename()", + "Alias of imap_renamemailbox()" + ], + "imap_scan": [ + "imap_scan()", + "Alias of imap_listscan()" + ], + "imap_scanmailbox": [ + "imap_scanmailbox()", + "Alias of imap_listscan()" + ], + "ini_alter": [ + "ini_alter()", + "Alias of ini_set()" + ], + "intdiv": [ + "intdiv(int $num1, int $num2): int", + "Integer division" + ], + "is_double": [ + "is_double()", + "Alias of is_float()" + ], + "is_int": [ + "is_int(mixed $value): bool", + "Find whether the type of a variable is integer" + ], + "is_integer": [ + "is_integer()", + "Alias of is_int()" + ], + "is_iterable": [ + "is_iterable(mixed $value): bool", + "" + ], + "is_real": [ + "is_real()", + "Alias of is_float()" + ], + "is_soap_fault": [ + "is_soap_fault(mixed $object): bool", + "Checks if a SOAP call has failed" + ], + "is_tainted": [ + "is_tainted(string $string): bool", + "Checks whether a string is tainted" + ], + "is_writeable": [ + "is_writeable()", + "Alias of is_writable()" + ], + "json_last_error_msg": [ + "json_last_error_msg(): string", + "Returns the error string of the last json_encode() or json_decode() call" + ], + "key_exists": [ + "key_exists()", + "Alias of array_key_exists()" + ], + "lchown": [ + "lchown(string $filename, string|int $user): bool", + "Changes user ownership of symlink" + ], + "libxml_set_external_entity_loader": [ + "libxml_set_external_entity_loader(?callable $resolver_function): bool", + "Changes the default external entity loader" + ], + "mb_chr": [ + "mb_chr(int $codepoint, ?string $encoding = null): string|false", + "Return character by Unicode code point value" + ], + "mb_ereg_replace_callback": [ + "mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null", + "" + ], + "mb_ord": [ + "mb_ord(string $string, ?string $encoding = null): int|false", + "Get Unicode code point of character" + ], + "mb_scrub": [ + "mb_scrub(string $string, ?string $encoding = null): string", + "Description" + ], + "mb_str_split": [ + "mb_str_split(string $string, int $length = 1, ?string $encoding = null): array", + "Given a multibyte string, return an array of its characters" + ], + "memcache_debug": [ + "memcache_debug(bool $on_off): bool", + "Turn debug output on/off" + ], + "mysql_db_name": [ + "mysql_db_name(resource $result, int $row, mixed $field = NULL): string", + "Retrieves database name from the call to mysql_list_dbs()" + ], + "mysql_tablename": [ + "mysql_tablename(resource $result, int $i): string|false", + "Get table name of field" + ], + "mysql_xdevapi_expression": [ + "mysql_xdevapi\\expression(string $expression): object", + "Bind prepared statement variables as parameters" + ], + "mysql_xdevapi_getsession": [ + "mysql_xdevapi\\getSession(string $uri): mysql_xdevapi\\Session", + "Connect to a MySQL server" + ], + "mysqli_escape_string": [ + "mysqli_escape_string()", + "Alias of mysqli_real_escape_string()" + ], + "mysqli_execute": [ + "mysqli_execute()", + "Alias for mysqli_stmt_execute()" + ], + "mysqli_get_links_stats": [ + "mysqli_get_links_stats(): array", + "Return information about open and cached links" + ], + "mysqli_set_opt": [ + "mysqli_set_opt()", + "Alias of mysqli_options()" + ], + "ob_tidyhandler": [ + "ob_tidyhandler(string $input, int $mode = ?): string", + "ob_start callback function to repair the buffer" + ], + "odbc_do": [ + "odbc_do()", + "Alias of odbc_exec()" + ], + "odbc_field_precision": [ + "odbc_field_precision()", + "Alias of odbc_field_len()" + ], + "opcache_compile_file": [ + "opcache_compile_file(string $filename): bool", + "Compiles and caches a PHP script without executing it" + ], + "opcache_get_configuration": [ + "opcache_get_configuration(): array|false", + "Get configuration information about the cache" + ], + "opcache_get_status": [ + "opcache_get_status(bool $include_scripts = true): array|false", + "Get status information about the cache" + ], + "opcache_invalidate": [ + "opcache_invalidate(string $filename, bool $force = false): bool", + "Invalidates a cached script" + ], + "opcache_is_script_cached": [ + "opcache_is_script_cached(string $filename): bool", + "Tells whether a script is cached in OPCache" + ], + "opcache_reset": [ + "opcache_reset(): bool", + "Resets the contents of the opcode cache" + ], + "password_algos": [ + "password_algos(): array", + "Get available password hashing algorithm IDs" + ], + "password_get_info": [ + "password_get_info(string $hash): array", + "Returns information about the given hash" + ], + "password_hash": [ + "password_hash(string $password, string|int|null $algo, array $options = []): string", + "Creates a password hash" + ], + "password_needs_rehash": [ + "password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool", + "Checks if the given hash matches the given options" + ], + "password_verify": [ + "password_verify(string $password, string $hash): bool", + "Verifies that a password matches a hash" + ], + "pcntl_async_signals": [ + "pcntl_async_signals(?bool $enable = null): bool", + "Enable/disable asynchronous signal handling or return the old setting" + ], + "pcntl_errno": [ + "pcntl_errno()", + "Alias of pcntl_get_last_error()" + ], + "pcntl_get_last_error": [ + "pcntl_get_last_error(): int", + "Retrieve the error number set by the last pcntl function which failed" + ], + "pcntl_signal_get_handler": [ + "pcntl_signal_get_handler(int $signal): callable|int", + "Get the current handler for specified signal" + ], + "pcntl_sigwaitinfo": [ + "pcntl_sigwaitinfo(array $signals, array &$info = []): int|false", + "Waits for signals" + ], + "pcntl_strerror": [ + "pcntl_strerror(int $error_code): string", + "Retrieve the system error message associated with the given errno" + ], + "pg_connect_poll": [ + "pg_connect_poll(PgSql\\Connection $connection): int", + "" + ], + "pg_consume_input": [ + "pg_consume_input(PgSql\\Connection $connection): bool", + "Reads input on the connection" + ], + "pg_escape_identifier": [ + "pg_escape_identifier(PgSql\\Connection $connection = ?, string $data): string", + "" + ], + "pg_escape_literal": [ + "pg_escape_literal(PgSql\\Connection $connection = ?, string $data): string", + "" + ], + "pg_flush": [ + "pg_flush(PgSql\\Connection $connection): int|bool", + "Flush outbound query data on the connection" + ], + "pg_lo_truncate": [ + "pg_lo_truncate(PgSql\\Lob $lob, int $size): bool", + "" + ], + "pg_socket": [ + "pg_socket(PgSql\\Connection $connection): resource|false", + "" + ], + "pos": [ + "pos()", + "Alias of current()" + ], + "posix_errno": [ + "posix_errno()", + "Alias of posix_get_last_error()" + ], + "posix_setrlimit": [ + "posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool", + "Set system resource limits" + ], + "preg_last_error_msg": [ + "preg_last_error_msg(): string", + "Returns the error message of the last PCRE regex execution" + ], + "preg_replace_callback_array": [ + "preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, int &$count = null, int $flags = 0): string|array|null", + "Perform a regular expression search and replace using callbacks" + ], + "ps_translate": [ + "ps_translate(resource $psdoc, float $x, float $y): bool", + "Sets translation" + ], + "random_bytes": [ + "random_bytes(int $length): string", + "Generates cryptographically secure pseudo-random bytes" + ], + "random_int": [ + "random_int(int $min, int $max): int", + "Generates cryptographically secure pseudo-random integers" + ], + "read_exif_data": [ + "read_exif_data()", + "Alias of exif_read_data()" + ], + "recode": [ + "recode()", + "Alias of recode_string()" + ], + "session_abort": [ + "session_abort(): bool", + "Discard session array changes and finish session" + ], + "session_commit": [ + "session_commit()", + "Alias of session_write_close()" + ], + "session_create_id": [ + "session_create_id(string $prefix = \"\"): string|false", + "Create new session id" + ], + "session_gc": [ + "session_gc(): int|false", + "Perform session data garbage collection" + ], + "session_register_shutdown": [ + "session_register_shutdown(): void", + "Session shutdown function" + ], + "session_reset": [ + "session_reset(): bool", + "Re-initialize session array with original values" + ], + "session_status": [ + "session_status(): int", + "Returns the current session status" + ], + "set_file_buffer": [ + "set_file_buffer()", + "Alias of stream_set_write_buffer()" + ], + "show_source": [ + "show_source()", + "Alias of highlight_file()" + ], + "sizeof": [ + "sizeof()", + "Alias of count()" + ], + "snmp_set_oid_numeric_print": [ + "snmp_set_oid_numeric_print(int $format): bool", + "" + ], + "snmpwalkoid": [ + "snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false", + "" + ], + "socket_addrinfo_bind": [ + "socket_addrinfo_bind(AddressInfo $address): Socket|false", + "Create and bind to a socket from a given addrinfo" + ], + "socket_addrinfo_connect": [ + "socket_addrinfo_connect(AddressInfo $address): Socket|false", + "Create and connect to a socket from a given addrinfo" + ], + "socket_addrinfo_explain": [ + "socket_addrinfo_explain(AddressInfo $address): array", + "Get information about addrinfo" + ], + "socket_addrinfo_lookup": [ + "socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []): array|false", + "Get array with contents of getaddrinfo about the given hostname" + ], + "socket_cmsg_space": [ + "socket_cmsg_space(int $level, int $type, int $num = 0): ?int", + "Calculate message buffer size" + ], + "socket_export_stream": [ + "socket_export_stream(Socket $socket): resource|false", + "Export a socket into a stream that encapsulates a socket" + ], + "socket_get_status": [ + "socket_get_status()", + "Alias of stream_get_meta_data()" + ], + "socket_getopt": [ + "socket_getopt()", + "Alias of socket_get_option()" + ], + "socket_import_stream": [ + "socket_import_stream(resource $stream): Socket|false", + "Import a stream" + ], + "socket_recvmsg": [ + "socket_recvmsg(Socket $socket, array &$message, int $flags = 0): int|false", + "Read a message" + ], + "socket_sendmsg": [ + "socket_sendmsg(Socket $socket, array $message, int $flags = 0): int|false", + "Send a message" + ], + "socket_set_blocking": [ + "socket_set_blocking()", + "Alias of stream_set_blocking()" + ], + "socket_set_timeout": [ + "socket_set_timeout()", + "Alias of stream_set_timeout()" + ], + "socket_setopt": [ + "socket_setopt()", + "Alias of socket_set_option()" + ], + "socket_wsaprotocol_info_export": [ + "socket_wsaprotocol_info_export(Socket $socket, int $process_id): string|false", + "Exports the WSAPROTOCOL_INFO Structure" + ], + "socket_wsaprotocol_info_import": [ + "socket_wsaprotocol_info_import(string $info_id): Socket|false", + "Imports a Socket from another Process" + ], + "socket_wsaprotocol_info_release": [ + "socket_wsaprotocol_info_release(string $info_id): bool", + "Releases an exported WSAPROTOCOL_INFO Structure" + ], + "spl_object_id": [ + "spl_object_id(object $object): int", + "" + ], + "sqlsrv_begin_transaction": [ + "sqlsrv_begin_transaction(resource $conn): bool", + "Begins a database transaction" + ], + "sqlsrv_cancel": [ + "sqlsrv_cancel(resource $stmt): bool", + "Cancels a statement" + ], + "sqlsrv_client_info": [ + "sqlsrv_client_info(resource $conn): array", + "Returns information about the client and specified connection" + ], + "sqlsrv_close": [ + "sqlsrv_close(resource $conn): bool", + "Closes an open connection and releases resourses associated with the connection" + ], + "sqlsrv_commit": [ + "sqlsrv_commit(resource $conn): bool", + "Commits a transaction that was begun with sqlsrv_begin_transaction()" + ], + "sqlsrv_configure": [ + "sqlsrv_configure(string $setting, mixed $value): bool", + "Changes the driver error handling and logging configurations" + ], + "sqlsrv_connect": [ + "sqlsrv_connect(string $serverName, array $connectionInfo = ?): resource", + "Opens a connection to a Microsoft SQL Server database" + ], + "sqlsrv_errors": [ + "sqlsrv_errors(int $errorsOrWarnings = ?): mixed", + "Returns error and warning information about the last SQLSRV operation performed" + ], + "sqlsrv_execute": [ + "sqlsrv_execute(resource $stmt): bool", + "Executes a statement prepared with sqlsrv_prepare()" + ], + "sqlsrv_fetch_array": [ + "sqlsrv_fetch_array(resource $stmt, int $fetchType = ?, int $row = ?, int $offset = ?): array", + "Returns a row as an array" + ], + "sqlsrv_fetch_object": [ + "sqlsrv_fetch_object(resource $stmt, string $className = ?, array $ctorParams = ?, int $row = ?, int $offset = ?): mixed", + "Retrieves the next row of data in a result set as an object" + ], + "sqlsrv_fetch": [ + "sqlsrv_fetch(resource $stmt, int $row = ?, int $offset = ?): mixed", + "Makes the next row in a result set available for reading" + ], + "sqlsrv_field_metadata": [ + "sqlsrv_field_metadata(resource $stmt): mixed", + "" + ], + "sqlsrv_free_stmt": [ + "sqlsrv_free_stmt(resource $stmt): bool", + "Frees all resources for the specified statement" + ], + "sqlsrv_get_config": [ + "sqlsrv_get_config(string $setting): mixed", + "Returns the value of the specified configuration setting" + ], + "sqlsrv_get_field": [ + "sqlsrv_get_field(resource $stmt, int $fieldIndex, int $getAsType = ?): mixed", + "Gets field data from the currently selected row" + ], + "sqlsrv_has_rows": [ + "sqlsrv_has_rows(resource $stmt): bool", + "Indicates whether the specified statement has rows" + ], + "sqlsrv_next_result": [ + "sqlsrv_next_result(resource $stmt): mixed", + "Makes the next result of the specified statement active" + ], + "sqlsrv_num_fields": [ + "sqlsrv_num_fields(resource $stmt): mixed", + "Retrieves the number of fields (columns) on a statement" + ], + "sqlsrv_num_rows": [ + "sqlsrv_num_rows(resource $stmt): mixed", + "Retrieves the number of rows in a result set" + ], + "sqlsrv_prepare": [ + "sqlsrv_prepare(resource $conn, string $sql, array $params = ?, array $options = ?): mixed", + "Prepares a query for execution" + ], + "sqlsrv_query": [ + "sqlsrv_query(resource $conn, string $sql, array $params = ?, array $options = ?): mixed", + "Prepares and executes a query" + ], + "sqlsrv_rollback": [ + "sqlsrv_rollback(resource $conn): bool", + "" + ], + "sqlsrv_rows_affected": [ + "sqlsrv_rows_affected(resource $stmt): int|false", + "" + ], + "sqlsrv_send_stream_data": [ + "sqlsrv_send_stream_data(resource $stmt): bool", + "Sends data from parameter streams to the server" + ], + "sqlsrv_server_info": [ + "sqlsrv_server_info(resource $conn): array", + "Returns information about the server" + ], + "str_contains": [ + "str_contains(string $haystack, string $needle): bool", + "Determine if a string contains a given substring" + ], + "str_ends_with": [ + "str_ends_with(string $haystack, string $needle): bool", + "Checks if a string ends with a given substring" + ], + "str_starts_with": [ + "str_starts_with(string $haystack, string $needle): bool", + "Checks if a string starts with a given substring" + ], + "stream_isatty": [ + "stream_isatty(resource $stream): bool", + "Check if a stream is a TTY" + ], + "stream_notification_callback": [ + "stream_notification_callback(int $notification_code, int $severity, string $message, int $message_code, int $bytes_transferred, int $bytes_max): void", + "A callback function for the notification context parameter" + ], + "stream_register_wrapper": [ + "stream_register_wrapper()", + "Alias of stream_wrapper_register()" + ], + "stream_set_chunk_size": [ + "stream_set_chunk_size(resource $stream, int $size): int", + "Set the stream chunk size" + ], + "stream_set_read_buffer": [ + "stream_set_read_buffer(resource $stream, int $size): int", + "Set read file buffering on the given stream" + ], + "tcpwrap_check": [ + "tcpwrap_check(string $daemon, string $address, string $user = ?, bool $nodns = false): bool", + "Performs a tcpwrap check" + ], + "trait_exists": [ + "trait_exists(string $trait, bool $autoload = true): bool", + "Checks if the trait exists" + ], + "use_soap_error_handler": [ + "use_soap_error_handler(bool $enable = true): bool", + "Set whether to use the SOAP error handler" + ], + "user_error": [ + "user_error()", + "Alias of trigger_error()" + ], + "yaml_emit_file": [ + "yaml_emit_file(string $filename, mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): bool", + "Send the YAML representation of a value to a file" + ], + "yaml_emit": [ + "yaml_emit(mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): string", + "Returns the YAML representation of a value" + ], + "yaml_parse_file": [ + "yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed", + "Parse a YAML stream from a file" + ], + "yaml_parse_url": [ + "yaml_parse_url(string $url, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed", + "Parse a Yaml stream from a URL" + ], + "yaml_parse": [ + "yaml_parse(string $input, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed", + "Parse a YAML stream" + ], + "zlib_decode": [ + "zlib_decode(string $data, int $max_length = 0): string|false", + "Uncompress any raw/gzip/zlib encoded data" + ], + "zlib_encode": [ + "zlib_encode(string $data, int $encoding, int $level = -1): string|false", + "Compress data with the specified encoding" + ] +}; +var variableMap = { + "$_COOKIE": { + type: "array" + }, + "$_ENV": { + type: "array" + }, + "$_FILES": { + type: "array" + }, + "$_GET": { + type: "array" + }, + "$_POST": { + type: "array" + }, + "$_REQUEST": { + type: "array" + }, + "$_SERVER": { + type: "array", + value: { + "DOCUMENT_ROOT": 1, + "GATEWAY_INTERFACE": 1, + "HTTP_ACCEPT": 1, + "HTTP_ACCEPT_CHARSET": 1, + "HTTP_ACCEPT_ENCODING": 1, + "HTTP_ACCEPT_LANGUAGE": 1, + "HTTP_CONNECTION": 1, + "HTTP_HOST": 1, + "HTTP_REFERER": 1, + "HTTP_USER_AGENT": 1, + "PATH_TRANSLATED": 1, + "PHP_SELF": 1, + "QUERY_STRING": 1, + "REMOTE_ADDR": 1, + "REMOTE_PORT": 1, + "REQUEST_METHOD": 1, + "REQUEST_URI": 1, + "SCRIPT_FILENAME": 1, + "SCRIPT_NAME": 1, + "SERVER_ADMIN": 1, + "SERVER_NAME": 1, + "SERVER_PORT": 1, + "SERVER_PROTOCOL": 1, + "SERVER_SIGNATURE": 1, + "SERVER_SOFTWARE": 1, + "argv": 1, + "argc": 1 + } + }, + "$_SESSION": { + type: "array" + }, + "$GLOBALS": { + type: "array" + }, + '$argv': { + type: "array" + }, + '$argc': { + type: "int" + } +}; +function is(token, type) { + return token.type.lastIndexOf(type) > -1; +} +var PhpCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (token.type === 'support.php_tag' && token.value === ' 0) { + var prevToken = session.getTokenAt(pos.row, token.start); + if (prevToken.type === 'support.php_tag') { + return this.getTagCompletions(state, session, pos, prefix); + } + } + return this.getFunctionCompletions(state, session, pos, prefix); + } + if (is(token, "variable")) + return this.getVariableCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (token.type === 'string' && /(\$[\w]*)\[["']([^'"]*)$/i.test(line)) + return this.getArrayKeyCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return [{ + caption: 'php', + value: 'php', + meta: "php tag", + score: 1000000 + }, { + caption: '=', + value: '=', + meta: "php tag", + score: 1000000 + }]; + }; + this.getFunctionCompletions = function (state, session, pos, prefix) { + var functions = Object.keys(functionMap); + return functions.map(function (func) { + return { + caption: func, + snippet: func + '($0)', + meta: "php function", + score: 1000000, + docHTML: functionMap[func][1] + }; + }); + }; + this.getVariableCompletions = function (state, session, pos, prefix) { + var variables = Object.keys(variableMap); + return variables.map(function (variable) { + return { + caption: variable, + value: variable, + meta: "php variable", + score: 1000000 + }; + }); + }; + this.getArrayKeyCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var variable = line.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1]; + if (!variableMap[variable]) { + return []; + } + var keys = []; + if (variableMap[variable].type === 'array' && variableMap[variable].value) + keys = Object.keys(variableMap[variable].value); + return keys.map(function (key) { + return { + caption: key, + value: key, + meta: "php array key", + score: 1000000 + }; + }); + }; +}).call(PhpCompletions.prototype); +exports.PhpCompletions = PhpCompletions; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var CstyleFoldMode = require("./cstyle").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, CstyleFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.indentKeywords = { + "if": 1, + "while": 1, + "for": 1, + "foreach": 1, + "switch": 1, + "else": 0, + "elseif": 0, + "endif": -1, + "endwhile": -1, + "endfor": -1, + "endforeach": -1, + "endswitch": -1 + }; + this.foldingStartMarkerPhp = /(?:\s|^)(if|else|elseif|while|for|foreach|switch).*\:/i; + this.foldingStopMarkerPhp = /(?:\s|^)(endif|endwhile|endfor|endforeach|endswitch)\;/i; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarkerPhp.exec(line); + if (match) { + return this.phpBlock(session, row, match.index + 2); + } + var match = this.foldingStopMarkerPhp.exec(line); + if (match) { + return this.phpBlock(session, row, match.index + 2); + } + return this.getFoldWidgetRangeBase(session, foldStyle, row); + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarkerPhp.test(line); + var isEnd = this.foldingStopMarkerPhp.test(line); + if (isStart && !isEnd) { + var match = this.foldingStartMarkerPhp.exec(line); + var keyword = match && match[1].toLowerCase(); + if (keyword) { + var type = session.getTokenAt(row, match.index + 2).type; + if (type == "keyword") { + return "start"; + } + } + } + if (isEnd && foldStyle === "markbeginend") { + var match = this.foldingStopMarkerPhp.exec(line); + var keyword = match && match[1].toLowerCase(); + if (keyword) { + var type = session.getTokenAt(row, match.index + 2).type; + if (type == "keyword") { + return "end"; + } + } + } + return this.getFoldWidgetBase(session, foldStyle, row); + }; + this.phpBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + var val = token.value; + var stack = [val]; + var dir = this.indentKeywords[val]; + if (val === "else" || val === "elseif") { + dir = 1; + } + if (!dir) + return; + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while (token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = dir * this.indentKeywords[token.value]; + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0) { + stack.shift(); + if (!stack.length) + break; + if (level === 0) + stack.unshift(token.value); + } + } + if (!token) + return null; + if (tokenRange) + return stream.getCurrentTokenRange(); + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/php","ace/unicode","ace/mode/folding/mixed","ace/mode/folding/html","ace/mode/folding/cstyle","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; +var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var PhpCompletions = require("./php_completions").PhpCompletions; +var PhpFoldMode = require("./folding/php").FoldMode; +var unicode = require("../unicode"); +var MixedFoldMode = require("./folding/mixed").FoldMode; +var HtmlFoldMode = require("./folding/html").FoldMode; +var CstyleFoldMode = require("./folding/cstyle").FoldMode; +var HtmlMode = require("./html").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var PhpMode = function (opts) { + this.HighlightRules = PhpLangHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.$completer = new PhpCompletions(); + this.foldingRules = new MixedFoldMode(new HtmlFoldMode(), { + "js-": new CstyleFoldMode(), + "css-": new CstyleFoldMode(), + "php-": new PhpFoldMode() + }); +}; +oop.inherits(PhpMode, TextMode); +(function () { + this.tokenRe = new RegExp("^[" + unicode.wordChars + "_]+", "g"); + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "_]|\\s])+", "g"); + this.lineCommentStart = ["//", "#"]; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState != "doc-start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.$id = "ace/mode/php-inline"; +}).call(PhpMode.prototype); +var Mode = function (opts) { + if (opts && opts.inline) { + var mode = new PhpMode(); + mode.createWorker = this.createWorker; + mode.inlinePhp = true; + return mode; + } + HtmlMode.call(this); + this.HighlightRules = PhpHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "php-": PhpMode + }); + this.foldingRules = new MixedFoldMode(new HtmlFoldMode(), { + "js-": new CstyleFoldMode(), + "css-": new CstyleFoldMode(), + "php-": new PhpFoldMode() + }); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker"); + worker.attachToDocument(session.getDocument()); + if (this.inlinePhp) + worker.call("setOptions", [{ inline: true }]); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/php"; + this.snippetFileId = "ace/snippets/php"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/php"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-php_laravel_blade.js b/ui/base1/ace/mode-php_laravel_blade.js new file mode 100644 index 0000000..7700e48 --- /dev/null +++ b/ui/base1/ace/mode-php_laravel_blade.js @@ -0,0 +1,14259 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var PhpLangHighlightRules = function () { + var docComment = DocCommentHighlightRules; + var builtinFunctions = lang.arrayToMap('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|\ +aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|\ +apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|\ +apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|\ +apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|\ +apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|\ +apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|\ +apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_column|array_combine|\ +array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|\ +array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|\ +array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|\ +array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|\ +array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|\ +array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|\ +atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|\ +bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|\ +bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|\ +bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|\ +bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|\ +bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|\ +cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|\ +cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|\ +cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|\ +cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|\ +cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|\ +cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|\ +cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|\ +cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|\ +cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|\ +cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|\ +cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|\ +cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|\ +cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|\ +cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|\ +cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|\ +cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|\ +cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|\ +cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|\ +cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|\ +cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|\ +cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|\ +cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|\ +cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|\ +cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|\ +cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|\ +cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|\ +cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|\ +cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|\ +chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|\ +class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|\ +classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|\ +com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|\ +com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|\ +convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|\ +counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|\ +crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|\ +ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|\ +cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|\ +cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|\ +cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|\ +cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|\ +cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|\ +cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|\ +cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|\ +cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|\ +cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|\ +cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|\ +cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|\ +curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|\ +curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|\ +curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|\ +date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|\ +date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|\ +date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|\ +dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|\ +db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|\ +db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|\ +db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|\ +db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|\ +db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|\ +db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|\ +dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|\ +dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|\ +dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|\ +dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|\ +dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|\ +dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|\ +dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|\ +dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|\ +dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|\ +define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|\ +dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|\ +dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|\ +domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|\ +domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|\ +domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|\ +domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|\ +domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|\ +domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|\ +domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|\ +domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|\ +domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|\ +domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|\ +domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|\ +domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|\ +domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|\ +domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|\ +domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|\ +domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|\ +domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|\ +enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|\ +enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|\ +enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|\ +enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|\ +eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|\ +event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|\ +event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|\ +event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|\ +event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|\ +expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|\ +fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|\ +fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|\ +fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|\ +fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|\ +fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|\ +fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|\ +fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|\ +fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|\ +fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|\ +fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|\ +fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|\ +fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|\ +fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|\ +file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|\ +filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|\ +filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|\ +finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|\ +forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|\ +ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|\ +ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|\ +ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|\ +func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|\ +gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|\ +geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|\ +geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|\ +get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|\ +get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|\ +get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|\ +get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|\ +getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|\ +gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|\ +getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|\ +getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|\ +gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|\ +gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|\ +gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|\ +gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|\ +gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|\ +gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|\ +gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|\ +grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|\ +gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|\ +gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|\ +gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|\ +gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|\ +gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|\ +gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|\ +gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|\ +gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|\ +gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|\ +gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|\ +halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|\ +haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|\ +harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|\ +harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|\ +harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|\ +harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|\ +harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|\ +harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|\ +harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|\ +harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|\ +haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|\ +harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|\ +harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|\ +haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|\ +haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|\ +harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|\ +harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|\ +harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|\ +harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|\ +harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|\ +harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|\ +harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|\ +harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|\ +harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|\ +harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|\ +harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|\ +harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|\ +harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|\ +harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|\ +hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|\ +header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|\ +html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|\ +http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|\ +http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|\ +http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|\ +http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|\ +http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|\ +http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|\ +http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|\ +http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|\ +httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|\ +httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|\ +httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|\ +httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|\ +httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|\ +httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|\ +httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|\ +httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|\ +httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|\ +httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|\ +httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|\ +httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|\ +httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|\ +httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|\ +httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|\ +httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|\ +httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|\ +httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|\ +httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|\ +httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|\ +httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|\ +httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|\ +httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|\ +httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|\ +httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|\ +httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|\ +httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|\ +httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|\ +httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|\ +hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|\ +hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|\ +hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|\ +hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|\ +hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|\ +hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|\ +hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|\ +hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|\ +hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|\ +hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|\ +hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|\ +hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|\ +hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|\ +hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|\ +ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|\ +ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|\ +ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|\ +ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|\ +ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|\ +ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|\ +ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|\ +iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|\ +id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|\ +idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|\ +ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|\ +ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|\ +ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|\ +ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|\ +iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|\ +iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|\ +iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|\ +imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|\ +imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|\ +imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|\ +imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|\ +imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|\ +imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|\ +imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|\ +imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|\ +imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|\ +imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|\ +imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|\ +imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|\ +imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|\ +imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|\ +imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|\ +imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|\ +imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|\ +imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|\ +imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|\ +imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|\ +imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|\ +imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|\ +imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|\ +imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|\ +imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|\ +imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|\ +imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|\ +imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|\ +imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|\ +imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|\ +imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|\ +imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|\ +imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|\ +imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|\ +imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|\ +imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|\ +imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|\ +imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|\ +imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|\ +imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|\ +imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|\ +imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|\ +imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|\ +imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|\ +imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|\ +imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|\ +imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|\ +imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|\ +imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|\ +imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|\ +imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|\ +imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|\ +imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|\ +imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|\ +imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|\ +imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|\ +imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|\ +imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|\ +imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|\ +imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|\ +imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|\ +imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|\ +imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|\ +imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|\ +imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|\ +imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|\ +imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|\ +imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|\ +imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|\ +imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|\ +imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|\ +imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|\ +imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|\ +imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|\ +imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|\ +imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|\ +imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|\ +imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|\ +imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|\ +imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|\ +imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|\ +imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|\ +imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|\ +imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|\ +imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|\ +imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|\ +imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|\ +imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|\ +imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|\ +imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|\ +imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|\ +imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|\ +imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|\ +imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|\ +imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|\ +imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|\ +imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|\ +imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|\ +imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|\ +imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|\ +imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|\ +imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|\ +imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|\ +imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|\ +imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|\ +imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|\ +imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|\ +imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|\ +imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|\ +imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|\ +include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|\ +ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|\ +ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|\ +ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|\ +ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|\ +ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|\ +inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|\ +intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|\ +is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|\ +is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|\ +iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|\ +iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|\ +jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|\ +json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|\ +kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|\ +kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|\ +ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|\ +ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|\ +ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|\ +ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|\ +ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|\ +libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|\ +limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|\ +lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|\ +m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|\ +m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|\ +m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|\ +m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|\ +mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|\ +mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|\ +mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|\ +maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|\ +maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|\ +maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|\ +maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|\ +maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|\ +maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|\ +maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|\ +maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|\ +maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|\ +maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|\ +maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|\ +maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|\ +maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|\ +maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|\ +maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|\ +mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|\ +mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|\ +mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|\ +mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|\ +mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|\ +mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|\ +mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|\ +mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|\ +mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|\ +mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|\ +mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|\ +mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|\ +mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|\ +mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|\ +mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|\ +ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|\ +mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|\ +mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|\ +mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|\ +mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|\ +mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|\ +msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|\ +msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|\ +msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|\ +msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|\ +msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|\ +msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|\ +msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|\ +mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|\ +mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|\ +mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|\ +mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|\ +mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|\ +mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|\ +mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|\ +mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|\ +mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|\ +mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|\ +mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|\ +mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|\ +mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|\ +mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|\ +mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|\ +mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|\ +mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|\ +mysqli_free_result|mysqli_get_charset|mysqli_get_client_info|mysqli_get_client_stats|mysqli_get_client_version|mysqli_get_connection_stats|\ +mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|\ +mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|\ +mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|\ +mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|\ +mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|\ +mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|\ +mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|\ +mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|\ +mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|\ +mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|\ +mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|\ +mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|\ +mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|\ +mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|\ +ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|\ +ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|\ +ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|\ +ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|\ +ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|\ +ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|\ +ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|\ +ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|\ +ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|\ +ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|\ +ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|\ +ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|\ +ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|\ +ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|\ +ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|\ +ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|\ +ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|\ +ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|\ +ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|\ +ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|\ +ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|\ +ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|\ +newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|\ +newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|\ +newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|\ +newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|\ +newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|\ +newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|\ +newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|\ +newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|\ +newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|\ +newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|\ +newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|\ +newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|\ +newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|\ +newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|\ +newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|\ +newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|\ +newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|\ +newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|\ +newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|\ +notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|\ +notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|\ +numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|\ +ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|\ +ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|\ +oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|\ +oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|\ +oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|\ +oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|\ +oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|\ +oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|\ +oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|\ +oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|\ +oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|\ +ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|\ +ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|\ +ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|\ +ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|\ +ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|\ +octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|\ +odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|\ +odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|\ +odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|\ +odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|\ +odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|\ +openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|\ +openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|\ +openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|\ +openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|\ +openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|\ +openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|\ +openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|\ +openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|\ +openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|\ +openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|\ +openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|\ +outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|\ +ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|\ +ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|\ +ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|\ +parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|\ +pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|\ +pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|\ +pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|\ +pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|\ +pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|\ +pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|\ +pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|\ +pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|\ +pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|\ +pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|\ +pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|\ +pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|\ +pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|\ +pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|\ +pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|\ +pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|\ +pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|\ +pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|\ +pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|\ +pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|\ +pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|\ +pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|\ +pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|\ +pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|\ +pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|\ +pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|\ +pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|\ +pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|\ +pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|\ +pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|\ +pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|\ +pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|\ +pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|\ +pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|\ +pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|\ +php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|\ +png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|\ +posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|\ +posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|\ +posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|\ +preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|\ +printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|\ +printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|\ +printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|\ +printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|\ +printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|\ +ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|\ +ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|\ +ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|\ +ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|\ +ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|\ +ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|\ +ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|\ +ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|\ +ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|\ +pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|\ +pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|\ +pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|\ +px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|\ +px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|\ +px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|\ +radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|\ +radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|\ +radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|\ +radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|\ +rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|\ +readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|\ +readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|\ +readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|\ +recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|\ +recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|\ +reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|\ +regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|\ +resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|\ +rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|\ +rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|\ +runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|\ +runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|\ +runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|\ +runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|\ +samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|\ +samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|\ +sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|\ +sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|\ +sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|\ +sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|\ +sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|\ +sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|\ +sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|\ +sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|\ +sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|\ +sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|\ +sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|\ +sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|\ +sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|\ +sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|\ +sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|\ +sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|\ +sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|\ +sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|\ +sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|\ +sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|\ +session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|\ +session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|\ +session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|\ +session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|\ +set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|\ +setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|\ +shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|\ +similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|\ +snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|\ +snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|\ +snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|\ +soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|\ +socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|\ +socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|\ +socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|\ +solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|\ +solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|\ +solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|\ +spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|\ +splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|\ +splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|\ +sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|\ +sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|\ +sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|\ +sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|\ +sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|\ +sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|\ +ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|\ +ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|\ +ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|\ +ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|\ +stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|\ +stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|\ +stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|\ +stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|\ +stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|\ +stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|\ +stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|\ +stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|\ +stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|\ +stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|\ +stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|\ +stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|\ +str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|\ +stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|\ +stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|\ +stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|\ +stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|\ +stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|\ +stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|\ +stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|\ +stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|\ +stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|\ +strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|\ +svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|\ +svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|\ +svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|\ +svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|\ +svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|\ +svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|\ +swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|\ +swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|\ +swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|\ +swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|\ +swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|\ +swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|\ +swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|\ +swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|\ +swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|\ +swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|\ +swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|\ +swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|\ +swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|\ +sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|\ +sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|\ +sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|\ +sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|\ +tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|\ +tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|\ +time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|\ +timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|\ +tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|\ +ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|\ +udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|\ +udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|\ +uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|\ +urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|\ +variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|\ +variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|\ +variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|\ +vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|\ +vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|\ +vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|\ +w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|\ +wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|\ +win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|\ +win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|\ +wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|\ +wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|\ +wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|\ +wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|\ +xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|\ +xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|\ +xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|\ +xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|\ +xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|\ +xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|\ +xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|\ +xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|\ +xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|\ +xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|\ +xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|\ +xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|\ +xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|\ +xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|\ +xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|\ +xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|\ +xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|\ +xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|\ +xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|\ +xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|\ +xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|\ +xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|\ +yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|\ +yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|\ +yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|\ +yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|\ +zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|\ +ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|\ +ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|\ +ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|\ +ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|\ +ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|\ +ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type'.split('|')); + var keywords = lang.arrayToMap('abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|\ +endif|endswitch|endwhile|extends|final|finally|for|foreach|function|global|goto|if|implements|instanceof|insteadof|interface|namespace|new|or|private|protected|\ +public|static|switch|throw|trait|try|use|var|while|xor|yield'.split('|')); + var languageConstructs = lang.arrayToMap(('__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|')); + var builtinConstants = lang.arrayToMap(('true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__').split('|')); + var builtinVariables = lang.arrayToMap('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|\ +$http_response_header|$argc|$argv'.split('|')); + var builtinFunctionsDeprecated = lang.arrayToMap('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|\ +com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|\ +cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|\ +hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|\ +maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|\ +mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|\ +mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|\ +mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|\ +mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|\ +mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|\ +mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|\ +ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|\ +ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|\ +ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|\ +ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|\ +ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|\ +PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|\ +PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|\ +PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|\ +PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|\ +PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|\ +PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|\ +PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|\ +PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|\ +px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister\ +set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|\ +sql_regcase'.split('|')); + var keywordsDeprecated = lang.arrayToMap(('cfunction|old_function').split('|')); + var futureReserved = lang.arrayToMap([]); + this.$rules = { + "start": [ + { + token: "comment", + regex: /(?:#|\/\/)(?:[^?]|\?[^>])*/ + }, + docComment.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)" + }, { + token: "string", // " string start + regex: '"', + next: "qqstring" + }, { + token: "string", // ' string start + regex: "'", + next: "qstring" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language", // constants + regex: "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" + + "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" + + "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" + + "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" + + "VERSION))|__COMPILER_HALT_OFFSET__)\\b" + }, { + token: ["keyword", "text", "support.class"], + regex: "\\b(new)(\\s+)(\\w+)" + }, { + token: ["support.class", "keyword.operator"], + regex: "\\b(\\w+)(::)" + }, { + token: "constant.language", // constants + regex: "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" + + "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" + + "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" + + "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" + + "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" + + "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" + + "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" + + "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" + + "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" + + "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" + + "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" + + "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" + + "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" + + "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b" + }, { + token: function (value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (futureReserved.hasOwnProperty(value)) + return "invalid.illegal"; + else if (builtinFunctions.hasOwnProperty(value)) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else if (value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)) + return "variable"; + return "identifier"; + }, + regex: /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ + }, { + onMatch: function (value, currentSate, state) { + value = value.substr(3); + if (value[0] == "'" || value[0] == '"') + value = value.slice(1, -1); + state.unshift(this.next, value); + return "markup.list"; + }, + regex: /<<<(?:\w+|'\w+'|"\w+")$/, + next: "heredoc" + }, { + token: "keyword.operator", + regex: "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|\\.=|=|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "punctuation.operator", + regex: /[,;]/ + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "heredoc": [ + { + onMatch: function (value, currentState, stack) { + if (stack[1] != value) { + this.next = ""; + return "string"; + } + stack.shift(); + stack.shift(); + this.next = this.nextState; + return "markup.list"; + }, + regex: "^\\w+(?=;?$)", + nextState: "start" + }, { + token: "string", + regex: ".*" + } + ], + "comment": [ + { + token: "comment", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, { + token: "variable", + regex: /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/ + }, { + token: "variable", + regex: /\$\{[^"\}]+\}?/ // this is wrong but ok for now + }, + { token: "string", regex: '"', next: "start" }, + { defaultToken: "string" } + ], + "qstring": [ + { token: "constant.language.escape", regex: /\\['\\]/ }, + { token: "string", regex: "'", next: "start" }, + { defaultToken: "string" } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(PhpLangHighlightRules, TextHighlightRules); +var PhpHighlightRules = function () { + HtmlHighlightRules.call(this); + var startRules = [ + { + token: "support.php_tag", // php open tag + regex: "<\\?(?:php|=)?", + push: "php-start" + } + ]; + var endRules = [ + { + token: "support.php_tag", // php close tag + regex: "\\?>", + next: "pop" + } + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]); + this.normalizeRules(); +}; +oop.inherits(PhpHighlightRules, HtmlHighlightRules); +exports.PhpHighlightRules = PhpHighlightRules; +exports.PhpLangHighlightRules = PhpLangHighlightRules; + +}); + +define("ace/mode/php_laravel_blade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/php_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; +var PHPLaravelBladeHighlightRules = function () { + PhpHighlightRules.call(this); + var bladeRules = { + start: [{ + include: "bladeComments" + }, { + include: "directives" + }, { + include: "parenthesis" + }], + comments: [{ + include: "bladeComments" + }, { + token: "punctuation.definition.comment.blade", + regex: "(\\/\\/(.)*)|(\\#(.)*)" + }, { + token: "punctuation.definition.comment.begin.php", + regex: "(?:\\/\\*)", + push: [{ + token: "punctuation.definition.comment.end.php", + regex: "(?:\\*\\/)", + next: "pop" + }, { + defaultToken: "comment.block.blade" + }] + }], + bladeComments: [{ + token: "punctuation.definition.comment.begin.blade", + regex: "(?:\\{\\{\\-\\-)", + push: [{ + token: "punctuation.definition.comment.end.blade", + regex: "(?:\\-\\-\\}\\})", + next: "pop" + }, { + defaultToken: "comment.block.blade" + }] + }], + parenthesis: [{ + token: "parenthesis.begin.blade", + regex: "\\(", + push: [{ + token: "parenthesis.end.blade", + regex: "\\)", + next: "pop" + }, { + include: "strings" + }, { + include: "variables" + }, { + include: "lang" + }, { + include: "parenthesis" + }, { + include: "comments" + }, { + defaultToken: "source.blade" + }] + }], + directives: [{ + token: ["directive.declaration.blade", "keyword.directives.blade"], + regex: "(@)(endunless|endisset|endempty|endauth|endguest|endcomponent|endslot|endalert|endverbatim|endsection|show|php|endphp|endpush|endprepend|endenv|endforelse|isset|empty|component|slot|alert|json|verbatim|section|auth|guest|hasSection|forelse|includeIf|includeWhen|includeFirst|each|push|stack|prepend|inject|env|elseenv|unless|yield|extends|parent|include|acfrepeater|block|can|cannot|choice|debug|elsecan|elsecannot|embed|hipchat|lang|layout|macro|macrodef|minify|partial|render|servers|set|slack|story|task|unset|wpposts|acfend|after|append|breakpoint|endafter|endcan|endcannot|endembed|endmacro|endmarkdown|endminify|endpartial|endsetup|endstory|endtask|endunless|markdown|overwrite|setup|stop|wpempty|wpend|wpquery)" + }, { + token: ["directive.declaration.blade", "keyword.control.blade"], + regex: "(@)(if|else|elseif|endif|foreach|endforeach|switch|case|break|default|endswitch|for|endfor|while|endwhile|continue)" + }, { + token: ["directive.ignore.blade", "injections.begin.blade"], + regex: "(@?)(\\{\\{)", + push: [{ + token: "injections.end.blade", + regex: "\\}\\}", + next: "pop" + }, { + include: "strings" + }, { + include: "variables" + }, { + include: "comments" + }, { + defaultToken: "source.blade" + }] + }, { + token: "injections.unescaped.begin.blade", + regex: "\\{\\!\\!", + push: [{ + token: "injections.unescaped.end.blade", + regex: "\\!\\!\\}", + next: "pop" + }, { + include: "strings" + }, { + include: "variables" + }, { + defaultToken: "source.blade" + }] + } + ], + lang: [{ + token: "keyword.operator.blade", + regex: "(?:!=|!|<=|>=|<|>|===|==|=|\\+\\+|\\;|\\,|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod|as)\\b" + }, { + token: "constant.language.blade", + regex: "\\b(?:TRUE|FALSE|true|false)\\b" + }], + strings: [{ + token: "punctuation.definition.string.begin.blade", + regex: "\"", + push: [{ + token: "punctuation.definition.string.end.blade", + regex: "\"", + next: "pop" + }, { + token: "string.character.escape.blade", + regex: "\\\\." + }, { + defaultToken: "string.quoted.single.blade" + }] + }, { + token: "punctuation.definition.string.begin.blade", + regex: "'", + push: [{ + token: "punctuation.definition.string.end.blade", + regex: "'", + next: "pop" + }, { + token: "string.character.escape.blade", + regex: "\\\\." + }, { + defaultToken: "string.quoted.double.blade" + }] + }], + variables: [{ + token: "variable.blade", + regex: "\\$([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, { + token: ["keyword.operator.blade", "constant.other.property.blade"], + regex: "(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, { + token: ["keyword.operator.blade", + "meta.function-call.object.blade", + "punctuation.definition.variable.blade", + "variable.blade", + "punctuation.definition.variable.blade" + ], + regex: "(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))" + }] + }; + var bladeStart = bladeRules.start; + for (var rule in this.$rules) { + this.$rules[rule].unshift.apply(this.$rules[rule], bladeStart); + } + Object.keys(bladeRules).forEach(function (x) { + if (!this.$rules[x]) + this.$rules[x] = bladeRules[x]; + }, this); + this.normalizeRules(); +}; +oop.inherits(PHPLaravelBladeHighlightRules, PhpHighlightRules); +exports.PHPLaravelBladeHighlightRules = PHPLaravelBladeHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/php_completions",["require","exports","module"], function(require, exports, module){/** + * ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** + */ +"use strict"; +var functionMap = { + "abs": [ + "int abs(int number)", + "Return the absolute value of the number" + ], + "acos": [ + "float acos(float number)", + "Return the arc cosine of the number in radians" + ], + "acosh": [ + "float acosh(float number)", + "Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number" + ], + "addGlob": [ + "bool addGlob(string pattern[,int flags [, array options]])", + "Add files matching the glob pattern. See php's glob for the pattern syntax." + ], + "addPattern": [ + "bool addPattern(string pattern[, string path [, array options]])", + "Add files matching the pcre pattern. See php's pcre for the pattern syntax." + ], + "addcslashes": [ + "string addcslashes(string str, string charlist)", + "Escapes all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\\n', '\\r', '\\t' etc...)" + ], + "addslashes": [ + "string addslashes(string str)", + "Escapes single quote, double quotes and backslash characters in a string with backslashes" + ], + "apache_child_terminate": [ + "bool apache_child_terminate()", + "Terminate apache process after this request" + ], + "apache_get_modules": [ + "array apache_get_modules()", + "Get a list of loaded Apache modules" + ], + "apache_get_version": [ + "string apache_get_version()", + "Fetch Apache version" + ], + "apache_getenv": [ + "bool apache_getenv(string variable [, bool walk_to_top])", + "Get an Apache subprocess_env variable" + ], + "apache_lookup_uri": [ + "object apache_lookup_uri(string URI)", + "Perform a partial request of the given URI to obtain information about it" + ], + "apache_note": [ + "string apache_note(string note_name [, string note_value])", + "Get and set Apache request notes" + ], + "apache_request_auth_name": [ + "string apache_request_auth_name()", + "" + ], + "apache_request_auth_type": [ + "string apache_request_auth_type()", + "" + ], + "apache_request_discard_request_body": [ + "long apache_request_discard_request_body()", + "" + ], + "apache_request_err_headers_out": [ + "array apache_request_err_headers_out([{string name|array list} [, string value [, bool replace = false]]])", + "* fetch all headers that go out in case of an error or a subrequest" + ], + "apache_request_headers": [ + "array apache_request_headers()", + "Fetch all HTTP request headers" + ], + "apache_request_headers_in": [ + "array apache_request_headers_in()", + "* fetch all incoming request headers" + ], + "apache_request_headers_out": [ + "array apache_request_headers_out([{string name|array list} [, string value [, bool replace = false]]])", + "* fetch all outgoing request headers" + ], + "apache_request_is_initial_req": [ + "bool apache_request_is_initial_req()", + "" + ], + "apache_request_log_error": [ + "bool apache_request_log_error(string message, [long facility])", + "" + ], + "apache_request_meets_conditions": [ + "long apache_request_meets_conditions()", + "" + ], + "apache_request_remote_host": [ + "int apache_request_remote_host([int type])", + "" + ], + "apache_request_run": [ + "long apache_request_run()", + "This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status." + ], + "apache_request_satisfies": [ + "long apache_request_satisfies()", + "" + ], + "apache_request_server_port": [ + "int apache_request_server_port()", + "" + ], + "apache_request_set_etag": [ + "void apache_request_set_etag()", + "" + ], + "apache_request_set_last_modified": [ + "void apache_request_set_last_modified()", + "" + ], + "apache_request_some_auth_required": [ + "bool apache_request_some_auth_required()", + "" + ], + "apache_request_sub_req_lookup_file": [ + "object apache_request_sub_req_lookup_file(string file)", + "Returns sub-request for the specified file. You would need to run it yourself with run()." + ], + "apache_request_sub_req_lookup_uri": [ + "object apache_request_sub_req_lookup_uri(string uri)", + "Returns sub-request for the specified uri. You would need to run it yourself with run()" + ], + "apache_request_sub_req_method_uri": [ + "object apache_request_sub_req_method_uri(string method, string uri)", + "Returns sub-request for the specified file. You would need to run it yourself with run()." + ], + "apache_request_update_mtime": [ + "long apache_request_update_mtime([int dependency_mtime])", + "" + ], + "apache_reset_timeout": [ + "bool apache_reset_timeout()", + "Reset the Apache write timer" + ], + "apache_response_headers": [ + "array apache_response_headers()", + "Fetch all HTTP response headers" + ], + "apache_setenv": [ + "bool apache_setenv(string variable, string value [, bool walk_to_top])", + "Set an Apache subprocess_env variable" + ], + "array_change_key_case": [ + "array array_change_key_case(array input [, int case=CASE_LOWER])", + "Retuns an array with all string keys lowercased [or uppercased]" + ], + "array_chunk": [ + "array array_chunk(array input, int size [, bool preserve_keys])", + "Split array into chunks" + ], + "array_combine": [ + "array array_combine(array keys, array values)", + "Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values" + ], + "array_count_values": [ + "array array_count_values(array input)", + "Return the value as key and the frequency of that value in input as value" + ], + "array_diff": [ + "array array_diff(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are not present in any of the others arguments." + ], + "array_diff_assoc": [ + "array array_diff_assoc(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal" + ], + "array_diff_key": [ + "array array_diff_key(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have keys which are not present in any of the others arguments. This function is like array_diff() but works on the keys instead of the values. The associativity is preserved." + ], + "array_diff_uassoc": [ + "array array_diff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Elements are compared by user supplied function." + ], + "array_diff_ukey": [ + "array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)", + "Returns the entries of arr1 that have keys which are not present in any of the others arguments. User supplied function is used for comparing the keys. This function is like array_udiff() but works on the keys instead of the values. The associativity is preserved." + ], + "array_fill": [ + "array array_fill(int start_key, int num, mixed val)", + "Create an array containing num elements starting with index start_key each initialized to val" + ], + "array_fill_keys": [ + "array array_fill_keys(array keys, mixed val)", + "Create an array using the elements of the first parameter as keys each initialized to val" + ], + "array_filter": [ + "array array_filter(array input [, mixed callback])", + "Filters elements from the array via the callback." + ], + "array_flip": [ + "array array_flip(array input)", + "Return array with key <-> value flipped" + ], + "array_intersect": [ + "array array_intersect(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are present in all the other arguments" + ], + "array_intersect_assoc": [ + "array array_intersect_assoc(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check" + ], + "array_intersect_key": [ + "array array_intersect_key(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). Equivalent of array_intersect_assoc() but does not do compare of the data." + ], + "array_intersect_uassoc": [ + "array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check and they are compared by using an user-supplied callback." + ], + "array_intersect_ukey": [ + "array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)", + "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). The comparison of the keys is performed by a user supplied function. Equivalent of array_intersect_uassoc() but does not do compare of the data." + ], + "array_key_exists": [ + "bool array_key_exists(mixed key, array search)", + "Checks if the given key or index exists in the array" + ], + "array_keys": [ + "array array_keys(array input [, mixed search_value[, bool strict]])", + "Return just the keys from the input array, optionally only for the specified search_value" + ], + "array_key_first": [ + "mixed array_key_first(array arr)", + "Returns the first key of arr if the array is not empty; NULL otherwise" + ], + "array_key_last": [ + "mixed array_key_last(array arr)", + "Returns the last key of arr if the array is not empty; NULL otherwise" + ], + "array_map": [ + "array array_map(mixed callback, array input1 [, array input2 ,...])", + "Applies the callback to the elements in given arrays." + ], + "array_merge": [ + "array array_merge(array arr1, array arr2 [, array ...])", + "Merges elements from passed arrays into one array" + ], + "array_merge_recursive": [ + "array array_merge_recursive(array arr1, array arr2 [, array ...])", + "Recursively merges elements from passed arrays into one array" + ], + "array_multisort": [ + "bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])", + "Sort multiple arrays at once similar to how ORDER BY clause works in SQL" + ], + "array_pad": [ + "array array_pad(array input, int pad_size, mixed pad_value)", + "Returns a copy of input array padded with pad_value to size pad_size" + ], + "array_pop": [ + "mixed array_pop(array stack)", + "Pops an element off the end of the array" + ], + "array_product": [ + "mixed array_product(array input)", + "Returns the product of the array entries" + ], + "array_push": [ + "int array_push(array stack, mixed var [, mixed ...])", + "Pushes elements onto the end of the array" + ], + "array_rand": [ + "mixed array_rand(array input [, int num_req])", + "Return key/keys for random entry/entries in the array" + ], + "array_reduce": [ + "mixed array_reduce(array input, mixed callback [, mixed initial])", + "Iteratively reduce the array to a single value via the callback." + ], + "array_replace": [ + "array array_replace(array arr1, array arr2 [, array ...])", + "Replaces elements from passed arrays into one array" + ], + "array_replace_recursive": [ + "array array_replace_recursive(array arr1, array arr2 [, array ...])", + "Recursively replaces elements from passed arrays into one array" + ], + "array_reverse": [ + "array array_reverse(array input [, bool preserve keys])", + "Return input as a new array with the order of the entries reversed" + ], + "array_search": [ + "mixed array_search(mixed needle, array haystack [, bool strict])", + "Searches the array for a given value and returns the corresponding key if successful" + ], + "array_shift": [ + "mixed array_shift(array stack)", + "Pops an element off the beginning of the array" + ], + "array_slice": [ + "array array_slice(array input, int offset [, int length [, bool preserve_keys]])", + "Returns elements specified by offset and length" + ], + "array_splice": [ + "array array_splice(array input, int offset [, int length [, array replacement]])", + "Removes the elements designated by offset and length and replace them with supplied array" + ], + "array_sum": [ + "mixed array_sum(array input)", + "Returns the sum of the array entries" + ], + "array_udiff": [ + "array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function." + ], + "array_udiff_assoc": [ + "array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function." + ], + "array_udiff_uassoc": [ + "array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions." + ], + "array_uintersect": [ + "array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback." + ], + "array_uintersect_assoc": [ + "array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Data is compared by using an user-supplied callback." + ], + "array_uintersect_uassoc": [ + "array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks." + ], + "array_unique": [ + "array array_unique(array input [, int sort_flags])", + "Removes duplicate values from array" + ], + "array_unshift": [ + "int array_unshift(array stack, mixed var [, mixed ...])", + "Pushes elements onto the beginning of the array" + ], + "array_values": [ + "array array_values(array input)", + "Return just the values from the input array" + ], + "array_walk": [ + "bool array_walk(array input, string funcname [, mixed userdata])", + "Apply a user function to every member of an array" + ], + "array_walk_recursive": [ + "bool array_walk_recursive(array input, string funcname [, mixed userdata])", + "Apply a user function recursively to every member of an array" + ], + "arsort": [ + "bool arsort(array &array_arg [, int sort_flags])", + "Sort an array in reverse order and maintain index association" + ], + "asin": [ + "float asin(float number)", + "Returns the arc sine of the number in radians" + ], + "asinh": [ + "float asinh(float number)", + "Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number" + ], + "asort": [ + "bool asort(array &array_arg [, int sort_flags])", + "Sort an array and maintain index association" + ], + "assert": [ + "int assert(string|bool assertion)", + "Checks if assertion is false" + ], + "assert_options": [ + "mixed assert_options(int what [, mixed value])", + "Set/get the various assert flags" + ], + "atan": [ + "float atan(float number)", + "Returns the arc tangent of the number in radians" + ], + "atan2": [ + "float atan2(float y, float x)", + "Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x" + ], + "atanh": [ + "float atanh(float number)", + "Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number" + ], + "attachIterator": [ + "void attachIterator(Iterator iterator[, mixed info])", + "Attach a new iterator" + ], + "base64_decode": [ + "string base64_decode(string str[, bool strict])", + "Decodes string using MIME base64 algorithm" + ], + "base64_encode": [ + "string base64_encode(string str)", + "Encodes string using MIME base64 algorithm" + ], + "base_convert": [ + "string base_convert(string number, int frombase, int tobase)", + "Converts a number in a string from any base <= 36 to any base <= 36" + ], + "basename": [ + "string basename(string path [, string suffix])", + "Returns the filename component of the path" + ], + "bcadd": [ + "string bcadd(string left_operand, string right_operand [, int scale])", + "Returns the sum of two arbitrary precision numbers" + ], + "bccomp": [ + "int bccomp(string left_operand, string right_operand [, int scale])", + "Compares two arbitrary precision numbers" + ], + "bcdiv": [ + "string bcdiv(string left_operand, string right_operand [, int scale])", + "Returns the quotient of two arbitrary precision numbers (division)" + ], + "bcmod": [ + "string bcmod(string left_operand, string right_operand)", + "Returns the modulus of the two arbitrary precision operands" + ], + "bcmul": [ + "string bcmul(string left_operand, string right_operand [, int scale])", + "Returns the multiplication of two arbitrary precision numbers" + ], + "bcpow": [ + "string bcpow(string x, string y [, int scale])", + "Returns the value of an arbitrary precision number raised to the power of another" + ], + "bcpowmod": [ + "string bcpowmod(string x, string y, string mod [, int scale])", + "Returns the value of an arbitrary precision number raised to the power of another reduced by a modulous" + ], + "bcscale": [ + "bool bcscale(int scale)", + "Sets default scale parameter for all bc math functions" + ], + "bcsqrt": [ + "string bcsqrt(string operand [, int scale])", + "Returns the square root of an arbitray precision number" + ], + "bcsub": [ + "string bcsub(string left_operand, string right_operand [, int scale])", + "Returns the difference between two arbitrary precision numbers" + ], + "bin2hex": [ + "string bin2hex(string data)", + "Converts the binary representation of data to hex" + ], + "bind_textdomain_codeset": [ + "string bind_textdomain_codeset (string domain, string codeset)", + "Specify the character encoding in which the messages from the DOMAIN message catalog will be returned." + ], + "bindec": [ + "int bindec(string binary_number)", + "Returns the decimal equivalent of the binary number" + ], + "bindtextdomain": [ + "string bindtextdomain(string domain_name, string dir)", + "Bind to the text domain domain_name, looking for translations in dir. Returns the current domain" + ], + "birdstep_autocommit": [ + "bool birdstep_autocommit(int index)", + "" + ], + "birdstep_close": [ + "bool birdstep_close(int id)", + "" + ], + "birdstep_commit": [ + "bool birdstep_commit(int index)", + "" + ], + "birdstep_connect": [ + "int birdstep_connect(string server, string user, string pass)", + "" + ], + "birdstep_exec": [ + "int birdstep_exec(int index, string exec_str)", + "" + ], + "birdstep_fetch": [ + "bool birdstep_fetch(int index)", + "" + ], + "birdstep_fieldname": [ + "string birdstep_fieldname(int index, int col)", + "" + ], + "birdstep_fieldnum": [ + "int birdstep_fieldnum(int index)", + "" + ], + "birdstep_freeresult": [ + "bool birdstep_freeresult(int index)", + "" + ], + "birdstep_off_autocommit": [ + "bool birdstep_off_autocommit(int index)", + "" + ], + "birdstep_result": [ + "mixed birdstep_result(int index, mixed col)", + "" + ], + "birdstep_rollback": [ + "bool birdstep_rollback(int index)", + "" + ], + "bzcompress": [ + "string bzcompress(string source [, int blocksize100k [, int workfactor]])", + "Compresses a string into BZip2 encoded data" + ], + "bzdecompress": [ + "string bzdecompress(string source [, int small])", + "Decompresses BZip2 compressed data" + ], + "bzerrno": [ + "int bzerrno(resource bz)", + "Returns the error number" + ], + "bzerror": [ + "array bzerror(resource bz)", + "Returns the error number and error string in an associative array" + ], + "bzerrstr": [ + "string bzerrstr(resource bz)", + "Returns the error string" + ], + "bzopen": [ + "resource bzopen(string|int file|fp, string mode)", + "Opens a new BZip2 stream" + ], + "bzread": [ + "string bzread(resource bz[, int length])", + "Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified" + ], + "cal_days_in_month": [ + "int cal_days_in_month(int calendar, int month, int year)", + "Returns the number of days in a month for a given year and calendar" + ], + "cal_from_jd": [ + "array cal_from_jd(int jd, int calendar)", + "Converts from Julian Day Count to a supported calendar and return extended information" + ], + "cal_info": [ + "array cal_info([int calendar])", + "Returns information about a particular calendar" + ], + "cal_to_jd": [ + "int cal_to_jd(int calendar, int month, int day, int year)", + "Converts from a supported calendar to Julian Day Count" + ], + "call_user_func": [ + "mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])", + "Call a user function which is the first parameter" + ], + "call_user_func_array": [ + "mixed call_user_func_array(string function_name, array parameters)", + "Call a user function which is the first parameter with the arguments contained in array" + ], + "call_user_method": [ + "mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])", + "Call a user method on a specific object or class" + ], + "call_user_method_array": [ + "mixed call_user_method_array(string method_name, mixed object, array params)", + "Call a user method on a specific object or class using a parameter array" + ], + "ceil": [ + "float ceil(float number)", + "Returns the next highest integer value of the number" + ], + "chdir": [ + "bool chdir(string directory)", + "Change the current directory" + ], + "checkdate": [ + "bool checkdate(int month, int day, int year)", + "Returns true(1) if it is a valid date in gregorian calendar" + ], + "chgrp": [ + "bool chgrp(string filename, mixed group)", + "Change file group" + ], + "chmod": [ + "bool chmod(string filename, int mode)", + "Change file mode" + ], + "chown": [ + "bool chown(string filename, mixed user)", + "Change file owner" + ], + "chr": [ + "string chr(int ascii)", + "Converts ASCII code to a character" + ], + "chroot": [ + "bool chroot(string directory)", + "Change root directory" + ], + "chunk_split": [ + "string chunk_split(string str [, int chunklen [, string ending]])", + "Returns split line" + ], + "class_alias": [ + "bool class_alias(string user_class_name , string alias_name [, bool autoload])", + "Creates an alias for user defined class" + ], + "class_exists": [ + "bool class_exists(string classname [, bool autoload])", + "Checks if the class exists" + ], + "class_implements": [ + "array class_implements(mixed what [, bool autoload ])", + "Return all classes and interfaces implemented by SPL" + ], + "class_parents": [ + "array class_parents(object instance [, bool autoload = true])", + "Return an array containing the names of all parent classes" + ], + "clearstatcache": [ + "void clearstatcache([bool clear_realpath_cache[, string filename]])", + "Clear file stat cache" + ], + "closedir": [ + "void closedir([resource dir_handle])", + "Close directory connection identified by the dir_handle" + ], + "closelog": [ + "bool closelog()", + "Close connection to system logger" + ], + "collator_asort": [ + "bool collator_asort( Collator $coll, array(string) $arr )", + "* Sort array using specified collator, maintaining index association." + ], + "collator_compare": [ + "int collator_compare( Collator $coll, string $str1, string $str2 )", + "* Compare two strings." + ], + "collator_create": [ + "Collator collator_create( string $locale )", + "* Create collator." + ], + "collator_get_attribute": [ + "int collator_get_attribute( Collator $coll, int $attr )", + "* Get collation attribute value." + ], + "collator_get_error_code": [ + "int collator_get_error_code( Collator $coll )", + "* Get collator's last error code." + ], + "collator_get_error_message": [ + "string collator_get_error_message( Collator $coll )", + "* Get text description for collator's last error code." + ], + "collator_get_locale": [ + "string collator_get_locale( Collator $coll, int $type )", + "* Gets the locale name of the collator." + ], + "collator_get_sort_key": [ + "bool collator_get_sort_key( Collator $coll, string $str )", + "* Get a sort key for a string from a Collator. }}}" + ], + "collator_get_strength": [ + "int collator_get_strength(Collator coll)", + "* Returns the current collation strength." + ], + "collator_set_attribute": [ + "bool collator_set_attribute( Collator $coll, int $attr, int $val )", + "* Set collation attribute." + ], + "collator_set_strength": [ + "bool collator_set_strength(Collator coll, int strength)", + "* Set the collation strength." + ], + "collator_sort": [ + "bool collator_sort( Collator $coll, array(string) $arr [, int $sort_flags] )", + "* Sort array using specified collator." + ], + "collator_sort_with_sort_keys": [ + "bool collator_sort_with_sort_keys( Collator $coll, array(string) $arr )", + "* Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance." + ], + "com_create_guid": [ + "string com_create_guid()", + "Generate a globally unique identifier (GUID)" + ], + "com_event_sink": [ + "bool com_event_sink(object comobject, object sinkobject [, mixed sinkinterface])", + "Connect events from a COM object to a PHP object" + ], + "com_get_active_object": [ + "object com_get_active_object(string progid [, int code_page ])", + "Returns a handle to an already running instance of a COM object" + ], + "com_load_typelib": [ + "bool com_load_typelib(string typelib_name [, int case_insensitive])", + "Loads a Typelibrary and registers its constants" + ], + "com_message_pump": [ + "bool com_message_pump([int timeoutms])", + "Process COM messages, sleeping for up to timeoutms milliseconds" + ], + "com_print_typeinfo": [ + "bool com_print_typeinfo(object comobject | string typelib, string dispinterface, bool wantsink)", + "Print out a PHP class definition for a dispatchable interface" + ], + "compact": [ + "array compact(mixed var_names [, mixed ...])", + "Creates a hash containing variables and their values" + ], + "compose_locale": [ + "static string compose_locale($array)", + "* Creates a locale by combining the parts of locale-ID passed * }}}" + ], + "confirm_extname_compiled": [ + "string confirm_extname_compiled(string arg)", + "Return a string to confirm that the module is compiled in" + ], + "connection_aborted": [ + "int connection_aborted()", + "Returns true if client disconnected" + ], + "connection_status": [ + "int connection_status()", + "Returns the connection status bitfield" + ], + "constant": [ + "mixed constant(string const_name)", + "Given the name of a constant this function will return the constant's associated value" + ], + "convert_cyr_string": [ + "string convert_cyr_string(string str, string from, string to)", + "Convert from one Cyrillic character set to another" + ], + "convert_uudecode": [ + "string convert_uudecode(string data)", + "decode a uuencoded string" + ], + "convert_uuencode": [ + "string convert_uuencode(string data)", + "uuencode a string" + ], + "copy": [ + "bool copy(string source_file, string destination_file [, resource context])", + "Copy a file" + ], + "cos": [ + "float cos(float number)", + "Returns the cosine of the number in radians" + ], + "cosh": [ + "float cosh(float number)", + "Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2" + ], + "count": [ + "int count(mixed var [, int mode])", + "Count the number of elements in a variable (usually an array)" + ], + "count_chars": [ + "mixed count_chars(string input [, int mode])", + "Returns info about what characters are used in input" + ], + "crc32": [ + "string crc32(string str)", + "Calculate the crc32 polynomial of a string" + ], + "create_function": [ + "string create_function(string args, string code)", + "Creates an anonymous function, and returns its name" + ], + "crypt": [ + "string crypt(string str [, string salt])", + "Hash a string" + ], + "ctype_alnum": [ + "bool ctype_alnum(mixed c)", + "Checks for alphanumeric character(s)" + ], + "ctype_alpha": [ + "bool ctype_alpha(mixed c)", + "Checks for alphabetic character(s)" + ], + "ctype_cntrl": [ + "bool ctype_cntrl(mixed c)", + "Checks for control character(s)" + ], + "ctype_digit": [ + "bool ctype_digit(mixed c)", + "Checks for numeric character(s)" + ], + "ctype_graph": [ + "bool ctype_graph(mixed c)", + "Checks for any printable character(s) except space" + ], + "ctype_lower": [ + "bool ctype_lower(mixed c)", + "Checks for lowercase character(s)" + ], + "ctype_print": [ + "bool ctype_print(mixed c)", + "Checks for printable character(s)" + ], + "ctype_punct": [ + "bool ctype_punct(mixed c)", + "Checks for any printable character which is not whitespace or an alphanumeric character" + ], + "ctype_space": [ + "bool ctype_space(mixed c)", + "Checks for whitespace character(s)" + ], + "ctype_upper": [ + "bool ctype_upper(mixed c)", + "Checks for uppercase character(s)" + ], + "ctype_xdigit": [ + "bool ctype_xdigit(mixed c)", + "Checks for character(s) representing a hexadecimal digit" + ], + "curl_close": [ + "void curl_close(resource ch)", + "Close a cURL session" + ], + "curl_copy_handle": [ + "resource curl_copy_handle(resource ch)", + "Copy a cURL handle along with all of it's preferences" + ], + "curl_errno": [ + "int curl_errno(resource ch)", + "Return an integer containing the last error number" + ], + "curl_error": [ + "string curl_error(resource ch)", + "Return a string contain the last error for the current session" + ], + "curl_exec": [ + "bool curl_exec(resource ch)", + "Perform a cURL session" + ], + "curl_getinfo": [ + "mixed curl_getinfo(resource ch [, int option])", + "Get information regarding a specific transfer" + ], + "curl_init": [ + "resource curl_init([string url])", + "Initialize a cURL session" + ], + "curl_multi_add_handle": [ + "int curl_multi_add_handle(resource mh, resource ch)", + "Add a normal cURL handle to a cURL multi handle" + ], + "curl_multi_close": [ + "void curl_multi_close(resource mh)", + "Close a set of cURL handles" + ], + "curl_multi_exec": [ + "int curl_multi_exec(resource mh, int &still_running)", + "Run the sub-connections of the current cURL handle" + ], + "curl_multi_getcontent": [ + "string curl_multi_getcontent(resource ch)", + "Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set" + ], + "curl_multi_info_read": [ + "array curl_multi_info_read(resource mh [, long msgs_in_queue])", + "Get information about the current transfers" + ], + "curl_multi_init": [ + "resource curl_multi_init()", + "Returns a new cURL multi handle" + ], + "curl_multi_remove_handle": [ + "int curl_multi_remove_handle(resource mh, resource ch)", + "Remove a multi handle from a set of cURL handles" + ], + "curl_multi_select": [ + "int curl_multi_select(resource mh[, double timeout])", + "Get all the sockets associated with the cURL extension, which can then be \"selected\"" + ], + "curl_setopt": [ + "bool curl_setopt(resource ch, int option, mixed value)", + "Set an option for a cURL transfer" + ], + "curl_setopt_array": [ + "bool curl_setopt_array(resource ch, array options)", + "Set an array of option for a cURL transfer" + ], + "curl_version": [ + "array curl_version([int version])", + "Return cURL version information." + ], + "current": [ + "mixed current(array array_arg)", + "Return the element currently pointed to by the internal array pointer" + ], + "date": [ + "string date(string format [, long timestamp])", + "Format a local date/time" + ], + "date_add": [ + "DateTime date_add(DateTime object, DateInterval interval)", + "Adds an interval to the current date in object." + ], + "date_create": [ + "DateTime date_create([string time[, DateTimeZone object]])", + "Returns new DateTime object" + ], + "date_create_from_format": [ + "DateTime date_create_from_format(string format, string time[, DateTimeZone object])", + "Returns new DateTime object formatted according to the specified format" + ], + "date_date_set": [ + "DateTime date_date_set(DateTime object, long year, long month, long day)", + "Sets the date." + ], + "date_default_timezone_get": [ + "string date_default_timezone_get()", + "Gets the default timezone used by all date/time functions in a script" + ], + "date_default_timezone_set": [ + "bool date_default_timezone_set(string timezone_identifier)", + "Sets the default timezone used by all date/time functions in a script" + ], + "date_diff": [ + "DateInterval date_diff(DateTime object [, bool absolute])", + "Returns the difference between two DateTime objects." + ], + "date_format": [ + "string date_format(DateTime object, string format)", + "Returns date formatted according to given format" + ], + "date_get_last_errors": [ + "array date_get_last_errors()", + "Returns the warnings and errors found while parsing a date/time string." + ], + "date_interval_create_from_date_string": [ + "DateInterval date_interval_create_from_date_string(string time)", + "Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string" + ], + "date_interval_format": [ + "string date_interval_format(DateInterval object, string format)", + "Formats the interval." + ], + "date_isodate_set": [ + "DateTime date_isodate_set(DateTime object, long year, long week[, long day])", + "Sets the ISO date." + ], + "date_modify": [ + "DateTime date_modify(DateTime object, string modify)", + "Alters the timestamp." + ], + "date_offset_get": [ + "long date_offset_get(DateTime object)", + "Returns the DST offset." + ], + "date_parse": [ + "array date_parse(string date)", + "Returns associative array with detailed info about given date" + ], + "date_parse_from_format": [ + "array date_parse_from_format(string format, string date)", + "Returns associative array with detailed info about given date" + ], + "date_sub": [ + "DateTime date_sub(DateTime object, DateInterval interval)", + "Subtracts an interval to the current date in object." + ], + "date_sun_info": [ + "array date_sun_info(long time, float latitude, float longitude)", + "Returns an array with information about sun set/rise and twilight begin/end" + ], + "date_sunrise": [ + "mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])", + "Returns time of sunrise for a given day and location" + ], + "date_sunset": [ + "mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])", + "Returns time of sunset for a given day and location" + ], + "date_time_set": [ + "DateTime date_time_set(DateTime object, long hour, long minute[, long second])", + "Sets the time." + ], + "date_timestamp_get": [ + "long date_timestamp_get(DateTime object)", + "Gets the Unix timestamp." + ], + "date_timestamp_set": [ + "DateTime date_timestamp_set(DateTime object, long unixTimestamp)", + "Sets the date and time based on an Unix timestamp." + ], + "date_timezone_get": [ + "DateTimeZone date_timezone_get(DateTime object)", + "Return new DateTimeZone object relative to give DateTime" + ], + "date_timezone_set": [ + "DateTime date_timezone_set(DateTime object, DateTimeZone object)", + "Sets the timezone for the DateTime object." + ], + "datefmt_create": [ + "IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )", + "* Create formatter." + ], + "datefmt_format": [ + "string datefmt_format( [mixed]int $args or array $args )", + "* Format the time value as a string. }}}" + ], + "datefmt_get_calendar": [ + "string datefmt_get_calendar( IntlDateFormatter $mf )", + "* Get formatter calendar." + ], + "datefmt_get_datetype": [ + "string datefmt_get_datetype( IntlDateFormatter $mf )", + "* Get formatter datetype." + ], + "datefmt_get_error_code": [ + "int datefmt_get_error_code( IntlDateFormatter $nf )", + "* Get formatter's last error code." + ], + "datefmt_get_error_message": [ + "string datefmt_get_error_message( IntlDateFormatter $coll )", + "* Get text description for formatter's last error code." + ], + "datefmt_get_locale": [ + "string datefmt_get_locale(IntlDateFormatter $mf)", + "* Get formatter locale." + ], + "datefmt_get_pattern": [ + "string datefmt_get_pattern( IntlDateFormatter $mf )", + "* Get formatter pattern." + ], + "datefmt_get_timetype": [ + "string datefmt_get_timetype( IntlDateFormatter $mf )", + "* Get formatter timetype." + ], + "datefmt_get_timezone_id": [ + "string datefmt_get_timezone_id( IntlDateFormatter $mf )", + "* Get formatter timezone_id." + ], + "datefmt_isLenient": [ + "string datefmt_isLenient(IntlDateFormatter $mf)", + "* Get formatter locale." + ], + "datefmt_localtime": [ + "integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse[, int $parse_pos ])", + "* Parse the string $value to a localtime array }}}" + ], + "datefmt_parse": [ + "integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse [, int $parse_pos] )", + "* Parse the string $value starting at parse_pos to a Unix timestamp -int }}}" + ], + "datefmt_setLenient": [ + "string datefmt_setLenient(IntlDateFormatter $mf)", + "* Set formatter lenient." + ], + "datefmt_set_calendar": [ + "bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )", + "* Set formatter calendar." + ], + "datefmt_set_pattern": [ + "bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern )", + "* Set formatter pattern." + ], + "datefmt_set_timezone_id": [ + "bool datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)", + "* Set formatter timezone_id." + ], + "dba_close": [ + "void dba_close(resource handle)", + "Closes database" + ], + "dba_delete": [ + "bool dba_delete(string key, resource handle)", + "Deletes the entry associated with key If inifile: remove all other key lines" + ], + "dba_exists": [ + "bool dba_exists(string key, resource handle)", + "Checks, if the specified key exists" + ], + "dba_fetch": [ + "string dba_fetch(string key, [int skip ,] resource handle)", + "Fetches the data associated with key" + ], + "dba_firstkey": [ + "string dba_firstkey(resource handle)", + "Resets the internal key pointer and returns the first key" + ], + "dba_handlers": [ + "array dba_handlers([bool full_info])", + "List configured database handlers" + ], + "dba_insert": [ + "bool dba_insert(string key, string value, resource handle)", + "If not inifile: Insert value as key, return false, if key exists already If inifile: Add vakue as key (next instance of key)" + ], + "dba_key_split": [ + "array|false dba_key_split(string key)", + "Splits an inifile key into an array of the form array(0=>group,1=>value_name) but returns false if input is false or null" + ], + "dba_list": [ + "array dba_list()", + "List opened databases" + ], + "dba_nextkey": [ + "string dba_nextkey(resource handle)", + "Returns the next key" + ], + "dba_open": [ + "resource dba_open(string path, string mode [, string handlername, string ...])", + "Opens path using the specified handler in mode" + ], + "dba_optimize": [ + "bool dba_optimize(resource handle)", + "Optimizes (e.g. clean up, vacuum) database" + ], + "dba_popen": [ + "resource dba_popen(string path, string mode [, string handlername, string ...])", + "Opens path using the specified handler in mode persistently" + ], + "dba_replace": [ + "bool dba_replace(string key, string value, resource handle)", + "Inserts value as key, replaces key, if key exists already If inifile: remove all other key lines" + ], + "dba_sync": [ + "bool dba_sync(resource handle)", + "Synchronizes database" + ], + "dcgettext": [ + "string dcgettext(string domain_name, string msgid, long category)", + "Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist" + ], + "dcngettext": [ + "string dcngettext(string domain, string msgid1, string msgid2, int n, int category)", + "Plural version of dcgettext()" + ], + "debug_backtrace": [ + "array debug_backtrace([bool provide_object])", + "Return backtrace as array" + ], + "debug_print_backtrace": [ + "void debug_print_backtrace()", + "Prints a PHP backtrace" + ], + "debug_zval_dump": [ + "void debug_zval_dump(mixed var)", + "Dumps a string representation of an internal Zend value to output" + ], + "decbin": [ + "string decbin(int decimal_number)", + "Returns a string containing a binary representation of the number" + ], + "dechex": [ + "string dechex(int decimal_number)", + "Returns a string containing a hexadecimal representation of the given number" + ], + "decoct": [ + "string decoct(int decimal_number)", + "Returns a string containing an octal representation of the given number" + ], + "define": [ + "bool define(string constant_name, mixed value, bool case_insensitive=false)", + "Define a new constant" + ], + "define_syslog_variables": [ + "void define_syslog_variables()", + "Initializes all syslog-related variables" + ], + "defined": [ + "bool defined(string constant_name)", + "Check whether a constant exists" + ], + "deg2rad": [ + "float deg2rad(float number)", + "Converts the number in degrees to the radian equivalent" + ], + "dgettext": [ + "string dgettext(string domain_name, string msgid)", + "Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist" + ], + "die": [ + "void die([mixed status])", + "Output a message and terminate the current script" + ], + "dir": [ + "object dir(string directory[, resource context])", + "Directory class with properties, handle and class and methods read, rewind and close" + ], + "dirname": [ + "string dirname(string path)", + "Returns the directory name component of the path" + ], + "disk_free_space": [ + "float disk_free_space(string path)", + "Get free disk space for filesystem that path is on" + ], + "disk_total_space": [ + "float disk_total_space(string path)", + "Get total disk space for filesystem that path is on" + ], + "display_disabled_function": [ + "void display_disabled_function()", + "Dummy function which displays an error when a disabled function is called." + ], + "dl": [ + "int dl(string extension_filename)", + "Load a PHP extension at runtime" + ], + "dngettext": [ + "string dngettext(string domain, string msgid1, string msgid2, int count)", + "Plural version of dgettext()" + ], + "dns_check_record": [ + "bool dns_check_record(string host [, string type])", + "Check DNS records corresponding to a given Internet host name or IP address" + ], + "dns_get_mx": [ + "bool dns_get_mx(string hostname, array mxhosts [, array weight])", + "Get MX records corresponding to a given Internet host name" + ], + "dns_get_record": [ + "array|false dns_get_record(string hostname [, int type[, array authns, array addtl]])", + "Get any Resource Record corresponding to a given Internet host name" + ], + "dom_attr_is_id": [ + "bool dom_attr_is_id()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-isId Since: DOM Level 3" + ], + "dom_characterdata_append_data": [ + "void dom_characterdata_append_data(string arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-32791A2F Since:" + ], + "dom_characterdata_delete_data": [ + "void dom_characterdata_delete_data(int offset, int count)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-7C603781 Since:" + ], + "dom_characterdata_insert_data": [ + "void dom_characterdata_insert_data(int offset, string arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3EDB695F Since:" + ], + "dom_characterdata_replace_data": [ + "void dom_characterdata_replace_data(int offset, int count, string arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-E5CBA7FB Since:" + ], + "dom_characterdata_substring_data": [ + "string dom_characterdata_substring_data(int offset, int count)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6531BCCF Since:" + ], + "dom_document_adopt_node": [ + "DOMNode dom_document_adopt_node(DOMNode source)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-adoptNode Since: DOM Level 3" + ], + "dom_document_create_attribute": [ + "DOMAttr dom_document_create_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198 Since:" + ], + "dom_document_create_attribute_ns": [ + "DOMAttr dom_document_create_attribute_ns(string namespaceURI, string qualifiedName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrAttrNS Since: DOM Level 2" + ], + "dom_document_create_cdatasection": [ + "DOMCdataSection dom_document_create_cdatasection(string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8 Since:" + ], + "dom_document_create_comment": [ + "DOMComment dom_document_create_comment(string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328 Since:" + ], + "dom_document_create_document_fragment": [ + "DOMDocumentFragment dom_document_create_document_fragment()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5 Since:" + ], + "dom_document_create_element": [ + "DOMElement dom_document_create_element(string tagName [, string value])", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547 Since:" + ], + "dom_document_create_element_ns": [ + "DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value])", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS Since: DOM Level 2" + ], + "dom_document_create_entity_reference": [ + "DOMEntityReference dom_document_create_entity_reference(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE Since:" + ], + "dom_document_create_processing_instruction": [ + "DOMProcessingInstruction dom_document_create_processing_instruction(string target, string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439 Since:" + ], + "dom_document_create_text_node": [ + "DOMText dom_document_create_text_node(string data)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127 Since:" + ], + "dom_document_get_element_by_id": [ + "DOMElement dom_document_get_element_by_id(string elementId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBId Since: DOM Level 2" + ], + "dom_document_get_elements_by_tag_name": [ + "DOMNodeList dom_document_get_elements_by_tag_name(string tagname)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094 Since:" + ], + "dom_document_get_elements_by_tag_name_ns": [ + "DOMNodeList dom_document_get_elements_by_tag_name_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getElBTNNS Since: DOM Level 2" + ], + "dom_document_import_node": [ + "DOMNode dom_document_import_node(DOMNode importedNode, bool deep)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Core-Document-importNode Since: DOM Level 2" + ], + "dom_document_load": [ + "DOMNode dom_document_load(string source [, int options])", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load Since: DOM Level 3" + ], + "dom_document_load_html": [ + "DOMNode dom_document_load_html(string source)", + "Since: DOM extended" + ], + "dom_document_load_html_file": [ + "DOMNode dom_document_load_html_file(string source)", + "Since: DOM extended" + ], + "dom_document_loadxml": [ + "DOMNode dom_document_loadxml(string source [, int options])", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-loadXML Since: DOM Level 3" + ], + "dom_document_normalize_document": [ + "void dom_document_normalize_document()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-normalizeDocument Since: DOM Level 3" + ], + "dom_document_relaxNG_validate_file": [ + "bool dom_document_relaxNG_validate_file(string filename); */", + "PHP_FUNCTION(dom_document_relaxNG_validate_file) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file" + ], + "dom_document_relaxNG_validate_xml": [ + "bool dom_document_relaxNG_validate_xml(string source); */", + "PHP_FUNCTION(dom_document_relaxNG_validate_xml) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_relaxNG_validate_xml" + ], + "dom_document_rename_node": [ + "DOMNode dom_document_rename_node(node n, string namespaceURI, string qualifiedName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-renameNode Since: DOM Level 3" + ], + "dom_document_save": [ + "int dom_document_save(string file)", + "Convenience method to save to file" + ], + "dom_document_save_html": [ + "string dom_document_save_html()", + "Convenience method to output as html" + ], + "dom_document_save_html_file": [ + "int dom_document_save_html_file(string file)", + "Convenience method to save to file as html" + ], + "dom_document_savexml": [ + "string dom_document_savexml([node n])", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3" + ], + "dom_document_schema_validate": [ + "bool dom_document_schema_validate(string source); */", + "PHP_FUNCTION(dom_document_schema_validate_xml) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_schema_validate" + ], + "dom_document_schema_validate_file": [ + "bool dom_document_schema_validate_file(string filename); */", + "PHP_FUNCTION(dom_document_schema_validate_file) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file" + ], + "dom_document_validate": [ + "bool dom_document_validate()", + "Since: DOM extended" + ], + "dom_document_xinclude": [ + "int dom_document_xinclude([int options])", + "Substitutues xincludes in a DomDocument" + ], + "dom_domconfiguration_can_set_parameter": [ + "bool dom_domconfiguration_can_set_parameter(string name, domuserdata value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter Since:" + ], + "dom_domconfiguration_get_parameter": [ + "domdomuserdata dom_domconfiguration_get_parameter(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:" + ], + "dom_domconfiguration_set_parameter": [ + "dom_void dom_domconfiguration_set_parameter(string name, domuserdata value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:" + ], + "dom_domerrorhandler_handle_error": [ + "dom_bool dom_domerrorhandler_handle_error(domerror error)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:" + ], + "dom_domimplementation_create_document": [ + "DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2" + ], + "dom_domimplementation_create_document_type": [ + "DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2" + ], + "dom_domimplementation_get_feature": [ + "DOMNode dom_domimplementation_get_feature(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3" + ], + "dom_domimplementation_has_feature": [ + "bool dom_domimplementation_has_feature(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:" + ], + "dom_domimplementationlist_item": [ + "domdomimplementation dom_domimplementationlist_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:" + ], + "dom_domimplementationsource_get_domimplementation": [ + "domdomimplementation dom_domimplementationsource_get_domimplementation(string features)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:" + ], + "dom_domimplementationsource_get_domimplementations": [ + "domimplementationlist dom_domimplementationsource_get_domimplementations(string features)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:" + ], + "dom_domstringlist_item": [ + "domstring dom_domstringlist_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:" + ], + "dom_element_get_attribute": [ + "string dom_element_get_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:" + ], + "dom_element_get_attribute_node": [ + "DOMAttr dom_element_get_attribute_node(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-217A91B8 Since:" + ], + "dom_element_get_attribute_node_ns": [ + "DOMAttr dom_element_get_attribute_node_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAtNodeNS Since: DOM Level 2" + ], + "dom_element_get_attribute_ns": [ + "string dom_element_get_attribute_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAttrNS Since: DOM Level 2" + ], + "dom_element_get_elements_by_tag_name": [ + "DOMNodeList dom_element_get_elements_by_tag_name(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D Since:" + ], + "dom_element_get_elements_by_tag_name_ns": [ + "DOMNodeList dom_element_get_elements_by_tag_name_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C90942 Since: DOM Level 2" + ], + "dom_element_has_attribute": [ + "bool dom_element_has_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttr Since: DOM Level 2" + ], + "dom_element_has_attribute_ns": [ + "bool dom_element_has_attribute_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttrNS Since: DOM Level 2" + ], + "dom_element_remove_attribute": [ + "void dom_element_remove_attribute(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D6AC0F9 Since:" + ], + "dom_element_remove_attribute_node": [ + "DOMAttr dom_element_remove_attribute_node(DOMAttr oldAttr)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D589198 Since:" + ], + "dom_element_remove_attribute_ns": [ + "void dom_element_remove_attribute_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElRemAtNS Since: DOM Level 2" + ], + "dom_element_set_attribute": [ + "void dom_element_set_attribute(string name, string value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68F082 Since:" + ], + "dom_element_set_attribute_node": [ + "DOMAttr dom_element_set_attribute_node(DOMAttr newAttr)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-887236154 Since:" + ], + "dom_element_set_attribute_node_ns": [ + "DOMAttr dom_element_set_attribute_node_ns(DOMAttr newAttr)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAtNodeNS Since: DOM Level 2" + ], + "dom_element_set_attribute_ns": [ + "void dom_element_set_attribute_ns(string namespaceURI, string qualifiedName, string value)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAttrNS Since: DOM Level 2" + ], + "dom_element_set_id_attribute": [ + "void dom_element_set_id_attribute(string name, bool isId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttr Since: DOM Level 3" + ], + "dom_element_set_id_attribute_node": [ + "void dom_element_set_id_attribute_node(attr idAttr, bool isId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNode Since: DOM Level 3" + ], + "dom_element_set_id_attribute_ns": [ + "void dom_element_set_id_attribute_ns(string namespaceURI, string localName, bool isId)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNS Since: DOM Level 3" + ], + "dom_import_simplexml": [ + "somNode dom_import_simplexml(sxeobject node)", + "Get a simplexml_element object from dom to allow for processing" + ], + "dom_namednodemap_get_named_item": [ + "DOMNode dom_namednodemap_get_named_item(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549 Since:" + ], + "dom_namednodemap_get_named_item_ns": [ + "DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS Since: DOM Level 2" + ], + "dom_namednodemap_item": [ + "DOMNode dom_namednodemap_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9 Since:" + ], + "dom_namednodemap_remove_named_item": [ + "DOMNode dom_namednodemap_remove_named_item(string name)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193 Since:" + ], + "dom_namednodemap_remove_named_item_ns": [ + "DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS Since: DOM Level 2" + ], + "dom_namednodemap_set_named_item": [ + "DOMNode dom_namednodemap_set_named_item(DOMNode arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788 Since:" + ], + "dom_namednodemap_set_named_item_ns": [ + "DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS Since: DOM Level 2" + ], + "dom_namelist_get_name": [ + "string dom_namelist_get_name(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName Since:" + ], + "dom_namelist_get_namespace_uri": [ + "string dom_namelist_get_namespace_uri(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI Since:" + ], + "dom_node_append_child": [ + "DomNode dom_node_append_child(DomNode newChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107 Since:" + ], + "dom_node_clone_node": [ + "DomNode dom_node_clone_node(bool deep)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4 Since:" + ], + "dom_node_compare_document_position": [ + "short dom_node_compare_document_position(DomNode other)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition Since: DOM Level 3" + ], + "dom_node_get_feature": [ + "DomNode dom_node_get_feature(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature Since: DOM Level 3" + ], + "dom_node_get_user_data": [ + "mixed dom_node_get_user_data(string key)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData Since: DOM Level 3" + ], + "dom_node_has_attributes": [ + "bool dom_node_has_attributes()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs Since: DOM Level 2" + ], + "dom_node_has_child_nodes": [ + "bool dom_node_has_child_nodes()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187 Since:" + ], + "dom_node_insert_before": [ + "domnode dom_node_insert_before(DomNode newChild, DomNode refChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727 Since:" + ], + "dom_node_is_default_namespace": [ + "bool dom_node_is_default_namespace(string namespaceURI)", + "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace Since: DOM Level 3" + ], + "dom_node_is_equal_node": [ + "bool dom_node_is_equal_node(DomNode arg)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode Since: DOM Level 3" + ], + "dom_node_is_same_node": [ + "bool dom_node_is_same_node(DomNode other)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode Since: DOM Level 3" + ], + "dom_node_is_supported": [ + "bool dom_node_is_supported(string feature, string version)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Level-2-Core-Node-supports Since: DOM Level 2" + ], + "dom_node_lookup_namespace_uri": [ + "string dom_node_lookup_namespace_uri(string prefix)", + "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI Since: DOM Level 3" + ], + "dom_node_lookup_prefix": [ + "string dom_node_lookup_prefix(string namespaceURI)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix Since: DOM Level 3" + ], + "dom_node_normalize": [ + "void dom_node_normalize()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize Since:" + ], + "dom_node_remove_child": [ + "DomNode dom_node_remove_child(DomNode oldChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066 Since:" + ], + "dom_node_replace_child": [ + "DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307 Since:" + ], + "dom_node_set_user_data": [ + "mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData Since: DOM Level 3" + ], + "dom_nodelist_item": [ + "DOMNode dom_nodelist_item(int index)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-844377136 Since:" + ], + "dom_string_extend_find_offset16": [ + "int dom_string_extend_find_offset16(int offset32)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16 Since:" + ], + "dom_string_extend_find_offset32": [ + "int dom_string_extend_find_offset32(int offset16)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32 Since:" + ], + "dom_text_is_whitespace_in_element_content": [ + "bool dom_text_is_whitespace_in_element_content()", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3" + ], + "dom_text_replace_whole_text": [ + "DOMText dom_text_replace_whole_text(string content)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3" + ], + "dom_text_split_text": [ + "DOMText dom_text_split_text(int offset)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since:" + ], + "dom_userdatahandler_handle": [ + "dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst)", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent Since:" + ], + "dom_xpath_evaluate": [ + "mixed dom_xpath_evaluate(string expr [,DOMNode context])", + "" + ], + "dom_xpath_query": [ + "DOMNodeList dom_xpath_query(string expr [,DOMNode context])", + "" + ], + "dom_xpath_register_ns": [ + "bool dom_xpath_register_ns(string prefix, string uri)", + "" + ], + "dom_xpath_register_php_functions": [ + "void dom_xpath_register_php_functions()", + "" + ], + "each": [ + "array each(array arr)", + "Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element" + ], + "easter_date": [ + "int easter_date([int year])", + "Return the timestamp of midnight on Easter of a given year (defaults to current year)" + ], + "easter_days": [ + "int easter_days([int year, [int method]])", + "Return the number of days after March 21 that Easter falls on for a given year (defaults to current year)" + ], + "echo": [ + "void echo(string arg1 [, string ...])", + "Output one or more strings" + ], + "empty": [ + "bool empty(mixed var)", + "Determine whether a variable is empty" + ], + "enchant_broker_describe": [ + "array enchant_broker_describe(resource broker)", + "Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo()" + ], + "enchant_broker_dict_exists": [ + "bool enchant_broker_dict_exists(resource broker, string tag)", + "Whether a dictionary exists or not. Using non-empty tag" + ], + "enchant_broker_free": [ + "bool enchant_broker_free(resource broker)", + "Destroys the broker object and its dictionnaries" + ], + "enchant_broker_free_dict": [ + "resource enchant_broker_free_dict(resource dict)", + "Free the dictionary resource" + ], + "enchant_broker_get_dict_path": [ + "string enchant_broker_get_dict_path(resource broker, int dict_type)", + "Get the directory path for a given backend, works with ispell and myspell" + ], + "enchant_broker_get_error": [ + "string enchant_broker_get_error(resource broker)", + "Returns the last error of the broker" + ], + "enchant_broker_init": [ + "resource enchant_broker_init()", + "create a new broker object capable of requesting" + ], + "enchant_broker_list_dicts": [ + "string enchant_broker_list_dicts(resource broker)", + "Lists the dictionaries available for the given broker" + ], + "enchant_broker_request_dict": [ + "resource enchant_broker_request_dict(resource broker, string tag)", + "create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for (\"en_US\", \"de_DE\", ...)" + ], + "enchant_broker_request_pwl_dict": [ + "resource enchant_broker_request_pwl_dict(resource broker, string filename)", + "creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call." + ], + "enchant_broker_set_dict_path": [ + "bool enchant_broker_set_dict_path(resource broker, int dict_type, string value)", + "Set the directory path for a given backend, works with ispell and myspell" + ], + "enchant_broker_set_ordering": [ + "bool enchant_broker_set_ordering(resource broker, string tag, string ordering)", + "Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the \"*\" tag can be used as a language tag to declare a default ordering for any language that does not explictly declare an ordering." + ], + "enchant_dict_add_to_personal": [ + "void enchant_dict_add_to_personal(resource dict, string word)", + "add 'word' to personal word list" + ], + "enchant_dict_add_to_session": [ + "void enchant_dict_add_to_session(resource dict, string word)", + "add 'word' to this spell-checking session" + ], + "enchant_dict_check": [ + "bool enchant_dict_check(resource dict, string word)", + "If the word is correctly spelled return true, otherwise return false" + ], + "enchant_dict_describe": [ + "array enchant_dict_describe(resource dict)", + "Describes an individual dictionary 'dict'" + ], + "enchant_dict_get_error": [ + "string enchant_dict_get_error(resource dict)", + "Returns the last error of the current spelling-session" + ], + "enchant_dict_is_in_session": [ + "bool enchant_dict_is_in_session(resource dict, string word)", + "whether or not 'word' exists in this spelling-session" + ], + "enchant_dict_quick_check": [ + "bool enchant_dict_quick_check(resource dict, string word [, array &suggestions])", + "If the word is correctly spelled return true, otherwise return false, if suggestions variable is provided, fill it with spelling alternatives." + ], + "enchant_dict_store_replacement": [ + "void enchant_dict_store_replacement(resource dict, string mis, string cor)", + "add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list." + ], + "enchant_dict_suggest": [ + "array enchant_dict_suggest(resource dict, string word)", + "Will return a list of values if any of those pre-conditions are not met." + ], + "end": [ + "mixed end(array array_arg)", + "Advances array argument's internal pointer to the last element and return it" + ], + "ereg": [ + "int ereg(string pattern, string string [, array registers])", + "Regular expression match" + ], + "ereg_replace": [ + "string ereg_replace(string pattern, string replacement, string string)", + "Replace regular expression" + ], + "eregi": [ + "int eregi(string pattern, string string [, array registers])", + "Case-insensitive regular expression match" + ], + "eregi_replace": [ + "string eregi_replace(string pattern, string replacement, string string)", + "Case insensitive replace regular expression" + ], + "error_get_last": [ + "array error_get_last()", + "Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet." + ], + "error_log": [ + "bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])", + "Send an error message somewhere" + ], + "error_reporting": [ + "int error_reporting([int new_error_level])", + "Return the current error_reporting level, and if an argument was passed - change to the new level" + ], + "escapeshellarg": [ + "string escapeshellarg(string arg)", + "Quote and escape an argument for use in a shell command" + ], + "escapeshellcmd": [ + "string escapeshellcmd(string command)", + "Escape shell metacharacters" + ], + "exec": [ + "string exec(string command [, array &output [, int &return_value]])", + "Execute an external program" + ], + "exif_imagetype": [ + "int exif_imagetype(string imagefile)", + "Get the type of an image" + ], + "exif_read_data": [ + "array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])", + "Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails" + ], + "exif_tagname": [ + "string exif_tagname(index)", + "Get headername for index or false if not defined" + ], + "exif_thumbnail": [ + "string exif_thumbnail(string filename [, &width, &height [, &imagetype]])", + "Reads the embedded thumbnail" + ], + "exit": [ + "void exit([mixed status])", + "Output a message and terminate the current script" + ], + "exp": [ + "float exp(float number)", + "Returns e raised to the power of the number" + ], + "explode": [ + "array explode(string separator, string str [, int limit])", + "Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned." + ], + "expm1": [ + "float expm1(float number)", + "Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero" + ], + "extension_loaded": [ + "bool extension_loaded(string extension_name)", + "Returns true if the named extension is loaded" + ], + "extract": [ + "int extract(array var_array [, int extract_type [, string prefix]])", + "Imports variables into symbol table from an array" + ], + "ezmlm_hash": [ + "int ezmlm_hash(string addr)", + "Calculate EZMLM list hash value." + ], + "fclose": [ + "bool fclose(resource fp)", + "Close an open file pointer" + ], + "feof": [ + "bool feof(resource fp)", + "Test for end-of-file on a file pointer" + ], + "fflush": [ + "bool fflush(resource fp)", + "Flushes output" + ], + "fgetc": [ + "string fgetc(resource fp)", + "Get a character from file pointer" + ], + "fgetcsv": [ + "array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])", + "Get line from file pointer and parse for CSV fields" + ], + "fgets": [ + "string fgets(resource fp[, int length])", + "Get a line from file pointer" + ], + "fgetss": [ + "string fgetss(resource fp [, int length [, string allowable_tags]])", + "Get a line from file pointer and strip HTML tags" + ], + "file": [ + "array file(string filename [, int flags[, resource context]])", + "Read entire file into an array" + ], + "file_exists": [ + "bool file_exists(string filename)", + "Returns true if filename exists" + ], + "file_get_contents": [ + "string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])", + "Read the entire file into a string" + ], + "file_put_contents": [ + "int file_put_contents(string file, mixed data [, int flags [, resource context]])", + "Write/Create a file with contents data and return the number of bytes written" + ], + "fileatime": [ + "int fileatime(string filename)", + "Get last access time of file" + ], + "filectime": [ + "int filectime(string filename)", + "Get inode modification time of file" + ], + "filegroup": [ + "int filegroup(string filename)", + "Get file group" + ], + "fileinode": [ + "int fileinode(string filename)", + "Get file inode" + ], + "filemtime": [ + "int filemtime(string filename)", + "Get last modification time of file" + ], + "fileowner": [ + "int fileowner(string filename)", + "Get file owner" + ], + "fileperms": [ + "int fileperms(string filename)", + "Get file permissions" + ], + "filesize": [ + "int filesize(string filename)", + "Get file size" + ], + "filetype": [ + "string filetype(string filename)", + "Get file type" + ], + "filter_has_var": [ + "mixed filter_has_var(constant type, string variable_name)", + "* Returns true if the variable with the name 'name' exists in source." + ], + "filter_input": [ + "mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])", + "* Returns the filtered variable 'name'* from source `type`." + ], + "filter_input_array": [ + "mixed filter_input_array(constant type, [, mixed options]])", + "* Returns an array with all arguments defined in 'definition'." + ], + "filter_var": [ + "mixed filter_var(mixed variable [, long filter [, mixed options]])", + "* Returns the filtered version of the vriable." + ], + "filter_var_array": [ + "mixed filter_var_array(array data, [, mixed options]])", + "* Returns an array with all arguments defined in 'definition'." + ], + "finfo_buffer": [ + "string finfo_buffer(resource finfo, char *string [, int options [, resource context]])", + "Return infromation about a string buffer." + ], + "finfo_close": [ + "resource finfo_close(resource finfo)", + "Close fileinfo resource." + ], + "finfo_file": [ + "string finfo_file(resource finfo, char *file_name [, int options [, resource context]])", + "Return information about a file." + ], + "finfo_open": [ + "resource finfo_open([int options [, string arg]])", + "Create a new fileinfo resource." + ], + "finfo_set_flags": [ + "bool finfo_set_flags(resource finfo, int options)", + "Set libmagic configuration options." + ], + "floatval": [ + "float floatval(mixed var)", + "Get the float value of a variable" + ], + "flock": [ + "bool flock(resource fp, int operation [, int &wouldblock])", + "Portable file locking" + ], + "floor": [ + "float floor(float number)", + "Returns the next lowest integer value from the number" + ], + "flush": [ + "void flush()", + "Flush the output buffer" + ], + "fmod": [ + "float fmod(float x, float y)", + "Returns the remainder of dividing x by y as a float" + ], + "fnmatch": [ + "bool fnmatch(string pattern, string filename [, int flags])", + "Match filename against pattern" + ], + "fopen": [ + "resource fopen(string filename, string mode [, bool use_include_path [, resource context]])", + "Open a file or a URL and return a file pointer" + ], + "forward_static_call": [ + "mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...])", + "Call a user function which is the first parameter" + ], + "fpassthru": [ + "int fpassthru(resource fp)", + "Output all remaining data from a file pointer" + ], + "fprintf": [ + "int fprintf(resource stream, string format [, mixed arg1 [, mixed ...]])", + "Output a formatted string into a stream" + ], + "fputcsv": [ + "int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]])", + "Format line as CSV and write to file pointer" + ], + "fread": [ + "string fread(resource fp, int length)", + "Binary-safe file read" + ], + "frenchtojd": [ + "int frenchtojd(int month, int day, int year)", + "Converts a french republic calendar date to julian day count" + ], + "fscanf": [ + "mixed fscanf(resource stream, string format [, string ...])", + "Implements a mostly ANSI compatible fscanf()" + ], + "fseek": [ + "int fseek(resource fp, int offset [, int whence])", + "Seek on a file pointer" + ], + "fsockopen": [ + "resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])", + "Open Internet or Unix domain socket connection" + ], + "fstat": [ + "array fstat(resource fp)", + "Stat() on a filehandle" + ], + "ftell": [ + "int ftell(resource fp)", + "Get file pointer's read/write position" + ], + "ftok": [ + "int ftok(string pathname, string proj)", + "Convert a pathname and a project identifier to a System V IPC key" + ], + "ftp_alloc": [ + "bool ftp_alloc(resource stream, int size[, &response])", + "Attempt to allocate space on the remote FTP server" + ], + "ftp_cdup": [ + "bool ftp_cdup(resource stream)", + "Changes to the parent directory" + ], + "ftp_chdir": [ + "bool ftp_chdir(resource stream, string directory)", + "Changes directories" + ], + "ftp_chmod": [ + "int ftp_chmod(resource stream, int mode, string filename)", + "Sets permissions on a file" + ], + "ftp_close": [ + "bool ftp_close(resource stream)", + "Closes the FTP stream" + ], + "ftp_connect": [ + "resource ftp_connect(string host [, int port [, int timeout]])", + "Opens a FTP stream" + ], + "ftp_delete": [ + "bool ftp_delete(resource stream, string file)", + "Deletes a file" + ], + "ftp_exec": [ + "bool ftp_exec(resource stream, string command)", + "Requests execution of a program on the FTP server" + ], + "ftp_fget": [ + "bool ftp_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])", + "Retrieves a file from the FTP server and writes it to an open file" + ], + "ftp_fput": [ + "bool ftp_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])", + "Stores a file from an open file to the FTP server" + ], + "ftp_get": [ + "bool ftp_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])", + "Retrieves a file from the FTP server and writes it to a local file" + ], + "ftp_get_option": [ + "mixed ftp_get_option(resource stream, int option)", + "Gets an FTP option" + ], + "ftp_login": [ + "bool ftp_login(resource stream, string username, string password)", + "Logs into the FTP server" + ], + "ftp_mdtm": [ + "int ftp_mdtm(resource stream, string filename)", + "Returns the last modification time of the file, or -1 on error" + ], + "ftp_mkdir": [ + "string ftp_mkdir(resource stream, string directory)", + "Creates a directory and returns the absolute path for the new directory or false on error" + ], + "ftp_nb_continue": [ + "int ftp_nb_continue(resource stream)", + "Continues retrieving/sending a file nbronously" + ], + "ftp_nb_fget": [ + "int ftp_nb_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])", + "Retrieves a file from the FTP server asynchronly and writes it to an open file" + ], + "ftp_nb_fput": [ + "int ftp_nb_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])", + "Stores a file from an open file to the FTP server nbronly" + ], + "ftp_nb_get": [ + "int ftp_nb_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])", + "Retrieves a file from the FTP server nbhronly and writes it to a local file" + ], + "ftp_nb_put": [ + "int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])", + "Stores a file on the FTP server" + ], + "ftp_nlist": [ + "array ftp_nlist(resource stream, string directory)", + "Returns an array of filenames in the given directory" + ], + "ftp_pasv": [ + "bool ftp_pasv(resource stream, bool pasv)", + "Turns passive mode on or off" + ], + "ftp_put": [ + "bool ftp_put(resource stream, string remote_file, string local_file, int mode[, int startpos])", + "Stores a file on the FTP server" + ], + "ftp_pwd": [ + "string ftp_pwd(resource stream)", + "Returns the present working directory" + ], + "ftp_raw": [ + "array ftp_raw(resource stream, string command)", + "Sends a literal command to the FTP server" + ], + "ftp_rawlist": [ + "array ftp_rawlist(resource stream, string directory [, bool recursive])", + "Returns a detailed listing of a directory as an array of output lines" + ], + "ftp_rename": [ + "bool ftp_rename(resource stream, string src, string dest)", + "Renames the given file to a new path" + ], + "ftp_rmdir": [ + "bool ftp_rmdir(resource stream, string directory)", + "Removes a directory" + ], + "ftp_set_option": [ + "bool ftp_set_option(resource stream, int option, mixed value)", + "Sets an FTP option" + ], + "ftp_site": [ + "bool ftp_site(resource stream, string cmd)", + "Sends a SITE command to the server" + ], + "ftp_size": [ + "int ftp_size(resource stream, string filename)", + "Returns the size of the file, or -1 on error" + ], + "ftp_ssl_connect": [ + "resource ftp_ssl_connect(string host [, int port [, int timeout]])", + "Opens a FTP-SSL stream" + ], + "ftp_systype": [ + "string ftp_systype(resource stream)", + "Returns the system type identifier" + ], + "ftruncate": [ + "bool ftruncate(resource fp, int size)", + "Truncate file to 'size' length" + ], + "func_get_arg": [ + "mixed func_get_arg(int arg_num)", + "Get the $arg_num'th argument that was passed to the function" + ], + "func_get_args": [ + "array func_get_args()", + "Get an array of the arguments that were passed to the function" + ], + "func_num_args": [ + "int func_num_args()", + "Get the number of arguments that were passed to the function" + ], + "function ": ["", ""], + "foreach ": ["", ""], + "function_exists": [ + "bool function_exists(string function_name)", + "Checks if the function exists" + ], + "fwrite": [ + "int fwrite(resource fp, string str [, int length])", + "Binary-safe file write" + ], + "gc_collect_cycles": [ + "int gc_collect_cycles()", + "Forces collection of any existing garbage cycles. Returns number of freed zvals" + ], + "gc_disable": [ + "void gc_disable()", + "Deactivates the circular reference collector" + ], + "gc_enable": [ + "void gc_enable()", + "Activates the circular reference collector" + ], + "gc_enabled": [ + "void gc_enabled()", + "Returns status of the circular reference collector" + ], + "gd_info": [ + "array gd_info()", + "" + ], + "getKeywords": [ + "static array getKeywords(string $locale) {", + "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array * }}}" + ], + "get_browser": [ + "mixed get_browser([string browser_name [, bool return_array]])", + "Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array." + ], + "get_called_class": [ + "string get_called_class()", + "Retrieves the \"Late Static Binding\" class name" + ], + "get_cfg_var": [ + "mixed get_cfg_var(string option_name)", + "Get the value of a PHP configuration option" + ], + "get_class": [ + "string get_class([object object])", + "Retrieves the class name" + ], + "get_class_methods": [ + "array get_class_methods(mixed class)", + "Returns an array of method names for class or class instance." + ], + "get_class_vars": [ + "array get_class_vars(string class_name)", + "Returns an array of default properties of the class." + ], + "get_current_user": [ + "string get_current_user()", + "Get the name of the owner of the current PHP script" + ], + "get_declared_classes": [ + "array get_declared_classes()", + "Returns an array of all declared classes." + ], + "get_declared_interfaces": [ + "array get_declared_interfaces()", + "Returns an array of all declared interfaces." + ], + "get_defined_constants": [ + "array get_defined_constants([bool categorize])", + "Return an array containing the names and values of all defined constants" + ], + "get_defined_functions": [ + "array get_defined_functions()", + "Returns an array of all defined functions" + ], + "get_defined_vars": [ + "array get_defined_vars()", + "Returns an associative array of names and values of all currently defined variable names (variables in the current scope)" + ], + "get_display_language": [ + "static string get_display_language($locale[, $in_locale = null])", + "* gets the language for the $locale in $in_locale or default_locale" + ], + "get_display_name": [ + "static string get_display_name($locale[, $in_locale = null])", + "* gets the name for the $locale in $in_locale or default_locale" + ], + "get_display_region": [ + "static string get_display_region($locale, $in_locale = null)", + "* gets the region for the $locale in $in_locale or default_locale" + ], + "get_display_script": [ + "static string get_display_script($locale, $in_locale = null)", + "* gets the script for the $locale in $in_locale or default_locale" + ], + "get_extension_funcs": [ + "array get_extension_funcs(string extension_name)", + "Returns an array with the names of functions belonging to the named extension" + ], + "get_headers": [ + "array get_headers(string url[, int format])", + "fetches all the headers sent by the server in response to a HTTP request" + ], + "get_html_translation_table": [ + "array get_html_translation_table([int table [, int quote_style]])", + "Returns the internal translation table used by htmlspecialchars and htmlentities" + ], + "get_include_path": [ + "string get_include_path()", + "Get the current include_path configuration option" + ], + "get_included_files": [ + "array get_included_files()", + "Returns an array with the file names that were include_once()'d" + ], + "get_loaded_extensions": [ + "array get_loaded_extensions([bool zend_extensions])", + "Return an array containing names of loaded extensions" + ], + "get_magic_quotes_gpc": [ + "int get_magic_quotes_gpc()", + "Get the current active configuration setting of magic_quotes_gpc" + ], + "get_magic_quotes_runtime": [ + "int get_magic_quotes_runtime()", + "Get the current active configuration setting of magic_quotes_runtime" + ], + "get_meta_tags": [ + "array get_meta_tags(string filename [, bool use_include_path])", + "Extracts all meta tag content attributes from a file and returns an array" + ], + "get_object_vars": [ + "array get_object_vars(object obj)", + "Returns an array of object properties" + ], + "get_parent_class": [ + "string get_parent_class([mixed object])", + "Retrieves the parent class name for object or class or current scope." + ], + "get_resource_type": [ + "string get_resource_type(resource res)", + "Get the resource type name for a given resource" + ], + "getallheaders": [ + "array getallheaders()", + "" + ], + "getcwd": [ + "mixed getcwd()", + "Gets the current directory" + ], + "getdate": [ + "array getdate([int timestamp])", + "Get date/time information" + ], + "getenv": [ + "string getenv(string varname)", + "Get the value of an environment variable" + ], + "gethostbyaddr": [ + "string gethostbyaddr(string ip_address)", + "Get the Internet host name corresponding to a given IP address" + ], + "gethostbyname": [ + "string gethostbyname(string hostname)", + "Get the IP address corresponding to a given Internet host name" + ], + "gethostbynamel": [ + "array gethostbynamel(string hostname)", + "Return a list of IP addresses that a given hostname resolves to." + ], + "gethostname": [ + "string gethostname()", + "Get the host name of the current machine" + ], + "getimagesize": [ + "array getimagesize(string imagefile [, array info])", + "Get the size of an image as 4-element array" + ], + "getlastmod": [ + "int getlastmod()", + "Get time of last page modification" + ], + "getmygid": [ + "int getmygid()", + "Get PHP script owner's GID" + ], + "getmyinode": [ + "int getmyinode()", + "Get the inode of the current script being parsed" + ], + "getmypid": [ + "int getmypid()", + "Get current process ID" + ], + "getmyuid": [ + "int getmyuid()", + "Get PHP script owner's UID" + ], + "getopt": [ + "array getopt(string options [, array longopts])", + "Get options from the command line argument list" + ], + "getprotobyname": [ + "int getprotobyname(string name)", + "Returns protocol number associated with name as per /etc/protocols" + ], + "getprotobynumber": [ + "string getprotobynumber(int proto)", + "Returns protocol name associated with protocol number proto" + ], + "getrandmax": [ + "int getrandmax()", + "Returns the maximum value a random number can have" + ], + "getrusage": [ + "array getrusage([int who])", + "Returns an array of usage statistics" + ], + "getservbyname": [ + "int getservbyname(string service, string protocol)", + "Returns port associated with service. Protocol must be \"tcp\" or \"udp\"" + ], + "getservbyport": [ + "string getservbyport(int port, string protocol)", + "Returns service name associated with port. Protocol must be \"tcp\" or \"udp\"" + ], + "gettext": [ + "string gettext(string msgid)", + "Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist" + ], + "gettimeofday": [ + "array gettimeofday([bool get_as_float])", + "Returns the current time as array" + ], + "gettype": [ + "string gettype(mixed var)", + "Returns the type of the variable" + ], + "glob": [ + "array glob(string pattern [, int flags])", + "Find pathnames matching a pattern" + ], + "gmdate": [ + "string gmdate(string format [, long timestamp])", + "Format a GMT date/time" + ], + "gmmktime": [ + "int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])", + "Get UNIX timestamp for a GMT date" + ], + "gmp_abs": [ + "resource gmp_abs(resource a)", + "Calculates absolute value" + ], + "gmp_add": [ + "resource gmp_add(resource a, resource b)", + "Add a and b" + ], + "gmp_and": [ + "resource gmp_and(resource a, resource b)", + "Calculates logical AND of a and b" + ], + "gmp_clrbit": [ + "void gmp_clrbit(resource &a, int index)", + "Clears bit in a" + ], + "gmp_cmp": [ + "int gmp_cmp(resource a, resource b)", + "Compares two numbers" + ], + "gmp_com": [ + "resource gmp_com(resource a)", + "Calculates one's complement of a" + ], + "gmp_div_q": [ + "resource gmp_div_q(resource a, resource b [, int round])", + "Divide a by b, returns quotient only" + ], + "gmp_div_qr": [ + "array gmp_div_qr(resource a, resource b [, int round])", + "Divide a by b, returns quotient and reminder" + ], + "gmp_div_r": [ + "resource gmp_div_r(resource a, resource b [, int round])", + "Divide a by b, returns reminder only" + ], + "gmp_divexact": [ + "resource gmp_divexact(resource a, resource b)", + "Divide a by b using exact division algorithm" + ], + "gmp_fact": [ + "resource gmp_fact(int a)", + "Calculates factorial function" + ], + "gmp_gcd": [ + "resource gmp_gcd(resource a, resource b)", + "Computes greatest common denominator (gcd) of a and b" + ], + "gmp_gcdext": [ + "array gmp_gcdext(resource a, resource b)", + "Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)" + ], + "gmp_hamdist": [ + "int gmp_hamdist(resource a, resource b)", + "Calculates hamming distance between a and b" + ], + "gmp_init": [ + "resource gmp_init(mixed number [, int base])", + "Initializes GMP number" + ], + "gmp_intval": [ + "int gmp_intval(resource gmpnumber)", + "Gets signed long value of GMP number" + ], + "gmp_invert": [ + "resource gmp_invert(resource a, resource b)", + "Computes the inverse of a modulo b" + ], + "gmp_jacobi": [ + "int gmp_jacobi(resource a, resource b)", + "Computes Jacobi symbol" + ], + "gmp_legendre": [ + "int gmp_legendre(resource a, resource b)", + "Computes Legendre symbol" + ], + "gmp_mod": [ + "resource gmp_mod(resource a, resource b)", + "Computes a modulo b" + ], + "gmp_mul": [ + "resource gmp_mul(resource a, resource b)", + "Multiply a and b" + ], + "gmp_neg": [ + "resource gmp_neg(resource a)", + "Negates a number" + ], + "gmp_nextprime": [ + "resource gmp_nextprime(resource a)", + "Finds next prime of a" + ], + "gmp_or": [ + "resource gmp_or(resource a, resource b)", + "Calculates logical OR of a and b" + ], + "gmp_perfect_square": [ + "bool gmp_perfect_square(resource a)", + "Checks if a is an exact square" + ], + "gmp_popcount": [ + "int gmp_popcount(resource a)", + "Calculates the population count of a" + ], + "gmp_pow": [ + "resource gmp_pow(resource base, int exp)", + "Raise base to power exp" + ], + "gmp_powm": [ + "resource gmp_powm(resource base, resource exp, resource mod)", + "Raise base to power exp and take result modulo mod" + ], + "gmp_prob_prime": [ + "int gmp_prob_prime(resource a[, int reps])", + "Checks if a is \"probably prime\"" + ], + "gmp_random": [ + "resource gmp_random([int limiter])", + "Gets random number" + ], + "gmp_scan0": [ + "int gmp_scan0(resource a, int start)", + "Finds first zero bit" + ], + "gmp_scan1": [ + "int gmp_scan1(resource a, int start)", + "Finds first non-zero bit" + ], + "gmp_setbit": [ + "void gmp_setbit(resource &a, int index[, bool set_clear])", + "Sets or clear bit in a" + ], + "gmp_sign": [ + "int gmp_sign(resource a)", + "Gets the sign of the number" + ], + "gmp_sqrt": [ + "resource gmp_sqrt(resource a)", + "Takes integer part of square root of a" + ], + "gmp_sqrtrem": [ + "array gmp_sqrtrem(resource a)", + "Square root with remainder" + ], + "gmp_strval": [ + "string gmp_strval(resource gmpnumber [, int base])", + "Gets string representation of GMP number" + ], + "gmp_sub": [ + "resource gmp_sub(resource a, resource b)", + "Subtract b from a" + ], + "gmp_testbit": [ + "bool gmp_testbit(resource a, int index)", + "Tests if bit is set in a" + ], + "gmp_xor": [ + "resource gmp_xor(resource a, resource b)", + "Calculates logical exclusive OR of a and b" + ], + "gmstrftime": [ + "string gmstrftime(string format [, int timestamp])", + "Format a GMT/UCT time/date according to locale settings" + ], + "grapheme_extract": [ + "string grapheme_extract(string str, int size[, int extract_type[, int start[, int next]]])", + "Function to extract a sequence of default grapheme clusters" + ], + "grapheme_stripos": [ + "int grapheme_stripos(string haystack, string needle [, int offset ])", + "Find position of first occurrence of a string within another, ignoring case differences" + ], + "grapheme_stristr": [ + "string grapheme_stristr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "grapheme_strlen": [ + "int grapheme_strlen(string str)", + "Get number of graphemes in a string" + ], + "grapheme_strpos": [ + "int grapheme_strpos(string haystack, string needle [, int offset ])", + "Find position of first occurrence of a string within another" + ], + "grapheme_strripos": [ + "int grapheme_strripos(string haystack, string needle [, int offset])", + "Find position of last occurrence of a string within another, ignoring case" + ], + "grapheme_strrpos": [ + "int grapheme_strrpos(string haystack, string needle [, int offset])", + "Find position of last occurrence of a string within another" + ], + "grapheme_strstr": [ + "string grapheme_strstr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "grapheme_substr": [ + "string grapheme_substr(string str, int start [, int length])", + "Returns part of a string" + ], + "gregoriantojd": [ + "int gregoriantojd(int month, int day, int year)", + "Converts a gregorian calendar date to julian day count" + ], + "gzcompress": [ + "string gzcompress(string data [, int level])", + "Gzip-compress a string" + ], + "gzdeflate": [ + "string gzdeflate(string data [, int level])", + "Gzip-compress a string" + ], + "gzencode": [ + "string gzencode(string data [, int level [, int encoding_mode]])", + "GZ encode a string" + ], + "gzfile": [ + "array gzfile(string filename [, int use_include_path])", + "Read und uncompress entire .gz-file into an array" + ], + "gzinflate": [ + "string gzinflate(string data [, int length])", + "Unzip a gzip-compressed string" + ], + "gzopen": [ + "resource gzopen(string filename, string mode [, int use_include_path])", + "Open a .gz-file and return a .gz-file pointer" + ], + "gzuncompress": [ + "string gzuncompress(string data [, int length])", + "Unzip a gzip-compressed string" + ], + "hash": [ + "string hash(string algo, string data[, bool raw_output = false])", + "Generate a hash of a given input string Returns lowercase hexits by default" + ], + "hash_algos": [ + "array hash_algos()", + "Return a list of registered hashing algorithms" + ], + "hash_copy": [ + "resource hash_copy(resource context)", + "Copy hash resource" + ], + "hash_file": [ + "string hash_file(string algo, string filename[, bool raw_output = false])", + "Generate a hash of a given file Returns lowercase hexits by default" + ], + "hash_final": [ + "string hash_final(resource context[, bool raw_output=false])", + "Output resulting digest" + ], + "hash_hmac": [ + "string hash_hmac(string algo, string data, string key[, bool raw_output = false])", + "Generate a hash of a given input string with a key using HMAC Returns lowercase hexits by default" + ], + "hash_hmac_file": [ + "string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])", + "Generate a hash of a given file with a key using HMAC Returns lowercase hexits by default" + ], + "hash_init": [ + "resource hash_init(string algo[, int options, string key])", + "Initialize a hashing context" + ], + "hash_update": [ + "bool hash_update(resource context, string data)", + "Pump data into the hashing algorithm" + ], + "hash_update_file": [ + "bool hash_update_file(resource context, string filename[, resource context])", + "Pump data into the hashing algorithm from a file" + ], + "hash_update_stream": [ + "int hash_update_stream(resource context, resource handle[, integer length])", + "Pump data into the hashing algorithm from an open stream" + ], + "header": [ + "void header(string header [, bool replace, [int http_response_code]])", + "Sends a raw HTTP header" + ], + "header_remove": [ + "void header_remove([string name])", + "Removes an HTTP header previously set using header()" + ], + "headers_list": [ + "array headers_list()", + "Return list of headers to be sent / already sent" + ], + "headers_sent": [ + "bool headers_sent([string &$file [, int &$line]])", + "Returns true if headers have already been sent, false otherwise" + ], + "hebrev": [ + "string hebrev(string str [, int max_chars_per_line])", + "Converts logical Hebrew text to visual text" + ], + "hebrevc": [ + "string hebrevc(string str [, int max_chars_per_line])", + "Converts logical Hebrew text to visual text with newline conversion" + ], + "hexdec": [ + "int hexdec(string hexadecimal_number)", + "Returns the decimal equivalent of the hexadecimal number" + ], + "highlight_file": [ + "bool highlight_file(string file_name [, bool return] )", + "Syntax highlight a source file" + ], + "highlight_string": [ + "bool highlight_string(string string [, bool return] )", + "Syntax highlight a string or optionally return it" + ], + "html_entity_decode": [ + "string html_entity_decode(string string [, int quote_style][, string charset])", + "Convert all HTML entities to their applicable characters" + ], + "htmlentities": [ + "string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])", + "Convert all applicable characters to HTML entities" + ], + "htmlspecialchars": [ + "string htmlspecialchars(string string [, int quote_style[, string charset[, bool double_encode]]])", + "Convert special characters to HTML entities" + ], + "htmlspecialchars_decode": [ + "string htmlspecialchars_decode(string string [, int quote_style])", + "Convert special HTML entities back to characters" + ], + "http_build_query": [ + "string http_build_query(mixed formdata [, string prefix [, string arg_separator]])", + "Generates a form-encoded query string from an associative array or object." + ], + "hypot": [ + "float hypot(float num1, float num2)", + "Returns sqrt(num1*num1 + num2*num2)" + ], + "ibase_add_user": [ + "bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Add a user to security database" + ], + "ibase_affected_rows": [ + "int ibase_affected_rows( [ resource link_identifier ] )", + "Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement" + ], + "ibase_backup": [ + "mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]])", + "Initiates a backup task in the service manager and returns immediately" + ], + "ibase_blob_add": [ + "bool ibase_blob_add(resource blob_handle, string data)", + "Add data into created blob" + ], + "ibase_blob_cancel": [ + "bool ibase_blob_cancel(resource blob_handle)", + "Cancel creating blob" + ], + "ibase_blob_close": [ + "string ibase_blob_close(resource blob_handle)", + "Close blob" + ], + "ibase_blob_create": [ + "resource ibase_blob_create([resource link_identifier])", + "Create blob for adding data" + ], + "ibase_blob_echo": [ + "bool ibase_blob_echo([ resource link_identifier, ] string blob_id)", + "Output blob contents to browser" + ], + "ibase_blob_get": [ + "string ibase_blob_get(resource blob_handle, int len)", + "Get len bytes data from open blob" + ], + "ibase_blob_import": [ + "string ibase_blob_import([ resource link_identifier, ] resource file)", + "Create blob, copy file in it, and close it" + ], + "ibase_blob_info": [ + "array ibase_blob_info([ resource link_identifier, ] string blob_id)", + "Return blob length and other useful info" + ], + "ibase_blob_open": [ + "resource ibase_blob_open([ resource link_identifier, ] string blob_id)", + "Open blob for retrieving data parts" + ], + "ibase_close": [ + "bool ibase_close([resource link_identifier])", + "Close an InterBase connection" + ], + "ibase_commit": [ + "bool ibase_commit( resource link_identifier )", + "Commit transaction" + ], + "ibase_commit_ret": [ + "bool ibase_commit_ret( resource link_identifier )", + "Commit transaction and retain the transaction context" + ], + "ibase_connect": [ + "resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])", + "Open a connection to an InterBase database" + ], + "ibase_db_info": [ + "string ibase_db_info(resource service_handle, string db, int action [, int argument])", + "Request statistics about a database" + ], + "ibase_delete_user": [ + "bool ibase_delete_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Delete a user from security database" + ], + "ibase_drop_db": [ + "bool ibase_drop_db([resource link_identifier])", + "Drop an InterBase database" + ], + "ibase_errcode": [ + "int ibase_errcode()", + "Return error code" + ], + "ibase_errmsg": [ + "string ibase_errmsg()", + "Return error message" + ], + "ibase_execute": [ + "mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]])", + "Execute a previously prepared query" + ], + "ibase_fetch_assoc": [ + "array ibase_fetch_assoc(resource result [, int fetch_flags])", + "Fetch a row from the results of a query" + ], + "ibase_fetch_object": [ + "object ibase_fetch_object(resource result [, int fetch_flags])", + "Fetch a object from the results of a query" + ], + "ibase_fetch_row": [ + "array ibase_fetch_row(resource result [, int fetch_flags])", + "Fetch a row from the results of a query" + ], + "ibase_field_info": [ + "array ibase_field_info(resource query_result, int field_number)", + "Get information about a field" + ], + "ibase_free_event_handler": [ + "bool ibase_free_event_handler(resource event)", + "Frees the event handler set by ibase_set_event_handler()" + ], + "ibase_free_query": [ + "bool ibase_free_query(resource query)", + "Free memory used by a query" + ], + "ibase_free_result": [ + "bool ibase_free_result(resource result)", + "Free the memory used by a result" + ], + "ibase_gen_id": [ + "int ibase_gen_id(string generator [, int increment [, resource link_identifier ]])", + "Increments the named generator and returns its new value" + ], + "ibase_maintain_db": [ + "bool ibase_maintain_db(resource service_handle, string db, int action [, int argument])", + "Execute a maintenance command on the database server" + ], + "ibase_modify_user": [ + "bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Modify a user in security database" + ], + "ibase_name_result": [ + "bool ibase_name_result(resource result, string name)", + "Assign a name to a result for use with ... WHERE CURRENT OF statements" + ], + "ibase_num_fields": [ + "int ibase_num_fields(resource query_result)", + "Get the number of fields in result" + ], + "ibase_num_params": [ + "int ibase_num_params(resource query)", + "Get the number of params in a prepared query" + ], + "ibase_num_rows": [ + "int ibase_num_rows( resource result_identifier )", + "Return the number of rows that are available in a result" + ], + "ibase_param_info": [ + "array ibase_param_info(resource query, int field_number)", + "Get information about a parameter" + ], + "ibase_pconnect": [ + "resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])", + "Open a persistent connection to an InterBase database" + ], + "ibase_prepare": [ + "resource ibase_prepare(resource link_identifier[, string query [, resource trans_identifier ]])", + "Prepare a query for later execution" + ], + "ibase_query": [ + "mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]])", + "Execute a query" + ], + "ibase_restore": [ + "mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]])", + "Initiates a restore task in the service manager and returns immediately" + ], + "ibase_rollback": [ + "bool ibase_rollback( resource link_identifier )", + "Rollback transaction" + ], + "ibase_rollback_ret": [ + "bool ibase_rollback_ret( resource link_identifier )", + "Rollback transaction and retain the transaction context" + ], + "ibase_server_info": [ + "string ibase_server_info(resource service_handle, int action)", + "Request information about a database server" + ], + "ibase_service_attach": [ + "resource ibase_service_attach(string host, string dba_username, string dba_password)", + "Connect to the service manager" + ], + "ibase_service_detach": [ + "bool ibase_service_detach(resource service_handle)", + "Disconnect from the service manager" + ], + "ibase_set_event_handler": [ + "resource ibase_set_event_handler([resource link_identifier,] callback handler, string event [, string event [, ...]])", + "Register the callback for handling each of the named events" + ], + "ibase_trans": [ + "resource ibase_trans([int trans_args [, resource link_identifier [, ... ], int trans_args [, resource link_identifier [, ... ]] [, ...]]])", + "Start a transaction over one or several databases" + ], + "ibase_wait_event": [ + "string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]])", + "Waits for any one of the passed Interbase events to be posted by the database, and returns its name" + ], + "iconv": [ + "string iconv(string in_charset, string out_charset, string str)", + "Returns str converted to the out_charset character set" + ], + "iconv_get_encoding": [ + "mixed iconv_get_encoding([string type])", + "Get internal encoding and output encoding for ob_iconv_handler()" + ], + "iconv_mime_decode": [ + "string iconv_mime_decode(string encoded_string [, int mode, string charset])", + "Decodes a mime header field" + ], + "iconv_mime_decode_headers": [ + "array iconv_mime_decode_headers(string headers [, int mode, string charset])", + "Decodes multiple mime header fields" + ], + "iconv_mime_encode": [ + "string iconv_mime_encode(string field_name, string field_value [, array preference])", + "Composes a mime header field with field_name and field_value in a specified scheme" + ], + "iconv_set_encoding": [ + "bool iconv_set_encoding(string type, string charset)", + "Sets internal encoding and output encoding for ob_iconv_handler()" + ], + "iconv_strlen": [ + "int iconv_strlen(string str [, string charset])", + "Returns the character count of str" + ], + "iconv_strpos": [ + "int iconv_strpos(string haystack, string needle [, int offset [, string charset]])", + "Finds position of first occurrence of needle within part of haystack beginning with offset" + ], + "iconv_strrpos": [ + "int iconv_strrpos(string haystack, string needle [, string charset])", + "Finds position of last occurrence of needle within part of haystack beginning with offset" + ], + "iconv_substr": [ + "string iconv_substr(string str, int offset, [int length, string charset])", + "Returns specified part of a string" + ], + "idate": [ + "int idate(string format [, int timestamp])", + "Format a local time/date as integer" + ], + "idn_to_ascii": [ + "int idn_to_ascii(string domain[, int options])", + "Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC" + ], + "idn_to_utf8": [ + "int idn_to_utf8(string domain[, int options])", + "Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC" + ], + "ignore_user_abort": [ + "int ignore_user_abort([string value])", + "Set whether we want to ignore a user abort event or not" + ], + "image2wbmp": [ + "bool image2wbmp(resource im [, string filename [, int threshold]])", + "Output WBMP image to browser or file" + ], + "image_type_to_extension": [ + "string image_type_to_extension(int imagetype [, bool include_dot])", + "Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype" + ], + "image_type_to_mime_type": [ + "string image_type_to_mime_type(int imagetype)", + "Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype" + ], + "imagealphablending": [ + "bool imagealphablending(resource im, bool on)", + "Turn alpha blending mode on or off for the given image" + ], + "imageantialias": [ + "bool imageantialias(resource im, bool on)", + "Should antialiased functions used or not" + ], + "imagearc": [ + "bool imagearc(resource im, int cx, int cy, int w, int h, int s, int e, int col)", + "Draw a partial ellipse" + ], + "imagechar": [ + "bool imagechar(resource im, int font, int x, int y, string c, int col)", + "Draw a character" + ], + "imagecharup": [ + "bool imagecharup(resource im, int font, int x, int y, string c, int col)", + "Draw a character rotated 90 degrees counter-clockwise" + ], + "imagecolorallocate": [ + "int imagecolorallocate(resource im, int red, int green, int blue)", + "Allocate a color for an image" + ], + "imagecolorallocatealpha": [ + "int imagecolorallocatealpha(resource im, int red, int green, int blue, int alpha)", + "Allocate a color with an alpha level. Works for true color and palette based images" + ], + "imagecolorat": [ + "int imagecolorat(resource im, int x, int y)", + "Get the index of the color of a pixel" + ], + "imagecolorclosest": [ + "int imagecolorclosest(resource im, int red, int green, int blue)", + "Get the index of the closest color to the specified color" + ], + "imagecolorclosestalpha": [ + "int imagecolorclosestalpha(resource im, int red, int green, int blue, int alpha)", + "Find the closest matching colour with alpha transparency" + ], + "imagecolorclosesthwb": [ + "int imagecolorclosesthwb(resource im, int red, int green, int blue)", + "Get the index of the color which has the hue, white and blackness nearest to the given color" + ], + "imagecolordeallocate": [ + "bool imagecolordeallocate(resource im, int index)", + "De-allocate a color for an image" + ], + "imagecolorexact": [ + "int imagecolorexact(resource im, int red, int green, int blue)", + "Get the index of the specified color" + ], + "imagecolorexactalpha": [ + "int imagecolorexactalpha(resource im, int red, int green, int blue, int alpha)", + "Find exact match for colour with transparency" + ], + "imagecolormatch": [ + "bool imagecolormatch(resource im1, resource im2)", + "Makes the colors of the palette version of an image more closely match the true color version" + ], + "imagecolorresolve": [ + "int imagecolorresolve(resource im, int red, int green, int blue)", + "Get the index of the specified color or its closest possible alternative" + ], + "imagecolorresolvealpha": [ + "int imagecolorresolvealpha(resource im, int red, int green, int blue, int alpha)", + "Resolve/Allocate a colour with an alpha level. Works for true colour and palette based images" + ], + "imagecolorset": [ + "void imagecolorset(resource im, int col, int red, int green, int blue)", + "Set the color for the specified palette index" + ], + "imagecolorsforindex": [ + "array imagecolorsforindex(resource im, int col)", + "Get the colors for an index" + ], + "imagecolorstotal": [ + "int imagecolorstotal(resource im)", + "Find out the number of colors in an image's palette" + ], + "imagecolortransparent": [ + "int imagecolortransparent(resource im [, int col])", + "Define a color as transparent" + ], + "imageconvolution": [ + "resource imageconvolution(resource src_im, array matrix3x3, double div, double offset)", + "Apply a 3x3 convolution matrix, using coefficient div and offset" + ], + "imagecopy": [ + "bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)", + "Copy part of an image" + ], + "imagecopymerge": [ + "bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)", + "Merge one part of an image with another" + ], + "imagecopymergegray": [ + "bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)", + "Merge one part of an image with another" + ], + "imagecopyresampled": [ + "bool imagecopyresampled(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)", + "Copy and resize part of an image using resampling to help ensure clarity" + ], + "imagecopyresized": [ + "bool imagecopyresized(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)", + "Copy and resize part of an image" + ], + "imagecreate": [ + "resource imagecreate(int x_size, int y_size)", + "Create a new image" + ], + "imagecreatefromgd": [ + "resource imagecreatefromgd(string filename)", + "Create a new image from GD file or URL" + ], + "imagecreatefromgd2": [ + "resource imagecreatefromgd2(string filename)", + "Create a new image from GD2 file or URL" + ], + "imagecreatefromgd2part": [ + "resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height)", + "Create a new image from a given part of GD2 file or URL" + ], + "imagecreatefromgif": [ + "resource imagecreatefromgif(string filename)", + "Create a new image from GIF file or URL" + ], + "imagecreatefromjpeg": [ + "resource imagecreatefromjpeg(string filename)", + "Create a new image from JPEG file or URL" + ], + "imagecreatefrompng": [ + "resource imagecreatefrompng(string filename)", + "Create a new image from PNG file or URL" + ], + "imagecreatefromstring": [ + "resource imagecreatefromstring(string image)", + "Create a new image from the image stream in the string" + ], + "imagecreatefromwbmp": [ + "resource imagecreatefromwbmp(string filename)", + "Create a new image from WBMP file or URL" + ], + "imagecreatefromxbm": [ + "resource imagecreatefromxbm(string filename)", + "Create a new image from XBM file or URL" + ], + "imagecreatefromxpm": [ + "resource imagecreatefromxpm(string filename)", + "Create a new image from XPM file or URL" + ], + "imagecreatetruecolor": [ + "resource imagecreatetruecolor(int x_size, int y_size)", + "Create a new true color image" + ], + "imagedashedline": [ + "bool imagedashedline(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a dashed line" + ], + "imagedestroy": [ + "bool imagedestroy(resource im)", + "Destroy an image" + ], + "imageellipse": [ + "bool imageellipse(resource im, int cx, int cy, int w, int h, int color)", + "Draw an ellipse" + ], + "imagefill": [ + "bool imagefill(resource im, int x, int y, int col)", + "Flood fill" + ], + "imagefilledarc": [ + "bool imagefilledarc(resource im, int cx, int cy, int w, int h, int s, int e, int col, int style)", + "Draw a filled partial ellipse" + ], + "imagefilledellipse": [ + "bool imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)", + "Draw an ellipse" + ], + "imagefilledpolygon": [ + "bool imagefilledpolygon(resource im, array point, int num_points, int col)", + "Draw a filled polygon" + ], + "imagefilledrectangle": [ + "bool imagefilledrectangle(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a filled rectangle" + ], + "imagefilltoborder": [ + "bool imagefilltoborder(resource im, int x, int y, int border, int col)", + "Flood fill to specific color" + ], + "imagefilter": [ + "bool imagefilter(resource src_im, int filtertype, [args] )", + "Applies Filter an image using a custom angle" + ], + "imagefontheight": [ + "int imagefontheight(int font)", + "Get font height" + ], + "imagefontwidth": [ + "int imagefontwidth(int font)", + "Get font width" + ], + "imageftbbox": [ + "array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])", + "Give the bounding box of a text using fonts via freetype2" + ], + "imagefttext": [ + "array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])", + "Write text to the image using fonts via freetype2" + ], + "imagegammacorrect": [ + "bool imagegammacorrect(resource im, float inputgamma, float outputgamma)", + "Apply a gamma correction to a GD image" + ], + "imagegd": [ + "bool imagegd(resource im [, string filename])", + "Output GD image to browser or file" + ], + "imagegd2": [ + "bool imagegd2(resource im [, string filename, [, int chunk_size, [, int type]]])", + "Output GD2 image to browser or file" + ], + "imagegif": [ + "bool imagegif(resource im [, string filename])", + "Output GIF image to browser or file" + ], + "imagegrabscreen": [ + "resource imagegrabscreen()", + "Grab a screenshot" + ], + "imagegrabwindow": [ + "resource imagegrabwindow(int window_handle [, int client_area])", + "Grab a window or its client area using a windows handle (HWND property in COM instance)" + ], + "imageinterlace": [ + "int imageinterlace(resource im [, int interlace])", + "Enable or disable interlace" + ], + "imageistruecolor": [ + "bool imageistruecolor(resource im)", + "return true if the image uses truecolor" + ], + "imagejpeg": [ + "bool imagejpeg(resource im [, string filename [, int quality]])", + "Output JPEG image to browser or file" + ], + "imagelayereffect": [ + "bool imagelayereffect(resource im, int effect)", + "Set the alpha blending flag to use the bundled libgd layering effects" + ], + "imageline": [ + "bool imageline(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a line" + ], + "imageloadfont": [ + "int imageloadfont(string filename)", + "Load a new font" + ], + "imagepalettecopy": [ + "void imagepalettecopy(resource dst, resource src)", + "Copy the palette from the src image onto the dst image" + ], + "imagepng": [ + "bool imagepng(resource im [, string filename])", + "Output PNG image to browser or file" + ], + "imagepolygon": [ + "bool imagepolygon(resource im, array point, int num_points, int col)", + "Draw a polygon" + ], + "imagepsbbox": [ + "array imagepsbbox(string text, resource font, int size [, int space, int tightness, float angle])", + "Return the bounding box needed by a string if rasterized" + ], + "imagepscopyfont": [ + "int imagepscopyfont(int font_index)", + "Make a copy of a font for purposes like extending or reenconding" + ], + "imagepsencodefont": [ + "bool imagepsencodefont(resource font_index, string filename)", + "To change a fonts character encoding vector" + ], + "imagepsextendfont": [ + "bool imagepsextendfont(resource font_index, float extend)", + "Extend or or condense if (extend < 1) a font" + ], + "imagepsfreefont": [ + "bool imagepsfreefont(resource font_index)", + "Free memory used by a font" + ], + "imagepsloadfont": [ + "resource imagepsloadfont(string pathname)", + "Load a new font from specified file" + ], + "imagepsslantfont": [ + "bool imagepsslantfont(resource font_index, float slant)", + "Slant a font" + ], + "imagepstext": [ + "array imagepstext(resource image, string text, resource font, int size, int foreground, int background, int xcoord, int ycoord [, int space [, int tightness [, float angle [, int antialias])", + "Rasterize a string over an image" + ], + "imagerectangle": [ + "bool imagerectangle(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a rectangle" + ], + "imagerotate": [ + "resource imagerotate(resource src_im, float angle, int bgdcolor [, int ignoretransparent])", + "Rotate an image using a custom angle" + ], + "imagesavealpha": [ + "bool imagesavealpha(resource im, bool on)", + "Include alpha channel to a saved image" + ], + "imagesetbrush": [ + "bool imagesetbrush(resource image, resource brush)", + "Set the brush image to $brush when filling $image with the \"IMG_COLOR_BRUSHED\" color" + ], + "imagesetpixel": [ + "bool imagesetpixel(resource im, int x, int y, int col)", + "Set a single pixel" + ], + "imagesetstyle": [ + "bool imagesetstyle(resource im, array styles)", + "Set the line drawing styles for use with imageline and IMG_COLOR_STYLED." + ], + "imagesetthickness": [ + "bool imagesetthickness(resource im, int thickness)", + "Set line thickness for drawing lines, ellipses, rectangles, polygons etc." + ], + "imagesettile": [ + "bool imagesettile(resource image, resource tile)", + "Set the tile image to $tile when filling $image with the \"IMG_COLOR_TILED\" color" + ], + "imagestring": [ + "bool imagestring(resource im, int font, int x, int y, string str, int col)", + "Draw a string horizontally" + ], + "imagestringup": [ + "bool imagestringup(resource im, int font, int x, int y, string str, int col)", + "Draw a string vertically - rotated 90 degrees counter-clockwise" + ], + "imagesx": [ + "int imagesx(resource im)", + "Get image width" + ], + "imagesy": [ + "int imagesy(resource im)", + "Get image height" + ], + "imagetruecolortopalette": [ + "void imagetruecolortopalette(resource im, bool ditherFlag, int colorsWanted)", + "Convert a true colour image to a palette based image with a number of colours, optionally using dithering." + ], + "imagettfbbox": [ + "array imagettfbbox(float size, float angle, string font_file, string text)", + "Give the bounding box of a text using TrueType fonts" + ], + "imagettftext": [ + "array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)", + "Write text to the image using a TrueType font" + ], + "imagetypes": [ + "int imagetypes()", + "Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM" + ], + "imagewbmp": [ + "bool imagewbmp(resource im [, string filename, [, int foreground]])", + "Output WBMP image to browser or file" + ], + "imagexbm": [ + "int imagexbm(int im, string filename [, int foreground])", + "Output XBM image to browser or file" + ], + "imap_8bit": [ + "string imap_8bit(string text)", + "Convert an 8-bit string to a quoted-printable string" + ], + "imap_alerts": [ + "array imap_alerts()", + "Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called." + ], + "imap_append": [ + "bool imap_append(resource stream_id, string folder, string message [, string options [, string internal_date]])", + "Append a new message to a specified mailbox" + ], + "imap_base64": [ + "string imap_base64(string text)", + "Decode BASE64 encoded text" + ], + "imap_binary": [ + "string imap_binary(string text)", + "Convert an 8bit string to a base64 string" + ], + "imap_body": [ + "string imap_body(resource stream_id, int msg_no [, int options])", + "Read the message body" + ], + "imap_bodystruct": [ + "object imap_bodystruct(resource stream_id, int msg_no, string section)", + "Read the structure of a specified body section of a specific message" + ], + "imap_check": [ + "object imap_check(resource stream_id)", + "Get mailbox properties" + ], + "imap_clearflag_full": [ + "bool imap_clearflag_full(resource stream_id, string sequence, string flag [, int options])", + "Clears flags on messages" + ], + "imap_close": [ + "bool imap_close(resource stream_id [, int options])", + "Close an IMAP stream" + ], + "imap_createmailbox": [ + "bool imap_createmailbox(resource stream_id, string mailbox)", + "Create a new mailbox" + ], + "imap_delete": [ + "bool imap_delete(resource stream_id, int msg_no [, int options])", + "Mark a message for deletion" + ], + "imap_deletemailbox": [ + "bool imap_deletemailbox(resource stream_id, string mailbox)", + "Delete a mailbox" + ], + "imap_errors": [ + "array imap_errors()", + "Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called." + ], + "imap_expunge": [ + "bool imap_expunge(resource stream_id)", + "Permanently delete all messages marked for deletion" + ], + "imap_fetch_overview": [ + "array imap_fetch_overview(resource stream_id, string sequence [, int options])", + "Read an overview of the information in the headers of the given message sequence" + ], + "imap_fetchbody": [ + "string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])", + "Get a specific body section" + ], + "imap_fetchheader": [ + "string imap_fetchheader(resource stream_id, int msg_no [, int options])", + "Get the full unfiltered header for a message" + ], + "imap_fetchstructure": [ + "object imap_fetchstructure(resource stream_id, int msg_no [, int options])", + "Read the full structure of a message" + ], + "imap_gc": [ + "bool imap_gc(resource stream_id, int flags)", + "This function garbage collects (purges) the cache of entries of a specific type." + ], + "imap_get_quota": [ + "array imap_get_quota(resource stream_id, string qroot)", + "Returns the quota set to the mailbox account qroot" + ], + "imap_get_quotaroot": [ + "array imap_get_quotaroot(resource stream_id, string mbox)", + "Returns the quota set to the mailbox account mbox" + ], + "imap_getacl": [ + "array imap_getacl(resource stream_id, string mailbox)", + "Gets the ACL for a given mailbox" + ], + "imap_getmailboxes": [ + "array imap_getmailboxes(resource stream_id, string ref, string pattern)", + "Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter" + ], + "imap_getsubscribed": [ + "array imap_getsubscribed(resource stream_id, string ref, string pattern)", + "Return a list of subscribed mailboxes, in the same format as imap_getmailboxes()" + ], + "imap_headerinfo": [ + "object imap_headerinfo(resource stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])", + "Read the headers of the message" + ], + "imap_headers": [ + "array imap_headers(resource stream_id)", + "Returns headers for all messages in a mailbox" + ], + "imap_last_error": [ + "string imap_last_error()", + "Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call." + ], + "imap_list": [ + "array imap_list(resource stream_id, string ref, string pattern)", + "Read the list of mailboxes" + ], + "imap_listscan": [ + "array imap_listscan(resource stream_id, string ref, string pattern, string content)", + "Read list of mailboxes containing a certain string" + ], + "imap_lsub": [ + "array imap_lsub(resource stream_id, string ref, string pattern)", + "Return a list of subscribed mailboxes" + ], + "imap_mail": [ + "bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])", + "Send an email message" + ], + "imap_mail_compose": [ + "string imap_mail_compose(array envelope, array body)", + "Create a MIME message based on given envelope and body sections" + ], + "imap_mail_copy": [ + "bool imap_mail_copy(resource stream_id, string msglist, string mailbox [, int options])", + "Copy specified message to a mailbox" + ], + "imap_mail_move": [ + "bool imap_mail_move(resource stream_id, string sequence, string mailbox [, int options])", + "Move specified message to a mailbox" + ], + "imap_mailboxmsginfo": [ + "object imap_mailboxmsginfo(resource stream_id)", + "Returns info about the current mailbox" + ], + "imap_mime_header_decode": [ + "array imap_mime_header_decode(string str)", + "Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text'" + ], + "imap_msgno": [ + "int imap_msgno(resource stream_id, int unique_msg_id)", + "Get the sequence number associated with a UID" + ], + "imap_mutf7_to_utf8": [ + "string imap_mutf7_to_utf8(string in)", + "Decode a modified UTF-7 string to UTF-8" + ], + "imap_num_msg": [ + "int imap_num_msg(resource stream_id)", + "Gives the number of messages in the current mailbox" + ], + "imap_num_recent": [ + "int imap_num_recent(resource stream_id)", + "Gives the number of recent messages in current mailbox" + ], + "imap_open": [ + "resource imap_open(string mailbox, string user, string password [, int options [, int n_retries]])", + "Open an IMAP stream to a mailbox" + ], + "imap_ping": [ + "bool imap_ping(resource stream_id)", + "Check if the IMAP stream is still active" + ], + "imap_qprint": [ + "string imap_qprint(string text)", + "Convert a quoted-printable string to an 8-bit string" + ], + "imap_renamemailbox": [ + "bool imap_renamemailbox(resource stream_id, string old_name, string new_name)", + "Rename a mailbox" + ], + "imap_reopen": [ + "bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]])", + "Reopen an IMAP stream to a new mailbox" + ], + "imap_rfc822_parse_adrlist": [ + "array imap_rfc822_parse_adrlist(string address_string, string default_host)", + "Parses an address string" + ], + "imap_rfc822_parse_headers": [ + "object imap_rfc822_parse_headers(string headers [, string default_host])", + "Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo()" + ], + "imap_rfc822_write_address": [ + "string imap_rfc822_write_address(string mailbox, string host, string personal)", + "Returns a properly formatted email address given the mailbox, host, and personal info" + ], + "imap_savebody": [ + "bool imap_savebody(resource stream_id, string|resource file, int msg_no[, string section = \"\"[, int options = 0]])", + "Save a specific body section to a file" + ], + "imap_search": [ + "array imap_search(resource stream_id, string criteria [, int options [, string charset]])", + "Return a list of messages matching the given criteria" + ], + "imap_set_quota": [ + "bool imap_set_quota(resource stream_id, string qroot, int mailbox_size)", + "Will set the quota for qroot mailbox" + ], + "imap_setacl": [ + "bool imap_setacl(resource stream_id, string mailbox, string id, string rights)", + "Sets the ACL for a given mailbox" + ], + "imap_setflag_full": [ + "bool imap_setflag_full(resource stream_id, string sequence, string flag [, int options])", + "Sets flags on messages" + ], + "imap_sort": [ + "array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]])", + "Sort an array of message headers, optionally including only messages that meet specified criteria." + ], + "imap_status": [ + "object imap_status(resource stream_id, string mailbox, int options)", + "Get status info from a mailbox" + ], + "imap_subscribe": [ + "bool imap_subscribe(resource stream_id, string mailbox)", + "Subscribe to a mailbox" + ], + "imap_thread": [ + "array imap_thread(resource stream_id [, int options])", + "Return threaded by REFERENCES tree" + ], + "imap_timeout": [ + "mixed imap_timeout(int timeout_type [, int timeout])", + "Set or fetch imap timeout" + ], + "imap_uid": [ + "int imap_uid(resource stream_id, int msg_no)", + "Get the unique message id associated with a standard sequential message number" + ], + "imap_undelete": [ + "bool imap_undelete(resource stream_id, int msg_no [, int flags])", + "Remove the delete flag from a message" + ], + "imap_unsubscribe": [ + "bool imap_unsubscribe(resource stream_id, string mailbox)", + "Unsubscribe from a mailbox" + ], + "imap_utf7_decode": [ + "string imap_utf7_decode(string buf)", + "Decode a modified UTF-7 string" + ], + "imap_utf7_encode": [ + "string imap_utf7_encode(string buf)", + "Encode a string in modified UTF-7" + ], + "imap_utf8": [ + "string imap_utf8(string mime_encoded_text)", + "Convert a mime-encoded text to UTF-8" + ], + "imap_utf8_to_mutf7": [ + "string imap_utf8_to_mutf7(string in)", + "Encode a UTF-8 string to modified UTF-7" + ], + "implode": [ + "string implode([string glue,] array pieces)", + "Joins array elements placing glue string between items and return one string" + ], + "import_request_variables": [ + "bool import_request_variables(string types [, string prefix])", + "Import GET/POST/Cookie variables into the global scope" + ], + "in_array": [ + "bool in_array(mixed needle, array haystack [, bool strict])", + "Checks if the given value exists in the array" + ], + "include": [ + "bool include(string path)", + "Includes and evaluates the specified file" + ], + "include_once": [ + "bool include_once(string path)", + "Includes and evaluates the specified file" + ], + "inet_ntop": [ + "string inet_ntop(string in_addr)", + "Converts a packed inet address to a human readable IP address string" + ], + "inet_pton": [ + "string inet_pton(string ip_address)", + "Converts a human readable IP address to a packed binary string" + ], + "ini_get": [ + "string ini_get(string varname)", + "Get a configuration option" + ], + "ini_get_all": [ + "array ini_get_all([string extension[, bool details = true]])", + "Get all configuration options" + ], + "ini_restore": [ + "void ini_restore(string varname)", + "Restore the value of a configuration option specified by varname" + ], + "ini_set": [ + "string ini_set(string varname, string newvalue)", + "Set a configuration option, returns false on error and the old value of the configuration option on success" + ], + "interface_exists": [ + "bool interface_exists(string classname [, bool autoload])", + "Checks if the class exists" + ], + "intl_error_name": [ + "string intl_error_name()", + "* Return a string for a given error code. * The string will be the same as the name of the error code constant." + ], + "intl_get_error_code": [ + "int intl_get_error_code()", + "* Get code of the last occured error." + ], + "intl_get_error_message": [ + "string intl_get_error_message()", + "* Get text description of the last occured error." + ], + "intl_is_failure": [ + "bool intl_is_failure()", + "* Check whether the given error code indicates a failure. * Returns true if it does, and false if the code * indicates success or a warning." + ], + "intval": [ + "int intval(mixed var [, int base])", + "Get the integer value of a variable using the optional base for the conversion" + ], + "ip2long": [ + "int ip2long(string ip_address)", + "Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address" + ], + "iptcembed": [ + "array iptcembed(string iptcdata, string jpeg_file_name [, int spool])", + "Embed binary IPTC data into a JPEG image." + ], + "iptcparse": [ + "array iptcparse(string iptcdata)", + "Parse binary IPTC-data into associative array" + ], + "is_a": [ + "bool is_a(object object, string class_name)", + "Returns true if the object is of this class or has this class as one of its parents" + ], + "is_array": [ + "bool is_array(mixed var)", + "Returns true if variable is an array" + ], + "is_bool": [ + "bool is_bool(mixed var)", + "Returns true if variable is a boolean" + ], + "is_callable": [ + "bool is_callable(mixed var [, bool syntax_only [, string callable_name]])", + "Returns true if var is callable." + ], + "is_countable": [ + "bool is_countable(mixed var)", + "Returns true if var is countable, false otherwise" + ], + "is_dir": [ + "bool is_dir(string filename)", + "Returns true if file is directory" + ], + "is_executable": [ + "bool is_executable(string filename)", + "Returns true if file is executable" + ], + "is_file": [ + "bool is_file(string filename)", + "Returns true if file is a regular file" + ], + "is_finite": [ + "bool is_finite(float val)", + "Returns whether argument is finite" + ], + "is_float": [ + "bool is_float(mixed var)", + "Returns true if variable is float point" + ], + "is_infinite": [ + "bool is_infinite(float val)", + "Returns whether argument is infinite" + ], + "is_link": [ + "bool is_link(string filename)", + "Returns true if file is symbolic link" + ], + "is_long": [ + "bool is_long(mixed var)", + "Returns true if variable is a long (integer)" + ], + "is_nan": [ + "bool is_nan(float val)", + "Returns whether argument is not a number" + ], + "is_null": [ + "bool is_null(mixed var)", + "Returns true if variable is null" + ], + "is_numeric": [ + "bool is_numeric(mixed value)", + "Returns true if value is a number or a numeric string" + ], + "is_object": [ + "bool is_object(mixed var)", + "Returns true if variable is an object" + ], + "is_readable": [ + "bool is_readable(string filename)", + "Returns true if file can be read" + ], + "is_resource": [ + "bool is_resource(mixed var)", + "Returns true if variable is a resource" + ], + "is_scalar": [ + "bool is_scalar(mixed value)", + "Returns true if value is a scalar" + ], + "is_string": [ + "bool is_string(mixed var)", + "Returns true if variable is a string" + ], + "is_subclass_of": [ + "bool is_subclass_of(object object, string class_name)", + "Returns true if the object has this class as one of its parents" + ], + "is_uploaded_file": [ + "bool is_uploaded_file(string path)", + "Check if file was created by rfc1867 upload" + ], + "is_writable": [ + "bool is_writable(string filename)", + "Returns true if file can be written" + ], + "isset": [ + "bool isset(mixed var [, mixed var])", + "Determine whether a variable is set" + ], + "iterator_apply": [ + "int iterator_apply(Traversable iterator, callable function [, array args = null)", + "Calls a function for every element in an iterator" + ], + "iterator_count": [ + "int iterator_count(Traversable iterator)", + "Count the elements in an iterator" + ], + "iterator_to_array": [ + "array iterator_to_array(Traversable iterator [, bool use_keys = true])", + "Copy the iterator into an array" + ], + "jddayofweek": [ + "mixed jddayofweek(int juliandaycount [, int mode])", + "Returns name or number of day of week from julian day count" + ], + "jdmonthname": [ + "string jdmonthname(int juliandaycount, int mode)", + "Returns name of month for julian day count" + ], + "jdtofrench": [ + "string jdtofrench(int juliandaycount)", + "Converts a julian day count to a french republic calendar date" + ], + "jdtogregorian": [ + "string jdtogregorian(int juliandaycount)", + "Converts a julian day count to a gregorian calendar date" + ], + "jdtojewish": [ + "string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])", + "Converts a julian day count to a jewish calendar date" + ], + "jdtojulian": [ + "string jdtojulian(int juliandaycount)", + "Convert a julian day count to a julian calendar date" + ], + "jdtounix": [ + "int jdtounix(int jday)", + "Convert Julian Day to UNIX timestamp" + ], + "jewishtojd": [ + "int jewishtojd(int month, int day, int year)", + "Converts a jewish calendar date to a julian day count" + ], + "join": [ + "string join([string glue,] array pieces)", + "Returns a string containing a string representation of all the arrayelements in the same order, with the glue string between each element" + ], + "jpeg2wbmp": [ + "bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)", + "Convert JPEG image to WBMP image" + ], + "json_decode": [ + "mixed json_decode(string json [, bool assoc [, long depth]])", + "Decodes the JSON representation into a PHP value" + ], + "json_encode": [ + "string json_encode(mixed data [, int options])", + "Returns the JSON representation of a value" + ], + "json_last_error": [ + "int json_last_error()", + "Returns the error code of the last json_decode()." + ], + "juliantojd": [ + "int juliantojd(int month, int day, int year)", + "Converts a julian calendar date to julian day count" + ], + "key": [ + "mixed key(array array_arg)", + "Return the key of the element currently pointed to by the internal array pointer" + ], + "krsort": [ + "bool krsort(array &array_arg [, int sort_flags])", + "Sort an array by key value in reverse order" + ], + "ksort": [ + "bool ksort(array &array_arg [, int sort_flags])", + "Sort an array by key" + ], + "lcfirst": [ + "string lcfirst(string str)", + "Make a string's first character lowercase" + ], + "lcg_value": [ + "float lcg_value()", + "Returns a value from the combined linear congruential generator" + ], + "lchgrp": [ + "bool lchgrp(string filename, mixed group)", + "Change symlink group" + ], + "ldap_8859_to_t61": [ + "string ldap_8859_to_t61(string value)", + "Translate 8859 characters to t61 characters" + ], + "ldap_add": [ + "bool ldap_add(resource link, string dn, array entry)", + "Add entries to LDAP directory" + ], + "ldap_bind": [ + "bool ldap_bind(resource link [, string dn [, string password]])", + "Bind to LDAP directory" + ], + "ldap_compare": [ + "bool ldap_compare(resource link, string dn, string attr, string value)", + "Determine if an entry has a specific value for one of its attributes" + ], + "ldap_connect": [ + "resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])", + "Connect to an LDAP server" + ], + "ldap_count_entries": [ + "int ldap_count_entries(resource link, resource result)", + "Count the number of entries in a search result" + ], + "ldap_delete": [ + "bool ldap_delete(resource link, string dn)", + "Delete an entry from a directory" + ], + "ldap_dn2ufn": [ + "string ldap_dn2ufn(string dn)", + "Convert DN to User Friendly Naming format" + ], + "ldap_err2str": [ + "string ldap_err2str(int errno)", + "Convert error number to error string" + ], + "ldap_errno": [ + "int ldap_errno(resource link)", + "Get the current ldap error number" + ], + "ldap_error": [ + "string ldap_error(resource link)", + "Get the current ldap error string" + ], + "ldap_explode_dn": [ + "array ldap_explode_dn(string dn, int with_attrib)", + "Splits DN into its component parts" + ], + "ldap_first_attribute": [ + "string ldap_first_attribute(resource link, resource result_entry)", + "Return first attribute" + ], + "ldap_first_entry": [ + "resource ldap_first_entry(resource link, resource result)", + "Return first result id" + ], + "ldap_first_reference": [ + "resource ldap_first_reference(resource link, resource result)", + "Return first reference" + ], + "ldap_free_result": [ + "bool ldap_free_result(resource result)", + "Free result memory" + ], + "ldap_get_attributes": [ + "array ldap_get_attributes(resource link, resource result_entry)", + "Get attributes from a search result entry" + ], + "ldap_get_dn": [ + "string ldap_get_dn(resource link, resource result_entry)", + "Get the DN of a result entry" + ], + "ldap_get_entries": [ + "array ldap_get_entries(resource link, resource result)", + "Get all result entries" + ], + "ldap_get_option": [ + "bool ldap_get_option(resource link, int option, mixed retval)", + "Get the current value of various session-wide parameters" + ], + "ldap_get_values_len": [ + "array ldap_get_values_len(resource link, resource result_entry, string attribute)", + "Get all values with lengths from a result entry" + ], + "ldap_list": [ + "resource ldap_list(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Single-level search" + ], + "ldap_mod_add": [ + "bool ldap_mod_add(resource link, string dn, array entry)", + "Add attribute values to current" + ], + "ldap_mod_del": [ + "bool ldap_mod_del(resource link, string dn, array entry)", + "Delete attribute values" + ], + "ldap_mod_replace": [ + "bool ldap_mod_replace(resource link, string dn, array entry)", + "Replace attribute values with new ones" + ], + "ldap_next_attribute": [ + "string ldap_next_attribute(resource link, resource result_entry)", + "Get the next attribute in result" + ], + "ldap_next_entry": [ + "resource ldap_next_entry(resource link, resource result_entry)", + "Get next result entry" + ], + "ldap_next_reference": [ + "resource ldap_next_reference(resource link, resource reference_entry)", + "Get next reference" + ], + "ldap_parse_reference": [ + "bool ldap_parse_reference(resource link, resource reference_entry, array referrals)", + "Extract information from reference entry" + ], + "ldap_parse_result": [ + "bool ldap_parse_result(resource link, resource result, int errcode, string matcheddn, string errmsg, array referrals)", + "Extract information from result" + ], + "ldap_read": [ + "resource ldap_read(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Read an entry" + ], + "ldap_rename": [ + "bool ldap_rename(resource link, string dn, string newrdn, string newparent, bool deleteoldrdn)", + "Modify the name of an entry" + ], + "ldap_sasl_bind": [ + "bool ldap_sasl_bind(resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, string sasl_authz_id [, string props]]]]]]])", + "Bind to LDAP directory using SASL" + ], + "ldap_search": [ + "resource ldap_search(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Search LDAP tree under base_dn" + ], + "ldap_set_option": [ + "bool ldap_set_option(resource link, int option, mixed newval)", + "Set the value of various session-wide parameters" + ], + "ldap_set_rebind_proc": [ + "bool ldap_set_rebind_proc(resource link, string callback)", + "Set a callback function to do re-binds on referral chasing." + ], + "ldap_sort": [ + "bool ldap_sort(resource link, resource result, string sortfilter)", + "Sort LDAP result entries" + ], + "ldap_start_tls": [ + "bool ldap_start_tls(resource link)", + "Start TLS" + ], + "ldap_t61_to_8859": [ + "string ldap_t61_to_8859(string value)", + "Translate t61 characters to 8859 characters" + ], + "ldap_unbind": [ + "bool ldap_unbind(resource link)", + "Unbind from LDAP directory" + ], + "leak": [ + "void leak(int num_bytes=3)", + "Cause an intentional memory leak, for testing/debugging purposes" + ], + "levenshtein": [ + "int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])", + "Calculate Levenshtein distance between two strings" + ], + "libxml_clear_errors": [ + "void libxml_clear_errors()", + "Clear last error from libxml" + ], + "libxml_disable_entity_loader": [ + "bool libxml_disable_entity_loader([bool disable])", + "Disable/Enable ability to load external entities" + ], + "libxml_get_errors": [ + "object libxml_get_errors()", + "Retrieve array of errors" + ], + "libxml_get_last_error": [ + "object libxml_get_last_error()", + "Retrieve last error from libxml" + ], + "libxml_set_streams_context": [ + "void libxml_set_streams_context(resource streams_context)", + "Set the streams context for the next libxml document load or write" + ], + "libxml_use_internal_errors": [ + "bool libxml_use_internal_errors([bool use_errors])", + "Disable libxml errors and allow user to fetch error information as needed" + ], + "link": [ + "int link(string target, string link)", + "Create a hard link" + ], + "linkinfo": [ + "int linkinfo(string filename)", + "Returns the st_dev field of the UNIX C stat structure describing the link" + ], + "litespeed_request_headers": [ + "array litespeed_request_headers()", + "Fetch all HTTP request headers" + ], + "litespeed_response_headers": [ + "array litespeed_response_headers()", + "Fetch all HTTP response headers" + ], + "locale_accept_from_http": [ + "string locale_accept_from_http(string $http_accept)", + null + ], + "locale_canonicalize": [ + "static string locale_canonicalize(Locale $loc, string $locale)", + "* @param string $locale The locale string to canonicalize" + ], + "locale_filter_matches": [ + "bool locale_filter_matches(string $langtag, string $locale[, bool $canonicalize])", + "* Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm" + ], + "locale_get_all_variants": [ + "static array locale_get_all_variants($locale)", + "* gets an array containing the list of variants, or null" + ], + "locale_get_default": [ + "static string locale_get_default( )", + "Get default locale" + ], + "locale_get_keywords": [ + "static array locale_get_keywords(string $locale) {", + "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array" + ], + "locale_get_primary_language": [ + "static string locale_get_primary_language($locale)", + "* gets the primary language for the $locale" + ], + "locale_get_region": [ + "static string locale_get_region($locale)", + "* gets the region for the $locale" + ], + "locale_get_script": [ + "static string locale_get_script($locale)", + "* gets the script for the $locale" + ], + "locale_lookup": [ + "string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])", + "* Searchs the items in $langtag for the best match to the language * range" + ], + "locale_set_default": [ + "static string locale_set_default( string $locale )", + "Set default locale" + ], + "localeconv": [ + "array localeconv()", + "Returns numeric formatting information based on the current locale" + ], + "localtime": [ + "array localtime([int timestamp [, bool associative_array]])", + "Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array" + ], + "log": [ + "float log(float number, [float base])", + "Returns the natural logarithm of the number, or the base log if base is specified" + ], + "log10": [ + "float log10(float number)", + "Returns the base-10 logarithm of the number" + ], + "log1p": [ + "float log1p(float number)", + "Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero" + ], + "long2ip": [ + "string long2ip(int proper_address)", + "Converts an (IPv4) Internet network address into a string in Internet standard dotted format" + ], + "lstat": [ + "array lstat(string filename)", + "Give information about a file or symbolic link" + ], + "ltrim": [ + "string ltrim(string str [, string character_mask])", + "Strips whitespace from the beginning of a string" + ], + "mail": [ + "int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])", + "Send an email message" + ], + "max": [ + "mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])", + "Return the highest value in an array or a series of arguments" + ], + "mb_check_encoding": [ + "bool mb_check_encoding([string var[, string encoding]])", + "Check if the string is valid for the specified encoding" + ], + "mb_convert_case": [ + "string mb_convert_case(string sourcestring, int mode [, string encoding])", + "Returns a case-folded version of sourcestring" + ], + "mb_convert_encoding": [ + "string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])", + "Returns converted string in desired encoding" + ], + "mb_convert_kana": [ + "string mb_convert_kana(string str [, string option] [, string encoding])", + "Conversion between full-width character and half-width character (Japanese)" + ], + "mb_convert_variables": [ + "string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...])", + "Converts the string resource in variables to desired encoding" + ], + "mb_decode_mimeheader": [ + "string mb_decode_mimeheader(string string)", + "Decodes the MIME \"encoded-word\" in the string" + ], + "mb_decode_numericentity": [ + "string mb_decode_numericentity(string string, array convmap [, string encoding])", + "Converts HTML numeric entities to character code" + ], + "mb_detect_encoding": [ + "string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]])", + "Encodings of the given string is returned (as a string)" + ], + "mb_detect_order": [ + "bool|array mb_detect_order([mixed encoding-list])", + "Sets the current detect_order or Return the current detect_order as a array" + ], + "mb_encode_mimeheader": [ + "string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])", + "Converts the string to MIME \"encoded-word\" in the format of =?charset?(B|Q)?encoded_string?=" + ], + "mb_encode_numericentity": [ + "string mb_encode_numericentity(string string, array convmap [, string encoding])", + "Converts specified characters to HTML numeric entities" + ], + "mb_encoding_aliases": [ + "array mb_encoding_aliases(string encoding)", + "Returns an array of the aliases of a given encoding name" + ], + "mb_ereg": [ + "int mb_ereg(string pattern, string string [, array registers])", + "Regular expression match for multibyte string" + ], + "mb_ereg_match": [ + "bool mb_ereg_match(string pattern, string string [,string option])", + "Regular expression match for multibyte string" + ], + "mb_ereg_replace": [ + "string mb_ereg_replace(string pattern, string replacement, string string [, string option])", + "Replace regular expression for multibyte string" + ], + "mb_ereg_search": [ + "bool mb_ereg_search([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_getpos": [ + "int mb_ereg_search_getpos()", + "Get search start position" + ], + "mb_ereg_search_getregs": [ + "array mb_ereg_search_getregs()", + "Get matched substring of the last time" + ], + "mb_ereg_search_init": [ + "bool mb_ereg_search_init(string string [, string pattern[, string option]])", + "Initialize string and regular expression for search." + ], + "mb_ereg_search_pos": [ + "array mb_ereg_search_pos([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_regs": [ + "array mb_ereg_search_regs([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_setpos": [ + "bool mb_ereg_search_setpos(int position)", + "Set search start position" + ], + "mb_eregi": [ + "int mb_eregi(string pattern, string string [, array registers])", + "Case-insensitive regular expression match for multibyte string" + ], + "mb_eregi_replace": [ + "string mb_eregi_replace(string pattern, string replacement, string string)", + "Case insensitive replace regular expression for multibyte string" + ], + "mb_get_info": [ + "mixed mb_get_info([string type])", + "Returns the current settings of mbstring" + ], + "mb_http_input": [ + "mixed mb_http_input([string type])", + "Returns the input encoding" + ], + "mb_http_output": [ + "string mb_http_output([string encoding])", + "Sets the current output_encoding or returns the current output_encoding as a string" + ], + "mb_internal_encoding": [ + "string mb_internal_encoding([string encoding])", + "Sets the current internal encoding or Returns the current internal encoding as a string" + ], + "mb_language": [ + "string mb_language([string language])", + "Sets the current language or Returns the current language as a string" + ], + "mb_list_encodings": [ + "mixed mb_list_encodings()", + "Returns an array of all supported entity encodings" + ], + "mb_output_handler": [ + "string mb_output_handler(string contents, int status)", + "Returns string in output buffer converted to the http_output encoding" + ], + "mb_parse_str": [ + "bool mb_parse_str(string encoded_string [, array result])", + "Parses GET/POST/COOKIE data and sets global variables" + ], + "mb_preferred_mime_name": [ + "string mb_preferred_mime_name(string encoding)", + "Return the preferred MIME name (charset) as a string" + ], + "mb_regex_encoding": [ + "string mb_regex_encoding([string encoding])", + "Returns the current encoding for regex as a string." + ], + "mb_regex_set_options": [ + "string mb_regex_set_options([string options])", + "Set or get the default options for mbregex functions" + ], + "mb_send_mail": [ + "int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])", + "* Sends an email message with MIME scheme" + ], + "mb_split": [ + "array mb_split(string pattern, string string [, int limit])", + "split multibyte string into array by regular expression" + ], + "mb_strcut": [ + "string mb_strcut(string str, int start [, int length [, string encoding]])", + "Returns part of a string" + ], + "mb_strimwidth": [ + "string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])", + "Trim the string in terminal width" + ], + "mb_stripos": [ + "int mb_stripos(string haystack, string needle [, int offset [, string encoding]])", + "Finds position of first occurrence of a string within another, case insensitive" + ], + "mb_stristr": [ + "string mb_stristr(string haystack, string needle[, bool part[, string encoding]])", + "Finds first occurrence of a string within another, case insensitive" + ], + "mb_strlen": [ + "int mb_strlen(string str [, string encoding])", + "Get character numbers of a string" + ], + "mb_strpos": [ + "int mb_strpos(string haystack, string needle [, int offset [, string encoding]])", + "Find position of first occurrence of a string within another" + ], + "mb_strrchr": [ + "string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])", + "Finds the last occurrence of a character in a string within another" + ], + "mb_strrichr": [ + "string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])", + "Finds the last occurrence of a character in a string within another, case insensitive" + ], + "mb_strripos": [ + "int mb_strripos(string haystack, string needle [, int offset [, string encoding]])", + "Finds position of last occurrence of a string within another, case insensitive" + ], + "mb_strrpos": [ + "int mb_strrpos(string haystack, string needle [, int offset [, string encoding]])", + "Find position of last occurrence of a string within another" + ], + "mb_strstr": [ + "string mb_strstr(string haystack, string needle[, bool part[, string encoding]])", + "Finds first occurrence of a string within another" + ], + "mb_strtolower": [ + "string mb_strtolower(string sourcestring [, string encoding])", + "* Returns a lowercased version of sourcestring" + ], + "mb_strtoupper": [ + "string mb_strtoupper(string sourcestring [, string encoding])", + "* Returns a uppercased version of sourcestring" + ], + "mb_strwidth": [ + "int mb_strwidth(string str [, string encoding])", + "Gets terminal width of a string" + ], + "mb_substitute_character": [ + "mixed mb_substitute_character([mixed substchar])", + "Sets the current substitute_character or returns the current substitute_character" + ], + "mb_substr": [ + "string mb_substr(string str, int start [, int length [, string encoding]])", + "Returns part of a string" + ], + "mb_substr_count": [ + "int mb_substr_count(string haystack, string needle [, string encoding])", + "Count the number of substring occurrences" + ], + "mcrypt_cbc": [ + "string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)", + "CBC crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_cfb": [ + "string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)", + "CFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_create_iv": [ + "string mcrypt_create_iv(int size, int source)", + "Create an initialization vector (IV)" + ], + "mcrypt_decrypt": [ + "string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_ecb": [ + "string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)", + "ECB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_enc_get_algorithms_name": [ + "string mcrypt_enc_get_algorithms_name(resource td)", + "Returns the name of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_block_size": [ + "int mcrypt_enc_get_block_size(resource td)", + "Returns the block size of the cipher specified by the descriptor td" + ], + "mcrypt_enc_get_iv_size": [ + "int mcrypt_enc_get_iv_size(resource td)", + "Returns the size of the IV in bytes of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_key_size": [ + "int mcrypt_enc_get_key_size(resource td)", + "Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_modes_name": [ + "string mcrypt_enc_get_modes_name(resource td)", + "Returns the name of the mode specified by the descriptor td" + ], + "mcrypt_enc_get_supported_key_sizes": [ + "array mcrypt_enc_get_supported_key_sizes(resource td)", + "This function decrypts the crypttext" + ], + "mcrypt_enc_is_block_algorithm": [ + "bool mcrypt_enc_is_block_algorithm(resource td)", + "Returns TRUE if the alrogithm is a block algorithms" + ], + "mcrypt_enc_is_block_algorithm_mode": [ + "bool mcrypt_enc_is_block_algorithm_mode(resource td)", + "Returns TRUE if the mode is for use with block algorithms" + ], + "mcrypt_enc_is_block_mode": [ + "bool mcrypt_enc_is_block_mode(resource td)", + "Returns TRUE if the mode outputs blocks" + ], + "mcrypt_enc_self_test": [ + "int mcrypt_enc_self_test(resource td)", + "This function runs the self test on the algorithm specified by the descriptor td" + ], + "mcrypt_encrypt": [ + "string mcrypt_encrypt(string cipher, string key, string data, string mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_generic": [ + "string mcrypt_generic(resource td, string data)", + "This function encrypts the plaintext" + ], + "mcrypt_generic_deinit": [ + "bool mcrypt_generic_deinit(resource td)", + "This function terminates encrypt specified by the descriptor td" + ], + "mcrypt_generic_init": [ + "int mcrypt_generic_init(resource td, string key, string iv)", + "This function initializes all buffers for the specific module" + ], + "mcrypt_get_block_size": [ + "int mcrypt_get_block_size(string cipher, string module)", + "Get the key size of cipher" + ], + "mcrypt_get_cipher_name": [ + "string mcrypt_get_cipher_name(string cipher)", + "Get the key size of cipher" + ], + "mcrypt_get_iv_size": [ + "int mcrypt_get_iv_size(string cipher, string module)", + "Get the IV size of cipher (Usually the same as the blocksize)" + ], + "mcrypt_get_key_size": [ + "int mcrypt_get_key_size(string cipher, string module)", + "Get the key size of cipher" + ], + "mcrypt_list_algorithms": [ + "array mcrypt_list_algorithms([string lib_dir])", + "List all algorithms in \"module_dir\"" + ], + "mcrypt_list_modes": [ + "array mcrypt_list_modes([string lib_dir])", + "List all modes \"module_dir\"" + ], + "mcrypt_module_close": [ + "bool mcrypt_module_close(resource td)", + "Free the descriptor td" + ], + "mcrypt_module_get_algo_block_size": [ + "int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir])", + "Returns the block size of the algorithm" + ], + "mcrypt_module_get_algo_key_size": [ + "int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir])", + "Returns the maximum supported key size of the algorithm" + ], + "mcrypt_module_get_supported_key_sizes": [ + "array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir])", + "This function decrypts the crypttext" + ], + "mcrypt_module_is_block_algorithm": [ + "bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir])", + "Returns TRUE if the algorithm is a block algorithm" + ], + "mcrypt_module_is_block_algorithm_mode": [ + "bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir])", + "Returns TRUE if the mode is for use with block algorithms" + ], + "mcrypt_module_is_block_mode": [ + "bool mcrypt_module_is_block_mode(string mode [, string lib_dir])", + "Returns TRUE if the mode outputs blocks of bytes" + ], + "mcrypt_module_open": [ + "resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory)", + "Opens the module of the algorithm and the mode to be used" + ], + "mcrypt_module_self_test": [ + "bool mcrypt_module_self_test(string algorithm [, string lib_dir])", + "Does a self test of the module \"module\"" + ], + "mcrypt_ofb": [ + "string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "md5": [ + "string md5(string str, [ bool raw_output])", + "Calculate the md5 hash of a string" + ], + "md5_file": [ + "string md5_file(string filename [, bool raw_output])", + "Calculate the md5 hash of given filename" + ], + "mdecrypt_generic": [ + "string mdecrypt_generic(resource td, string data)", + "This function decrypts the plaintext" + ], + "memory_get_peak_usage": [ + "int memory_get_peak_usage([real_usage])", + "Returns the peak allocated by PHP memory" + ], + "memory_get_usage": [ + "int memory_get_usage([real_usage])", + "Returns the allocated by PHP memory" + ], + "metaphone": [ + "string metaphone(string text[, int phones])", + "Break english phrases down into their phonemes" + ], + "method_exists": [ + "bool method_exists(object object, string method)", + "Checks if the class method exists" + ], + "mhash": [ + "string mhash(int hash, string data [, string key])", + "Hash data with hash" + ], + "mhash_count": [ + "int mhash_count()", + "Gets the number of available hashes" + ], + "mhash_get_block_size": [ + "int mhash_get_block_size(int hash)", + "Gets the block size of hash" + ], + "mhash_get_hash_name": [ + "string mhash_get_hash_name(int hash)", + "Gets the name of hash" + ], + "mhash_keygen_s2k": [ + "string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)", + "Generates a key using hash functions" + ], + "microtime": [ + "mixed microtime([bool get_as_float])", + "Returns either a string or a float containing the current time in seconds and microseconds" + ], + "mime_content_type": [ + "string mime_content_type(string filename|resource stream)", + "Return content-type for file" + ], + "min": [ + "mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])", + "Return the lowest value in an array or a series of arguments" + ], + "mkdir": [ + "bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])", + "Create a directory" + ], + "mktime": [ + "int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])", + "Get UNIX timestamp for a date" + ], + "money_format": [ + "string money_format(string format , float value)", + "Convert monetary value(s) to string" + ], + "move_uploaded_file": [ + "bool move_uploaded_file(string path, string new_path)", + "Move a file if and only if it was created by an upload" + ], + "msg_get_queue": [ + "resource msg_get_queue(int key [, int perms])", + "Attach to a message queue" + ], + "msg_queue_exists": [ + "bool msg_queue_exists(int key)", + "Check whether a message queue exists" + ], + "msg_receive": [ + "mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])", + "Send a message of type msgtype (must be > 0) to a message queue" + ], + "msg_remove_queue": [ + "bool msg_remove_queue(resource queue)", + "Destroy the queue" + ], + "msg_send": [ + "bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])", + "Send a message of type msgtype (must be > 0) to a message queue" + ], + "msg_set_queue": [ + "bool msg_set_queue(resource queue, array data)", + "Set information for a message queue" + ], + "msg_stat_queue": [ + "array msg_stat_queue(resource queue)", + "Returns information about a message queue" + ], + "msgfmt_create": [ + "MessageFormatter msgfmt_create( string $locale, string $pattern )", + "* Create formatter." + ], + "msgfmt_format": [ + "mixed msgfmt_format( MessageFormatter $nf, array $args )", + "* Format a message." + ], + "msgfmt_format_message": [ + "mixed msgfmt_format_message( string $locale, string $pattern, array $args )", + "* Format a message." + ], + "msgfmt_get_error_code": [ + "int msgfmt_get_error_code( MessageFormatter $nf )", + "* Get formatter's last error code." + ], + "msgfmt_get_error_message": [ + "string msgfmt_get_error_message( MessageFormatter $coll )", + "* Get text description for formatter's last error code." + ], + "msgfmt_get_locale": [ + "string msgfmt_get_locale(MessageFormatter $mf)", + "* Get formatter locale." + ], + "msgfmt_get_pattern": [ + "string msgfmt_get_pattern( MessageFormatter $mf )", + "* Get formatter pattern." + ], + "msgfmt_parse": [ + "array msgfmt_parse( MessageFormatter $nf, string $source )", + "* Parse a message." + ], + "msgfmt_set_pattern": [ + "bool msgfmt_set_pattern( MessageFormatter $mf, string $pattern )", + "* Set formatter pattern." + ], + "mssql_bind": [ + "bool mssql_bind(resource stmt, string param_name, mixed var, int type [, bool is_output [, bool is_null [, int maxlen]]])", + "Adds a parameter to a stored procedure or a remote stored procedure" + ], + "mssql_close": [ + "bool mssql_close([resource conn_id])", + "Closes a connection to a MS-SQL server" + ], + "mssql_connect": [ + "int mssql_connect([string servername [, string username [, string password [, bool new_link]]]])", + "Establishes a connection to a MS-SQL server" + ], + "mssql_data_seek": [ + "bool mssql_data_seek(resource result_id, int offset)", + "Moves the internal row pointer of the MS-SQL result associated with the specified result identifier to pointer to the specified row number" + ], + "mssql_execute": [ + "mixed mssql_execute(resource stmt [, bool skip_results = false])", + "Executes a stored procedure on a MS-SQL server database" + ], + "mssql_fetch_array": [ + "array mssql_fetch_array(resource result_id [, int result_type])", + "Returns an associative array of the current row in the result set specified by result_id" + ], + "mssql_fetch_assoc": [ + "array mssql_fetch_assoc(resource result_id)", + "Returns an associative array of the current row in the result set specified by result_id" + ], + "mssql_fetch_batch": [ + "int mssql_fetch_batch(resource result_index)", + "Returns the next batch of records" + ], + "mssql_fetch_field": [ + "object mssql_fetch_field(resource result_id [, int offset])", + "Gets information about certain fields in a query result" + ], + "mssql_fetch_object": [ + "object mssql_fetch_object(resource result_id)", + "Returns a pseudo-object of the current row in the result set specified by result_id" + ], + "mssql_fetch_row": [ + "array mssql_fetch_row(resource result_id)", + "Returns an array of the current row in the result set specified by result_id" + ], + "mssql_field_length": [ + "int mssql_field_length(resource result_id [, int offset])", + "Get the length of a MS-SQL field" + ], + "mssql_field_name": [ + "string mssql_field_name(resource result_id [, int offset])", + "Returns the name of the field given by offset in the result set given by result_id" + ], + "mssql_field_seek": [ + "bool mssql_field_seek(resource result_id, int offset)", + "Seeks to the specified field offset" + ], + "mssql_field_type": [ + "string mssql_field_type(resource result_id [, int offset])", + "Returns the type of a field" + ], + "mssql_free_result": [ + "bool mssql_free_result(resource result_index)", + "Free a MS-SQL result index" + ], + "mssql_free_statement": [ + "bool mssql_free_statement(resource result_index)", + "Free a MS-SQL statement index" + ], + "mssql_get_last_message": [ + "string mssql_get_last_message()", + "Gets the last message from the MS-SQL server" + ], + "mssql_guid_string": [ + "string mssql_guid_string(string binary [,bool short_format])", + "Converts a 16 byte binary GUID to a string" + ], + "mssql_init": [ + "int mssql_init(string sp_name [, resource conn_id])", + "Initializes a stored procedure or a remote stored procedure" + ], + "mssql_min_error_severity": [ + "void mssql_min_error_severity(int severity)", + "Sets the lower error severity" + ], + "mssql_min_message_severity": [ + "void mssql_min_message_severity(int severity)", + "Sets the lower message severity" + ], + "mssql_next_result": [ + "bool mssql_next_result(resource result_id)", + "Move the internal result pointer to the next result" + ], + "mssql_num_fields": [ + "int mssql_num_fields(resource mssql_result_index)", + "Returns the number of fields fetched in from the result id specified" + ], + "mssql_num_rows": [ + "int mssql_num_rows(resource mssql_result_index)", + "Returns the number of rows fetched in from the result id specified" + ], + "mssql_pconnect": [ + "int mssql_pconnect([string servername [, string username [, string password [, bool new_link]]]])", + "Establishes a persistent connection to a MS-SQL server" + ], + "mssql_query": [ + "resource mssql_query(string query [, resource conn_id [, int batch_size]])", + "Perform an SQL query on a MS-SQL server database" + ], + "mssql_result": [ + "string mssql_result(resource result_id, int row, mixed field)", + "Returns the contents of one cell from a MS-SQL result set" + ], + "mssql_rows_affected": [ + "int mssql_rows_affected(resource conn_id)", + "Returns the number of records affected by the query" + ], + "mssql_select_db": [ + "bool mssql_select_db(string database_name [, resource conn_id])", + "Select a MS-SQL database" + ], + "mt_getrandmax": [ + "int mt_getrandmax()", + "Returns the maximum value a random number from Mersenne Twister can have" + ], + "mt_rand": [ + "int mt_rand([int min, int max])", + "Returns a random number from Mersenne Twister" + ], + "mt_srand": [ + "void mt_srand([int seed])", + "Seeds Mersenne Twister random number generator" + ], + "mysql_affected_rows": [ + "int mysql_affected_rows([int link_identifier])", + "Gets number of affected rows in previous MySQL operation" + ], + "mysql_client_encoding": [ + "string mysql_client_encoding([int link_identifier])", + "Returns the default character set for the current connection" + ], + "mysql_close": [ + "bool mysql_close([int link_identifier])", + "Close a MySQL connection" + ], + "mysql_connect": [ + "resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])", + "Opens a connection to a MySQL Server" + ], + "mysql_create_db": [ + "bool mysql_create_db(string database_name [, int link_identifier])", + "Create a MySQL database" + ], + "mysql_data_seek": [ + "bool mysql_data_seek(resource result, int row_number)", + "Move internal result pointer" + ], + "mysql_db_query": [ + "resource mysql_db_query(string database_name, string query [, int link_identifier])", + "Sends an SQL query to MySQL" + ], + "mysql_drop_db": [ + "bool mysql_drop_db(string database_name [, int link_identifier])", + "Drops (delete) a MySQL database" + ], + "mysql_errno": [ + "int mysql_errno([int link_identifier])", + "Returns the number of the error message from previous MySQL operation" + ], + "mysql_error": [ + "string mysql_error([int link_identifier])", + "Returns the text of the error message from previous MySQL operation" + ], + "mysql_escape_string": [ + "string mysql_escape_string(string to_be_escaped)", + "Escape string for mysql query" + ], + "mysql_fetch_array": [ + "array mysql_fetch_array(resource result [, int result_type])", + "Fetch a result row as an array (associative, numeric or both)" + ], + "mysql_fetch_assoc": [ + "array mysql_fetch_assoc(resource result)", + "Fetch a result row as an associative array" + ], + "mysql_fetch_field": [ + "object mysql_fetch_field(resource result [, int field_offset])", + "Gets column information from a result and return as an object" + ], + "mysql_fetch_lengths": [ + "array mysql_fetch_lengths(resource result)", + "Gets max data size of each column in a result" + ], + "mysql_fetch_object": [ + "object mysql_fetch_object(resource result [, string class_name [, NULL|array ctor_params]])", + "Fetch a result row as an object" + ], + "mysql_fetch_row": [ + "array mysql_fetch_row(resource result)", + "Gets a result row as an enumerated array" + ], + "mysql_field_flags": [ + "string mysql_field_flags(resource result, int field_offset)", + "Gets the flags associated with the specified field in a result" + ], + "mysql_field_len": [ + "int mysql_field_len(resource result, int field_offset)", + "Returns the length of the specified field" + ], + "mysql_field_name": [ + "string mysql_field_name(resource result, int field_index)", + "Gets the name of the specified field in a result" + ], + "mysql_field_seek": [ + "bool mysql_field_seek(resource result, int field_offset)", + "Sets result pointer to a specific field offset" + ], + "mysql_field_table": [ + "string mysql_field_table(resource result, int field_offset)", + "Gets name of the table the specified field is in" + ], + "mysql_field_type": [ + "string mysql_field_type(resource result, int field_offset)", + "Gets the type of the specified field in a result" + ], + "mysql_free_result": [ + "bool mysql_free_result(resource result)", + "Free result memory" + ], + "mysql_get_client_info": [ + "string mysql_get_client_info()", + "Returns a string that represents the client library version" + ], + "mysql_get_host_info": [ + "string mysql_get_host_info([int link_identifier])", + "Returns a string describing the type of connection in use, including the server host name" + ], + "mysql_get_proto_info": [ + "int mysql_get_proto_info([int link_identifier])", + "Returns the protocol version used by current connection" + ], + "mysql_get_server_info": [ + "string mysql_get_server_info([int link_identifier])", + "Returns a string that represents the server version number" + ], + "mysql_info": [ + "string mysql_info([int link_identifier])", + "Returns a string containing information about the most recent query" + ], + "mysql_insert_id": [ + "int mysql_insert_id([int link_identifier])", + "Gets the ID generated from the previous INSERT operation" + ], + "mysql_list_dbs": [ + "resource mysql_list_dbs([int link_identifier])", + "List databases available on a MySQL server" + ], + "mysql_list_fields": [ + "resource mysql_list_fields(string database_name, string table_name [, int link_identifier])", + "List MySQL result fields" + ], + "mysql_list_processes": [ + "resource mysql_list_processes([int link_identifier])", + "Returns a result set describing the current server threads" + ], + "mysql_list_tables": [ + "resource mysql_list_tables(string database_name [, int link_identifier])", + "List tables in a MySQL database" + ], + "mysql_num_fields": [ + "int mysql_num_fields(resource result)", + "Gets number of fields in a result" + ], + "mysql_num_rows": [ + "int mysql_num_rows(resource result)", + "Gets number of rows in a result" + ], + "mysql_pconnect": [ + "resource mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])", + "Opens a persistent connection to a MySQL Server" + ], + "mysql_ping": [ + "bool mysql_ping([int link_identifier])", + "Ping a server connection. If no connection then reconnect." + ], + "mysql_query": [ + "resource mysql_query(string query [, int link_identifier])", + "Sends an SQL query to MySQL" + ], + "mysql_real_escape_string": [ + "string mysql_real_escape_string(string to_be_escaped [, int link_identifier])", + "Escape special characters in a string for use in a SQL statement, taking into account the current charset of the connection" + ], + "mysql_result": [ + "mixed mysql_result(resource result, int row [, mixed field])", + "Gets result data" + ], + "mysql_select_db": [ + "bool mysql_select_db(string database_name [, int link_identifier])", + "Selects a MySQL database" + ], + "mysql_set_charset": [ + "bool mysql_set_charset(string csname [, int link_identifier])", + "sets client character set" + ], + "mysql_stat": [ + "string mysql_stat([int link_identifier])", + "Returns a string containing status information" + ], + "mysql_thread_id": [ + "int mysql_thread_id([int link_identifier])", + "Returns the thread id of current connection" + ], + "mysql_unbuffered_query": [ + "resource mysql_unbuffered_query(string query [, int link_identifier])", + "Sends an SQL query to MySQL, without fetching and buffering the result rows" + ], + "mysqli_affected_rows": [ + "mixed mysqli_affected_rows(object link)", + "Get number of affected rows in previous MySQL operation" + ], + "mysqli_autocommit": [ + "bool mysqli_autocommit(object link, bool mode)", + "Turn auto commit on or of" + ], + "mysqli_cache_stats": [ + "array mysqli_cache_stats()", + "Returns statistics about the zval cache" + ], + "mysqli_change_user": [ + "bool mysqli_change_user(object link, string user, string password, string database)", + "Change logged-in user of the active connection" + ], + "mysqli_character_set_name": [ + "string mysqli_character_set_name(object link)", + "Returns the name of the character set used for this connection" + ], + "mysqli_close": [ + "bool mysqli_close(object link)", + "Close connection" + ], + "mysqli_commit": [ + "bool mysqli_commit(object link)", + "Commit outstanding actions and close transaction" + ], + "mysqli_connect": [ + "object mysqli_connect([string hostname [,string username [,string passwd [,string dbname [,int port [,string socket]]]]]])", + "Open a connection to a mysql server" + ], + "mysqli_connect_errno": [ + "int mysqli_connect_errno()", + "Returns the numerical value of the error message from last connect command" + ], + "mysqli_connect_error": [ + "string mysqli_connect_error()", + "Returns the text of the error message from previous MySQL operation" + ], + "mysqli_data_seek": [ + "bool mysqli_data_seek(object result, int offset)", + "Move internal result pointer" + ], + "mysqli_debug": [ + "void mysqli_debug(string debug)", + "" + ], + "mysqli_dump_debug_info": [ + "bool mysqli_dump_debug_info(object link)", + "" + ], + "mysqli_embedded_server_end": [ + "void mysqli_embedded_server_end()", + "" + ], + "mysqli_embedded_server_start": [ + "bool mysqli_embedded_server_start(bool start, array arguments, array groups)", + "initialize and start embedded server" + ], + "mysqli_errno": [ + "int mysqli_errno(object link)", + "Returns the numerical value of the error message from previous MySQL operation" + ], + "mysqli_error": [ + "string mysqli_error(object link)", + "Returns the text of the error message from previous MySQL operation" + ], + "mysqli_fetch_all": [ + "mixed mysqli_fetch_all(object result [,int resulttype])", + "Fetches all result rows as an associative array, a numeric array, or both" + ], + "mysqli_fetch_array": [ + "mixed mysqli_fetch_array(object result [,int resulttype])", + "Fetch a result row as an associative array, a numeric array, or both" + ], + "mysqli_fetch_assoc": [ + "mixed mysqli_fetch_assoc(object result)", + "Fetch a result row as an associative array" + ], + "mysqli_fetch_field": [ + "mixed mysqli_fetch_field(object result)", + "Get column information from a result and return as an object" + ], + "mysqli_fetch_field_direct": [ + "mixed mysqli_fetch_field_direct(object result, int offset)", + "Fetch meta-data for a single field" + ], + "mysqli_fetch_fields": [ + "mixed mysqli_fetch_fields(object result)", + "Return array of objects containing field meta-data" + ], + "mysqli_fetch_lengths": [ + "mixed mysqli_fetch_lengths(object result)", + "Get the length of each output in a result" + ], + "mysqli_fetch_object": [ + "mixed mysqli_fetch_object(object result [, string class_name [, NULL|array ctor_params]])", + "Fetch a result row as an object" + ], + "mysqli_fetch_row": [ + "array mysqli_fetch_row(object result)", + "Get a result row as an enumerated array" + ], + "mysqli_field_count": [ + "int mysqli_field_count(object link)", + "Fetch the number of fields returned by the last query for the given link" + ], + "mysqli_field_seek": [ + "int mysqli_field_seek(object result, int fieldnr)", + "Set result pointer to a specified field offset" + ], + "mysqli_field_tell": [ + "int mysqli_field_tell(object result)", + "Get current field offset of result pointer" + ], + "mysqli_free_result": [ + "void mysqli_free_result(object result)", + "Free query result memory for the given result handle" + ], + "mysqli_get_charset": [ + "object mysqli_get_charset(object link)", + "returns a character set object" + ], + "mysqli_get_client_info": [ + "string mysqli_get_client_info()", + "Get MySQL client info" + ], + "mysqli_get_client_stats": [ + "array mysqli_get_client_stats()", + "Returns statistics about the zval cache" + ], + "mysqli_get_client_version": [ + "int mysqli_get_client_version()", + "Get MySQL client info" + ], + "mysqli_get_connection_stats": [ + "array mysqli_get_connection_stats()", + "Returns statistics about the zval cache" + ], + "mysqli_get_host_info": [ + "string mysqli_get_host_info(object link)", + "Get MySQL host info" + ], + "mysqli_get_proto_info": [ + "int mysqli_get_proto_info(object link)", + "Get MySQL protocol information" + ], + "mysqli_get_server_info": [ + "string mysqli_get_server_info(object link)", + "Get MySQL server info" + ], + "mysqli_get_server_version": [ + "int mysqli_get_server_version(object link)", + "Return the MySQL version for the server referenced by the given link" + ], + "mysqli_get_warnings": [ + "object mysqli_get_warnings(object link)", + "" + ], + "mysqli_info": [ + "string mysqli_info(object link)", + "Get information about the most recent query" + ], + "mysqli_init": [ + "resource mysqli_init()", + "Initialize mysqli and return a resource for use with mysql_real_connect" + ], + "mysqli_insert_id": [ + "mixed mysqli_insert_id(object link)", + "Get the ID generated from the previous INSERT operation" + ], + "mysqli_kill": [ + "bool mysqli_kill(object link, int processid)", + "Kill a mysql process on the server" + ], + "mysqli_link_construct": [ + "object mysqli_link_construct()", + "" + ], + "mysqli_more_results": [ + "bool mysqli_more_results(object link)", + "check if there any more query results from a multi query" + ], + "mysqli_multi_query": [ + "bool mysqli_multi_query(object link, string query)", + "allows to execute multiple queries" + ], + "mysqli_next_result": [ + "bool mysqli_next_result(object link)", + "read next result from multi_query" + ], + "mysqli_num_fields": [ + "int mysqli_num_fields(object result)", + "Get number of fields in result" + ], + "mysqli_num_rows": [ + "mixed mysqli_num_rows(object result)", + "Get number of rows in result" + ], + "mysqli_options": [ + "bool mysqli_options(object link, int flags, mixed values)", + "Set options" + ], + "mysqli_ping": [ + "bool mysqli_ping(object link)", + "Ping a server connection or reconnect if there is no connection" + ], + "mysqli_poll": [ + "int mysqli_poll(array read, array write, array error, long sec [, long usec])", + "Poll connections" + ], + "mysqli_prepare": [ + "mixed mysqli_prepare(object link, string query)", + "Prepare a SQL statement for execution" + ], + "mysqli_query": [ + "mixed mysqli_query(object link, string query [,int resultmode])", + "" + ], + "mysqli_real_connect": [ + "bool mysqli_real_connect(object link [,string hostname [,string username [,string passwd [,string dbname [,int port [,string socket [,int flags]]]]]]])", + "Open a connection to a mysql server" + ], + "mysqli_real_escape_string": [ + "string mysqli_real_escape_string(object link, string escapestr)", + "Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection" + ], + "mysqli_real_query": [ + "bool mysqli_real_query(object link, string query)", + "Binary-safe version of mysql_query()" + ], + "mysqli_reap_async_query": [ + "int mysqli_reap_async_query(object link)", + "Poll connections" + ], + "mysqli_refresh": [ + "bool mysqli_refresh(object link, long options)", + "Flush tables or caches, or reset replication server information" + ], + "mysqli_report": [ + "bool mysqli_report(int flags)", + "sets report level" + ], + "mysqli_rollback": [ + "bool mysqli_rollback(object link)", + "Undo actions from current transaction" + ], + "mysqli_select_db": [ + "bool mysqli_select_db(object link, string dbname)", + "Select a MySQL database" + ], + "mysqli_set_charset": [ + "bool mysqli_set_charset(object link, string csname)", + "sets client character set" + ], + "mysqli_set_local_infile_default": [ + "void mysqli_set_local_infile_default(object link)", + "unsets user defined handler for load local infile command" + ], + "mysqli_set_local_infile_handler": [ + "bool mysqli_set_local_infile_handler(object link, callback read_func)", + "Set callback functions for LOAD DATA LOCAL INFILE" + ], + "mysqli_sqlstate": [ + "string mysqli_sqlstate(object link)", + "Returns the SQLSTATE error from previous MySQL operation" + ], + "mysqli_ssl_set": [ + "bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])", + "" + ], + "mysqli_stat": [ + "mixed mysqli_stat(object link)", + "Get current system status" + ], + "mysqli_stmt_affected_rows": [ + "mixed mysqli_stmt_affected_rows(object stmt)", + "Return the number of rows affected in the last query for the given link" + ], + "mysqli_stmt_attr_get": [ + "int mysqli_stmt_attr_get(object stmt, long attr)", + "" + ], + "mysqli_stmt_attr_set": [ + "int mysqli_stmt_attr_set(object stmt, long attr, long mode)", + "" + ], + "mysqli_stmt_bind_param": [ + "bool mysqli_stmt_bind_param(object stmt, string types, mixed variable [,mixed,....])", + "Bind variables to a prepared statement as parameters" + ], + "mysqli_stmt_bind_result": [ + "bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])", + "Bind variables to a prepared statement for result storage" + ], + "mysqli_stmt_close": [ + "bool mysqli_stmt_close(object stmt)", + "Close statement" + ], + "mysqli_stmt_data_seek": [ + "void mysqli_stmt_data_seek(object stmt, int offset)", + "Move internal result pointer" + ], + "mysqli_stmt_errno": [ + "int mysqli_stmt_errno(object stmt)", + "" + ], + "mysqli_stmt_error": [ + "string mysqli_stmt_error(object stmt)", + "" + ], + "mysqli_stmt_execute": [ + "bool mysqli_stmt_execute(object stmt)", + "Execute a prepared statement" + ], + "mysqli_stmt_fetch": [ + "mixed mysqli_stmt_fetch(object stmt)", + "Fetch results from a prepared statement into the bound variables" + ], + "mysqli_stmt_field_count": [ + "int mysqli_stmt_field_count(object stmt) {", + "Return the number of result columns for the given statement" + ], + "mysqli_stmt_free_result": [ + "void mysqli_stmt_free_result(object stmt)", + "Free stored result memory for the given statement handle" + ], + "mysqli_stmt_get_result": [ + "object mysqli_stmt_get_result(object link)", + "Buffer result set on client" + ], + "mysqli_stmt_get_warnings": [ + "object mysqli_stmt_get_warnings(object link)", + "" + ], + "mysqli_stmt_init": [ + "mixed mysqli_stmt_init(object link)", + "Initialize statement object" + ], + "mysqli_stmt_insert_id": [ + "mixed mysqli_stmt_insert_id(object stmt)", + "Get the ID generated from the previous INSERT operation" + ], + "mysqli_stmt_next_result": [ + "bool mysqli_stmt_next_result(object link)", + "read next result from multi_query" + ], + "mysqli_stmt_num_rows": [ + "mixed mysqli_stmt_num_rows(object stmt)", + "Return the number of rows in statements result set" + ], + "mysqli_stmt_param_count": [ + "int mysqli_stmt_param_count(object stmt)", + "Return the number of parameter for the given statement" + ], + "mysqli_stmt_prepare": [ + "bool mysqli_stmt_prepare(object stmt, string query)", + "prepare server side statement with query" + ], + "mysqli_stmt_reset": [ + "bool mysqli_stmt_reset(object stmt)", + "reset a prepared statement" + ], + "mysqli_stmt_result_metadata": [ + "mixed mysqli_stmt_result_metadata(object stmt)", + "return result set from statement" + ], + "mysqli_stmt_send_long_data": [ + "bool mysqli_stmt_send_long_data(object stmt, int param_nr, string data)", + "" + ], + "mysqli_stmt_sqlstate": [ + "string mysqli_stmt_sqlstate(object stmt)", + "" + ], + "mysqli_stmt_store_result": [ + "bool mysqli_stmt_store_result(stmt)", + "" + ], + "mysqli_store_result": [ + "object mysqli_store_result(object link)", + "Buffer result set on client" + ], + "mysqli_thread_id": [ + "int mysqli_thread_id(object link)", + "Return the current thread ID" + ], + "mysqli_thread_safe": [ + "bool mysqli_thread_safe()", + "Return whether thread safety is given or not" + ], + "mysqli_use_result": [ + "mixed mysqli_use_result(object link)", + "Directly retrieve query results - do not buffer results on client side" + ], + "mysqli_warning_count": [ + "int mysqli_warning_count(object link)", + "Return number of warnings from the last query for the given link" + ], + "natcasesort": [ + "void natcasesort(array &array_arg)", + "Sort an array using case-insensitive natural sort" + ], + "natsort": [ + "void natsort(array &array_arg)", + "Sort an array using natural sort" + ], + "next": [ + "mixed next(array array_arg)", + "Move array argument's internal pointer to the next element and return it" + ], + "ngettext": [ + "string ngettext(string MSGID1, string MSGID2, int N)", + "Plural version of gettext()" + ], + "nl2br": [ + "string nl2br(string str [, bool is_xhtml])", + "Converts newlines to HTML line breaks" + ], + "nl_langinfo": [ + "string nl_langinfo(int item)", + "Query language and locale information" + ], + "normalizer_is_normalize": [ + "bool normalizer_is_normalize( string $input [, string $form = FORM_C] )", + "* Test if a string is in a given normalization form." + ], + "normalizer_normalize": [ + "string normalizer_normalize( string $input [, string $form = FORM_C] )", + "* Normalize a string." + ], + "nsapi_request_headers": [ + "array nsapi_request_headers()", + "Get all headers from the request" + ], + "nsapi_response_headers": [ + "array nsapi_response_headers()", + "Get all headers from the response" + ], + "nsapi_virtual": [ + "bool nsapi_virtual(string uri)", + "Perform an NSAPI sub-request" + ], + "number_format": [ + "string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])", + "Formats a number with grouped thousands" + ], + "numfmt_create": [ + "NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )", + "* Create number formatter." + ], + "numfmt_format": [ + "mixed numfmt_format( NumberFormatter $nf, mixed $num[, int type] )", + "* Format a number." + ], + "numfmt_format_currency": [ + "mixed numfmt_format_currency( NumberFormatter $nf, double $num, string $currency )", + "* Format a number as currency." + ], + "numfmt_get_attribute": [ + "mixed numfmt_get_attribute( NumberFormatter $nf, int $attr )", + "* Get formatter attribute value." + ], + "numfmt_get_error_code": [ + "int numfmt_get_error_code( NumberFormatter $nf )", + "* Get formatter's last error code." + ], + "numfmt_get_error_message": [ + "string numfmt_get_error_message( NumberFormatter $nf )", + "* Get text description for formatter's last error code." + ], + "numfmt_get_locale": [ + "string numfmt_get_locale( NumberFormatter $nf[, int type] )", + "* Get formatter locale." + ], + "numfmt_get_pattern": [ + "string numfmt_get_pattern( NumberFormatter $nf )", + "* Get formatter pattern." + ], + "numfmt_get_symbol": [ + "string numfmt_get_symbol( NumberFormatter $nf, int $attr )", + "* Get formatter symbol value." + ], + "numfmt_get_text_attribute": [ + "string numfmt_get_text_attribute( NumberFormatter $nf, int $attr )", + "* Get formatter attribute value." + ], + "numfmt_parse": [ + "mixed numfmt_parse( NumberFormatter $nf, string $str[, int $type, int &$position ])", + "* Parse a number." + ], + "numfmt_parse_currency": [ + "double numfmt_parse_currency( NumberFormatter $nf, string $str, string $¤cy[, int $&position] )", + "* Parse a number as currency." + ], + "numfmt_parse_message": [ + "array numfmt_parse_message( string $locale, string $pattern, string $source )", + "* Parse a message." + ], + "numfmt_set_attribute": [ + "bool numfmt_set_attribute( NumberFormatter $nf, int $attr, mixed $value )", + "* Get formatter attribute value." + ], + "numfmt_set_pattern": [ + "bool numfmt_set_pattern( NumberFormatter $nf, string $pattern )", + "* Set formatter pattern." + ], + "numfmt_set_symbol": [ + "bool numfmt_set_symbol( NumberFormatter $nf, int $attr, string $symbol )", + "* Set formatter symbol value." + ], + "numfmt_set_text_attribute": [ + "bool numfmt_set_text_attribute( NumberFormatter $nf, int $attr, string $value )", + "* Get formatter attribute value." + ], + "ob_clean": [ + "bool ob_clean()", + "Clean (delete) the current output buffer" + ], + "ob_end_clean": [ + "bool ob_end_clean()", + "Clean the output buffer, and delete current output buffer" + ], + "ob_end_flush": [ + "bool ob_end_flush()", + "Flush (send) the output buffer, and delete current output buffer" + ], + "ob_flush": [ + "bool ob_flush()", + "Flush (send) contents of the output buffer. The last buffer content is sent to next buffer" + ], + "ob_get_clean": [ + "bool ob_get_clean()", + "Get current buffer contents and delete current output buffer" + ], + "ob_get_contents": [ + "string ob_get_contents()", + "Return the contents of the output buffer" + ], + "ob_get_flush": [ + "bool ob_get_flush()", + "Get current buffer contents, flush (send) the output buffer, and delete current output buffer" + ], + "ob_get_length": [ + "int ob_get_length()", + "Return the length of the output buffer" + ], + "ob_get_level": [ + "int ob_get_level()", + "Return the nesting level of the output buffer" + ], + "ob_get_status": [ + "false|array ob_get_status([bool full_status])", + "Return the status of the active or all output buffers" + ], + "ob_gzhandler": [ + "string ob_gzhandler(string str, int mode)", + "Encode str based on accept-encoding setting - designed to be called from ob_start()" + ], + "ob_iconv_handler": [ + "string ob_iconv_handler(string contents, int status)", + "Returns str in output buffer converted to the iconv.output_encoding character set" + ], + "ob_implicit_flush": [ + "void ob_implicit_flush([int flag])", + "Turn implicit flush on/off and is equivalent to calling flush() after every output call" + ], + "ob_list_handlers": [ + "false|array ob_list_handlers()", + "* List all output_buffers in an array" + ], + "ob_start": [ + "bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])", + "Turn on Output Buffering (specifying an optional output handler)." + ], + "oci_bind_array_by_name": [ + "bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]])", + "Bind a PHP array to an Oracle PL/SQL type by name" + ], + "oci_bind_by_name": [ + "bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]])", + "Bind a PHP variable to an Oracle placeholder by name" + ], + "oci_cancel": [ + "bool oci_cancel(resource stmt)", + "Cancel reading from a cursor" + ], + "oci_close": [ + "bool oci_close(resource connection)", + "Disconnect from database" + ], + "oci_collection_append": [ + "bool oci_collection_append(string value)", + "Append an object to the collection" + ], + "oci_collection_assign": [ + "bool oci_collection_assign(object from)", + "Assign a collection from another existing collection" + ], + "oci_collection_element_assign": [ + "bool oci_collection_element_assign(int index, string val)", + "Assign element val to collection at index ndx" + ], + "oci_collection_element_get": [ + "string oci_collection_element_get(int ndx)", + "Retrieve the value at collection index ndx" + ], + "oci_collection_max": [ + "int oci_collection_max()", + "Return the max value of a collection. For a varray this is the maximum length of the array" + ], + "oci_collection_size": [ + "int oci_collection_size()", + "Return the size of a collection" + ], + "oci_collection_trim": [ + "bool oci_collection_trim(int num)", + "Trim num elements from the end of a collection" + ], + "oci_commit": [ + "bool oci_commit(resource connection)", + "Commit the current context" + ], + "oci_connect": [ + "resource oci_connect(string user, string pass [, string db [, string charset [, int session_mode ]])", + "Connect to an Oracle database and log on. Returns a new session." + ], + "oci_define_by_name": [ + "bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])", + "Define a PHP variable to an Oracle column by name" + ], + "oci_error": [ + "array oci_error([resource stmt|connection|global])", + "Return the last error of stmt|connection|global. If no error happened returns false." + ], + "oci_execute": [ + "bool oci_execute(resource stmt [, int mode])", + "Execute a parsed statement" + ], + "oci_fetch": [ + "bool oci_fetch(resource stmt)", + "Prepare a new row of data for reading" + ], + "oci_fetch_all": [ + "int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]])", + "Fetch all rows of result data into an array" + ], + "oci_fetch_array": [ + "array oci_fetch_array( resource stmt [, int mode ])", + "Fetch a result row as an array" + ], + "oci_fetch_assoc": [ + "array oci_fetch_assoc( resource stmt )", + "Fetch a result row as an associative array" + ], + "oci_fetch_object": [ + "object oci_fetch_object( resource stmt )", + "Fetch a result row as an object" + ], + "oci_fetch_row": [ + "array oci_fetch_row( resource stmt )", + "Fetch a result row as an enumerated array" + ], + "oci_field_is_null": [ + "bool oci_field_is_null(resource stmt, int col)", + "Tell whether a column is NULL" + ], + "oci_field_name": [ + "string oci_field_name(resource stmt, int col)", + "Tell the name of a column" + ], + "oci_field_precision": [ + "int oci_field_precision(resource stmt, int col)", + "Tell the precision of a column" + ], + "oci_field_scale": [ + "int oci_field_scale(resource stmt, int col)", + "Tell the scale of a column" + ], + "oci_field_size": [ + "int oci_field_size(resource stmt, int col)", + "Tell the maximum data size of a column" + ], + "oci_field_type": [ + "mixed oci_field_type(resource stmt, int col)", + "Tell the data type of a column" + ], + "oci_field_type_raw": [ + "int oci_field_type_raw(resource stmt, int col)", + "Tell the raw oracle data type of a column" + ], + "oci_free_collection": [ + "bool oci_free_collection()", + "Deletes collection object" + ], + "oci_free_descriptor": [ + "bool oci_free_descriptor()", + "Deletes large object description" + ], + "oci_free_statement": [ + "bool oci_free_statement(resource stmt)", + "Free all resources associated with a statement" + ], + "oci_internal_debug": [ + "void oci_internal_debug(int onoff)", + "Toggle internal debugging output for the OCI extension" + ], + "oci_lob_append": [ + "bool oci_lob_append( object lob )", + "Appends data from a LOB to another LOB" + ], + "oci_lob_close": [ + "bool oci_lob_close()", + "Closes lob descriptor" + ], + "oci_lob_copy": [ + "bool oci_lob_copy( object lob_to, object lob_from [, int length ] )", + "Copies data from a LOB to another LOB" + ], + "oci_lob_eof": [ + "bool oci_lob_eof()", + "Checks if EOF is reached" + ], + "oci_lob_erase": [ + "int oci_lob_erase( [ int offset [, int length ] ] )", + "Erases a specified portion of the internal LOB, starting at a specified offset" + ], + "oci_lob_export": [ + "bool oci_lob_export([string filename [, int start [, int length]]])", + "Writes a large object into a file" + ], + "oci_lob_flush": [ + "bool oci_lob_flush( [ int flag ] )", + "Flushes the LOB buffer" + ], + "oci_lob_import": [ + "bool oci_lob_import( string filename )", + "Loads file into a LOB" + ], + "oci_lob_is_equal": [ + "bool oci_lob_is_equal( object lob1, object lob2 )", + "Tests to see if two LOB/FILE locators are equal" + ], + "oci_lob_load": [ + "string oci_lob_load()", + "Loads a large object" + ], + "oci_lob_read": [ + "string oci_lob_read( int length )", + "Reads particular part of a large object" + ], + "oci_lob_rewind": [ + "bool oci_lob_rewind()", + "Rewind pointer of a LOB" + ], + "oci_lob_save": [ + "bool oci_lob_save( string data [, int offset ])", + "Saves a large object" + ], + "oci_lob_seek": [ + "bool oci_lob_seek( int offset [, int whence ])", + "Moves the pointer of a LOB" + ], + "oci_lob_size": [ + "int oci_lob_size()", + "Returns size of a large object" + ], + "oci_lob_tell": [ + "int oci_lob_tell()", + "Tells LOB pointer position" + ], + "oci_lob_truncate": [ + "bool oci_lob_truncate( [ int length ])", + "Truncates a LOB" + ], + "oci_lob_write": [ + "int oci_lob_write( string string [, int length ])", + "Writes data to current position of a LOB" + ], + "oci_lob_write_temporary": [ + "bool oci_lob_write_temporary(string var [, int lob_type])", + "Writes temporary blob" + ], + "oci_new_collection": [ + "object oci_new_collection(resource connection, string tdo [, string schema])", + "Initialize a new collection" + ], + "oci_new_connect": [ + "resource oci_new_connect(string user, string pass [, string db])", + "Connect to an Oracle database and log on. Returns a new session." + ], + "oci_new_cursor": [ + "resource oci_new_cursor(resource connection)", + "Return a new cursor (Statement-Handle) - use this to bind ref-cursors!" + ], + "oci_new_descriptor": [ + "object oci_new_descriptor(resource connection [, int type])", + "Initialize a new empty descriptor LOB/FILE (LOB is default)" + ], + "oci_num_fields": [ + "int oci_num_fields(resource stmt)", + "Return the number of result columns in a statement" + ], + "oci_num_rows": [ + "int oci_num_rows(resource stmt)", + "Return the row count of an OCI statement" + ], + "oci_parse": [ + "resource oci_parse(resource connection, string query)", + "Parse a query and return a statement" + ], + "oci_password_change": [ + "bool oci_password_change(resource connection, string username, string old_password, string new_password)", + "Changes the password of an account" + ], + "oci_pconnect": [ + "resource oci_pconnect(string user, string pass [, string db [, string charset ]])", + "Connect to an Oracle database using a persistent connection and log on. Returns a new session." + ], + "oci_result": [ + "string oci_result(resource stmt, mixed column)", + "Return a single column of result data" + ], + "oci_rollback": [ + "bool oci_rollback(resource connection)", + "Rollback the current context" + ], + "oci_server_version": [ + "string oci_server_version(resource connection)", + "Return a string containing server version information" + ], + "oci_set_action": [ + "bool oci_set_action(resource connection, string value)", + "Sets the action attribute on the connection" + ], + "oci_set_client_identifier": [ + "bool oci_set_client_identifier(resource connection, string value)", + "Sets the client identifier attribute on the connection" + ], + "oci_set_client_info": [ + "bool oci_set_client_info(resource connection, string value)", + "Sets the client info attribute on the connection" + ], + "oci_set_edition": [ + "bool oci_set_edition(string value)", + "Sets the edition attribute for all subsequent connections created" + ], + "oci_set_module_name": [ + "bool oci_set_module_name(resource connection, string value)", + "Sets the module attribute on the connection" + ], + "oci_set_prefetch": [ + "bool oci_set_prefetch(resource stmt, int prefetch_rows)", + "Sets the number of rows to be prefetched on execute to prefetch_rows for stmt" + ], + "oci_statement_type": [ + "string oci_statement_type(resource stmt)", + "Return the query type of an OCI statement" + ], + "ocifetchinto": [ + "int ocifetchinto(resource stmt, array &output [, int mode])", + "Fetch a row of result data into an array" + ], + "ocigetbufferinglob": [ + "bool ocigetbufferinglob()", + "Returns current state of buffering for a LOB" + ], + "ocisetbufferinglob": [ + "bool ocisetbufferinglob( bool flag )", + "Enables/disables buffering for a LOB" + ], + "octdec": [ + "int octdec(string octal_number)", + "Returns the decimal equivalent of an octal string" + ], + "odbc_autocommit": [ + "mixed odbc_autocommit(resource connection_id [, int OnOff])", + "Toggle autocommit mode or get status" + ], + "odbc_binmode": [ + "bool odbc_binmode(int result_id, int mode)", + "Handle binary column data" + ], + "odbc_close": [ + "void odbc_close(resource connection_id)", + "Close an ODBC connection" + ], + "odbc_close_all": [ + "void odbc_close_all()", + "Close all ODBC connections" + ], + "odbc_columnprivileges": [ + "resource odbc_columnprivileges(resource connection_id, string catalog, string schema, string table, string column)", + "Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table" + ], + "odbc_columns": [ + "resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])", + "Returns a result identifier that can be used to fetch a list of column names in specified tables" + ], + "odbc_commit": [ + "bool odbc_commit(resource connection_id)", + "Commit an ODBC transaction" + ], + "odbc_connect": [ + "resource odbc_connect(string DSN, string user, string password [, int cursor_option])", + "Connect to a datasource" + ], + "odbc_cursor": [ + "string odbc_cursor(resource result_id)", + "Get cursor name" + ], + "odbc_data_source": [ + "array odbc_data_source(resource connection_id, int fetch_type)", + "Return information about the currently connected data source" + ], + "odbc_error": [ + "string odbc_error([resource connection_id])", + "Get the last error code" + ], + "odbc_errormsg": [ + "string odbc_errormsg([resource connection_id])", + "Get the last error message" + ], + "odbc_exec": [ + "resource odbc_exec(resource connection_id, string query [, int flags])", + "Prepare and execute an SQL statement" + ], + "odbc_execute": [ + "bool odbc_execute(resource result_id [, array parameters_array])", + "Execute a prepared statement" + ], + "odbc_fetch_array": [ + "array odbc_fetch_array(int result [, int rownumber])", + "Fetch a result row as an associative array" + ], + "odbc_fetch_into": [ + "int odbc_fetch_into(resource result_id, array &result_array, [, int rownumber])", + "Fetch one result row into an array" + ], + "odbc_fetch_object": [ + "object odbc_fetch_object(int result [, int rownumber])", + "Fetch a result row as an object" + ], + "odbc_fetch_row": [ + "bool odbc_fetch_row(resource result_id [, int row_number])", + "Fetch a row" + ], + "odbc_field_len": [ + "int odbc_field_len(resource result_id, int field_number)", + "Get the length (precision) of a column" + ], + "odbc_field_name": [ + "string odbc_field_name(resource result_id, int field_number)", + "Get a column name" + ], + "odbc_field_num": [ + "int odbc_field_num(resource result_id, string field_name)", + "Return column number" + ], + "odbc_field_scale": [ + "int odbc_field_scale(resource result_id, int field_number)", + "Get the scale of a column" + ], + "odbc_field_type": [ + "string odbc_field_type(resource result_id, int field_number)", + "Get the datatype of a column" + ], + "odbc_foreignkeys": [ + "resource odbc_foreignkeys(resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)", + "Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table" + ], + "odbc_free_result": [ + "bool odbc_free_result(resource result_id)", + "Free resources associated with a result" + ], + "odbc_gettypeinfo": [ + "resource odbc_gettypeinfo(resource connection_id [, int data_type])", + "Returns a result identifier containing information about data types supported by the data source" + ], + "odbc_longreadlen": [ + "bool odbc_longreadlen(int result_id, int length)", + "Handle LONG columns" + ], + "odbc_next_result": [ + "bool odbc_next_result(resource result_id)", + "Checks if multiple results are avaiable" + ], + "odbc_num_fields": [ + "int odbc_num_fields(resource result_id)", + "Get number of columns in a result" + ], + "odbc_num_rows": [ + "int odbc_num_rows(resource result_id)", + "Get number of rows in a result" + ], + "odbc_pconnect": [ + "resource odbc_pconnect(string DSN, string user, string password [, int cursor_option])", + "Establish a persistent connection to a datasource" + ], + "odbc_prepare": [ + "resource odbc_prepare(resource connection_id, string query)", + "Prepares a statement for execution" + ], + "odbc_primarykeys": [ + "resource odbc_primarykeys(resource connection_id, string qualifier, string owner, string table)", + "Returns a result identifier listing the column names that comprise the primary key for a table" + ], + "odbc_procedurecolumns": [ + "resource odbc_procedurecolumns(resource connection_id [, string qualifier, string owner, string proc, string column])", + "Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures" + ], + "odbc_procedures": [ + "resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])", + "Returns a result identifier containg the list of procedure names in a datasource" + ], + "odbc_result": [ + "mixed odbc_result(resource result_id, mixed field)", + "Get result data" + ], + "odbc_result_all": [ + "int odbc_result_all(resource result_id [, string format])", + "Print result as HTML table" + ], + "odbc_rollback": [ + "bool odbc_rollback(resource connection_id)", + "Rollback a transaction" + ], + "odbc_setoption": [ + "bool odbc_setoption(resource conn_id|result_id, int which, int option, int value)", + "Sets connection or statement options" + ], + "odbc_specialcolumns": [ + "resource odbc_specialcolumns(resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)", + "Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction" + ], + "odbc_statistics": [ + "resource odbc_statistics(resource connection_id, string qualifier, string owner, string name, int unique, int accuracy)", + "Returns a result identifier that contains statistics about a single table and the indexes associated with the table" + ], + "odbc_tableprivileges": [ + "resource odbc_tableprivileges(resource connection_id, string qualifier, string owner, string name)", + "Returns a result identifier containing a list of tables and the privileges associated with each table" + ], + "odbc_tables": [ + "resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])", + "Call the SQLTables function" + ], + "opendir": [ + "mixed opendir(string path[, resource context])", + "Open a directory and return a dir_handle" + ], + "openlog": [ + "bool openlog(string ident, int option, int facility)", + "Open connection to system logger" + ], + "openssl_csr_export": [ + "bool openssl_csr_export(resource csr, string &out [, bool notext=true])", + "Exports a CSR to file or a var" + ], + "openssl_csr_export_to_file": [ + "bool openssl_csr_export_to_file(resource csr, string outfilename [, bool notext=true])", + "Exports a CSR to file" + ], + "openssl_csr_get_public_key": [ + "mixed openssl_csr_get_public_key(mixed csr)", + "Returns the subject of a CERT or FALSE on error" + ], + "openssl_csr_get_subject": [ + "mixed openssl_csr_get_subject(mixed csr)", + "Returns the subject of a CERT or FALSE on error" + ], + "openssl_csr_new": [ + "bool openssl_csr_new(array dn, resource &privkey [, array configargs [, array extraattribs]])", + "Generates a privkey and CSR" + ], + "openssl_csr_sign": [ + "resource openssl_csr_sign(mixed csr, mixed x509, mixed priv_key, long days [, array config_args [, long serial]])", + "Signs a cert with another CERT" + ], + "openssl_decrypt": [ + "string openssl_decrypt(string data, string method, string password [, bool raw_input=false])", + "Takes raw or base64 encoded string and dectupt it using given method and key" + ], + "openssl_dh_compute_key": [ + "string openssl_dh_compute_key(string pub_key, resource dh_key)", + "Computes shared sicret for public value of remote DH key and local DH key" + ], + "openssl_digest": [ + "string openssl_digest(string data, string method [, bool raw_output=false])", + "Computes digest hash value for given data using given method, returns raw or binhex encoded string" + ], + "openssl_encrypt": [ + "string openssl_encrypt(string data, string method, string password [, bool raw_output=false])", + "Encrypts given data with given method and key, returns raw or base64 encoded string" + ], + "openssl_error_string": [ + "mixed openssl_error_string()", + "Returns a description of the last error, and alters the index of the error messages. Returns false when the are no more messages" + ], + "openssl_get_cipher_methods": [ + "array openssl_get_cipher_methods([bool aliases = false])", + "Return array of available cipher methods" + ], + "openssl_get_md_methods": [ + "array openssl_get_md_methods([bool aliases = false])", + "Return array of available digest methods" + ], + "openssl_open": [ + "bool openssl_open(string data, &string opendata, string ekey, mixed privkey)", + "Opens data" + ], + "openssl_pkcs12_export": [ + "bool openssl_pkcs12_export(mixed x509, string &out, mixed priv_key, string pass[, array args])", + "Creates and exports a PKCS12 to a var" + ], + "openssl_pkcs12_export_to_file": [ + "bool openssl_pkcs12_export_to_file(mixed x509, string filename, mixed priv_key, string pass[, array args])", + "Creates and exports a PKCS to file" + ], + "openssl_pkcs12_read": [ + "bool openssl_pkcs12_read(string PKCS12, array &certs, string pass)", + "Parses a PKCS12 to an array" + ], + "openssl_pkcs7_decrypt": [ + "bool openssl_pkcs7_decrypt(string infilename, string outfilename, mixed recipcert [, mixed recipkey])", + "Decrypts the S/MIME message in the file name infilename and output the results to the file name outfilename. recipcert is a CERT for one of the recipients. recipkey specifies the private key matching recipcert, if recipcert does not include the key" + ], + "openssl_pkcs7_encrypt": [ + "bool openssl_pkcs7_encrypt(string infile, string outfile, mixed recipcerts, array headers [, long flags [, long cipher]])", + "Encrypts the message in the file named infile with the certificates in recipcerts and output the result to the file named outfile" + ], + "openssl_pkcs7_sign": [ + "bool openssl_pkcs7_sign(string infile, string outfile, mixed signcert, mixed signkey, array headers [, long flags [, string extracertsfilename]])", + "Signs the MIME message in the file named infile with signcert/signkey and output the result to file name outfile. headers lists plain text headers to exclude from the signed portion of the message, and should include to, from and subject as a minimum" + ], + "openssl_pkcs7_verify": [ + "bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])", + "Verifys that the data block is intact, the signer is who they say they are, and returns the CERTs of the signers" + ], + "openssl_pkey_export": [ + "bool openssl_pkey_export(mixed key, &mixed out [, string passphrase [, array config_args]])", + "Gets an exportable representation of a key into a string or file" + ], + "openssl_pkey_export_to_file": [ + "bool openssl_pkey_export_to_file(mixed key, string outfilename [, string passphrase, array config_args)", + "Gets an exportable representation of a key into a file" + ], + "openssl_pkey_free": [ + "void openssl_pkey_free(int key)", + "Frees a key" + ], + "openssl_pkey_get_details": [ + "resource openssl_pkey_get_details(resource key)", + "returns an array with the key details (bits, pkey, type)" + ], + "openssl_pkey_get_private": [ + "int openssl_pkey_get_private(string key [, string passphrase])", + "Gets private keys" + ], + "openssl_pkey_get_public": [ + "int openssl_pkey_get_public(mixed cert)", + "Gets public key from X.509 certificate" + ], + "openssl_pkey_new": [ + "resource openssl_pkey_new([array configargs])", + "Generates a new private key" + ], + "openssl_private_decrypt": [ + "bool openssl_private_decrypt(string data, string &decrypted, mixed key [, int padding])", + "Decrypts data with private key" + ], + "openssl_private_encrypt": [ + "bool openssl_private_encrypt(string data, string &crypted, mixed key [, int padding])", + "Encrypts data with private key" + ], + "openssl_public_decrypt": [ + "bool openssl_public_decrypt(string data, string &crypted, resource key [, int padding])", + "Decrypts data with public key" + ], + "openssl_public_encrypt": [ + "bool openssl_public_encrypt(string data, string &crypted, mixed key [, int padding])", + "Encrypts data with public key" + ], + "openssl_random_pseudo_bytes": [ + "string openssl_random_pseudo_bytes(integer length [, &bool returned_strong_result])", + "Returns a string of the length specified filled with random pseudo bytes" + ], + "openssl_seal": [ + "int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys)", + "Seals data" + ], + "openssl_sign": [ + "bool openssl_sign(string data, &string signature, mixed key[, mixed method])", + "Signs data" + ], + "openssl_verify": [ + "int openssl_verify(string data, string signature, mixed key[, mixed method])", + "Verifys data" + ], + "openssl_x509_check_private_key": [ + "bool openssl_x509_check_private_key(mixed cert, mixed key)", + "Checks if a private key corresponds to a CERT" + ], + "openssl_x509_checkpurpose": [ + "int openssl_x509_checkpurpose(mixed x509cert, int purpose, array cainfo [, string untrustedfile])", + "Checks the CERT to see if it can be used for the purpose in purpose. cainfo holds information about trusted CAs" + ], + "openssl_x509_export": [ + "bool openssl_x509_export(mixed x509, string &out [, bool notext = true])", + "Exports a CERT to file or a var" + ], + "openssl_x509_export_to_file": [ + "bool openssl_x509_export_to_file(mixed x509, string outfilename [, bool notext = true])", + "Exports a CERT to file or a var" + ], + "openssl_x509_free": [ + "void openssl_x509_free(resource x509)", + "Frees X.509 certificates" + ], + "openssl_x509_parse": [ + "array openssl_x509_parse(mixed x509 [, bool shortnames=true])", + "Returns an array of the fields/values of the CERT" + ], + "openssl_x509_read": [ + "resource openssl_x509_read(mixed cert)", + "Reads X.509 certificates" + ], + "ord": [ + "int ord(string character)", + "Returns ASCII value of character" + ], + "output_add_rewrite_var": [ + "bool output_add_rewrite_var(string name, string value)", + "Add URL rewriter values" + ], + "output_reset_rewrite_vars": [ + "bool output_reset_rewrite_vars()", + "Reset(clear) URL rewriter values" + ], + "pack": [ + "string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])", + "Takes one or more arguments and packs them into a binary string according to the format argument" + ], + "parse_ini_file": [ + "array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])", + "Parse configuration file" + ], + "parse_ini_string": [ + "array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])", + "Parse configuration string" + ], + "parse_locale": [ + "static array parse_locale($locale)", + "* parses a locale-id into an array the different parts of it" + ], + "parse_str": [ + "void parse_str(string encoded_string [, array result])", + "Parses GET/POST/COOKIE data and sets global variables" + ], + "parse_url": [ + "mixed parse_url(string url, [int url_component])", + "Parse a URL and return its components" + ], + "passthru": [ + "void passthru(string command [, int &return_value])", + "Execute an external program and display raw output" + ], + "pathinfo": [ + "array pathinfo(string path[, int options])", + "Returns information about a certain string" + ], + "pclose": [ + "int pclose(resource fp)", + "Close a file pointer opened by popen()" + ], + "pcnlt_sigwaitinfo": [ + "int pcnlt_sigwaitinfo(array set[, array &siginfo])", + "Synchronously wait for queued signals" + ], + "pcntl_alarm": [ + "int pcntl_alarm(int seconds)", + "Set an alarm clock for delivery of a signal" + ], + "pcntl_exec": [ + "bool pcntl_exec(string path [, array args [, array envs]])", + "Executes specified program in current process space as defined by exec(2)" + ], + "pcntl_fork": [ + "int pcntl_fork()", + "Forks the currently running process following the same behavior as the UNIX fork() system call" + ], + "pcntl_getpriority": [ + "int pcntl_getpriority([int pid [, int process_identifier]])", + "Get the priority of any process" + ], + "pcntl_setpriority": [ + "bool pcntl_setpriority(int priority [, int pid [, int process_identifier]])", + "Change the priority of any process" + ], + "pcntl_signal": [ + "bool pcntl_signal(int signo, callback handle [, bool restart_syscalls])", + "Assigns a system signal handler to a PHP function" + ], + "pcntl_signal_dispatch": [ + "bool pcntl_signal_dispatch()", + "Dispatch signals to signal handlers" + ], + "pcntl_sigprocmask": [ + "bool pcntl_sigprocmask(int how, array set[, array &oldset])", + "Examine and change blocked signals" + ], + "pcntl_sigtimedwait": [ + "int pcntl_sigtimedwait(array set[, array &siginfo[, int seconds[, int nanoseconds]]])", + "Wait for queued signals" + ], + "pcntl_wait": [ + "int pcntl_wait(int &status)", + "Waits on or returns the status of a forked child as defined by the waitpid() system call" + ], + "pcntl_waitpid": [ + "int pcntl_waitpid(int pid, int &status, int options)", + "Waits on or returns the status of a forked child as defined by the waitpid() system call" + ], + "pcntl_wexitstatus": [ + "int pcntl_wexitstatus(int status)", + "Returns the status code of a child's exit" + ], + "pcntl_wifexited": [ + "bool pcntl_wifexited(int status)", + "Returns true if the child status code represents a successful exit" + ], + "pcntl_wifsignaled": [ + "bool pcntl_wifsignaled(int status)", + "Returns true if the child status code represents a process that was terminated due to a signal" + ], + "pcntl_wifstopped": [ + "bool pcntl_wifstopped(int status)", + "Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid)" + ], + "pcntl_wstopsig": [ + "int pcntl_wstopsig(int status)", + "Returns the number of the signal that caused the process to stop who's status code is passed" + ], + "pcntl_wtermsig": [ + "int pcntl_wtermsig(int status)", + "Returns the number of the signal that terminated the process who's status code is passed" + ], + "pdo_drivers": [ + "array pdo_drivers()", + "Return array of available PDO drivers" + ], + "pfsockopen": [ + "resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])", + "Open persistent Internet or Unix domain socket connection" + ], + "pg_affected_rows": [ + "int pg_affected_rows(resource result)", + "Returns the number of affected tuples" + ], + "pg_cancel_query": [ + "bool pg_cancel_query(resource connection)", + "Cancel request" + ], + "pg_client_encoding": [ + "string pg_client_encoding([resource connection])", + "Get the current client encoding" + ], + "pg_close": [ + "bool pg_close([resource connection])", + "Close a PostgreSQL connection" + ], + "pg_connect": [ + "resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database)", + "Open a PostgreSQL connection" + ], + "pg_connection_busy": [ + "bool pg_connection_busy(resource connection)", + "Get connection is busy or not" + ], + "pg_connection_reset": [ + "bool pg_connection_reset(resource connection)", + "Reset connection (reconnect)" + ], + "pg_connection_status": [ + "int pg_connection_status(resource connnection)", + "Get connection status" + ], + "pg_convert": [ + "array pg_convert(resource db, string table, array values[, int options])", + "Check and convert values for PostgreSQL SQL statement" + ], + "pg_copy_from": [ + "bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]])", + "Copy table from array" + ], + "pg_copy_to": [ + "array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]])", + "Copy table to array" + ], + "pg_dbname": [ + "string pg_dbname([resource connection])", + "Get the database name" + ], + "pg_delete": [ + "mixed pg_delete(resource db, string table, array ids[, int options])", + "Delete records has ids (id => value)" + ], + "pg_end_copy": [ + "bool pg_end_copy([resource connection])", + "Sync with backend. Completes the Copy command" + ], + "pg_escape_bytea": [ + "string pg_escape_bytea([resource connection,] string data)", + "Escape binary for bytea type" + ], + "pg_escape_string": [ + "string pg_escape_string([resource connection,] string data)", + "Escape string for text/char type" + ], + "pg_execute": [ + "resource pg_execute([resource connection,] string stmtname, array params)", + "Execute a prepared query" + ], + "pg_fetch_all": [ + "array pg_fetch_all(resource result)", + "Fetch all rows into array" + ], + "pg_fetch_all_columns": [ + "array pg_fetch_all_columns(resource result [, int column_number])", + "Fetch all rows into array" + ], + "pg_fetch_array": [ + "array pg_fetch_array(resource result [, int row [, int result_type]])", + "Fetch a row as an array" + ], + "pg_fetch_assoc": [ + "array pg_fetch_assoc(resource result [, int row])", + "Fetch a row as an assoc array" + ], + "pg_fetch_object": [ + "object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]])", + "Fetch a row as an object" + ], + "pg_fetch_result": [ + "mixed pg_fetch_result(resource result, [int row_number,] mixed field_name)", + "Returns values from a result identifier" + ], + "pg_fetch_row": [ + "array pg_fetch_row(resource result [, int row [, int result_type]])", + "Get a row as an enumerated array" + ], + "pg_field_is_null": [ + "int pg_field_is_null(resource result, [int row,] mixed field_name_or_number)", + "Test if a field is NULL" + ], + "pg_field_name": [ + "string pg_field_name(resource result, int field_number)", + "Returns the name of the field" + ], + "pg_field_num": [ + "int pg_field_num(resource result, string field_name)", + "Returns the field number of the named field" + ], + "pg_field_prtlen": [ + "int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number)", + "Returns the printed length" + ], + "pg_field_size": [ + "int pg_field_size(resource result, int field_number)", + "Returns the internal size of the field" + ], + "pg_field_table": [ + "mixed pg_field_table(resource result, int field_number[, bool oid_only])", + "Returns the name of the table field belongs to, or table's oid if oid_only is true" + ], + "pg_field_type": [ + "string pg_field_type(resource result, int field_number)", + "Returns the type name for the given field" + ], + "pg_field_type_oid": [ + "string pg_field_type_oid(resource result, int field_number)", + "Returns the type oid for the given field" + ], + "pg_free_result": [ + "bool pg_free_result(resource result)", + "Free result memory" + ], + "pg_get_notify": [ + "array pg_get_notify([resource connection[, result_type]])", + "Get asynchronous notification" + ], + "pg_get_pid": [ + "int pg_get_pid([resource connection)", + "Get backend(server) pid" + ], + "pg_get_result": [ + "resource pg_get_result(resource connection)", + "Get asynchronous query result" + ], + "pg_host": [ + "string pg_host([resource connection])", + "Returns the host name associated with the connection" + ], + "pg_insert": [ + "mixed pg_insert(resource db, string table, array values[, int options])", + "Insert values (filed => value) to table" + ], + "pg_last_error": [ + "string pg_last_error([resource connection])", + "Get the error message string" + ], + "pg_last_notice": [ + "string pg_last_notice(resource connection)", + "Returns the last notice set by the backend" + ], + "pg_last_oid": [ + "string pg_last_oid(resource result)", + "Returns the last object identifier" + ], + "pg_lo_close": [ + "bool pg_lo_close(resource large_object)", + "Close a large object" + ], + "pg_lo_create": [ + "mixed pg_lo_create([resource connection],[mixed large_object_oid])", + "Create a large object" + ], + "pg_lo_export": [ + "bool pg_lo_export([resource connection, ] int objoid, string filename)", + "Export large object direct to filesystem" + ], + "pg_lo_import": [ + "int pg_lo_import([resource connection, ] string filename [, mixed oid])", + "Import large object direct from filesystem" + ], + "pg_lo_open": [ + "resource pg_lo_open([resource connection,] int large_object_oid, string mode)", + "Open a large object and return fd" + ], + "pg_lo_read": [ + "string pg_lo_read(resource large_object [, int len])", + "Read a large object" + ], + "pg_lo_read_all": [ + "int pg_lo_read_all(resource large_object)", + "Read a large object and send straight to browser" + ], + "pg_lo_seek": [ + "bool pg_lo_seek(resource large_object, int offset [, int whence])", + "Seeks position of large object" + ], + "pg_lo_tell": [ + "int pg_lo_tell(resource large_object)", + "Returns current position of large object" + ], + "pg_lo_unlink": [ + "bool pg_lo_unlink([resource connection,] string large_object_oid)", + "Delete a large object" + ], + "pg_lo_write": [ + "int pg_lo_write(resource large_object, string buf [, int len])", + "Write a large object" + ], + "pg_meta_data": [ + "array pg_meta_data(resource db, string table)", + "Get meta_data" + ], + "pg_num_fields": [ + "int pg_num_fields(resource result)", + "Return the number of fields in the result" + ], + "pg_num_rows": [ + "int pg_num_rows(resource result)", + "Return the number of rows in the result" + ], + "pg_options": [ + "string pg_options([resource connection])", + "Get the options associated with the connection" + ], + "pg_parameter_status": [ + "string|false pg_parameter_status([resource connection,] string param_name)", + "Returns the value of a server parameter" + ], + "pg_pconnect": [ + "resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database)", + "Open a persistent PostgreSQL connection" + ], + "pg_ping": [ + "bool pg_ping([resource connection])", + "Ping database. If connection is bad, try to reconnect." + ], + "pg_port": [ + "int pg_port([resource connection])", + "Return the port number associated with the connection" + ], + "pg_prepare": [ + "resource pg_prepare([resource connection,] string stmtname, string query)", + "Prepare a query for future execution" + ], + "pg_put_line": [ + "bool pg_put_line([resource connection,] string query)", + "Send null-terminated string to backend server" + ], + "pg_query": [ + "resource pg_query([resource connection,] string query)", + "Execute a query" + ], + "pg_query_params": [ + "resource pg_query_params([resource connection,] string query, array params)", + "Execute a query" + ], + "pg_result_error": [ + "string pg_result_error(resource result)", + "Get error message associated with result" + ], + "pg_result_error_field": [ + "string pg_result_error_field(resource result, int fieldcode)", + "Get error message field associated with result" + ], + "pg_result_seek": [ + "bool pg_result_seek(resource result, int offset)", + "Set internal row offset" + ], + "pg_result_status": [ + "mixed pg_result_status(resource result[, long result_type])", + "Get status of query result" + ], + "pg_select": [ + "mixed pg_select(resource db, string table, array ids[, int options])", + "Select records that has ids (id => value)" + ], + "pg_send_execute": [ + "bool pg_send_execute(resource connection, string stmtname, array params)", + "Executes prevriously prepared stmtname asynchronously" + ], + "pg_send_prepare": [ + "bool pg_send_prepare(resource connection, string stmtname, string query)", + "Asynchronously prepare a query for future execution" + ], + "pg_send_query": [ + "bool pg_send_query(resource connection, string query)", + "Send asynchronous query" + ], + "pg_send_query_params": [ + "bool pg_send_query_params(resource connection, string query, array params)", + "Send asynchronous parameterized query" + ], + "pg_set_client_encoding": [ + "int pg_set_client_encoding([resource connection,] string encoding)", + "Set client encoding" + ], + "pg_set_error_verbosity": [ + "int pg_set_error_verbosity([resource connection,] int verbosity)", + "Set error verbosity" + ], + "pg_trace": [ + "bool pg_trace(string filename [, string mode [, resource connection]])", + "Enable tracing a PostgreSQL connection" + ], + "pg_transaction_status": [ + "int pg_transaction_status(resource connnection)", + "Get transaction status" + ], + "pg_tty": [ + "string pg_tty([resource connection])", + "Return the tty name associated with the connection" + ], + "pg_unescape_bytea": [ + "string pg_unescape_bytea(string data)", + "Unescape binary for bytea type" + ], + "pg_untrace": [ + "bool pg_untrace([resource connection])", + "Disable tracing of a PostgreSQL connection" + ], + "pg_update": [ + "mixed pg_update(resource db, string table, array fields, array ids[, int options])", + "Update table using values (field => value) and ids (id => value)" + ], + "pg_version": [ + "array pg_version([resource connection])", + "Returns an array with client, protocol and server version (when available)" + ], + "php_egg_logo_guid": [ + "string php_egg_logo_guid()", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_ini_loaded_file": [ + "string php_ini_loaded_file()", + "Return the actual loaded ini filename" + ], + "php_ini_scanned_files": [ + "string php_ini_scanned_files()", + "Return comma-separated string of .ini files parsed from the additional ini dir" + ], + "php_logo_guid": [ + "string php_logo_guid()", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_real_logo_guid": [ + "string php_real_logo_guid()", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_sapi_name": [ + "string php_sapi_name()", + "Return the current SAPI module name" + ], + "php_snmpv3": [ + "void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st)", + "* * Generic SNMPv3 object fetcher * From here is passed on the the common internal object fetcher. * * st=SNMP_CMD_GET snmp3_get() - query an agent and return a single value. * st=SNMP_CMD_GETNEXT snmp3_getnext() - query an agent and return the next single value. * st=SNMP_CMD_WALK snmp3_walk() - walk the mib and return a single dimensional array * containing the values. * st=SNMP_CMD_REALWALK snmp3_real_walk() - walk the mib and return an * array of oid,value pairs. * st=SNMP_CMD_SET snmp3_set() - query an agent and set a single value *" + ], + "php_strip_whitespace": [ + "string php_strip_whitespace(string file_name)", + "Return source with stripped comments and whitespace" + ], + "php_uname": [ + "string php_uname()", + "Return information about the system PHP was built on" + ], + "phpcredits": [ + "void phpcredits([int flag])", + "Prints the list of people who've contributed to the PHP project" + ], + "phpinfo": [ + "void phpinfo([int what])", + "Output a page of useful information about PHP and the current request" + ], + "phpversion": [ + "string phpversion([string extension])", + "Return the current PHP version" + ], + "pi": [ + "float pi()", + "Returns an approximation of pi" + ], + "png2wbmp": [ + "bool png2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)", + "Convert PNG image to WBMP image" + ], + "popen": [ + "resource popen(string command, string mode)", + "Execute a command and open either a read or a write pipe to it" + ], + "posix_access": [ + "bool posix_access(string file [, int mode])", + "Determine accessibility of a file (POSIX.1 5.6.3)" + ], + "posix_ctermid": [ + "string posix_ctermid()", + "Generate terminal path name (POSIX.1, 4.7.1)" + ], + "posix_get_last_error": [ + "int posix_get_last_error()", + "Retrieve the error number set by the last posix function which failed." + ], + "posix_getcwd": [ + "string posix_getcwd()", + "Get working directory pathname (POSIX.1, 5.2.2)" + ], + "posix_getegid": [ + "int posix_getegid()", + "Get the current effective group id (POSIX.1, 4.2.1)" + ], + "posix_geteuid": [ + "int posix_geteuid()", + "Get the current effective user id (POSIX.1, 4.2.1)" + ], + "posix_getgid": [ + "int posix_getgid()", + "Get the current group id (POSIX.1, 4.2.1)" + ], + "posix_getgrgid": [ + "array posix_getgrgid(long gid)", + "Group database access (POSIX.1, 9.2.1)" + ], + "posix_getgrnam": [ + "array posix_getgrnam(string groupname)", + "Group database access (POSIX.1, 9.2.1)" + ], + "posix_getgroups": [ + "array posix_getgroups()", + "Get supplementary group id's (POSIX.1, 4.2.3)" + ], + "posix_getlogin": [ + "string posix_getlogin()", + "Get user name (POSIX.1, 4.2.4)" + ], + "posix_getpgid": [ + "int posix_getpgid()", + "Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)" + ], + "posix_getpgrp": [ + "int posix_getpgrp()", + "Get current process group id (POSIX.1, 4.3.1)" + ], + "posix_getpid": [ + "int posix_getpid()", + "Get the current process id (POSIX.1, 4.1.1)" + ], + "posix_getppid": [ + "int posix_getppid()", + "Get the parent process id (POSIX.1, 4.1.1)" + ], + "posix_getpwnam": [ + "array posix_getpwnam(string groupname)", + "User database access (POSIX.1, 9.2.2)" + ], + "posix_getpwuid": [ + "array posix_getpwuid(long uid)", + "User database access (POSIX.1, 9.2.2)" + ], + "posix_getrlimit": [ + "array posix_getrlimit()", + "Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally)" + ], + "posix_getsid": [ + "int posix_getsid()", + "Get process group id of session leader (This is not a POSIX function, but a SVR4ism, so be compile conditionally)" + ], + "posix_getuid": [ + "int posix_getuid()", + "Get the current user id (POSIX.1, 4.2.1)" + ], + "posix_initgroups": [ + "bool posix_initgroups(string name, int base_group_id)", + "Calculate the group access list for the user specified in name." + ], + "posix_isatty": [ + "bool posix_isatty(int fd)", + "Determine if filedesc is a tty (POSIX.1, 4.7.1)" + ], + "posix_kill": [ + "bool posix_kill(int pid, int sig)", + "Send a signal to a process (POSIX.1, 3.3.2)" + ], + "posix_mkfifo": [ + "bool posix_mkfifo(string pathname, int mode)", + "Make a FIFO special file (POSIX.1, 5.4.2)" + ], + "posix_mknod": [ + "bool posix_mknod(string pathname, int mode [, int major [, int minor]])", + "Make a special or ordinary file (POSIX.1)" + ], + "posix_setegid": [ + "bool posix_setegid(long uid)", + "Set effective group id" + ], + "posix_seteuid": [ + "bool posix_seteuid(long uid)", + "Set effective user id" + ], + "posix_setgid": [ + "bool posix_setgid(int uid)", + "Set group id (POSIX.1, 4.2.2)" + ], + "posix_setpgid": [ + "bool posix_setpgid(int pid, int pgid)", + "Set process group id for job control (POSIX.1, 4.3.3)" + ], + "posix_setsid": [ + "int posix_setsid()", + "Create session and set process group id (POSIX.1, 4.3.2)" + ], + "posix_setuid": [ + "bool posix_setuid(long uid)", + "Set user id (POSIX.1, 4.2.2)" + ], + "posix_strerror": [ + "string posix_strerror(int errno)", + "Retrieve the system error message associated with the given errno." + ], + "posix_times": [ + "array posix_times()", + "Get process times (POSIX.1, 4.5.2)" + ], + "posix_ttyname": [ + "string posix_ttyname(int fd)", + "Determine terminal device name (POSIX.1, 4.7.2)" + ], + "posix_uname": [ + "array posix_uname()", + "Get system name (POSIX.1, 4.4.1)" + ], + "pow": [ + "number pow(number base, number exponent)", + "Returns base raised to the power of exponent. Returns integer result when possible" + ], + "preg_filter": [ + "mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement and only return matches." + ], + "preg_grep": [ + "array preg_grep(string regex, array input [, int flags])", + "Searches array and returns entries which match regex" + ], + "preg_last_error": [ + "int preg_last_error()", + "Returns the error code of the last regexp execution." + ], + "preg_match": [ + "int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])", + "Perform a Perl-style regular expression match" + ], + "preg_match_all": [ + "int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]])", + "Perform a Perl-style global regular expression match" + ], + "preg_quote": [ + "string preg_quote(string str [, string delim_char])", + "Quote regular expression characters plus an optional character" + ], + "preg_replace": [ + "mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement." + ], + "preg_replace_callback": [ + "mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement using replacement callback." + ], + "preg_split": [ + "array preg_split(string pattern, string subject [, int limit [, int flags]])", + "Split string into an array using a perl-style regular expression as a delimiter" + ], + "prev": [ + "mixed prev(array array_arg)", + "Move array argument's internal pointer to the previous element and return it" + ], + "print": [ + "int print(string arg)", + "Output a string" + ], + "print_r": [ + "mixed print_r(mixed var [, bool return])", + "Prints out or returns information about the specified variable" + ], + "printf": [ + "int printf(string format [, mixed arg1 [, mixed ...]])", + "Output a formatted string" + ], + "proc_close": [ + "int proc_close(resource process)", + "close a process opened by proc_open" + ], + "proc_get_status": [ + "array proc_get_status(resource process)", + "get information about a process opened by proc_open" + ], + "proc_nice": [ + "bool proc_nice(int priority)", + "Change the priority of the current process" + ], + "proc_open": [ + "resource proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]])", + "Run a process with more control over it's file descriptors" + ], + "proc_terminate": [ + "bool proc_terminate(resource process [, long signal])", + "kill a process opened by proc_open" + ], + "property_exists": [ + "bool property_exists(mixed object_or_class, string property_name)", + "Checks if the object or class has a property" + ], + "pspell_add_to_personal": [ + "bool pspell_add_to_personal(int pspell, string word)", + "Adds a word to a personal list" + ], + "pspell_add_to_session": [ + "bool pspell_add_to_session(int pspell, string word)", + "Adds a word to the current session" + ], + "pspell_check": [ + "bool pspell_check(int pspell, string word)", + "Returns true if word is valid" + ], + "pspell_clear_session": [ + "bool pspell_clear_session(int pspell)", + "Clears the current session" + ], + "pspell_config_create": [ + "int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])", + "Create a new config to be used later to create a manager" + ], + "pspell_config_data_dir": [ + "bool pspell_config_data_dir(int conf, string directory)", + "location of language data files" + ], + "pspell_config_dict_dir": [ + "bool pspell_config_dict_dir(int conf, string directory)", + "location of the main word list" + ], + "pspell_config_ignore": [ + "bool pspell_config_ignore(int conf, int ignore)", + "Ignore words <= n chars" + ], + "pspell_config_mode": [ + "bool pspell_config_mode(int conf, long mode)", + "Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS)" + ], + "pspell_config_personal": [ + "bool pspell_config_personal(int conf, string personal)", + "Use a personal dictionary for this config" + ], + "pspell_config_repl": [ + "bool pspell_config_repl(int conf, string repl)", + "Use a personal dictionary with replacement pairs for this config" + ], + "pspell_config_runtogether": [ + "bool pspell_config_runtogether(int conf, bool runtogether)", + "Consider run-together words as valid components" + ], + "pspell_config_save_repl": [ + "bool pspell_config_save_repl(int conf, bool save)", + "Save replacement pairs when personal list is saved for this config" + ], + "pspell_new": [ + "int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])", + "Load a dictionary" + ], + "pspell_new_config": [ + "int pspell_new_config(int config)", + "Load a dictionary based on the given config" + ], + "pspell_new_personal": [ + "int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])", + "Load a dictionary with a personal wordlist" + ], + "pspell_save_wordlist": [ + "bool pspell_save_wordlist(int pspell)", + "Saves the current (personal) wordlist" + ], + "pspell_store_replacement": [ + "bool pspell_store_replacement(int pspell, string misspell, string correct)", + "Notify the dictionary of a user-selected replacement" + ], + "pspell_suggest": [ + "array pspell_suggest(int pspell, string word)", + "Returns array of suggestions" + ], + "putenv": [ + "bool putenv(string setting)", + "Set the value of an environment variable" + ], + "quoted_printable_decode": [ + "string quoted_printable_decode(string str)", + "Convert a quoted-printable string to an 8 bit string" + ], + "quoted_printable_encode": [ + "string quoted_printable_encode(string str)", + "" + ], + "quotemeta": [ + "string quotemeta(string str)", + "Quotes meta characters" + ], + "rad2deg": [ + "float rad2deg(float number)", + "Converts the radian number to the equivalent number in degrees" + ], + "rand": [ + "int rand([int min, int max])", + "Returns a random number" + ], + "range": [ + "array range(mixed low, mixed high[, int step])", + "Create an array containing the range of integers or characters from low to high (inclusive)" + ], + "rawurldecode": [ + "string rawurldecode(string str)", + "Decodes URL-encodes string" + ], + "rawurlencode": [ + "string rawurlencode(string str)", + "URL-encodes string" + ], + "readdir": [ + "string readdir([resource dir_handle])", + "Read directory entry from dir_handle" + ], + "readfile": [ + "int readfile(string filename [, bool use_include_path[, resource context]])", + "Output a file or a URL" + ], + "readgzfile": [ + "int readgzfile(string filename [, int use_include_path])", + "Output a .gz-file" + ], + "readline": [ + "string readline([string prompt])", + "Reads a line" + ], + "readline_add_history": [ + "bool readline_add_history(string prompt)", + "Adds a line to the history" + ], + "readline_callback_handler_install": [ + "void readline_callback_handler_install(string prompt, mixed callback)", + "Initializes the readline callback interface and terminal, prints the prompt and returns immediately" + ], + "readline_callback_handler_remove": [ + "bool readline_callback_handler_remove()", + "Removes a previously installed callback handler and restores terminal settings" + ], + "readline_callback_read_char": [ + "void readline_callback_read_char()", + "Informs the readline callback interface that a character is ready for input" + ], + "readline_clear_history": [ + "bool readline_clear_history()", + "Clears the history" + ], + "readline_completion_function": [ + "bool readline_completion_function(string funcname)", + "Readline completion function?" + ], + "readline_info": [ + "mixed readline_info([string varname [, string newvalue]])", + "Gets/sets various internal readline variables." + ], + "readline_list_history": [ + "array readline_list_history()", + "Lists the history" + ], + "readline_on_new_line": [ + "void readline_on_new_line()", + "Inform readline that the cursor has moved to a new line" + ], + "readline_read_history": [ + "bool readline_read_history([string filename])", + "Reads the history" + ], + "readline_redisplay": [ + "void readline_redisplay()", + "Ask readline to redraw the display" + ], + "readline_write_history": [ + "bool readline_write_history([string filename])", + "Writes the history" + ], + "readlink": [ + "string readlink(string filename)", + "Return the target of a symbolic link" + ], + "realpath": [ + "string realpath(string path)", + "Return the resolved path" + ], + "realpath_cache_get": [ + "bool realpath_cache_get()", + "Get current size of realpath cache" + ], + "realpath_cache_size": [ + "bool realpath_cache_size()", + "Get current size of realpath cache" + ], + "recode_file": [ + "bool recode_file(string request, resource input, resource output)", + "Recode file input into file output according to request" + ], + "recode_string": [ + "string recode_string(string request, string str)", + "Recode string str according to request string" + ], + "register_shutdown_function": [ + "void register_shutdown_function(string function_name)", + "Register a user-level function to be called on request termination" + ], + "register_tick_function": [ + "bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])", + "Registers a tick callback function" + ], + "rename": [ + "bool rename(string old_name, string new_name[, resource context])", + "Rename a file" + ], + "require": [ + "bool require(string path)", + "Includes and evaluates the specified file, erroring if the file cannot be included" + ], + "require_once": [ + "bool require_once(string path)", + "Includes and evaluates the specified file, erroring if the file cannot be included" + ], + "reset": [ + "mixed reset(array array_arg)", + "Set array argument's internal pointer to the first element and return it" + ], + "restore_error_handler": [ + "void restore_error_handler()", + "Restores the previously defined error handler function" + ], + "restore_exception_handler": [ + "void restore_exception_handler()", + "Restores the previously defined exception handler function" + ], + "restore_include_path": [ + "void restore_include_path()", + "Restore the value of the include_path configuration option" + ], + "rewind": [ + "bool rewind(resource fp)", + "Rewind the position of a file pointer" + ], + "rewinddir": [ + "void rewinddir([resource dir_handle])", + "Rewind dir_handle back to the start" + ], + "rmdir": [ + "bool rmdir(string dirname[, resource context])", + "Remove a directory" + ], + "round": [ + "float round(float number [, int precision [, int mode]])", + "Returns the number rounded to specified precision" + ], + "rsort": [ + "bool rsort(array &array_arg [, int sort_flags])", + "Sort an array in reverse order" + ], + "rtrim": [ + "string rtrim(string str [, string character_mask])", + "Removes trailing whitespace" + ], + "scandir": [ + "array scandir(string dir [, int sorting_order [, resource context]])", + "List files & directories inside the specified path" + ], + "sem_acquire": [ + "bool sem_acquire(resource id)", + "Acquires the semaphore with the given id, blocking if necessary" + ], + "sem_get": [ + "resource sem_get(int key [, int max_acquire [, int perm [, int auto_release]])", + "Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously" + ], + "sem_release": [ + "bool sem_release(resource id)", + "Releases the semaphore with the given id" + ], + "sem_remove": [ + "bool sem_remove(resource id)", + "Removes semaphore from Unix systems" + ], + "serialize": [ + "string serialize(mixed variable)", + "Returns a string representation of variable (which can later be unserialized)" + ], + "session_cache_expire": [ + "int session_cache_expire([int new_cache_expire])", + "Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire" + ], + "session_cache_limiter": [ + "string session_cache_limiter([string new_cache_limiter])", + "Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter" + ], + "session_decode": [ + "bool session_decode(string data)", + "Deserializes data and reinitializes the variables" + ], + "session_destroy": [ + "bool session_destroy()", + "Destroy the current session and all data associated with it" + ], + "session_encode": [ + "string session_encode()", + "Serializes the current setup and returns the serialized representation" + ], + "session_get_cookie_params": [ + "array session_get_cookie_params()", + "Return the session cookie parameters" + ], + "session_id": [ + "string session_id([string newid])", + "Return the current session id. If newid is given, the session id is replaced with newid" + ], + "session_is_registered": [ + "bool session_is_registered(string varname)", + "Checks if a variable is registered in session" + ], + "session_module_name": [ + "string session_module_name([string newname])", + "Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname" + ], + "session_name": [ + "string session_name([string newname])", + "Return the current session name. If newname is given, the session name is replaced with newname" + ], + "session_regenerate_id": [ + "bool session_regenerate_id([bool delete_old_session])", + "Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session." + ], + "session_register": [ + "bool session_register(mixed var_names [, mixed ...])", + "Adds varname(s) to the list of variables which are freezed at the session end" + ], + "session_save_path": [ + "string session_save_path([string newname])", + "Return the current save path passed to module_name. If newname is given, the save path is replaced with newname" + ], + "session_set_cookie_params": [ + "void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])", + "Set session cookie parameters" + ], + "session_set_save_handler": [ + "void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc)", + "Sets user-level functions" + ], + "session_start": [ + "bool session_start()", + "Begin session - reinitializes freezed variables, registers browsers etc" + ], + "session_unregister": [ + "bool session_unregister(string varname)", + "Removes varname from the list of variables which are freezed at the session end" + ], + "session_unset": [ + "void session_unset()", + "Unset all registered variables" + ], + "session_write_close": [ + "void session_write_close()", + "Write session data and end session" + ], + "set_error_handler": [ + "string set_error_handler(string error_handler [, int error_types])", + "Sets a user-defined error handler function. Returns the previously defined error handler, or false on error" + ], + "set_exception_handler": [ + "string set_exception_handler(callable exception_handler)", + "Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error" + ], + "set_include_path": [ + "string set_include_path(string new_include_path)", + "Sets the include_path configuration option" + ], + "set_magic_quotes_runtime": [ + "bool set_magic_quotes_runtime(int new_setting)", + "Set the current active configuration setting of magic_quotes_runtime and return previous" + ], + "set_time_limit": [ + "bool set_time_limit(int seconds)", + "Sets the maximum time a script can run" + ], + "setcookie": [ + "bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])", + "Send a cookie" + ], + "setlocale": [ + "string setlocale(mixed category, string locale [, string ...])", + "Set locale information" + ], + "setrawcookie": [ + "bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])", + "Send a cookie with no url encoding of the value" + ], + "settype": [ + "bool settype(mixed var, string type)", + "Set the type of the variable" + ], + "sha1": [ + "string sha1(string str [, bool raw_output])", + "Calculate the sha1 hash of a string" + ], + "sha1_file": [ + "string sha1_file(string filename [, bool raw_output])", + "Calculate the sha1 hash of given filename" + ], + "shell_exec": [ + "string shell_exec(string cmd)", + "Execute command via shell and return complete output as string" + ], + "shm_attach": [ + "int shm_attach(int key [, int memsize [, int perm]])", + "Creates or open a shared memory segment" + ], + "shm_detach": [ + "bool shm_detach(resource shm_identifier)", + "Disconnects from shared memory segment" + ], + "shm_get_var": [ + "mixed shm_get_var(resource id, int variable_key)", + "Returns a variable from shared memory" + ], + "shm_has_var": [ + "bool shm_has_var(resource id, int variable_key)", + "Checks whether a specific entry exists" + ], + "shm_put_var": [ + "bool shm_put_var(resource shm_identifier, int variable_key, mixed variable)", + "Inserts or updates a variable in shared memory" + ], + "shm_remove": [ + "bool shm_remove(resource shm_identifier)", + "Removes shared memory from Unix systems" + ], + "shm_remove_var": [ + "bool shm_remove_var(resource id, int variable_key)", + "Removes variable from shared memory" + ], + "shmop_close": [ + "void shmop_close(int shmid)", + "closes a shared memory segment" + ], + "shmop_delete": [ + "bool shmop_delete(int shmid)", + "mark segment for deletion" + ], + "shmop_open": [ + "int shmop_open(int key, string flags, int mode, int size)", + "gets and attaches a shared memory segment" + ], + "shmop_read": [ + "string shmop_read(int shmid, int start, int count)", + "reads from a shm segment" + ], + "shmop_size": [ + "int shmop_size(int shmid)", + "returns the shm size" + ], + "shmop_write": [ + "int shmop_write(int shmid, string data, int offset)", + "writes to a shared memory segment" + ], + "shuffle": [ + "bool shuffle(array array_arg)", + "Randomly shuffle the contents of an array" + ], + "similar_text": [ + "int similar_text(string str1, string str2 [, float percent])", + "Calculates the similarity between two strings" + ], + "simplexml_import_dom": [ + "simplemxml_element simplexml_import_dom(domNode node [, string class_name])", + "Get a simplexml_element object from dom to allow for processing" + ], + "simplexml_load_file": [ + "simplemxml_element simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]])", + "Load a filename and return a simplexml_element object to allow for processing" + ], + "simplexml_load_string": [ + "simplemxml_element simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]])", + "Load a string and return a simplexml_element object to allow for processing" + ], + "sin": [ + "float sin(float number)", + "Returns the sine of the number in radians" + ], + "sinh": [ + "float sinh(float number)", + "Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2" + ], + "sleep": [ + "void sleep(int seconds)", + "Delay for a given number of seconds" + ], + "smfi_addheader": [ + "bool smfi_addheader(string headerf, string headerv)", + "Adds a header to the current message." + ], + "smfi_addrcpt": [ + "bool smfi_addrcpt(string rcpt)", + "Add a recipient to the message envelope." + ], + "smfi_chgheader": [ + "bool smfi_chgheader(string headerf, string headerv)", + "Changes a header's value for the current message." + ], + "smfi_delrcpt": [ + "bool smfi_delrcpt(string rcpt)", + "Removes the named recipient from the current message's envelope." + ], + "smfi_getsymval": [ + "string smfi_getsymval(string macro)", + "Returns the value of the given macro or NULL if the macro is not defined." + ], + "smfi_replacebody": [ + "bool smfi_replacebody(string body)", + "Replaces the body of the current message. If called more than once, subsequent calls result in data being appended to the new body." + ], + "smfi_setflags": [ + "void smfi_setflags(long flags)", + "Sets the flags describing the actions the filter may take." + ], + "smfi_setreply": [ + "bool smfi_setreply(string rcode, string xcode, string message)", + "Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter." + ], + "smfi_settimeout": [ + "void smfi_settimeout(long timeout)", + "Sets the number of seconds libmilter will wait for an MTA connection before timing out a socket." + ], + "snmp2_get": [ + "string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmp2_getnext": [ + "string snmp2_getnext(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmp2_real_walk": [ + "array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects including their respective object id withing the specified one" + ], + "snmp2_set": [ + "int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Set the value of a SNMP object" + ], + "snmp2_walk": [ + "array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects under the specified object id" + ], + "snmp3_get": [ + "int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_getnext": [ + "int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_real_walk": [ + "int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_set": [ + "int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_walk": [ + "int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp_get_quick_print": [ + "bool snmp_get_quick_print()", + "Return the current status of quick_print" + ], + "snmp_get_valueretrieval": [ + "int snmp_get_valueretrieval()", + "Return the method how the SNMP values will be returned" + ], + "snmp_read_mib": [ + "int snmp_read_mib(string filename)", + "Reads and parses a MIB file into the active MIB tree." + ], + "snmp_set_enum_print": [ + "void snmp_set_enum_print(int enum_print)", + "Return all values that are enums with their enum value instead of the raw integer" + ], + "snmp_set_oid_output_format": [ + "void snmp_set_oid_output_format(int oid_format)", + "Set the OID output format." + ], + "snmp_set_quick_print": [ + "void snmp_set_quick_print(int quick_print)", + "Return all objects including their respective object id withing the specified one" + ], + "snmp_set_valueretrieval": [ + "void snmp_set_valueretrieval(int method)", + "Specify the method how the SNMP values will be returned" + ], + "snmpget": [ + "string snmpget(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmpgetnext": [ + "string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmprealwalk": [ + "array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects including their respective object id withing the specified one" + ], + "snmpset": [ + "int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Set the value of a SNMP object" + ], + "snmpwalk": [ + "array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects under the specified object id" + ], + "socket_accept": [ + "resource socket_accept(resource socket)", + "Accepts a connection on the listening socket fd" + ], + "socket_bind": [ + "bool socket_bind(resource socket, string addr [, int port])", + "Binds an open socket to a listening port, port is only specified in AF_INET family." + ], + "socket_clear_error": [ + "void socket_clear_error([resource socket])", + "Clears the error on the socket or the last error code." + ], + "socket_close": [ + "void socket_close(resource socket)", + "Closes a file descriptor" + ], + "socket_connect": [ + "bool socket_connect(resource socket, string addr [, int port])", + "Opens a connection to addr:port on the socket specified by socket" + ], + "socket_create": [ + "resource socket_create(int domain, int type, int protocol)", + "Creates an endpoint for communication in the domain specified by domain, of type specified by type" + ], + "socket_create_listen": [ + "resource socket_create_listen(int port[, int backlog])", + "Opens a socket on port to accept connections" + ], + "socket_create_pair": [ + "bool socket_create_pair(int domain, int type, int protocol, array &fd)", + "Creates a pair of indistinguishable sockets and stores them in fds." + ], + "socket_get_option": [ + "mixed socket_get_option(resource socket, int level, int optname)", + "Gets socket options for the socket" + ], + "socket_getpeername": [ + "bool socket_getpeername(resource socket, string &addr[, int &port])", + "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type." + ], + "socket_getsockname": [ + "bool socket_getsockname(resource socket, string &addr[, int &port])", + "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type." + ], + "socket_last_error": [ + "int socket_last_error([resource socket])", + "Returns the last socket error (either the last used or the provided socket resource)" + ], + "socket_listen": [ + "bool socket_listen(resource socket[, int backlog])", + "Sets the maximum number of connections allowed to be waited for on the socket specified by fd" + ], + "socket_read": [ + "string socket_read(resource socket, int length [, int type])", + "Reads a maximum of length bytes from socket" + ], + "socket_recv": [ + "int socket_recv(resource socket, string &buf, int len, int flags)", + "Receives data from a connected socket" + ], + "socket_recvfrom": [ + "int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name [, int &port])", + "Receives data from a socket, connected or not" + ], + "socket_select": [ + "int socket_select(array &read_fds, array &write_fds, array &except_fds, int tv_sec[, int tv_usec])", + "Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and tv_usec" + ], + "socket_send": [ + "int socket_send(resource socket, string buf, int len, int flags)", + "Sends data to a connected socket" + ], + "socket_sendto": [ + "int socket_sendto(resource socket, string buf, int len, int flags, string addr [, int port])", + "Sends a message to a socket, whether it is connected or not" + ], + "socket_set_block": [ + "bool socket_set_block(resource socket)", + "Sets blocking mode on a socket resource" + ], + "socket_set_nonblock": [ + "bool socket_set_nonblock(resource socket)", + "Sets nonblocking mode on a socket resource" + ], + "socket_set_option": [ + "bool socket_set_option(resource socket, int level, int optname, int|array optval)", + "Sets socket options for the socket" + ], + "socket_shutdown": [ + "bool socket_shutdown(resource socket[, int how])", + "Shuts down a socket for receiving, sending, or both." + ], + "socket_strerror": [ + "string socket_strerror(int errno)", + "Returns a string describing an error" + ], + "socket_write": [ + "int socket_write(resource socket, string buf[, int length])", + "Writes the buffer to the socket resource, length is optional" + ], + "solid_fetch_prev": [ + "bool solid_fetch_prev(resource result_id)", + "" + ], + "sort": [ + "bool sort(array &array_arg [, int sort_flags])", + "Sort an array" + ], + "soundex": [ + "string soundex(string str)", + "Calculate the soundex key of a string" + ], + "spl_autoload": [ + "void spl_autoload(string class_name [, string file_extensions])", + "Default implementation for __autoload()" + ], + "spl_autoload_call": [ + "void spl_autoload_call(string class_name)", + "Try all registerd autoload function to load the requested class" + ], + "spl_autoload_extensions": [ + "string spl_autoload_extensions([string file_extensions])", + "Register and return default file extensions for spl_autoload" + ], + "spl_autoload_functions": [ + "false|array spl_autoload_functions()", + "Return all registered __autoload() functionns" + ], + "spl_autoload_register": [ + "bool spl_autoload_register([mixed autoload_function = \"spl_autoload\" [, throw = true [, prepend]]])", + "Register given function as __autoload() implementation" + ], + "spl_autoload_unregister": [ + "bool spl_autoload_unregister(mixed autoload_function)", + "Unregister given function as __autoload() implementation" + ], + "spl_classes": [ + "array spl_classes()", + "Return an array containing the names of all clsses and interfaces defined in SPL" + ], + "spl_object_hash": [ + "string spl_object_hash(object obj)", + "Return hash id for given object" + ], + "split": [ + "array split(string pattern, string string [, int limit])", + "Split string into array by regular expression" + ], + "spliti": [ + "array spliti(string pattern, string string [, int limit])", + "Split string into array by regular expression case-insensitive" + ], + "sprintf": [ + "string sprintf(string format [, mixed arg1 [, mixed ...]])", + "Return a formatted string" + ], + "sql_regcase": [ + "string sql_regcase(string string)", + "Make regular expression for case insensitive match" + ], + "sqlite_array_query": [ + "array sqlite_array_query(resource db, string query [ , int result_type [, bool decode_binary]])", + "Executes a query against a given database and returns an array of arrays." + ], + "sqlite_busy_timeout": [ + "void sqlite_busy_timeout(resource db, int ms)", + "Set busy timeout duration. If ms <= 0, all busy handlers are disabled." + ], + "sqlite_changes": [ + "int sqlite_changes(resource db)", + "Returns the number of rows that were changed by the most recent SQL statement." + ], + "sqlite_close": [ + "void sqlite_close(resource db)", + "Closes an open sqlite database." + ], + "sqlite_column": [ + "mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary])", + "Fetches a column from the current row of a result set." + ], + "sqlite_create_aggregate": [ + "bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args])", + "Registers an aggregate function for queries." + ], + "sqlite_create_function": [ + "bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args])", + "Registers a \"regular\" function for queries." + ], + "sqlite_current": [ + "array sqlite_current(resource result [, int result_type [, bool decode_binary]])", + "Fetches the current row from a result set as an array." + ], + "sqlite_error_string": [ + "string sqlite_error_string(int error_code)", + "Returns the textual description of an error code." + ], + "sqlite_escape_string": [ + "string sqlite_escape_string(string item)", + "Escapes a string for use as a query parameter." + ], + "sqlite_exec": [ + "bool sqlite_exec(string query, resource db[, string &error_message])", + "Executes a result-less query against a given database" + ], + "sqlite_factory": [ + "object sqlite_factory(string filename [, int mode [, string &error_message]])", + "Opens a SQLite database and creates an object for it. Will create the database if it does not exist." + ], + "sqlite_fetch_all": [ + "array sqlite_fetch_all(resource result [, int result_type [, bool decode_binary]])", + "Fetches all rows from a result set as an array of arrays." + ], + "sqlite_fetch_array": [ + "array sqlite_fetch_array(resource result [, int result_type [, bool decode_binary]])", + "Fetches the next row from a result set as an array." + ], + "sqlite_fetch_column_types": [ + "resource sqlite_fetch_column_types(string table_name, resource db [, int result_type])", + "Return an array of column types from a particular table." + ], + "sqlite_fetch_object": [ + "object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]])", + "Fetches the next row from a result set as an object." + ], + "sqlite_fetch_single": [ + "string sqlite_fetch_single(resource result [, bool decode_binary])", + "Fetches the first column of a result set as a string." + ], + "sqlite_field_name": [ + "string sqlite_field_name(resource result, int field_index)", + "Returns the name of a particular field of a result set." + ], + "sqlite_has_prev": [ + "bool sqlite_has_prev(resource result)", + "* Returns whether a previous row is available." + ], + "sqlite_key": [ + "int sqlite_key(resource result)", + "Return the current row index of a buffered result." + ], + "sqlite_last_error": [ + "int sqlite_last_error(resource db)", + "Returns the error code of the last error for a database." + ], + "sqlite_last_insert_rowid": [ + "int sqlite_last_insert_rowid(resource db)", + "Returns the rowid of the most recently inserted row." + ], + "sqlite_libencoding": [ + "string sqlite_libencoding()", + "Returns the encoding (iso8859 or UTF-8) of the linked SQLite library." + ], + "sqlite_libversion": [ + "string sqlite_libversion()", + "Returns the version of the linked SQLite library." + ], + "sqlite_next": [ + "bool sqlite_next(resource result)", + "Seek to the next row number of a result set." + ], + "sqlite_num_fields": [ + "int sqlite_num_fields(resource result)", + "Returns the number of fields in a result set." + ], + "sqlite_num_rows": [ + "int sqlite_num_rows(resource result)", + "Returns the number of rows in a buffered result set." + ], + "sqlite_open": [ + "resource sqlite_open(string filename [, int mode [, string &error_message]])", + "Opens a SQLite database. Will create the database if it does not exist." + ], + "sqlite_popen": [ + "resource sqlite_popen(string filename [, int mode [, string &error_message]])", + "Opens a persistent handle to a SQLite database. Will create the database if it does not exist." + ], + "sqlite_prev": [ + "bool sqlite_prev(resource result)", + "* Seek to the previous row number of a result set." + ], + "sqlite_query": [ + "resource sqlite_query(string query, resource db [, int result_type [, string &error_message]])", + "Executes a query against a given database and returns a result handle." + ], + "sqlite_rewind": [ + "bool sqlite_rewind(resource result)", + "Seek to the first row number of a buffered result set." + ], + "sqlite_seek": [ + "bool sqlite_seek(resource result, int row)", + "Seek to a particular row number of a buffered result set." + ], + "sqlite_single_query": [ + "array sqlite_single_query(resource db, string query [, bool first_row_only [, bool decode_binary]])", + "Executes a query and returns either an array for one single column or the value of the first row." + ], + "sqlite_udf_decode_binary": [ + "string sqlite_udf_decode_binary(string data)", + "Decode binary encoding on a string parameter passed to an UDF." + ], + "sqlite_udf_encode_binary": [ + "string sqlite_udf_encode_binary(string data)", + "Apply binary encoding (if required) to a string to return from an UDF." + ], + "sqlite_unbuffered_query": [ + "resource sqlite_unbuffered_query(string query, resource db [ , int result_type [, string &error_message]])", + "Executes a query that does not prefetch and buffer all data." + ], + "sqlite_valid": [ + "bool sqlite_valid(resource result)", + "Returns whether more rows are available." + ], + "sqrt": [ + "float sqrt(float number)", + "Returns the square root of the number" + ], + "srand": [ + "void srand([int seed])", + "Seeds random number generator" + ], + "sscanf": [ + "mixed sscanf(string str, string format [, string ...])", + "Implements an ANSI C compatible sscanf" + ], + "stat": [ + "array stat(string filename)", + "Give information about a file" + ], + "str_getcsv": [ + "array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])", + "Parse a CSV string into an array" + ], + "str_ireplace": [ + "mixed str_ireplace(mixed search, mixed replace, mixed subject [, int &replace_count])", + "Replaces all occurrences of search in haystack with replace / case-insensitive" + ], + "str_pad": [ + "string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])", + "Returns input string padded on the left or right to specified length with pad_string" + ], + "str_repeat": [ + "string str_repeat(string input, int mult)", + "Returns the input string repeat mult times" + ], + "str_replace": [ + "mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count])", + "Replaces all occurrences of search in haystack with replace" + ], + "str_rot13": [ + "string str_rot13(string str)", + "Perform the rot13 transform on a string" + ], + "str_shuffle": [ + "void str_shuffle(string str)", + "Shuffles string. One permutation of all possible is created" + ], + "str_split": [ + "array str_split(string str [, int split_length])", + "Convert a string to an array. If split_length is specified, break the string down into chunks each split_length characters long." + ], + "str_word_count": [ + "mixed str_word_count(string str, [int format [, string charlist]])", + "Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with \"'\" and \"-\" characters." + ], + "strcasecmp": [ + "int strcasecmp(string str1, string str2)", + "Binary safe case-insensitive string comparison" + ], + "strchr": [ + "string strchr(string haystack, string needle)", + "An alias for strstr" + ], + "strcmp": [ + "int strcmp(string str1, string str2)", + "Binary safe string comparison" + ], + "strcoll": [ + "int strcoll(string str1, string str2)", + "Compares two strings using the current locale" + ], + "strcspn": [ + "int strcspn(string str, string mask [, start [, len]])", + "Finds length of initial segment consisting entirely of characters not found in mask. If start or/and length is provide works like strcspn(substr($s,$start,$len),$bad_chars)" + ], + "stream_bucket_append": [ + "void stream_bucket_append(resource brigade, resource bucket)", + "Append bucket to brigade" + ], + "stream_bucket_make_writeable": [ + "object stream_bucket_make_writeable(resource brigade)", + "Return a bucket object from the brigade for operating on" + ], + "stream_bucket_new": [ + "resource stream_bucket_new(resource stream, string buffer)", + "Create a new bucket for use on the current stream" + ], + "stream_bucket_prepend": [ + "void stream_bucket_prepend(resource brigade, resource bucket)", + "Prepend bucket to brigade" + ], + "stream_context_create": [ + "resource stream_context_create([array options[, array params]])", + "Create a file context and optionally set parameters" + ], + "stream_context_get_default": [ + "resource stream_context_get_default([array options])", + "Get a handle on the default file/stream context and optionally set parameters" + ], + "stream_context_get_options": [ + "array stream_context_get_options(resource context|resource stream)", + "Retrieve options for a stream/wrapper/context" + ], + "stream_context_get_params": [ + "array stream_context_get_params(resource context|resource stream)", + "Get parameters of a file context" + ], + "stream_context_set_default": [ + "resource stream_context_set_default(array options)", + "Set default file/stream context, returns the context as a resource" + ], + "stream_context_set_option": [ + "bool stream_context_set_option(resource context|resource stream, string wrappername, string optionname, mixed value)", + "Set an option for a wrapper" + ], + "stream_context_set_params": [ + "bool stream_context_set_params(resource context|resource stream, array options)", + "Set parameters for a file context" + ], + "stream_copy_to_stream": [ + "long stream_copy_to_stream(resource source, resource dest [, long maxlen [, long pos]])", + "Reads up to maxlen bytes from source stream and writes them to dest stream." + ], + "stream_filter_append": [ + "resource stream_filter_append(resource stream, string filtername[, int read_write[, string filterparams]])", + "Append a filter to a stream" + ], + "stream_filter_prepend": [ + "resource stream_filter_prepend(resource stream, string filtername[, int read_write[, string filterparams]])", + "Prepend a filter to a stream" + ], + "stream_filter_register": [ + "bool stream_filter_register(string filtername, string classname)", + "Registers a custom filter handler class" + ], + "stream_filter_remove": [ + "bool stream_filter_remove(resource stream_filter)", + "Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource" + ], + "stream_get_contents": [ + "string stream_get_contents(resource source [, long maxlen [, long offset]])", + "Reads all remaining bytes (or up to maxlen bytes) from a stream and returns them as a string." + ], + "stream_get_filters": [ + "array stream_get_filters()", + "Returns a list of registered filters" + ], + "stream_get_line": [ + "string stream_get_line(resource stream, int maxlen [, string ending])", + "Read up to maxlen bytes from a stream or until the ending string is found" + ], + "stream_get_meta_data": [ + "array stream_get_meta_data(resource fp)", + "Retrieves header/meta data from streams/file pointers" + ], + "stream_get_transports": [ + "array stream_get_transports()", + "Retrieves list of registered socket transports" + ], + "stream_get_wrappers": [ + "array stream_get_wrappers()", + "Retrieves list of registered stream wrappers" + ], + "stream_is_local": [ + "bool stream_is_local(resource stream|string url)", + "" + ], + "stream_resolve_include_path": [ + "string stream_resolve_include_path(string filename)", + "Determine what file will be opened by calls to fopen() with a relative path" + ], + "stream_select": [ + "int stream_select(array &read_streams, array &write_streams, array &except_streams, int tv_sec[, int tv_usec])", + "Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec" + ], + "stream_set_blocking": [ + "bool stream_set_blocking(resource socket, int mode)", + "Set blocking/non-blocking mode on a socket or stream" + ], + "stream_set_timeout": [ + "bool stream_set_timeout(resource stream, int seconds [, int microseconds])", + "Set timeout on stream read to seconds + microseonds" + ], + "stream_set_write_buffer": [ + "int stream_set_write_buffer(resource fp, int buffer)", + "Set file write buffer" + ], + "stream_socket_accept": [ + "resource stream_socket_accept(resource serverstream, [ double timeout [, string &peername ]])", + "Accept a client connection from a server socket" + ], + "stream_socket_client": [ + "resource stream_socket_client(string remoteaddress [, long &errcode [, string &errstring [, double timeout [, long flags [, resource context]]]]])", + "Open a client connection to a remote address" + ], + "stream_socket_enable_crypto": [ + "int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]])", + "Enable or disable a specific kind of crypto on the stream" + ], + "stream_socket_get_name": [ + "string stream_socket_get_name(resource stream, bool want_peer)", + "Returns either the locally bound or remote name for a socket stream" + ], + "stream_socket_pair": [ + "array stream_socket_pair(int domain, int type, int protocol)", + "Creates a pair of connected, indistinguishable socket streams" + ], + "stream_socket_recvfrom": [ + "string stream_socket_recvfrom(resource stream, long amount [, long flags [, string &remote_addr]])", + "Receives data from a socket stream" + ], + "stream_socket_sendto": [ + "long stream_socket_sendto(resouce stream, string data [, long flags [, string target_addr]])", + "Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format" + ], + "stream_socket_server": [ + "resource stream_socket_server(string localaddress [, long &errcode [, string &errstring [, long flags [, resource context]]]])", + "Create a server socket bound to localaddress" + ], + "stream_socket_shutdown": [ + "int stream_socket_shutdown(resource stream, int how)", + "causes all or part of a full-duplex connection on the socket associated with stream to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed." + ], + "stream_supports_lock": [ + "bool stream_supports_lock(resource stream)", + "Tells whether the stream supports locking through flock()." + ], + "stream_wrapper_register": [ + "bool stream_wrapper_register(string protocol, string classname[, integer flags])", + "Registers a custom URL protocol handler class" + ], + "stream_wrapper_restore": [ + "bool stream_wrapper_restore(string protocol)", + "Restore the original protocol handler, overriding if necessary" + ], + "stream_wrapper_unregister": [ + "bool stream_wrapper_unregister(string protocol)", + "Unregister a wrapper for the life of the current request." + ], + "strftime": [ + "string strftime(string format [, int timestamp])", + "Format a local time/date according to locale settings" + ], + "strip_tags": [ + "string strip_tags(string str [, string allowable_tags])", + "Strips HTML and PHP tags from a string" + ], + "stripcslashes": [ + "string stripcslashes(string str)", + "Strips backslashes from a string. Uses C-style conventions" + ], + "stripos": [ + "int stripos(string haystack, string needle [, int offset])", + "Finds position of first occurrence of a string within another, case insensitive" + ], + "stripslashes": [ + "string stripslashes(string str)", + "Strips backslashes from a string" + ], + "stristr": [ + "string stristr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another, case insensitive" + ], + "strlen": [ + "int strlen(string str)", + "Get string length" + ], + "strnatcasecmp": [ + "int strnatcasecmp(string s1, string s2)", + "Returns the result of case-insensitive string comparison using 'natural' algorithm" + ], + "strnatcmp": [ + "int strnatcmp(string s1, string s2)", + "Returns the result of string comparison using 'natural' algorithm" + ], + "strncasecmp": [ + "int strncasecmp(string str1, string str2, int len)", + "Binary safe string comparison" + ], + "strncmp": [ + "int strncmp(string str1, string str2, int len)", + "Binary safe string comparison" + ], + "strpbrk": [ + "array strpbrk(string haystack, string char_list)", + "Search a string for any of a set of characters" + ], + "strpos": [ + "int strpos(string haystack, string needle [, int offset])", + "Finds position of first occurrence of a string within another" + ], + "strptime": [ + "string strptime(string timestamp, string format)", + "Parse a time/date generated with strftime()" + ], + "strrchr": [ + "string strrchr(string haystack, string needle)", + "Finds the last occurrence of a character in a string within another" + ], + "strrev": [ + "string strrev(string str)", + "Reverse a string" + ], + "strripos": [ + "int strripos(string haystack, string needle [, int offset])", + "Finds position of last occurrence of a string within another string" + ], + "strrpos": [ + "int strrpos(string haystack, string needle [, int offset])", + "Finds position of last occurrence of a string within another string" + ], + "strspn": [ + "int strspn(string str, string mask [, start [, len]])", + "Finds length of initial segment consisting entirely of characters found in mask. If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)" + ], + "strstr": [ + "string strstr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "strtok": [ + "string strtok([string str,] string token)", + "Tokenize a string" + ], + "strtolower": [ + "string strtolower(string str)", + "Makes a string lowercase" + ], + "strtotime": [ + "int strtotime(string time [, int now ])", + "Convert string representation of date and time to a timestamp" + ], + "strtoupper": [ + "string strtoupper(string str)", + "Makes a string uppercase" + ], + "strtr": [ + "string strtr(string str, string from[, string to])", + "Translates characters in str using given translation tables" + ], + "strval": [ + "string strval(mixed var)", + "Get the string value of a variable" + ], + "substr": [ + "string substr(string str, int start [, int length])", + "Returns part of a string" + ], + "substr_compare": [ + "int substr_compare(string main_str, string str, int offset [, int length [, bool case_sensitivity]])", + "Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters" + ], + "substr_count": [ + "int substr_count(string haystack, string needle [, int offset [, int length]])", + "Returns the number of times a substring occurs in the string" + ], + "substr_replace": [ + "mixed substr_replace(mixed str, mixed repl, mixed start [, mixed length])", + "Replaces part of a string with another string" + ], + "sybase_affected_rows": [ + "int sybase_affected_rows([resource link_id])", + "Get number of affected rows in last query" + ], + "sybase_close": [ + "bool sybase_close([resource link_id])", + "Close Sybase connection" + ], + "sybase_connect": [ + "int sybase_connect([string host [, string user [, string password [, string charset [, string appname [, bool new]]]]]])", + "Open Sybase server connection" + ], + "sybase_data_seek": [ + "bool sybase_data_seek(resource result, int offset)", + "Move internal row pointer" + ], + "sybase_deadlock_retry_count": [ + "void sybase_deadlock_retry_count(int retry_count)", + "Sets deadlock retry count" + ], + "sybase_fetch_array": [ + "array sybase_fetch_array(resource result)", + "Fetch row as array" + ], + "sybase_fetch_assoc": [ + "array sybase_fetch_assoc(resource result)", + "Fetch row as array without numberic indices" + ], + "sybase_fetch_field": [ + "object sybase_fetch_field(resource result [, int offset])", + "Get field information" + ], + "sybase_fetch_object": [ + "object sybase_fetch_object(resource result [, mixed object])", + "Fetch row as object" + ], + "sybase_fetch_row": [ + "array sybase_fetch_row(resource result)", + "Get row as enumerated array" + ], + "sybase_field_seek": [ + "bool sybase_field_seek(resource result, int offset)", + "Set field offset" + ], + "sybase_free_result": [ + "bool sybase_free_result(resource result)", + "Free result memory" + ], + "sybase_get_last_message": [ + "string sybase_get_last_message()", + "Returns the last message from server (over min_message_severity)" + ], + "sybase_min_client_severity": [ + "void sybase_min_client_severity(int severity)", + "Sets minimum client severity" + ], + "sybase_min_server_severity": [ + "void sybase_min_server_severity(int severity)", + "Sets minimum server severity" + ], + "sybase_num_fields": [ + "int sybase_num_fields(resource result)", + "Get number of fields in result" + ], + "sybase_num_rows": [ + "int sybase_num_rows(resource result)", + "Get number of rows in result" + ], + "sybase_pconnect": [ + "int sybase_pconnect([string host [, string user [, string password [, string charset [, string appname]]]]])", + "Open persistent Sybase connection" + ], + "sybase_query": [ + "int sybase_query(string query [, resource link_id])", + "Send Sybase query" + ], + "sybase_result": [ + "string sybase_result(resource result, int row, mixed field)", + "Get result data" + ], + "sybase_select_db": [ + "bool sybase_select_db(string database [, resource link_id])", + "Select Sybase database" + ], + "sybase_set_message_handler": [ + "bool sybase_set_message_handler(mixed error_func [, resource connection])", + "Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted" + ], + "sybase_unbuffered_query": [ + "int sybase_unbuffered_query(string query [, resource link_id])", + "Send Sybase query" + ], + "symlink": [ + "int symlink(string target, string link)", + "Create a symbolic link" + ], + "sys_get_temp_dir": [ + "string sys_get_temp_dir()", + "Returns directory path used for temporary files" + ], + "sys_getloadavg": [ + "array sys_getloadavg()", + "" + ], + "syslog": [ + "bool syslog(int priority, string message)", + "Generate a system log message" + ], + "system": [ + "int system(string command [, int &return_value])", + "Execute an external program and display output" + ], + "tan": [ + "float tan(float number)", + "Returns the tangent of the number in radians" + ], + "tanh": [ + "float tanh(float number)", + "Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number)" + ], + "tempnam": [ + "string tempnam(string dir, string prefix)", + "Create a unique filename in a directory" + ], + "textdomain": [ + "string textdomain(string domain)", + "Set the textdomain to \"domain\". Returns the current domain" + ], + "tidy_access_count": [ + "int tidy_access_count()", + "Returns the Number of Tidy accessibility warnings encountered for specified document." + ], + "tidy_clean_repair": [ + "bool tidy_clean_repair()", + "Execute configured cleanup and repair operations on parsed markup" + ], + "tidy_config_count": [ + "int tidy_config_count()", + "Returns the Number of Tidy configuration errors encountered for specified document." + ], + "tidy_diagnose": [ + "bool tidy_diagnose()", + "Run configured diagnostics on parsed and repaired markup." + ], + "tidy_error_count": [ + "int tidy_error_count()", + "Returns the Number of Tidy errors encountered for specified document." + ], + "tidy_get_body": [ + "TidyNode tidy_get_body(resource tidy)", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_config": [ + "array tidy_get_config()", + "Get current Tidy configuarion" + ], + "tidy_get_error_buffer": [ + "string tidy_get_error_buffer([bool detailed])", + "Return warnings and errors which occured parsing the specified document" + ], + "tidy_get_head": [ + "TidyNode tidy_get_head()", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_html": [ + "TidyNode tidy_get_html()", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_html_ver": [ + "int tidy_get_html_ver()", + "Get the Detected HTML version for the specified document." + ], + "tidy_get_opt_doc": [ + "string tidy_get_opt_doc(tidy resource, string optname)", + "Returns the documentation for the given option name" + ], + "tidy_get_output": [ + "string tidy_get_output()", + "Return a string representing the parsed tidy markup" + ], + "tidy_get_release": [ + "string tidy_get_release()", + "Get release date (version) for Tidy library" + ], + "tidy_get_root": [ + "TidyNode tidy_get_root()", + "Returns a TidyNode Object representing the root of the tidy parse tree" + ], + "tidy_get_status": [ + "int tidy_get_status()", + "Get status of specfied document." + ], + "tidy_getopt": [ + "mixed tidy_getopt(string option)", + "Returns the value of the specified configuration option for the tidy document." + ], + "tidy_is_xhtml": [ + "bool tidy_is_xhtml()", + "Indicates if the document is a XHTML document." + ], + "tidy_is_xml": [ + "bool tidy_is_xml()", + "Indicates if the document is a generic (non HTML/XHTML) XML document." + ], + "tidy_parse_file": [ + "bool tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])", + "Parse markup in file or URI" + ], + "tidy_parse_string": [ + "bool tidy_parse_string(string input [, mixed config_options [, string encoding]])", + "Parse a document stored in a string" + ], + "tidy_repair_file": [ + "bool tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])", + "Repair a file using an optionally provided configuration file" + ], + "tidy_repair_string": [ + "bool tidy_repair_string(string data [, mixed config_file [, string encoding]])", + "Repair a string using an optionally provided configuration file" + ], + "tidy_warning_count": [ + "int tidy_warning_count()", + "Returns the Number of Tidy warnings encountered for specified document." + ], + "time": [ + "int time()", + "Return current UNIX timestamp" + ], + "time_nanosleep": [ + "mixed time_nanosleep(long seconds, long nanoseconds)", + "Delay for a number of seconds and nano seconds" + ], + "time_sleep_until": [ + "mixed time_sleep_until(float timestamp)", + "Make the script sleep until the specified time" + ], + "timezone_abbreviations_list": [ + "array timezone_abbreviations_list()", + "Returns associative array containing dst, offset and the timezone name" + ], + "timezone_identifiers_list": [ + "array timezone_identifiers_list([long what[, string country]])", + "Returns numerically index array with all timezone identifiers." + ], + "timezone_location_get": [ + "array timezone_location_get()", + "Returns location information for a timezone, including country code, latitude/longitude and comments" + ], + "timezone_name_from_abbr": [ + "string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])", + "Returns the timezone name from abbrevation" + ], + "timezone_name_get": [ + "string timezone_name_get(DateTimeZone object)", + "Returns the name of the timezone." + ], + "timezone_offset_get": [ + "long timezone_offset_get(DateTimeZone object, DateTime object)", + "Returns the timezone offset." + ], + "timezone_open": [ + "DateTimeZone timezone_open(string timezone)", + "Returns new DateTimeZone object" + ], + "timezone_transitions_get": [ + "array timezone_transitions_get(DateTimeZone object [, long timestamp_begin [, long timestamp_end ]])", + "Returns numerically indexed array containing associative array for all transitions in the specified range for the timezone." + ], + "timezone_version_get": [ + "array timezone_version_get()", + "Returns the Olson database version number." + ], + "tmpfile": [ + "resource tmpfile()", + "Create a temporary file that will be deleted automatically after use" + ], + "token_get_all": [ + "array token_get_all(string source)", + "" + ], + "token_name": [ + "string token_name(int type)", + "" + ], + "touch": [ + "bool touch(string filename [, int time [, int atime]])", + "Set modification time of file" + ], + "trigger_error": [ + "void trigger_error(string messsage [, int error_type])", + "Generates a user-level error/warning/notice message" + ], + "trim": [ + "string trim(string str [, string character_mask])", + "Strips whitespace from the beginning and end of a string" + ], + "uasort": [ + "bool uasort(array array_arg, string cmp_function)", + "Sort an array with a user-defined comparison function and maintain index association" + ], + "ucfirst": [ + "string ucfirst(string str)", + "Make a string's first character lowercase" + ], + "ucwords": [ + "string ucwords(string str)", + "Uppercase the first character of every word in a string" + ], + "uksort": [ + "bool uksort(array array_arg, string cmp_function)", + "Sort an array by keys using a user-defined comparison function" + ], + "umask": [ + "int umask([int mask])", + "Return or change the umask" + ], + "uniqid": [ + "string uniqid([string prefix [, bool more_entropy]])", + "Generates a unique ID" + ], + "unixtojd": [ + "int unixtojd([int timestamp])", + "Convert UNIX timestamp to Julian Day" + ], + "unlink": [ + "bool unlink(string filename[, context context])", + "Delete a file" + ], + "unpack": [ + "array unpack(string format, string input)", + "Unpack binary string into named array elements according to format argument" + ], + "unregister_tick_function": [ + "void unregister_tick_function(string function_name)", + "Unregisters a tick callback function" + ], + "unserialize": [ + "mixed unserialize(string variable_representation)", + "Takes a string representation of variable and recreates it" + ], + "unset": [ + "void unset(mixed var [, mixed var])", + "Unset a given variable" + ], + "urldecode": [ + "string urldecode(string str)", + "Decodes URL-encoded string" + ], + "urlencode": [ + "string urlencode(string str)", + "URL-encodes string" + ], + "usleep": [ + "void usleep(int micro_seconds)", + "Delay for a given number of micro seconds" + ], + "usort": [ + "bool usort(array array_arg, string cmp_function)", + "Sort an array by values using a user-defined comparison function" + ], + "utf8_decode": [ + "string utf8_decode(string data)", + "Converts a UTF-8 encoded string to ISO-8859-1" + ], + "utf8_encode": [ + "string utf8_encode(string data)", + "Encodes an ISO-8859-1 string to UTF-8" + ], + "var_dump": [ + "void var_dump(mixed var)", + "Dumps a string representation of variable to output" + ], + "var_export": [ + "string var_export(mixed var [, bool return])", + "Outputs or returns a string representation of a variable" + ], + "variant_abs": [ + "mixed variant_abs(mixed left)", + "Returns the absolute value of a variant" + ], + "variant_add": [ + "mixed variant_add(mixed left, mixed right)", + "\"Adds\" two variant values together and returns the result" + ], + "variant_and": [ + "mixed variant_and(mixed left, mixed right)", + "performs a bitwise AND operation between two variants and returns the result" + ], + "variant_cast": [ + "object variant_cast(object variant, int type)", + "Convert a variant into a new variant object of another type" + ], + "variant_cat": [ + "mixed variant_cat(mixed left, mixed right)", + "concatenates two variant values together and returns the result" + ], + "variant_cmp": [ + "int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])", + "Compares two variants" + ], + "variant_date_from_timestamp": [ + "object variant_date_from_timestamp(int timestamp)", + "Returns a variant date representation of a unix timestamp" + ], + "variant_date_to_timestamp": [ + "int variant_date_to_timestamp(object variant)", + "Converts a variant date/time value to unix timestamp" + ], + "variant_div": [ + "mixed variant_div(mixed left, mixed right)", + "Returns the result from dividing two variants" + ], + "variant_eqv": [ + "mixed variant_eqv(mixed left, mixed right)", + "Performs a bitwise equivalence on two variants" + ], + "variant_fix": [ + "mixed variant_fix(mixed left)", + "Returns the integer part ? of a variant" + ], + "variant_get_type": [ + "int variant_get_type(object variant)", + "Returns the VT_XXX type code for a variant" + ], + "variant_idiv": [ + "mixed variant_idiv(mixed left, mixed right)", + "Converts variants to integers and then returns the result from dividing them" + ], + "variant_imp": [ + "mixed variant_imp(mixed left, mixed right)", + "Performs a bitwise implication on two variants" + ], + "variant_int": [ + "mixed variant_int(mixed left)", + "Returns the integer portion of a variant" + ], + "variant_mod": [ + "mixed variant_mod(mixed left, mixed right)", + "Divides two variants and returns only the remainder" + ], + "variant_mul": [ + "mixed variant_mul(mixed left, mixed right)", + "multiplies the values of the two variants and returns the result" + ], + "variant_neg": [ + "mixed variant_neg(mixed left)", + "Performs logical negation on a variant" + ], + "variant_not": [ + "mixed variant_not(mixed left)", + "Performs bitwise not negation on a variant" + ], + "variant_or": [ + "mixed variant_or(mixed left, mixed right)", + "Performs a logical disjunction on two variants" + ], + "variant_pow": [ + "mixed variant_pow(mixed left, mixed right)", + "Returns the result of performing the power function with two variants" + ], + "variant_round": [ + "mixed variant_round(mixed left, int decimals)", + "Rounds a variant to the specified number of decimal places" + ], + "variant_set": [ + "void variant_set(object variant, mixed value)", + "Assigns a new value for a variant object" + ], + "variant_set_type": [ + "void variant_set_type(object variant, int type)", + "Convert a variant into another type. Variant is modified \"in-place\"" + ], + "variant_sub": [ + "mixed variant_sub(mixed left, mixed right)", + "subtracts the value of the right variant from the left variant value and returns the result" + ], + "variant_xor": [ + "mixed variant_xor(mixed left, mixed right)", + "Performs a logical exclusion on two variants" + ], + "version_compare": [ + "int version_compare(string ver1, string ver2 [, string oper])", + "Compares two \"PHP-standardized\" version number strings" + ], + "vfprintf": [ + "int vfprintf(resource stream, string format, array args)", + "Output a formatted string into a stream" + ], + "virtual": [ + "bool virtual(string filename)", + "Perform an Apache sub-request" + ], + "vprintf": [ + "int vprintf(string format, array args)", + "Output a formatted string" + ], + "vsprintf": [ + "string vsprintf(string format, array args)", + "Return a formatted string" + ], + "wddx_add_vars": [ + "int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])", + "Serializes given variables and adds them to packet given by packet_id" + ], + "wddx_deserialize": [ + "mixed wddx_deserialize(mixed packet)", + "Deserializes given packet and returns a PHP value" + ], + "wddx_packet_end": [ + "string wddx_packet_end(resource packet_id)", + "Ends specified WDDX packet and returns the string containing the packet" + ], + "wddx_packet_start": [ + "resource wddx_packet_start([string comment])", + "Starts a WDDX packet with optional comment and returns the packet id" + ], + "wddx_serialize_value": [ + "string wddx_serialize_value(mixed var [, string comment])", + "Creates a new packet and serializes the given value" + ], + "wddx_serialize_vars": [ + "string wddx_serialize_vars(mixed var_name [, mixed ...])", + "Creates a new packet and serializes given variables into a struct" + ], + "wordwrap": [ + "string wordwrap(string str [, int width [, string break [, bool cut]]])", + "Wraps buffer to selected number of characters using string break char" + ], + "xml_error_string": [ + "string xml_error_string(int code)", + "Get XML parser error string" + ], + "xml_get_current_byte_index": [ + "int xml_get_current_byte_index(resource parser)", + "Get current byte index for an XML parser" + ], + "xml_get_current_column_number": [ + "int xml_get_current_column_number(resource parser)", + "Get current column number for an XML parser" + ], + "xml_get_current_line_number": [ + "int xml_get_current_line_number(resource parser)", + "Get current line number for an XML parser" + ], + "xml_get_error_code": [ + "int xml_get_error_code(resource parser)", + "Get XML parser error code" + ], + "xml_parse": [ + "int xml_parse(resource parser, string data [, int isFinal])", + "Start parsing an XML document" + ], + "xml_parse_into_struct": [ + "int xml_parse_into_struct(resource parser, string data, array &values [, array &index ])", + "Parsing a XML document" + ], + "xml_parser_create": [ + "resource xml_parser_create([string encoding])", + "Create an XML parser" + ], + "xml_parser_create_ns": [ + "resource xml_parser_create_ns([string encoding [, string sep]])", + "Create an XML parser" + ], + "xml_parser_free": [ + "int xml_parser_free(resource parser)", + "Free an XML parser" + ], + "xml_parser_get_option": [ + "int xml_parser_get_option(resource parser, int option)", + "Get options from an XML parser" + ], + "xml_parser_set_option": [ + "int xml_parser_set_option(resource parser, int option, mixed value)", + "Set options in an XML parser" + ], + "xml_set_character_data_handler": [ + "int xml_set_character_data_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_default_handler": [ + "int xml_set_default_handler(resource parser, string hdl)", + "Set up default handler" + ], + "xml_set_element_handler": [ + "int xml_set_element_handler(resource parser, string shdl, string ehdl)", + "Set up start and end element handlers" + ], + "xml_set_end_namespace_decl_handler": [ + "int xml_set_end_namespace_decl_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_external_entity_ref_handler": [ + "int xml_set_external_entity_ref_handler(resource parser, string hdl)", + "Set up external entity reference handler" + ], + "xml_set_notation_decl_handler": [ + "int xml_set_notation_decl_handler(resource parser, string hdl)", + "Set up notation declaration handler" + ], + "xml_set_object": [ + "int xml_set_object(resource parser, object &obj)", + "Set up object which should be used for callbacks" + ], + "xml_set_processing_instruction_handler": [ + "int xml_set_processing_instruction_handler(resource parser, string hdl)", + "Set up processing instruction (PI) handler" + ], + "xml_set_start_namespace_decl_handler": [ + "int xml_set_start_namespace_decl_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_unparsed_entity_decl_handler": [ + "int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)", + "Set up unparsed entity declaration handler" + ], + "xmlrpc_decode": [ + "array xmlrpc_decode(string xml [, string encoding])", + "Decodes XML into native PHP types" + ], + "xmlrpc_decode_request": [ + "array xmlrpc_decode_request(string xml, string& method [, string encoding])", + "Decodes XML into native PHP types" + ], + "xmlrpc_encode": [ + "string xmlrpc_encode(mixed value)", + "Generates XML for a PHP value" + ], + "xmlrpc_encode_request": [ + "string xmlrpc_encode_request(string method, mixed params [, array output_options])", + "Generates XML for a method request" + ], + "xmlrpc_get_type": [ + "string xmlrpc_get_type(mixed value)", + "Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings" + ], + "xmlrpc_is_fault": [ + "bool xmlrpc_is_fault(array)", + "Determines if an array value represents an XMLRPC fault." + ], + "xmlrpc_parse_method_descriptions": [ + "array xmlrpc_parse_method_descriptions(string xml)", + "Decodes XML into a list of method descriptions" + ], + "xmlrpc_server_add_introspection_data": [ + "int xmlrpc_server_add_introspection_data(resource server, array desc)", + "Adds introspection documentation" + ], + "xmlrpc_server_call_method": [ + "mixed xmlrpc_server_call_method(resource server, string xml, mixed user_data [, array output_options])", + "Parses XML requests and call methods" + ], + "xmlrpc_server_create": [ + "resource xmlrpc_server_create()", + "Creates an xmlrpc server" + ], + "xmlrpc_server_destroy": [ + "int xmlrpc_server_destroy(resource server)", + "Destroys server resources" + ], + "xmlrpc_server_register_introspection_callback": [ + "bool xmlrpc_server_register_introspection_callback(resource server, string function)", + "Register a PHP function to generate documentation" + ], + "xmlrpc_server_register_method": [ + "bool xmlrpc_server_register_method(resource server, string method_name, string function)", + "Register a PHP function to handle method matching method_name" + ], + "xmlrpc_set_type": [ + "bool xmlrpc_set_type(string value, string type)", + "Sets xmlrpc type, base64 or datetime, for a PHP string value" + ], + "xmlwriter_end_attribute": [ + "bool xmlwriter_end_attribute(resource xmlwriter)", + "End attribute - returns FALSE on error" + ], + "xmlwriter_end_cdata": [ + "bool xmlwriter_end_cdata(resource xmlwriter)", + "End current CDATA - returns FALSE on error" + ], + "xmlwriter_end_comment": [ + "bool xmlwriter_end_comment(resource xmlwriter)", + "Create end comment - returns FALSE on error" + ], + "xmlwriter_end_document": [ + "bool xmlwriter_end_document(resource xmlwriter)", + "End current document - returns FALSE on error" + ], + "xmlwriter_end_dtd": [ + "bool xmlwriter_end_dtd(resource xmlwriter)", + "End current DTD - returns FALSE on error" + ], + "xmlwriter_end_dtd_attlist": [ + "bool xmlwriter_end_dtd_attlist(resource xmlwriter)", + "End current DTD AttList - returns FALSE on error" + ], + "xmlwriter_end_dtd_element": [ + "bool xmlwriter_end_dtd_element(resource xmlwriter)", + "End current DTD element - returns FALSE on error" + ], + "xmlwriter_end_dtd_entity": [ + "bool xmlwriter_end_dtd_entity(resource xmlwriter)", + "End current DTD Entity - returns FALSE on error" + ], + "xmlwriter_end_element": [ + "bool xmlwriter_end_element(resource xmlwriter)", + "End current element - returns FALSE on error" + ], + "xmlwriter_end_pi": [ + "bool xmlwriter_end_pi(resource xmlwriter)", + "End current PI - returns FALSE on error" + ], + "xmlwriter_flush": [ + "mixed xmlwriter_flush(resource xmlwriter [,bool empty])", + "Output current buffer" + ], + "xmlwriter_full_end_element": [ + "bool xmlwriter_full_end_element(resource xmlwriter)", + "End current element - returns FALSE on error" + ], + "xmlwriter_open_memory": [ + "resource xmlwriter_open_memory()", + "Create new xmlwriter using memory for string output" + ], + "xmlwriter_open_uri": [ + "resource xmlwriter_open_uri(resource xmlwriter, string source)", + "Create new xmlwriter using source uri for output" + ], + "xmlwriter_output_memory": [ + "string xmlwriter_output_memory(resource xmlwriter [,bool flush])", + "Output current buffer as string" + ], + "xmlwriter_set_indent": [ + "bool xmlwriter_set_indent(resource xmlwriter, bool indent)", + "Toggle indentation on/off - returns FALSE on error" + ], + "xmlwriter_set_indent_string": [ + "bool xmlwriter_set_indent_string(resource xmlwriter, string indentString)", + "Set string used for indenting - returns FALSE on error" + ], + "xmlwriter_start_attribute": [ + "bool xmlwriter_start_attribute(resource xmlwriter, string name)", + "Create start attribute - returns FALSE on error" + ], + "xmlwriter_start_attribute_ns": [ + "bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri)", + "Create start namespaced attribute - returns FALSE on error" + ], + "xmlwriter_start_cdata": [ + "bool xmlwriter_start_cdata(resource xmlwriter)", + "Create start CDATA tag - returns FALSE on error" + ], + "xmlwriter_start_comment": [ + "bool xmlwriter_start_comment(resource xmlwriter)", + "Create start comment - returns FALSE on error" + ], + "xmlwriter_start_document": [ + "bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone)", + "Create document tag - returns FALSE on error" + ], + "xmlwriter_start_dtd": [ + "bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid)", + "Create start DTD tag - returns FALSE on error" + ], + "xmlwriter_start_dtd_attlist": [ + "bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)", + "Create start DTD AttList - returns FALSE on error" + ], + "xmlwriter_start_dtd_element": [ + "bool xmlwriter_start_dtd_element(resource xmlwriter, string name)", + "Create start DTD element - returns FALSE on error" + ], + "xmlwriter_start_dtd_entity": [ + "bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)", + "Create start DTD Entity - returns FALSE on error" + ], + "xmlwriter_start_element": [ + "bool xmlwriter_start_element(resource xmlwriter, string name)", + "Create start element tag - returns FALSE on error" + ], + "xmlwriter_start_element_ns": [ + "bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri)", + "Create start namespaced element tag - returns FALSE on error" + ], + "xmlwriter_start_pi": [ + "bool xmlwriter_start_pi(resource xmlwriter, string target)", + "Create start PI tag - returns FALSE on error" + ], + "xmlwriter_text": [ + "bool xmlwriter_text(resource xmlwriter, string content)", + "Write text - returns FALSE on error" + ], + "xmlwriter_write_attribute": [ + "bool xmlwriter_write_attribute(resource xmlwriter, string name, string content)", + "Write full attribute - returns FALSE on error" + ], + "xmlwriter_write_attribute_ns": [ + "bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content)", + "Write full namespaced attribute - returns FALSE on error" + ], + "xmlwriter_write_cdata": [ + "bool xmlwriter_write_cdata(resource xmlwriter, string content)", + "Write full CDATA tag - returns FALSE on error" + ], + "xmlwriter_write_comment": [ + "bool xmlwriter_write_comment(resource xmlwriter, string content)", + "Write full comment tag - returns FALSE on error" + ], + "xmlwriter_write_dtd": [ + "bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset)", + "Write full DTD tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_attlist": [ + "bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content)", + "Write full DTD AttList tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_element": [ + "bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content)", + "Write full DTD element tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_entity": [ + "bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])", + "Write full DTD Entity tag - returns FALSE on error" + ], + "xmlwriter_write_element": [ + "bool xmlwriter_write_element(resource xmlwriter, string name[, string content])", + "Write full element tag - returns FALSE on error" + ], + "xmlwriter_write_element_ns": [ + "bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])", + "Write full namespaced element tag - returns FALSE on error" + ], + "xmlwriter_write_pi": [ + "bool xmlwriter_write_pi(resource xmlwriter, string target, string content)", + "Write full PI tag - returns FALSE on error" + ], + "xmlwriter_write_raw": [ + "bool xmlwriter_write_raw(resource xmlwriter, string content)", + "Write text - returns FALSE on error" + ], + "xsl_xsltprocessor_get_parameter": [ + "string xsl_xsltprocessor_get_parameter(string namespace, string name)", + "" + ], + "xsl_xsltprocessor_has_exslt_support": [ + "bool xsl_xsltprocessor_has_exslt_support()", + "" + ], + "xsl_xsltprocessor_import_stylesheet": [ + "void xsl_xsltprocessor_import_stylesheet(domdocument doc)", + "" + ], + "xsl_xsltprocessor_register_php_functions": [ + "void xsl_xsltprocessor_register_php_functions([mixed $restrict])", + "" + ], + "xsl_xsltprocessor_remove_parameter": [ + "bool xsl_xsltprocessor_remove_parameter(string namespace, string name)", + "" + ], + "xsl_xsltprocessor_set_parameter": [ + "bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value])", + "" + ], + "xsl_xsltprocessor_set_profiling": [ + "bool xsl_xsltprocessor_set_profiling(string filename)", + "" + ], + "xsl_xsltprocessor_transform_to_doc": [ + "domdocument xsl_xsltprocessor_transform_to_doc(domnode doc)", + "" + ], + "xsl_xsltprocessor_transform_to_uri": [ + "int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri)", + "" + ], + "xsl_xsltprocessor_transform_to_xml": [ + "string xsl_xsltprocessor_transform_to_xml(domdocument doc)", + "" + ], + "zend_logo_guid": [ + "string zend_logo_guid()", + "Return the special ID used to request the Zend logo in phpinfo screens" + ], + "zend_version": [ + "string zend_version()", + "Get the version of the Zend Engine" + ], + "zip_close": [ + "void zip_close(resource zip)", + "Close a Zip archive" + ], + "zip_entry_close": [ + "void zip_entry_close(resource zip_ent)", + "Close a zip entry" + ], + "zip_entry_compressedsize": [ + "int zip_entry_compressedsize(resource zip_entry)", + "Return the compressed size of a ZZip entry" + ], + "zip_entry_compressionmethod": [ + "string zip_entry_compressionmethod(resource zip_entry)", + "Return a string containing the compression method used on a particular entry" + ], + "zip_entry_filesize": [ + "int zip_entry_filesize(resource zip_entry)", + "Return the actual filesize of a ZZip entry" + ], + "zip_entry_name": [ + "string zip_entry_name(resource zip_entry)", + "Return the name given a ZZip entry" + ], + "zip_entry_open": [ + "bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])", + "Open a Zip File, pointed by the resource entry" + ], + "zip_entry_read": [ + "mixed zip_entry_read(resource zip_entry [, int len])", + "Read from an open directory entry" + ], + "zip_open": [ + "resource zip_open(string filename)", + "Create new zip using source uri for output" + ], + "zip_read": [ + "resource zip_read(resource zip)", + "Returns the next file in the archive" + ], + "zlib_get_coding_type": [ + "string zlib_get_coding_type()", + "Returns the coding type used for output compression" + ], + "array_column": [ + "array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array", + "Return the values from a single column in the input array" + ], + "boolval": [ + "boolval(mixed $value): bool", + "Get the boolean value of a variable" + ], + "bzclose": [ + "bzclose(resource $bz): bool", + "Close a bzip2 file" + ], + "bzflush": [ + "bzflush(resource $bz): bool", + "Do nothing" + ], + "bzwrite": [ + "bzwrite(resource $bz, string $data, ?int $length = null): int|false", + "Binary safe bzip2 file write" + ], + "checkdnsrr": [ + "checkdnsrr(string $hostname, string $type = "MX"): bool", + "Check DNS records corresponding to a given Internet host name or IP address" + ], + "chop": [ + "chop()", + "Alias of rtrim()" + ], + "class_uses": [ + "class_uses(object|string $object_or_class, bool $autoload = true): array|false", + "" + ], + "curl_escape": [ + "curl_escape(CurlHandle $handle, string $string): string|false", + "URL encodes the given string" + ], + "curl_file_create": [ + "curl_file_create()", + "Create a CURLFile object" + ], + "curl_multi_errno": [ + "curl_multi_errno(CurlMultiHandle $multi_handle): int", + "Return the last multi curl error number" + ], + "curl_multi_setopt": [ + "curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value): bool", + "Set an option for the cURL multi handle" + ], + "curl_multi_strerror": [ + "curl_multi_strerror(int $error_code): ?string", + "Return string describing error code" + ], + "curl_pause": [ + "curl_pause(CurlHandle $handle, int $flags): int", + "Pause and unpause a connection" + ], + "curl_reset": [ + "curl_reset(CurlHandle $handle): void", + "Reset all options of a libcurl session handle" + ], + "curl_share_close": [ + "curl_share_close(CurlShareHandle $share_handle): void", + "Close a cURL share handle" + ], + "curl_share_errno": [ + "curl_share_errno(CurlShareHandle $share_handle): int", + "Return the last share curl error number" + ], + "curl_share_init": [ + "curl_share_init(): CurlShareHandle", + "Initialize a cURL share handle" + ], + "curl_share_setopt": [ + "curl_share_setopt(CurlShareHandle $share_handle, int $option, mixed $value): bool", + "Set an option for a cURL share handle" + ], + "curl_share_strerror": [ + "curl_share_strerror(int $error_code): ?string", + "Return string describing the given error code" + ], + "curl_strerror": [ + "curl_strerror(int $error_code): ?string", + "Return string describing the given error code" + ], + "curl_unescape": [ + "curl_unescape(CurlHandle $handle, string $string): string|false", + "Decodes the given URL encoded string" + ], + "date_create_immutable_from_format": [ + "date_create_immutable_from_format()", + "Alias of DateTimeImmutable::createFromFormat()" + ], + "date_create_immutable": [ + "date_create_immutable()", + "Alias of DateTimeImmutable::__construct()" + ], + "deflate_add": [ + "deflate_add(DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false", + "Incrementally deflate data" + ], + "deflate_init": [ + "deflate_init(int $encoding, array $options = []): DeflateContext|false", + "Initialize an incremental deflate context" + ], + "delete": [ + "delete()", + "See unlink()" + ], + "diskfreespace": [ + "diskfreespace()", + "Alias of disk_free_space()" + ], + "doubleval": [ + "doubleval()", + "Alias of floatval()" + ], + "enchant_dict_add": [ + "enchant_dict_add(EnchantDictionary $dictionary, string $word): void", + "Add a word to personal word list" + ], + "enchant_dict_is_added": [ + "enchant_dict_is_added(EnchantDictionary $dictionary, string $word): bool", + "Whether or not 'word' exists in this spelling-session" + ], + "error_clear_last": [ + "error_clear_last(): void", + "Clear the most recent error" + ], + "eval": [ + "eval(string $code): mixed", + "Evaluate a string as PHP code" + ], + "expect_expectl": [ + "expect_expectl(resource $expect, array $cases, array &$match = ?): int", + "" + ], + "expect_popen": [ + "expect_popen(string $command): resource", + "" + ], + "fdiv": [ + "fdiv(float $num1, float $num2): float", + "Divides two numbers, according to IEEE 754" + ], + "filter_id": [ + "filter_id(string $name): int|false", + "Returns the filter ID belonging to a named filter" + ], + "filter_list": [ + "filter_list(): array", + "Returns a list of all supported filters" + ], + "forward_static_call_array": [ + "forward_static_call_array(callable $callback, array $args): mixed", + "Call a static method and pass the arguments as array" + ], + "fputs": [ + "fputs()", + "Alias of fwrite()" + ], + "ftp_append": [ + "ftp_append(FTP\\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): bool", + "Append the contents of a file to another file on the FTP server" + ], + "ftp_mlsd": [ + "ftp_mlsd(FTP\\Connection $ftp, string $directory): array|false", + "Returns a list of files in the given directory" + ], + "ftp_quit": [ + "ftp_quit()", + "Alias of ftp_close()" + ], + "gc_mem_caches": [ + "gc_mem_caches(): int", + "" + ], + "gc_status": [ + "gc_status(): array", + "Gets information about the garbage collector" + ], + "get_debug_type": [ + "get_debug_type(mixed $value): string", + "Gets the type name of a variable in a way that is suitable for debugging" + ], + "get_declared_traits": [ + "get_declared_traits(): array", + "Returns an array of all declared traits" + ], + "get_required_files": [ + "get_required_files()", + "Alias of get_included_files()" + ], + "get_resource_id": [ + "get_resource_id(resource $resource): int", + "" + ], + "get_resources": [ + "get_resources(?string $type = null): array", + "Returns active resources" + ], + "getimagesizefromstring": [ + "getimagesizefromstring(string $string, array &$image_info = null): array|false", + "Get the size of an image from a string" + ], + "getmxrr": [ + "getmxrr(string $hostname, array &$hosts, array &$weights = null): bool", + "Get MX records corresponding to a given Internet host name" + ], + "gmp_binomial": [ + "gmp_binomial(GMP|int|string $n, int $k): GMP", + "Calculates binomial coefficient" + ], + "gmp_div": [ + "gmp_div()", + "Alias of gmp_div_q()" + ], + "gmp_export": [ + "gmp_export(GMP|int|string $num, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string", + "Export to a binary string" + ], + "gmp_import": [ + "gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP", + "Import from a binary string" + ], + "gmp_kronecker": [ + "gmp_kronecker(GMP|int|string $num1, GMP|int|string $num2): int", + "Kronecker symbol" + ], + "gmp_lcm": [ + "gmp_lcm(GMP|int|string $num1, GMP|int|string $num2): GMP", + "Calculate LCM" + ], + "gmp_perfect_power": [ + "gmp_perfect_power(GMP|int|string $num): bool", + "Perfect power check" + ], + "gmp_random_bits": [ + "gmp_random_bits(int $bits): GMP", + "Random number" + ], + "gmp_random_range": [ + "gmp_random_range(GMP|int|string $min, GMP|int|string $max): GMP", + "Random number" + ], + "gmp_random_seed": [ + "gmp_random_seed(GMP|int|string $seed): void", + "Sets the RNG seed" + ], + "gmp_root": [ + "gmp_root(GMP|int|string $num, int $nth): GMP", + "Take the integer part of nth root" + ], + "gmp_rootrem": [ + "gmp_rootrem(GMP|int|string $num, int $nth): array", + "Take the integer part and remainder of nth root" + ], + "gzclose": [ + "gzclose(resource $stream): bool", + "Close an open gz-file pointer" + ], + "gzdecode": [ + "gzdecode(string $data, int $max_length = 0): string|false", + "Decodes a gzip compressed string" + ], + "gzeof": [ + "gzeof(resource $stream): bool", + "Test for EOF on a gz-file pointer" + ], + "gzgetc": [ + "gzgetc(resource $stream): string|false", + "Get character from gz-file pointer" + ], + "gzgets": [ + "gzgets(resource $stream, ?int $length = null): string|false", + "Get line from file pointer" + ], + "gzgetss": [ + "gzgetss(resource $zp, int $length, string $allowable_tags = ?): string", + "" + ], + "gzpassthru": [ + "gzpassthru(resource $stream): int", + "" + ], + "gzputs": [ + "gzputs()", + "Alias of gzwrite()" + ], + "gzread": [ + "gzread(resource $stream, int $length): string|false", + "Binary-safe gz-file read" + ], + "gzrewind": [ + "gzrewind(resource $stream): bool", + "Rewind the position of a gz-file pointer" + ], + "gzseek": [ + "gzseek(resource $stream, int $offset, int $whence = SEEK_SET): int", + "Seek on a gz-file pointer" + ], + "gztell": [ + "gztell(resource $stream): int|false", + "Tell gz-file pointer read/write position" + ], + "gzwrite": [ + "gzwrite(resource $stream, string $data, ?int $length = null): int|false", + "Binary-safe gz-file write" + ], + "halt_compiler": [ + "__halt_compiler(): void", + "" + ], + "hash_equals": [ + "hash_equals(string $known_string, string $user_string): bool", + "Timing attack safe string comparison" + ], + "hash_hkdf": [ + "hash_hkdf(string $algo, string $key, int $length = 0, string $info = \"\", string $salt = \"\"): string", + "Generate a HKDF key derivation of a supplied key input" + ], + "hash_hmac_algos": [ + "hash_hmac_algos(): array", + "Return a list of registered hashing algorithms suitable for hash_hmac" + ], + "hash_pbkdf2": [ + "hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string", + "Generate a PBKDF2 key derivation of a supplied password" + ], + "header_register_callback": [ + "header_register_callback(callable $callback): bool", + "Call a header function" + ], + "hex2bin": [ + "hex2bin(string $string): string|false", + "Decodes a hexadecimally encoded binary string" + ], + "hrtime": [ + "hrtime(bool $as_number = false): array|int|float|false", + "Get the system's high resolution time" + ], + "http_response_code": [ + "http_response_code(int $response_code = 0): int|bool", + "Get or Set the HTTP response code" + ], + "imageaffine": [ + "imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false", + "Return an image containing the affine transformed src image, using an optional clipping area" + ], + "imageaffinematrixconcat": [ + "imageaffinematrixconcat(array $matrix1, array $matrix2): array|false", + "Concatenate two affine transformation matrices" + ], + "imageaffinematrixget": [ + "imageaffinematrixget(int $type, array|float $options): array|false", + "Get an affine transformation matrix" + ], + "imagebmp": [ + "imagebmp(GdImage $image, resource|string|null $file = null, bool $compressed = true): bool", + "Output a BMP image to browser or file" + ], + "imagecreatefrombmp": [ + "imagecreatefrombmp(string $filename): GdImage|false", + "Create a new image from file or URL" + ], + "imagecreatefromwebp": [ + "imagecreatefromwebp(string $filename): GdImage|false", + "Create a new image from file or URL" + ], + "imagecrop": [ + "imagecrop(GdImage $image, array $rectangle): GdImage|false", + "Crop an image to the given rectangle" + ], + "imagecropauto": [ + "imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false", + "Crop an image automatically using one of the available modes" + ], + "imageflip": [ + "imageflip(GdImage $image, int $mode): bool", + "Flips an image using a given mode" + ], + "imagegetclip": [ + "imagegetclip(GdImage $image): array", + "Get the clipping rectangle" + ], + "imagegetinterpolation": [ + "imagegetinterpolation(GdImage $image): int", + "Get the interpolation method" + ], + "imageopenpolygon": [ + "imageopenpolygon(GdImage $image, array $points, int $color): bool", + "Draws an open polygon" + ], + "imagepalettetotruecolor": [ + "imagepalettetotruecolor(GdImage $image): bool", + "Converts a palette based image to true color" + ], + "imageresolution": [ + "imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool", + "Get or set the resolution of the image" + ], + "imagescale": [ + "imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false", + "Scale an image using the given new width and height" + ], + "imagesetclip": [ + "imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool", + "Set the clipping rectangle" + ], + "imagesetinterpolation": [ + "imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool", + "Set the interpolation method" + ], + "imagewebp": [ + "imagewebp(GdImage $image, resource|string|null $file = null, int $quality = -1): bool", + "Output a WebP image to browser or file" + ], + "imap_create": [ + "", + "Alias of imap_createmailbox()" + ], + "imap_fetchmime": [ + "imap_fetchmime(IMAP\\Connection $imap, int $message_num, string $section, int $flags = 0): string|false", + "Fetch MIME headers for a particular section of the message" + ], + "imap_fetchtext": [ + "imap_fetchtext()", + "Alias of imap_body()" + ], + "imap_header": [ + "imap_header()", + "Alias of imap_headerinfo()" + ], + "imap_listmailbox": [ + "imap_listmailbox()", + "Alias of imap_list()" + ], + "imap_listsubscribed": [ + "imap_listsubscribed()", + "Alias of imap_lsub()" + ], + "imap_rename": [ + "imap_rename()", + "Alias of imap_renamemailbox()" + ], + "imap_scan": [ + "imap_scan()", + "Alias of imap_listscan()" + ], + "imap_scanmailbox": [ + "imap_scanmailbox()", + "Alias of imap_listscan()" + ], + "ini_alter": [ + "ini_alter()", + "Alias of ini_set()" + ], + "intdiv": [ + "intdiv(int $num1, int $num2): int", + "Integer division" + ], + "is_double": [ + "is_double()", + "Alias of is_float()" + ], + "is_int": [ + "is_int(mixed $value): bool", + "Find whether the type of a variable is integer" + ], + "is_integer": [ + "is_integer()", + "Alias of is_int()" + ], + "is_iterable": [ + "is_iterable(mixed $value): bool", + "" + ], + "is_real": [ + "is_real()", + "Alias of is_float()" + ], + "is_soap_fault": [ + "is_soap_fault(mixed $object): bool", + "Checks if a SOAP call has failed" + ], + "is_tainted": [ + "is_tainted(string $string): bool", + "Checks whether a string is tainted" + ], + "is_writeable": [ + "is_writeable()", + "Alias of is_writable()" + ], + "json_last_error_msg": [ + "json_last_error_msg(): string", + "Returns the error string of the last json_encode() or json_decode() call" + ], + "key_exists": [ + "key_exists()", + "Alias of array_key_exists()" + ], + "lchown": [ + "lchown(string $filename, string|int $user): bool", + "Changes user ownership of symlink" + ], + "libxml_set_external_entity_loader": [ + "libxml_set_external_entity_loader(?callable $resolver_function): bool", + "Changes the default external entity loader" + ], + "mb_chr": [ + "mb_chr(int $codepoint, ?string $encoding = null): string|false", + "Return character by Unicode code point value" + ], + "mb_ereg_replace_callback": [ + "mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null", + "" + ], + "mb_ord": [ + "mb_ord(string $string, ?string $encoding = null): int|false", + "Get Unicode code point of character" + ], + "mb_scrub": [ + "mb_scrub(string $string, ?string $encoding = null): string", + "Description" + ], + "mb_str_split": [ + "mb_str_split(string $string, int $length = 1, ?string $encoding = null): array", + "Given a multibyte string, return an array of its characters" + ], + "memcache_debug": [ + "memcache_debug(bool $on_off): bool", + "Turn debug output on/off" + ], + "mysql_db_name": [ + "mysql_db_name(resource $result, int $row, mixed $field = NULL): string", + "Retrieves database name from the call to mysql_list_dbs()" + ], + "mysql_tablename": [ + "mysql_tablename(resource $result, int $i): string|false", + "Get table name of field" + ], + "mysql_xdevapi_expression": [ + "mysql_xdevapi\\expression(string $expression): object", + "Bind prepared statement variables as parameters" + ], + "mysql_xdevapi_getsession": [ + "mysql_xdevapi\\getSession(string $uri): mysql_xdevapi\\Session", + "Connect to a MySQL server" + ], + "mysqli_escape_string": [ + "mysqli_escape_string()", + "Alias of mysqli_real_escape_string()" + ], + "mysqli_execute": [ + "mysqli_execute()", + "Alias for mysqli_stmt_execute()" + ], + "mysqli_get_links_stats": [ + "mysqli_get_links_stats(): array", + "Return information about open and cached links" + ], + "mysqli_set_opt": [ + "mysqli_set_opt()", + "Alias of mysqli_options()" + ], + "ob_tidyhandler": [ + "ob_tidyhandler(string $input, int $mode = ?): string", + "ob_start callback function to repair the buffer" + ], + "odbc_do": [ + "odbc_do()", + "Alias of odbc_exec()" + ], + "odbc_field_precision": [ + "odbc_field_precision()", + "Alias of odbc_field_len()" + ], + "opcache_compile_file": [ + "opcache_compile_file(string $filename): bool", + "Compiles and caches a PHP script without executing it" + ], + "opcache_get_configuration": [ + "opcache_get_configuration(): array|false", + "Get configuration information about the cache" + ], + "opcache_get_status": [ + "opcache_get_status(bool $include_scripts = true): array|false", + "Get status information about the cache" + ], + "opcache_invalidate": [ + "opcache_invalidate(string $filename, bool $force = false): bool", + "Invalidates a cached script" + ], + "opcache_is_script_cached": [ + "opcache_is_script_cached(string $filename): bool", + "Tells whether a script is cached in OPCache" + ], + "opcache_reset": [ + "opcache_reset(): bool", + "Resets the contents of the opcode cache" + ], + "password_algos": [ + "password_algos(): array", + "Get available password hashing algorithm IDs" + ], + "password_get_info": [ + "password_get_info(string $hash): array", + "Returns information about the given hash" + ], + "password_hash": [ + "password_hash(string $password, string|int|null $algo, array $options = []): string", + "Creates a password hash" + ], + "password_needs_rehash": [ + "password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool", + "Checks if the given hash matches the given options" + ], + "password_verify": [ + "password_verify(string $password, string $hash): bool", + "Verifies that a password matches a hash" + ], + "pcntl_async_signals": [ + "pcntl_async_signals(?bool $enable = null): bool", + "Enable/disable asynchronous signal handling or return the old setting" + ], + "pcntl_errno": [ + "pcntl_errno()", + "Alias of pcntl_get_last_error()" + ], + "pcntl_get_last_error": [ + "pcntl_get_last_error(): int", + "Retrieve the error number set by the last pcntl function which failed" + ], + "pcntl_signal_get_handler": [ + "pcntl_signal_get_handler(int $signal): callable|int", + "Get the current handler for specified signal" + ], + "pcntl_sigwaitinfo": [ + "pcntl_sigwaitinfo(array $signals, array &$info = []): int|false", + "Waits for signals" + ], + "pcntl_strerror": [ + "pcntl_strerror(int $error_code): string", + "Retrieve the system error message associated with the given errno" + ], + "pg_connect_poll": [ + "pg_connect_poll(PgSql\\Connection $connection): int", + "" + ], + "pg_consume_input": [ + "pg_consume_input(PgSql\\Connection $connection): bool", + "Reads input on the connection" + ], + "pg_escape_identifier": [ + "pg_escape_identifier(PgSql\\Connection $connection = ?, string $data): string", + "" + ], + "pg_escape_literal": [ + "pg_escape_literal(PgSql\\Connection $connection = ?, string $data): string", + "" + ], + "pg_flush": [ + "pg_flush(PgSql\\Connection $connection): int|bool", + "Flush outbound query data on the connection" + ], + "pg_lo_truncate": [ + "pg_lo_truncate(PgSql\\Lob $lob, int $size): bool", + "" + ], + "pg_socket": [ + "pg_socket(PgSql\\Connection $connection): resource|false", + "" + ], + "pos": [ + "pos()", + "Alias of current()" + ], + "posix_errno": [ + "posix_errno()", + "Alias of posix_get_last_error()" + ], + "posix_setrlimit": [ + "posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool", + "Set system resource limits" + ], + "preg_last_error_msg": [ + "preg_last_error_msg(): string", + "Returns the error message of the last PCRE regex execution" + ], + "preg_replace_callback_array": [ + "preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, int &$count = null, int $flags = 0): string|array|null", + "Perform a regular expression search and replace using callbacks" + ], + "ps_translate": [ + "ps_translate(resource $psdoc, float $x, float $y): bool", + "Sets translation" + ], + "random_bytes": [ + "random_bytes(int $length): string", + "Generates cryptographically secure pseudo-random bytes" + ], + "random_int": [ + "random_int(int $min, int $max): int", + "Generates cryptographically secure pseudo-random integers" + ], + "read_exif_data": [ + "read_exif_data()", + "Alias of exif_read_data()" + ], + "recode": [ + "recode()", + "Alias of recode_string()" + ], + "session_abort": [ + "session_abort(): bool", + "Discard session array changes and finish session" + ], + "session_commit": [ + "session_commit()", + "Alias of session_write_close()" + ], + "session_create_id": [ + "session_create_id(string $prefix = \"\"): string|false", + "Create new session id" + ], + "session_gc": [ + "session_gc(): int|false", + "Perform session data garbage collection" + ], + "session_register_shutdown": [ + "session_register_shutdown(): void", + "Session shutdown function" + ], + "session_reset": [ + "session_reset(): bool", + "Re-initialize session array with original values" + ], + "session_status": [ + "session_status(): int", + "Returns the current session status" + ], + "set_file_buffer": [ + "set_file_buffer()", + "Alias of stream_set_write_buffer()" + ], + "show_source": [ + "show_source()", + "Alias of highlight_file()" + ], + "sizeof": [ + "sizeof()", + "Alias of count()" + ], + "snmp_set_oid_numeric_print": [ + "snmp_set_oid_numeric_print(int $format): bool", + "" + ], + "snmpwalkoid": [ + "snmpwalkoid(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): array|false", + "" + ], + "socket_addrinfo_bind": [ + "socket_addrinfo_bind(AddressInfo $address): Socket|false", + "Create and bind to a socket from a given addrinfo" + ], + "socket_addrinfo_connect": [ + "socket_addrinfo_connect(AddressInfo $address): Socket|false", + "Create and connect to a socket from a given addrinfo" + ], + "socket_addrinfo_explain": [ + "socket_addrinfo_explain(AddressInfo $address): array", + "Get information about addrinfo" + ], + "socket_addrinfo_lookup": [ + "socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []): array|false", + "Get array with contents of getaddrinfo about the given hostname" + ], + "socket_cmsg_space": [ + "socket_cmsg_space(int $level, int $type, int $num = 0): ?int", + "Calculate message buffer size" + ], + "socket_export_stream": [ + "socket_export_stream(Socket $socket): resource|false", + "Export a socket into a stream that encapsulates a socket" + ], + "socket_get_status": [ + "socket_get_status()", + "Alias of stream_get_meta_data()" + ], + "socket_getopt": [ + "socket_getopt()", + "Alias of socket_get_option()" + ], + "socket_import_stream": [ + "socket_import_stream(resource $stream): Socket|false", + "Import a stream" + ], + "socket_recvmsg": [ + "socket_recvmsg(Socket $socket, array &$message, int $flags = 0): int|false", + "Read a message" + ], + "socket_sendmsg": [ + "socket_sendmsg(Socket $socket, array $message, int $flags = 0): int|false", + "Send a message" + ], + "socket_set_blocking": [ + "socket_set_blocking()", + "Alias of stream_set_blocking()" + ], + "socket_set_timeout": [ + "socket_set_timeout()", + "Alias of stream_set_timeout()" + ], + "socket_setopt": [ + "socket_setopt()", + "Alias of socket_set_option()" + ], + "socket_wsaprotocol_info_export": [ + "socket_wsaprotocol_info_export(Socket $socket, int $process_id): string|false", + "Exports the WSAPROTOCOL_INFO Structure" + ], + "socket_wsaprotocol_info_import": [ + "socket_wsaprotocol_info_import(string $info_id): Socket|false", + "Imports a Socket from another Process" + ], + "socket_wsaprotocol_info_release": [ + "socket_wsaprotocol_info_release(string $info_id): bool", + "Releases an exported WSAPROTOCOL_INFO Structure" + ], + "spl_object_id": [ + "spl_object_id(object $object): int", + "" + ], + "sqlsrv_begin_transaction": [ + "sqlsrv_begin_transaction(resource $conn): bool", + "Begins a database transaction" + ], + "sqlsrv_cancel": [ + "sqlsrv_cancel(resource $stmt): bool", + "Cancels a statement" + ], + "sqlsrv_client_info": [ + "sqlsrv_client_info(resource $conn): array", + "Returns information about the client and specified connection" + ], + "sqlsrv_close": [ + "sqlsrv_close(resource $conn): bool", + "Closes an open connection and releases resourses associated with the connection" + ], + "sqlsrv_commit": [ + "sqlsrv_commit(resource $conn): bool", + "Commits a transaction that was begun with sqlsrv_begin_transaction()" + ], + "sqlsrv_configure": [ + "sqlsrv_configure(string $setting, mixed $value): bool", + "Changes the driver error handling and logging configurations" + ], + "sqlsrv_connect": [ + "sqlsrv_connect(string $serverName, array $connectionInfo = ?): resource", + "Opens a connection to a Microsoft SQL Server database" + ], + "sqlsrv_errors": [ + "sqlsrv_errors(int $errorsOrWarnings = ?): mixed", + "Returns error and warning information about the last SQLSRV operation performed" + ], + "sqlsrv_execute": [ + "sqlsrv_execute(resource $stmt): bool", + "Executes a statement prepared with sqlsrv_prepare()" + ], + "sqlsrv_fetch_array": [ + "sqlsrv_fetch_array(resource $stmt, int $fetchType = ?, int $row = ?, int $offset = ?): array", + "Returns a row as an array" + ], + "sqlsrv_fetch_object": [ + "sqlsrv_fetch_object(resource $stmt, string $className = ?, array $ctorParams = ?, int $row = ?, int $offset = ?): mixed", + "Retrieves the next row of data in a result set as an object" + ], + "sqlsrv_fetch": [ + "sqlsrv_fetch(resource $stmt, int $row = ?, int $offset = ?): mixed", + "Makes the next row in a result set available for reading" + ], + "sqlsrv_field_metadata": [ + "sqlsrv_field_metadata(resource $stmt): mixed", + "" + ], + "sqlsrv_free_stmt": [ + "sqlsrv_free_stmt(resource $stmt): bool", + "Frees all resources for the specified statement" + ], + "sqlsrv_get_config": [ + "sqlsrv_get_config(string $setting): mixed", + "Returns the value of the specified configuration setting" + ], + "sqlsrv_get_field": [ + "sqlsrv_get_field(resource $stmt, int $fieldIndex, int $getAsType = ?): mixed", + "Gets field data from the currently selected row" + ], + "sqlsrv_has_rows": [ + "sqlsrv_has_rows(resource $stmt): bool", + "Indicates whether the specified statement has rows" + ], + "sqlsrv_next_result": [ + "sqlsrv_next_result(resource $stmt): mixed", + "Makes the next result of the specified statement active" + ], + "sqlsrv_num_fields": [ + "sqlsrv_num_fields(resource $stmt): mixed", + "Retrieves the number of fields (columns) on a statement" + ], + "sqlsrv_num_rows": [ + "sqlsrv_num_rows(resource $stmt): mixed", + "Retrieves the number of rows in a result set" + ], + "sqlsrv_prepare": [ + "sqlsrv_prepare(resource $conn, string $sql, array $params = ?, array $options = ?): mixed", + "Prepares a query for execution" + ], + "sqlsrv_query": [ + "sqlsrv_query(resource $conn, string $sql, array $params = ?, array $options = ?): mixed", + "Prepares and executes a query" + ], + "sqlsrv_rollback": [ + "sqlsrv_rollback(resource $conn): bool", + "" + ], + "sqlsrv_rows_affected": [ + "sqlsrv_rows_affected(resource $stmt): int|false", + "" + ], + "sqlsrv_send_stream_data": [ + "sqlsrv_send_stream_data(resource $stmt): bool", + "Sends data from parameter streams to the server" + ], + "sqlsrv_server_info": [ + "sqlsrv_server_info(resource $conn): array", + "Returns information about the server" + ], + "str_contains": [ + "str_contains(string $haystack, string $needle): bool", + "Determine if a string contains a given substring" + ], + "str_ends_with": [ + "str_ends_with(string $haystack, string $needle): bool", + "Checks if a string ends with a given substring" + ], + "str_starts_with": [ + "str_starts_with(string $haystack, string $needle): bool", + "Checks if a string starts with a given substring" + ], + "stream_isatty": [ + "stream_isatty(resource $stream): bool", + "Check if a stream is a TTY" + ], + "stream_notification_callback": [ + "stream_notification_callback(int $notification_code, int $severity, string $message, int $message_code, int $bytes_transferred, int $bytes_max): void", + "A callback function for the notification context parameter" + ], + "stream_register_wrapper": [ + "stream_register_wrapper()", + "Alias of stream_wrapper_register()" + ], + "stream_set_chunk_size": [ + "stream_set_chunk_size(resource $stream, int $size): int", + "Set the stream chunk size" + ], + "stream_set_read_buffer": [ + "stream_set_read_buffer(resource $stream, int $size): int", + "Set read file buffering on the given stream" + ], + "tcpwrap_check": [ + "tcpwrap_check(string $daemon, string $address, string $user = ?, bool $nodns = false): bool", + "Performs a tcpwrap check" + ], + "trait_exists": [ + "trait_exists(string $trait, bool $autoload = true): bool", + "Checks if the trait exists" + ], + "use_soap_error_handler": [ + "use_soap_error_handler(bool $enable = true): bool", + "Set whether to use the SOAP error handler" + ], + "user_error": [ + "user_error()", + "Alias of trigger_error()" + ], + "yaml_emit_file": [ + "yaml_emit_file(string $filename, mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): bool", + "Send the YAML representation of a value to a file" + ], + "yaml_emit": [ + "yaml_emit(mixed $data, int $encoding = YAML_ANY_ENCODING, int $linebreak = YAML_ANY_BREAK, array $callbacks = null): string", + "Returns the YAML representation of a value" + ], + "yaml_parse_file": [ + "yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed", + "Parse a YAML stream from a file" + ], + "yaml_parse_url": [ + "yaml_parse_url(string $url, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed", + "Parse a Yaml stream from a URL" + ], + "yaml_parse": [ + "yaml_parse(string $input, int $pos = 0, int &$ndocs = ?, array $callbacks = null): mixed", + "Parse a YAML stream" + ], + "zlib_decode": [ + "zlib_decode(string $data, int $max_length = 0): string|false", + "Uncompress any raw/gzip/zlib encoded data" + ], + "zlib_encode": [ + "zlib_encode(string $data, int $encoding, int $level = -1): string|false", + "Compress data with the specified encoding" + ] +}; +var variableMap = { + "$_COOKIE": { + type: "array" + }, + "$_ENV": { + type: "array" + }, + "$_FILES": { + type: "array" + }, + "$_GET": { + type: "array" + }, + "$_POST": { + type: "array" + }, + "$_REQUEST": { + type: "array" + }, + "$_SERVER": { + type: "array", + value: { + "DOCUMENT_ROOT": 1, + "GATEWAY_INTERFACE": 1, + "HTTP_ACCEPT": 1, + "HTTP_ACCEPT_CHARSET": 1, + "HTTP_ACCEPT_ENCODING": 1, + "HTTP_ACCEPT_LANGUAGE": 1, + "HTTP_CONNECTION": 1, + "HTTP_HOST": 1, + "HTTP_REFERER": 1, + "HTTP_USER_AGENT": 1, + "PATH_TRANSLATED": 1, + "PHP_SELF": 1, + "QUERY_STRING": 1, + "REMOTE_ADDR": 1, + "REMOTE_PORT": 1, + "REQUEST_METHOD": 1, + "REQUEST_URI": 1, + "SCRIPT_FILENAME": 1, + "SCRIPT_NAME": 1, + "SERVER_ADMIN": 1, + "SERVER_NAME": 1, + "SERVER_PORT": 1, + "SERVER_PROTOCOL": 1, + "SERVER_SIGNATURE": 1, + "SERVER_SOFTWARE": 1, + "argv": 1, + "argc": 1 + } + }, + "$_SESSION": { + type: "array" + }, + "$GLOBALS": { + type: "array" + }, + '$argv': { + type: "array" + }, + '$argc': { + type: "int" + } +}; +function is(token, type) { + return token.type.lastIndexOf(type) > -1; +} +var PhpCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (token.type === 'support.php_tag' && token.value === ' 0) { + var prevToken = session.getTokenAt(pos.row, token.start); + if (prevToken.type === 'support.php_tag') { + return this.getTagCompletions(state, session, pos, prefix); + } + } + return this.getFunctionCompletions(state, session, pos, prefix); + } + if (is(token, "variable")) + return this.getVariableCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (token.type === 'string' && /(\$[\w]*)\[["']([^'"]*)$/i.test(line)) + return this.getArrayKeyCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return [{ + caption: 'php', + value: 'php', + meta: "php tag", + score: 1000000 + }, { + caption: '=', + value: '=', + meta: "php tag", + score: 1000000 + }]; + }; + this.getFunctionCompletions = function (state, session, pos, prefix) { + var functions = Object.keys(functionMap); + return functions.map(function (func) { + return { + caption: func, + snippet: func + '($0)', + meta: "php function", + score: 1000000, + docHTML: functionMap[func][1] + }; + }); + }; + this.getVariableCompletions = function (state, session, pos, prefix) { + var variables = Object.keys(variableMap); + return variables.map(function (variable) { + return { + caption: variable, + value: variable, + meta: "php variable", + score: 1000000 + }; + }); + }; + this.getArrayKeyCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var variable = line.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1]; + if (!variableMap[variable]) { + return []; + } + var keys = []; + if (variableMap[variable].type === 'array' && variableMap[variable].value) + keys = Object.keys(variableMap[variable].value); + return keys.map(function (key) { + return { + caption: key, + value: key, + meta: "php array key", + score: 1000000 + }; + }); + }; +}).call(PhpCompletions.prototype); +exports.PhpCompletions = PhpCompletions; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var CstyleFoldMode = require("./cstyle").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, CstyleFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.indentKeywords = { + "if": 1, + "while": 1, + "for": 1, + "foreach": 1, + "switch": 1, + "else": 0, + "elseif": 0, + "endif": -1, + "endwhile": -1, + "endfor": -1, + "endforeach": -1, + "endswitch": -1 + }; + this.foldingStartMarkerPhp = /(?:\s|^)(if|else|elseif|while|for|foreach|switch).*\:/i; + this.foldingStopMarkerPhp = /(?:\s|^)(endif|endwhile|endfor|endforeach|endswitch)\;/i; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarkerPhp.exec(line); + if (match) { + return this.phpBlock(session, row, match.index + 2); + } + var match = this.foldingStopMarkerPhp.exec(line); + if (match) { + return this.phpBlock(session, row, match.index + 2); + } + return this.getFoldWidgetRangeBase(session, foldStyle, row); + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarkerPhp.test(line); + var isEnd = this.foldingStopMarkerPhp.test(line); + if (isStart && !isEnd) { + var match = this.foldingStartMarkerPhp.exec(line); + var keyword = match && match[1].toLowerCase(); + if (keyword) { + var type = session.getTokenAt(row, match.index + 2).type; + if (type == "keyword") { + return "start"; + } + } + } + if (isEnd && foldStyle === "markbeginend") { + var match = this.foldingStopMarkerPhp.exec(line); + var keyword = match && match[1].toLowerCase(); + if (keyword) { + var type = session.getTokenAt(row, match.index + 2).type; + if (type == "keyword") { + return "end"; + } + } + } + return this.getFoldWidgetBase(session, foldStyle, row); + }; + this.phpBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + var val = token.value; + var stack = [val]; + var dir = this.indentKeywords[val]; + if (val === "else" || val === "elseif") { + dir = 1; + } + if (!dir) + return; + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while (token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = dir * this.indentKeywords[token.value]; + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0) { + stack.shift(); + if (!stack.length) + break; + if (level === 0) + stack.unshift(token.value); + } + } + if (!token) + return null; + if (tokenRange) + return stream.getCurrentTokenRange(); + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/php","ace/unicode","ace/mode/folding/mixed","ace/mode/folding/html","ace/mode/folding/cstyle","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; +var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var PhpCompletions = require("./php_completions").PhpCompletions; +var PhpFoldMode = require("./folding/php").FoldMode; +var unicode = require("../unicode"); +var MixedFoldMode = require("./folding/mixed").FoldMode; +var HtmlFoldMode = require("./folding/html").FoldMode; +var CstyleFoldMode = require("./folding/cstyle").FoldMode; +var HtmlMode = require("./html").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var PhpMode = function (opts) { + this.HighlightRules = PhpLangHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.$completer = new PhpCompletions(); + this.foldingRules = new MixedFoldMode(new HtmlFoldMode(), { + "js-": new CstyleFoldMode(), + "css-": new CstyleFoldMode(), + "php-": new PhpFoldMode() + }); +}; +oop.inherits(PhpMode, TextMode); +(function () { + this.tokenRe = new RegExp("^[" + unicode.wordChars + "_]+", "g"); + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "_]|\\s])+", "g"); + this.lineCommentStart = ["//", "#"]; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState != "doc-start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.$id = "ace/mode/php-inline"; +}).call(PhpMode.prototype); +var Mode = function (opts) { + if (opts && opts.inline) { + var mode = new PhpMode(); + mode.createWorker = this.createWorker; + mode.inlinePhp = true; + return mode; + } + HtmlMode.call(this); + this.HighlightRules = PhpHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "php-": PhpMode + }); + this.foldingRules = new MixedFoldMode(new HtmlFoldMode(), { + "js-": new CstyleFoldMode(), + "css-": new CstyleFoldMode(), + "php-": new PhpFoldMode() + }); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker"); + worker.attachToDocument(session.getDocument()); + if (this.inlinePhp) + worker.call("setOptions", [{ inline: true }]); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/php"; + this.snippetFileId = "ace/snippets/php"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/php_laravel_blade",["require","exports","module","ace/lib/oop","ace/mode/php_laravel_blade_highlight_rules","ace/mode/php","ace/mode/javascript","ace/mode/css","ace/mode/html"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var PHPLaravelBladeHighlightRules = require("./php_laravel_blade_highlight_rules").PHPLaravelBladeHighlightRules; +var PHPMode = require("./php").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlMode = require("./html").Mode; +var Mode = function () { + PHPMode.call(this); + this.HighlightRules = PHPLaravelBladeHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "html-": HtmlMode + }); +}; +oop.inherits(Mode, PHPMode); +(function () { + this.$id = "ace/mode/php_laravel_blade"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/php_laravel_blade"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-pig.js b/ui/base1/ace/mode-pig.js new file mode 100644 index 0000000..fc62592 --- /dev/null +++ b/ui/base1/ace/mode-pig.js @@ -0,0 +1,278 @@ +define("ace/mode/pig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from Pig.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PigHighlightRules = function () { + this.$rules = { + start: [{ + token: "comment.block.pig", + regex: /\/\*/, + push: [{ + token: "comment.block.pig", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment.block.pig" + }] + }, { + token: "comment.line.double-dash.asciidoc", + regex: /--.*$/ + }, { + token: "keyword.control.pig", + regex: /\b(?:ASSERT|LOAD|STORE|DUMP|FILTER|DISTINCT|FOREACH|GENERATE|STREAM|JOIN|COGROUP|GROUP|CROSS|ORDER|LIMIT|UNION|SPLIT|DESCRIBE|EXPLAIN|ILLUSTRATE|AS|BY|INTO|USING|LIMIT|PARALLEL|OUTER|INNER|DEFAULT|LEFT|SAMPLE|RANK|CUBE|ALL|KILL|QUIT|MAPREDUCE|ASC|DESC|THROUGH|SHIP|CACHE|DECLARE|CASE|WHEN|THEN|END|IN|PARTITION|FULL|IMPORT|IF|ONSCHEMA|INPUT|OUTPUT)\b/, + caseInsensitive: true + }, { + token: "storage.datatypes.pig", + regex: /\b(?:int|long|float|double|chararray|bytearray|boolean|datetime|biginteger|bigdecimal|tuple|bag|map)\b/, + caseInsensitive: true + }, { + token: "support.function.storage.pig", + regex: /\b(?:PigStorage|BinStorage|BinaryStorage|PigDump|HBaseStorage|JsonLoader|JsonStorage|AvroStorage|TextLoader|PigStreaming|TrevniStorage|AccumuloStorage)\b/ + }, { + token: "support.function.udf.pig", + regex: /\b(?:DIFF|TOBAG|TOMAP|TOP|TOTUPLE|RANDOM|FLATTEN|flatten|CUBE|ROLLUP|IsEmpty|ARITY|PluckTuple|SUBTRACT|BagToString)\b/ + }, { + token: "support.function.udf.math.pig", + regex: /\b(?:ABS|ACOS|ASIN|ATAN|CBRT|CEIL|COS|COSH|EXP|FLOOR|LOG|LOG10|ROUND|ROUND_TO|SIN|SINH|SQRT|TAN|TANH|AVG|COUNT|COUNT_STAR|MAX|MIN|SUM|COR|COV)\b/ + }, { + token: "support.function.udf.string.pig", + regex: /\b(?:CONCAT|INDEXOF|LAST_INDEX_OF|LCFIRST|LOWER|REGEX_EXTRACT|REGEX_EXTRACT_ALL|REPLACE|SIZE|STRSPLIT|SUBSTRING|TOKENIZE|TRIM|UCFIRST|UPPER|LTRIM|RTRIM|ENDSWITH|STARTSWITH|TRIM)\b/ + }, { + token: "support.function.udf.datetime.pig", + regex: /\b(?:AddDuration|CurrentTime|DaysBetween|GetDay|GetHour|GetMilliSecond|GetMinute|GetMonth|GetSecond|GetWeek|GetWeekYear|GetYear|HoursBetween|MilliSecondsBetween|MinutesBetween|MonthsBetween|SecondsBetween|SubtractDuration|ToDate|WeeksBetween|YearsBetween|ToMilliSeconds|ToString|ToUnixTime)\b/ + }, { + token: "support.function.command.pig", + regex: /\b(?:cat|cd|copyFromLocal|copyToLocal|cp|ls|mkdir|mv|pwd|rm)\b/ + }, { + token: "variable.pig", + regex: /\$[a_zA-Z0-9_]+/ + }, { + token: "constant.language.pig", + regex: /\b(?:NULL|true|false|stdin|stdout|stderr)\b/, + caseInsensitive: true + }, { + token: "constant.numeric.pig", + regex: /\b\d+(?:\.\d+)?\b/ + }, { + token: "keyword.operator.comparison.pig", + regex: /!=|==|<|>|<=|>=|\b(?:MATCHES|IS|OR|AND|NOT)\b/, + caseInsensitive: true + }, { + token: "keyword.operator.arithmetic.pig", + regex: /\+|\-|\*|\/|\%|\?|:|::|\.\.|#/ + }, { + token: "string.quoted.double.pig", + regex: /"/, + push: [{ + token: "string.quoted.double.pig", + regex: /"/, + next: "pop" + }, { + token: "constant.character.escape.pig", + regex: /\\./ + }, { + defaultToken: "string.quoted.double.pig" + }] + }, { + token: "string.quoted.single.pig", + regex: /'/, + push: [{ + token: "string.quoted.single.pig", + regex: /'/, + next: "pop" + }, { + token: "constant.character.escape.pig", + regex: /\\./ + }, { + defaultToken: "string.quoted.single.pig" + }] + }, { + todo: { + token: [ + "text", + "keyword.parameter.pig", + "text", + "storage.type.parameter.pig" + ], + regex: /^(\s*)(set)(\s+)(\S+)/, + caseInsensitive: true, + push: [{ + token: "text", + regex: /$/, + next: "pop" + }, { + include: "$self" + }] + } + }, { + token: [ + "text", + "keyword.alias.pig", + "text", + "storage.type.alias.pig" + ], + regex: /(\s*)(DEFINE|DECLARE|REGISTER)(\s+)(\S+)/, + caseInsensitive: true, + push: [{ + token: "text", + regex: /;?$/, + next: "pop" + }] + }] + }; + this.normalizeRules(); +}; +PigHighlightRules.metaData = { + fileTypes: ["pig"], + name: "Pig", + scopeName: "source.pig" +}; +oop.inherits(PigHighlightRules, TextHighlightRules); +exports.PigHighlightRules = PigHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pig_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PigHighlightRules = require("./pig_highlight_rules").PigHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = PigHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/pig"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/pig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-plain_text.js b/ui/base1/ace/mode-plain_text.js new file mode 100644 index 0000000..df09391 --- /dev/null +++ b/ui/base1/ace/mode-plain_text.js @@ -0,0 +1,27 @@ +define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var Behaviour = require("./behaviour").Behaviour; +var Mode = function () { + this.HighlightRules = TextHighlightRules; + this.$behaviour = new Behaviour(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.getNextLineIndent = function (state, line, tab) { + return ''; + }; + this.$id = "ace/mode/plain_text"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/plain_text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-plsql.js b/ui/base1/ace/mode-plsql.js new file mode 100644 index 0000000..20e77b6 --- /dev/null +++ b/ui/base1/ace/mode-plsql.js @@ -0,0 +1,268 @@ +define("ace/mode/plsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var plsqlHighlightRules = function () { + var keywords = ("all|alter|and|any|array|arrow|as|asc|at|begin|between|by|case|check|clusters|cluster|colauth|columns|compress|connect|crash|create|cross|current|database|declare|default|delete|desc|distinct|drop|else|end|exception|exclusive|exists|fetch|form|for|foreign|from|goto|grant|group|having|identified|if|in|inner|indexes|index|insert|intersect|into|is|join|key|left|like|lock|minus|mode|natural|nocompress|not|nowait|null|of|on|option|or|order,overlaps|outer|primary|prior|procedure|public|range|record|references|resource|revoke|right|select|share|size|sql|start|subtype|tabauth|table|then|to|type|union|unique|update|use|values|view|views|when|where|with"); + var builtinConstants = ("true|false"); + var builtinFunctions = ("abs|acos|add_months|ascii|asciistr|asin|atan|atan2|avg|bfilename|bin_to_num|bitand|cardinality|case|cast|ceil|chartorowid|chr|coalesce|compose|concat|convert|corr|cos|cosh|count|covar_pop|covar_samp|cume_dist|current_date|current_timestamp|dbtimezone|decode|decompose|dense_rank|dump|empty_blob|empty_clob|exp|extract|first_value|floor|from_tz|greatest|group_id|hextoraw|initcap|instr|instr2|instr4|instrb|instrc|lag|last_day|last_value|lead|least|length|length2|length4|lengthb|lengthc|listagg|ln|lnnvl|localtimestamp|log|lower|lpad|ltrim|max|median|min|mod|months_between|nanvl|nchr|new_time|next_day|nth_value|nullif|numtodsinterval|numtoyminterval|nvl|nvl2|power|rank|rawtohex|regexp_count|regexp_instr|regexp_replace|regexp_substr|remainder|replace|round|rownum|rpad|rtrim|sessiontimezone|sign|sin|sinh|soundex|sqrt|stddev|substr|sum|sys_context|sysdate|systimestamp|tan|tanh|to_char|to_clob|to_date|to_dsinterval|to_lob|to_multi_byte|to_nclob|to_number|to_single_byte|to_timestamp|to_timestamp_tz|to_yminterval|translate|trim|trunc|tz_offset|uid|upper|user|userenv|var_pop|var_samp|variance|vsize"); + var dataTypes = ("char|nchar|nvarchar2|varchar2|long|raw|" + + "number|numeric|float|dec|decimal|integer|int|smallint|real|double|precision|" + + "date|timestamp|interval|year|day|" + + "bfile|blob|clob|nclob|" + + "rowid|urowid"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants, + "storage.type": dataTypes + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "--.*$" + }, { + token: "comment", + start: "/\\*", + end: "\\*/" + }, { + token: "string", // " string + regex: '".*?"' + }, { + token: "string", // ' string + regex: "'.*?'" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(plsqlHighlightRules, TextHighlightRules); +exports.plsqlHighlightRules = plsqlHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { +}).call(FoldMode.prototype); + +}); + +define("ace/mode/plsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/plsql_highlight_rules","ace/mode/folding/sql"], function(require, exports, module){/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PLSqlHighlightRules = require("./plsql_highlight_rules").plsqlHighlightRules; +var FoldMode = require("./folding/sql").FoldMode; +var Mode = function () { + this.HighlightRules = PLSqlHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/plsql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/plsql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-powershell.js b/ui/base1/ace/mode-powershell.js new file mode 100644 index 0000000..6b5666b --- /dev/null +++ b/ui/base1/ace/mode-powershell.js @@ -0,0 +1,567 @@ +define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PowershellHighlightRules = function () { + var identifierRe = "[a-zA-Z\\?_\u00a1-\uffff][a-zA-Z\\d\\?_\u00a1-\uffff]*"; + var keywords = ("begin|break|catch|class|continue|data|define|do|dynamicparam|else|elseif|end|enum|exit|filter|" + + "finally|for|foreach|from|function|if|in|inlinescript|hidden|parallel|param|" + + "process|return|static|sequence|switch|throw|trap|try|until|using|while|workflow|var"); + var builtinFunctions = ( + "Get-AppBackgroundTask|Start-AppBackgroundTask|Unregister-AppBackgroundTask|Disable-AppBackgroundTaskDiagnosticLog|Enable-AppBackgroundTaskDiagnosticLog|Set-AppBackgroundTaskResourcePolicy|" + + "Get-AppLockerFileInformation|Get-AppLockerPolicy|New-AppLockerPolicy|Set-AppLockerPolicy|Test-AppLockerPolicy|" + + "Add-AppvClientConnectionGroup|Add-AppvClientPackage|Add-AppvPublishingServer|Disable-Appv|Disable-AppvClientConnectionGroup|Disable-AppvClientMode|Disable-AppvPublishingServer|Enable-Appv|Enable-AppvClientConnectionGroup|Enable-AppvClientMode|Enable-AppvPublishingServer|Get-AppvClientApplication|Get-AppvClientConfiguration|Get-AppvClientConnectionGroup|Get-AppvClientMode|Get-AppvClientPackage|Get-AppvClientPackageStatus|Get-AppvClientPackageVersion|Get-AppvClientPackageVersionHistory|Get-AppvClientPackageVersionStatus|Get-AppvClientPublishingServer|Get-AppvClientSFTFileSystem|Get-AppvClientStatus|Get-AppvPublishingServer|Get-AppvVirtualProcess|Publish-AppvClientPackage|Remove-AppvClientConnectionGroup|Remove-AppvClientPackage|Remove-AppvPublishingServer|Set-AppvClientConfiguration|Set-AppvClientMode|Set-AppvClientPackage|Set-AppvClientPublishingServer|Set-AppvVirtualProcess|Sync-AppvPublishingServer|Get-AppvStatus|Mount-AppvClientConnectionGroup|Repair-AppvClientConnectionGroup|Repair-AppvClientPackage|Send-AppvClientReport|Set-AppvPublishingServer|Start-AppvVirtualProcess|Stop-AppvClientConnectionGroup|Stop-AppvClientPackage|Unpublish-AppvClientPackage|" + + "Expand-AppvSequencerPackage|New-AppvPackageAccelerator|New-AppvSequencerPackage|Update-AppvSequencerPackage|" + + "Add-AppSharedPackageContainer|Add-AppxPackage|Add-AppxVolume|Dismount-AppxVolume|Get-AppSharedPackageContainer|Get-AppxDefaultVolume|Get-AppxLastError|Get-AppxLog|Get-AppxPackage|Get-AppxPackageAutoUpdateSettings|Get-AppxPackageManifest|Get-AppxVolume|Invoke-CommandInDesktopPackage|Mount-AppxVolume|Move-AppxPackage|Remove-AppSharedPackageContainer|Remove-AppxPackage|Remove-AppxPackageAutoUpdateSettings|Remove-AppxVolume|Reset-AppSharedPackageContainer|Reset-AppxPackage|Set-AppxDefaultVolume|Set-AppxPackageAutoUpdateSettings|" + + "Clear-AssignedAccess|Get-AssignedAccess|Set-AssignedAccess|" + + "Get-BpaModel|Get-BpaResult|Invoke-BpaModel|Set-BpaResult|" + + "Add-BitLockerKeyProtector|Backup-BitLockerKeyProtector|BackupToAAD-BitLockerKeyProtector|Clear-BitLockerAutoUnlock|Disable-BitLocker|Disable-BitLockerAutoUnlock|Enable-BitLocker|Enable-BitLockerAutoUnlock|Get-BitLockerVolume|Lock-BitLocker|Remove-BitLockerKeyProtector|Resume-BitLocker|Suspend-BitLocker|Unlock-BitLocker|" + + "Add-BitsFile|Complete-BitsTransfer|Get-BitsTransfer|Remove-BitsTransfer|Resume-BitsTransfer|Set-BitsTransfer|Start-BitsTransfer|Suspend-BitsTransfer|" + + "Checkpoint-SbecActiveConfig|Clear-SbecProviderCache|Disable-SbecAutologger|Disable-SbecBcd|Enable-SbecAutologger|Enable-SbecBcd|Enable-SbecBootImage|Enable-SbecWdsBcd|Get-SbecActiveConfig|Get-SbecBackupConfig|Get-SbecDestination|Get-SbecForwarding|Get-SbecHistory|Get-SbecLocalizedMessage|Get-SbecLogSession|Get-SbecTraceProviders|New-SbecUnattendFragment|Redo-SbecActiveConfig|Restore-SbecBackupConfig|Save-SbecInstance|Save-SbecLogSession|Set-SbecActiveConfig|Set-SbecLogSession|Start-SbecInstance|Start-SbecLogSession|Start-SbecNtKernelLogSession|Start-SbecSimpleLogSession|Stop-SbecInstance|Stop-SbecLogSession|Test-SbecActiveConfig|Test-SbecConfig|Undo-SbecActiveConfig|" + + "Add-BCDataCacheExtension|Clear-BCCache|Disable-BC|Disable-BCDowngrading|Disable-BCServeOnBattery|Enable-BCDistributed|Enable-BCDowngrading|Enable-BCHostedClient|Enable-BCHostedServer|Enable-BCLocal|Enable-BCServeOnBattery|Export-BCCachePackage|Export-BCSecretKey|Get-BCClientConfiguration|Get-BCContentServerConfiguration|Get-BCDataCache|Get-BCDataCacheExtension|Get-BCHashCache|Get-BCHostedCacheServerConfiguration|Get-BCNetworkConfiguration|Get-BCStatus|Import-BCCachePackage|Import-BCSecretKey|Publish-BCFileContent|Publish-BCWebContent|Remove-BCDataCacheExtension|Reset-BC|Set-BCAuthentication|Set-BCCache|Set-BCDataCacheEntryMaxAge|Set-BCMinSMBLatency|Set-BCSecretKey|" + + "Add-CauClusterRole|Disable-CauClusterRole|Enable-CauClusterRole|Export-CauReport|Get-CauClusterRole|Get-CauPlugin|Get-CauReport|Get-CauRun|Invoke-CauRun|Invoke-CauScan|Register-CauPlugin|Remove-CauClusterRole|Save-CauDebugTrace|Set-CauClusterRole|Stop-CauRun|Test-CauSetup|Unregister-CauPlugin|" + + "Export-BinaryMiLog|Get-CimAssociatedInstance|Get-CimClass|Get-CimInstance|Get-CimSession|Import-BinaryMiLog|Invoke-CimMethod|New-CimInstance|New-CimSession|New-CimSessionOption|Register-CimIndicationEvent|Remove-CimInstance|Remove-CimSession|Set-CimInstance|" + + "ConvertFrom-CIPolicy|" + + "Add-SignerRule|ConvertFrom-CIPolicy|Edit-CIPolicyRule|Get-CIPolicy|Get-CIPolicyIdInfo|Get-CIPolicyInfo|Get-SystemDriver|Merge-CIPolicy|New-CIPolicy|New-CIPolicyRule|Remove-CIPolicyRule|Set-CIPolicyIdInfo|Set-CIPolicySetting|Set-CIPolicyVersion|Set-HVCIOptions|Set-RuleOption|" + + "Disable-NetQosFlowControl|Enable-NetQosFlowControl|Get-NetQosDcbxSetting|Get-NetQosFlowControl|Get-NetQosTrafficClass|New-NetQosTrafficClass|Remove-NetQosTrafficClass|Set-NetQosDcbxSetting|Set-NetQosFlowControl|Set-NetQosTrafficClass|Switch-NetQosDcbxSetting|Switch-NetQosFlowControl|Switch-NetQosTrafficClass|" + + "Disable-DedupVolume|Enable-DedupVolume|Expand-DedupFile|Get-DedupJob|Get-DedupMetadata|Get-DedupSchedule|Get-DedupStatus|Get-DedupVolume|Measure-DedupFileMetadata|New-DedupSchedule|Remove-DedupSchedule|Set-DedupSchedule|Set-DedupVolume|Start-DedupJob|Stop-DedupJob|Update-DedupStatus|" + + "Add-MpPreference|Get-MpComputerStatus|Get-MpPreference|Get-MpThreat|Get-MpThreatCatalog|Get-MpThreatDetection|Remove-MpPreference|Remove-MpThreat|Set-MpPreference|Start-MpScan|Start-MpWDOScan|Update-MpSignature|" + + "Backup-DHASConfiguration|Get-DHASActiveEncryptionCertificate|Get-DHASActiveSigningCertificate|Get-DHASCertificateChainPolicy|Get-DHASInactiveEncryptionCertificate|Get-DHASInactiveSigningCertificate|Install-DeviceHealthAttestation|Remove-DHASInactiveEncryptionCertificate|Remove-DHASInactiveSigningCertificate|Restore-DHASConfiguration|Set-DHASActiveEncryptionCertificate|Set-DHASActiveSigningCertificate|Set-DHASCertificateChainPolicy|Set-DHASSupportedAuthenticationSchema|Uninstall-DeviceHealthAttestation||" + + "Get-DfsnAccess|Get-DfsnFolder|Get-DfsnFolderTarget|Get-DfsnRoot|Get-DfsnRootTarget|Get-DfsnServerConfiguration|Grant-DfsnAccess|Move-DfsnFolder|New-DfsnFolder|New-DfsnFolderTarget|New-DfsnRoot|New-DfsnRootTarget|Remove-DfsnAccess|Remove-DfsnFolder|Remove-DfsnFolderTarget|Remove-DfsnRoot|Remove-DfsnRootTarget|Revoke-DfsnAccess|Set-DfsnFolder|Set-DfsnFolderTarget|Set-DfsnRoot|Set-DfsnRootTarget|Set-DfsnServerConfiguration|" + + "Add-DfsrConnection|Add-DfsrMember|ConvertFrom-DfsrGuid|Export-DfsrClone|Get-DfsrBacklog|Get-DfsrCloneState|Get-DfsrConnection|Get-DfsrConnectionSchedule|Get-DfsrDelegation|Get-DfsReplicatedFolder|Get-DfsReplicationGroup|Get-DfsrFileHash|Get-DfsrGroupSchedule|Get-DfsrIdRecord|Get-DfsrMember|Get-DfsrMembership|Get-DfsrPreservedFiles|Get-DfsrServiceConfiguration|Get-DfsrState|Grant-DfsrDelegation|Import-DfsrClone|New-DfsReplicatedFolder|New-DfsReplicationGroup|Remove-DfsrConnection|Remove-DfsReplicatedFolder|Remove-DfsReplicationGroup|Remove-DfsrMember|Remove-DfsrPropagationTestFile|Reset-DfsrCloneState|Restore-DfsrPreservedFiles|Revoke-DfsrDelegation|Set-DfsrConnection|Set-DfsrConnectionSchedule|Set-DfsReplicatedFolder|Set-DfsReplicationGroup|Set-DfsrGroupSchedule|Set-DfsrMember|Set-DfsrMembership|Set-DfsrServiceConfiguration|Start-DfsrPropagationTest|Suspend-DfsReplicationGroup|Sync-DfsReplicationGroup|Update-DfsrConfigurationFromAD|Write-DfsrHealthReport|Write-DfsrPropagationReport|" + + "Add-DhcpServerInDC|Add-DhcpServerSecurityGroup|Add-DhcpServerv4Class|Add-DhcpServerv4ExclusionRange|Add-DhcpServerv4Failover|Add-DhcpServerv4FailoverScope|Add-DhcpServerv4Filter|Add-DhcpServerv4Lease|Add-DhcpServerv4MulticastExclusionRange|Add-DhcpServerv4MulticastScope|Add-DhcpServerv4OptionDefinition|Add-DhcpServerv4Policy|Add-DhcpServerv4PolicyIPRange|Add-DhcpServerv4Reservation|Add-DhcpServerv4Scope|Add-DhcpServerv4Superscope|Add-DhcpServerv6Class|Add-DhcpServerv6ExclusionRange|Add-DhcpServerv6Lease|Add-DhcpServerv6OptionDefinition|Add-DhcpServerv6Reservation|Add-DhcpServerv6Scope|Backup-DhcpServer|Export-DhcpServer|Get-DhcpServerAuditLog|Get-DhcpServerDatabase|Get-DhcpServerDnsCredential|Get-DhcpServerInDC|Get-DhcpServerSetting|Get-DhcpServerv4Binding|Get-DhcpServerv4Class|Get-DhcpServerv4DnsSetting|Get-DhcpServerv4ExclusionRange|Get-DhcpServerv4Failover|Get-DhcpServerv4Filter|Get-DhcpServerv4FilterList|Get-DhcpServerv4FreeIPAddress|Get-DhcpServerv4Lease|Get-DhcpServerv4MulticastExclusionRange|Get-DhcpServerv4MulticastLease|Get-DhcpServerv4MulticastScope|Get-DhcpServerv4MulticastScopeStatistics|Get-DhcpServerv4OptionDefinition|Get-DhcpServerv4OptionValue|Get-DhcpServerv4Policy|Get-DhcpServerv4PolicyIPRange|Get-DhcpServerv4Reservation|Get-DhcpServerv4Scope|Get-DhcpServerv4ScopeStatistics|Get-DhcpServerv4Statistics|Get-DhcpServerv4Superscope|Get-DhcpServerv4SuperscopeStatistics|Get-DhcpServerv6Binding|Get-DhcpServerv6Class|Get-DhcpServerv6DnsSetting|Get-DhcpServerv6ExclusionRange|Get-DhcpServerv6FreeIPAddress|Get-DhcpServerv6Lease|Get-DhcpServerv6OptionDefinition|Get-DhcpServerv6OptionValue|Get-DhcpServerv6Reservation|Get-DhcpServerv6Scope|Get-DhcpServerv6ScopeStatistics|Get-DhcpServerv6StatelessStatistics|Get-DhcpServerv6StatelessStore|Get-DhcpServerv6Statistics|Get-DhcpServerVersion|Import-DhcpServer|Invoke-DhcpServerv4FailoverReplication|Remove-DhcpServerDnsCredential|Remove-DhcpServerInDC|Remove-DhcpServerv4Class|Remove-DhcpServerv4ExclusionRange|Remove-DhcpServerv4Failover|Remove-DhcpServerv4FailoverScope|Remove-DhcpServerv4Filter|Remove-DhcpServerv4Lease|Remove-DhcpServerv4MulticastExclusionRange|Remove-DhcpServerv4MulticastLease|Remove-DhcpServerv4MulticastScope|Remove-DhcpServerv4OptionDefinition|Remove-DhcpServerv4OptionValue|Remove-DhcpServerv4Policy|Remove-DhcpServerv4PolicyIPRange|Remove-DhcpServerv4Reservation|Remove-DhcpServerv4Scope|Remove-DhcpServerv4Superscope|Remove-DhcpServerv6Class|Remove-DhcpServerv6ExclusionRange|Remove-DhcpServerv6Lease|Remove-DhcpServerv6OptionDefinition|Remove-DhcpServerv6OptionValue|Remove-DhcpServerv6Reservation|Remove-DhcpServerv6Scope|Rename-DhcpServerv4Superscope|Repair-DhcpServerv4IPRecord|Restore-DhcpServer|Set-DhcpServerAuditLog|Set-DhcpServerDatabase|Set-DhcpServerDnsCredential|Set-DhcpServerSetting|Set-DhcpServerv4Binding|Set-DhcpServerv4Class|Set-DhcpServerv4DnsSetting|Set-DhcpServerv4Failover|Set-DhcpServerv4FilterList|Set-DhcpServerv4MulticastScope|Set-DhcpServerv4OptionDefinition|Set-DhcpServerv4OptionValue|Set-DhcpServerv4Policy|Set-DhcpServerv4Reservation|Set-DhcpServerv4Scope|Set-DhcpServerv6Binding|Set-DhcpServerv6Class|Set-DhcpServerv6DnsSetting|Set-DhcpServerv6OptionDefinition|Set-DhcpServerv6OptionValue|Set-DhcpServerv6Reservation|Set-DhcpServerv6Scope|Set-DhcpServerv6StatelessStore|" + + "Disable-DAManualEntryPointSelection|Enable-DAManualEntryPointSelection|Get-DAClientExperienceConfiguration|Get-DAEntryPointTableItem|New-DAEntryPointTableItem|Remove-DAEntryPointTableItem|Rename-DAEntryPointTableItem|Reset-DAClientExperienceConfiguration|Reset-DAEntryPointTableItem|Set-DAClientExperienceConfiguration|Set-DAEntryPointTableItem|" + + "Add-AppxProvisionedPackage|Add-WindowsCapability|Add-WindowsDriver|Add-WindowsImage|Add-WindowsPackage|Clear-WindowsCorruptMountPoint|Disable-WindowsOptionalFeature|Dismount-WindowsImage|Enable-WindowsOptionalFeature|Expand-WindowsCustomDataImage|Expand-WindowsImage|Export-WindowsCapabilitySource|Export-WindowsDriver|Export-WindowsImage|Get-AppxProvisionedPackage|Get-NonRemovableAppsPolicy|Get-WIMBootEntry|Get-WindowsCapability|Get-WindowsDriver|Get-WindowsEdition|Get-WindowsImage|Get-WindowsImageContent|Get-WindowsOptionalFeature|Get-WindowsPackage|Get-WindowsReservedStorageState|Mount-WindowsImage|New-WindowsCustomImage|New-WindowsImage|Optimize-AppXProvisionedPackages|Optimize-WindowsImage|Remove-AppxProvisionedPackage|Remove-WindowsCapability|Remove-WindowsDriver|Remove-WindowsImage|Remove-WindowsPackage|Repair-WindowsImage|Save-WindowsImage|Set-AppXProvisionedDataFile|Set-NonRemovableAppsPolicy|Set-WindowsEdition|Set-WindowsProductKey|Set-WindowsReservedStorageState|Split-WindowsImage|Start-OSUninstall|Update-WIMBootEntry|Use-WindowsUnattend|" + + "Add-DnsClientDohServerAddress|Add-DnsClientNrptRule|Clear-DnsClientCache|Get-DnsClient|Get-DnsClientCache|Get-DnsClientDohServerAddress|Get-DnsClientGlobalSetting|Get-DnsClientNrptGlobal|Get-DnsClientNrptPolicy|Get-DnsClientNrptRule|Get-DnsClientServerAddress|Register-DnsClient|Remove-DnsClientDohServerAddress|Remove-DnsClientNrptRule|Resolve-DnsName|Set-DnsClient|Set-DnsClientDohServerAddress|Set-DnsClientGlobalSetting|Set-DnsClientNrptGlobal|Set-DnsClientNrptRule|Set-DnsClientServerAddress|" + + "Add-DnsServerClientSubnet|Add-DnsServerConditionalForwarderZone|Add-DnsServerDirectoryPartition|Add-DnsServerForwarder|Add-DnsServerPrimaryZone|Add-DnsServerQueryResolutionPolicy|Add-DnsServerRecursionScope|Add-DnsServerResourceRecord|Add-DnsServerResourceRecordA|Add-DnsServerResourceRecordAAAA|Add-DnsServerResourceRecordCName|Add-DnsServerResourceRecordDnsKey|Add-DnsServerResourceRecordDS|Add-DnsServerResourceRecordMX|Add-DnsServerResourceRecordPtr|Add-DnsServerResponseRateLimitingExceptionlist|Add-DnsServerRootHint|Add-DnsServerSecondaryZone|Add-DnsServerSigningKey|Add-DnsServerStubZone|Add-DnsServerTrustAnchor|Add-DnsServerVirtualizationInstance|Add-DnsServerZoneDelegation|Add-DnsServerZoneScope|Add-DnsServerZoneTransferPolicy|Clear-DnsServerCache|Clear-DnsServerStatistics|ConvertTo-DnsServerPrimaryZone|ConvertTo-DnsServerSecondaryZone|Disable-DnsServerPolicy|Disable-DnsServerSigningKeyRollover|Enable-DnsServerPolicy|Enable-DnsServerSigningKeyRollover|Export-DnsServerDnsSecPublicKey|Export-DnsServerZone|Get-DnsServer|Get-DnsServerCache|Get-DnsServerClientSubnet|Get-DnsServerDiagnostics|Get-DnsServerDirectoryPartition|Get-DnsServerDnsSecZoneSetting|Get-DnsServerDsSetting|Get-DnsServerEDns|Get-DnsServerForwarder|Get-DnsServerGlobalNameZone|Get-DnsServerGlobalQueryBlockList|Get-DnsServerQueryResolutionPolicy|Get-DnsServerRecursion|Get-DnsServerRecursionScope|Get-DnsServerResourceRecord|Get-DnsServerResponseRateLimiting|Get-DnsServerResponseRateLimitingExceptionlist|Get-DnsServerRootHint|Get-DnsServerScavenging|Get-DnsServerSetting|Get-DnsServerSigningKey|Get-DnsServerStatistics|Get-DnsServerTrustAnchor|Get-DnsServerTrustPoint|Get-DnsServerVirtualizationInstance|Get-DnsServerZone|Get-DnsServerZoneAging|Get-DnsServerZoneDelegation|Get-DnsServerZoneScope|Get-DnsServerZoneTransferPolicy|Import-DnsServerResourceRecordDS|Import-DnsServerRootHint|Import-DnsServerTrustAnchor|Invoke-DnsServerSigningKeyRollover|Invoke-DnsServerZoneSign|Invoke-DnsServerZoneUnsign|Register-DnsServerDirectoryPartition|Remove-DnsServerClientSubnet|Remove-DnsServerDirectoryPartition|Remove-DnsServerForwarder|Remove-DnsServerQueryResolutionPolicy|Remove-DnsServerRecursionScope|Remove-DnsServerResourceRecord|Remove-DnsServerResponseRateLimitingExceptionlist|Remove-DnsServerRootHint|Remove-DnsServerSigningKey|Remove-DnsServerTrustAnchor|Remove-DnsServerVirtualizationInstance|Remove-DnsServerZone|Remove-DnsServerZoneDelegation|Remove-DnsServerZoneScope|Remove-DnsServerZoneTransferPolicy|Reset-DnsServerZoneKeyMasterRole|Restore-DnsServerPrimaryZone|Restore-DnsServerSecondaryZone|Resume-DnsServerZone|Set-DnsServer|Set-DnsServerCache|Set-DnsServerClientSubnet|Set-DnsServerConditionalForwarderZone|Set-DnsServerDiagnostics|Set-DnsServerDnsSecZoneSetting|Set-DnsServerDsSetting|Set-DnsServerEDns|Set-DnsServerForwarder|Set-DnsServerGlobalNameZone|Set-DnsServerGlobalQueryBlockList|Set-DnsServerPrimaryZone|Set-DnsServerQueryResolutionPolicy|Set-DnsServerRecursion|Set-DnsServerRecursionScope|Set-DnsServerResourceRecord|Set-DnsServerResourceRecordAging|Set-DnsServerResponseRateLimiting|Set-DnsServerResponseRateLimitingExceptionlist|Set-DnsServerRootHint|Set-DnsServerScavenging|Set-DnsServerSecondaryZone|Set-DnsServerSetting|Set-DnsServerSigningKey|Set-DnsServerStubZone|Set-DnsServerVirtualizationInstance|Set-DnsServerZoneAging|Set-DnsServerZoneDelegation|Set-DnsServerZoneTransferPolicy|Show-DnsServerCache|Show-DnsServerKeyStorageProvider|Start-DnsServerScavenging|Start-DnsServerZoneTransfer|Step-DnsServerSigningKeyRollover|Suspend-DnsServerZone|Sync-DnsServerZone|Test-DnsServer|Test-DnsServerDnsSecZoneSetting|Unregister-DnsServerDirectoryPartition|Update-DnsServerTrustPoint|" + + "Add-EtwTraceProvider|Get-AutologgerConfig|Get-EtwTraceProvider|Get-EtwTraceSession|New-AutologgerConfig|New-EtwTraceSession|Remove-AutologgerConfig|Remove-EtwTraceProvider|Save-EtwTraceSession|Send-EtwTraceSession|Set-EtwTraceProvider|Start-EtwTraceSession|Stop-EtwTraceSession|Update-AutologgerConfig|Update-EtwTraceSession|" + + "Add-ClusterCheckpoint|Add-ClusterDisk|Add-ClusterFileServerRole|Add-ClusterGenericApplicationRole|Add-ClusterGenericScriptRole|Add-ClusterGenericServiceRole|Add-ClusterGroup|Add-ClusterGroupSetDependency|Add-ClusterGroupToSet|Add-ClusteriSCSITargetServerRole|Add-ClusterNode|Add-ClusterResource|Add-ClusterResourceDependency|Add-ClusterResourceType|Add-ClusterScaleOutFileServerRole|Add-ClusterSharedVolume|Add-ClusterVirtualMachineRole|Add-ClusterVMMonitoredItem|Block-ClusterAccess|Clear-ClusterDiskReservation|Clear-ClusterNode|Disable-ClusterStorageSpacesDirect|Enable-ClusterStorageSpacesDirect|Get-Cluster|Get-ClusterAccess|Get-ClusterAvailableDisk|Get-ClusterCheckpoint|Get-ClusterDiagnosticInfo|Get-ClusterFaultDomain|Get-ClusterFaultDomainXML|Get-ClusterGroup|Get-ClusterGroupSet|Get-ClusterGroupSetDependency|Get-ClusterLog|Get-ClusterNetwork|Get-ClusterNetworkInterface|Get-ClusterNode|Get-ClusterOwnerNode|Get-ClusterParameter|Get-ClusterQuorum|Get-ClusterResource|Get-ClusterResourceDependency|Get-ClusterResourceDependencyReport|Get-ClusterResourceType|Get-ClusterSharedVolume|Get-ClusterSharedVolumeState|Get-ClusterStorageSpacesDirect|Get-ClusterVMMonitoredItem|Grant-ClusterAccess|Move-ClusterGroup|Move-ClusterResource|Move-ClusterSharedVolume|Move-ClusterVirtualMachineRole|New-Cluster|New-ClusterFaultDomain|New-ClusterGroupSet|New-ClusterNameAccount|Remove-Cluster|Remove-ClusterAccess|Remove-ClusterCheckpoint|Remove-ClusterFaultDomain|Remove-ClusterGroup|Remove-ClusterGroupFromSet|Remove-ClusterGroupSet|Remove-ClusterGroupSetDependency|Remove-ClusterNode|Remove-ClusterResource|Remove-ClusterResourceDependency|Remove-ClusterResourceType|Remove-ClusterSharedVolume|Remove-ClusterVMMonitoredItem|Repair-ClusterStorageSpacesDirect|Reset-ClusterVMMonitoredState|Resume-ClusterNode|Resume-ClusterResource|Set-ClusterFaultDomain|Set-ClusterFaultDomainXML|Set-ClusterGroupSet|Set-ClusterLog|Set-ClusterOwnerNode|Set-ClusterParameter|Set-ClusterQuorum|Set-ClusterResourceDependency|Set-ClusterStorageSpacesDirect|Set-ClusterStorageSpacesDirectDisk|Start-Cluster|Start-ClusterGroup|Start-ClusterNode|Start-ClusterResource|Stop-Cluster|Stop-ClusterGroup|Stop-ClusterNode|Stop-ClusterResource|Suspend-ClusterNode|Suspend-ClusterResource|Test-Cluster|Test-ClusterResourceFailure|Update-ClusterFunctionalLevel|Update-ClusterIPResource|Update-ClusterNetworkNameResource|Update-ClusterVirtualMachineConfiguration|" + + "Get-FsrmAdrSetting|Get-FsrmAutoQuota|Get-FsrmClassification|Get-FsrmClassificationPropertyDefinition|Get-FsrmClassificationRule|Get-FsrmEffectiveNamespace|Get-FsrmFileGroup|Get-FsrmFileManagementJob|Get-FsrmFileScreen|Get-FsrmFileScreenException|Get-FsrmFileScreenTemplate|Get-FsrmMacro|Get-FsrmMgmtProperty|Get-FsrmQuota|Get-FsrmQuotaTemplate|Get-FsrmRmsTemplate|Get-FsrmSetting|Get-FsrmStorageReport|New-FsrmAction|New-FsrmAutoQuota|New-FsrmClassificationPropertyDefinition|New-FsrmClassificationPropertyValue|New-FsrmClassificationRule|New-FsrmFileGroup|New-FsrmFileManagementJob|New-FsrmFileScreen|New-FsrmFileScreenException|New-FsrmFileScreenTemplate|New-FsrmFmjAction|New-FsrmFmjCondition|New-FsrmFMJNotification|New-FsrmFmjNotificationAction|New-FsrmQuota|New-FsrmQuotaTemplate|New-FsrmQuotaThreshold|New-FsrmScheduledTask|New-FsrmStorageReport|Remove-FsrmAutoQuota|Remove-FsrmClassificationPropertyDefinition|Remove-FsrmClassificationRule|Remove-FsrmFileGroup|Remove-FsrmFileManagementJob|Remove-FsrmFileScreen|Remove-FsrmFileScreenException|Remove-FsrmFileScreenTemplate|Remove-FsrmMgmtProperty|Remove-FsrmQuota|Remove-FsrmQuotaTemplate|Remove-FsrmStorageReport|Reset-FsrmFileScreen|Reset-FsrmQuota|Send-FsrmTestEmail|Set-FsrmAdrSetting|Set-FsrmAutoQuota|Set-FsrmClassification|Set-FsrmClassificationPropertyDefinition|Set-FsrmClassificationRule|Set-FsrmFileGroup|Set-FsrmFileManagementJob|Set-FsrmFileScreen|Set-FsrmFileScreenException|Set-FsrmFileScreenTemplate|Set-FsrmMgmtProperty|Set-FsrmQuota|Set-FsrmQuotaTemplate|Set-FsrmSetting|Set-FsrmStorageReport|Start-FsrmClassification|Start-FsrmFileManagementJob|Start-FsrmStorageReport|Stop-FsrmClassification|Stop-FsrmFileManagementJob|Stop-FsrmStorageReport|Update-FsrmAutoQuota|Update-FsrmClassificationPropertyDefinition|Update-FsrmQuota|Wait-FsrmClassification|Wait-FsrmFileManagementJob|Wait-FsrmStorageReport|" + + "Backup-GPO|Copy-GPO|Get-GPInheritance|Get-GPO|Get-GPOReport|Get-GPPermission|Get-GPPrefRegistryValue|Get-GPRegistryValue|Get-GPResultantSetOfPolicy|Get-GPStarterGPO|Import-GPO|Invoke-GPUpdate|New-GPLink|New-GPO|New-GPStarterGPO|Remove-GPLink|Remove-GPO|Remove-GPPrefRegistryValue|Remove-GPRegistryValue|Rename-GPO|Restore-GPO|Set-GPInheritance|Set-GPLink|Set-GPPermission|Set-GPPrefRegistryValue|Set-GPRegistryValue|" + + "Export-HwCertTestCollectionToXml|Import-HwCertTestCollectionFromXml|Merge-HwCertTestCollectionFromPackage|Merge-HwCertTestCollectionFromXml|New-HwCertProjectDefinitionFile|New-HwCertTestCollection|New-HwCertTestCollectionExcelReport|" + + "Add-HgsAttestationCIPolicy|Add-HgsAttestationDumpPolicy|Add-HgsAttestationHostGroup|Add-HgsAttestationTpmHost|Add-HgsAttestationTpmPolicy|Disable-HgsAttestationPolicy|Enable-HgsAttestationPolicy|Get-HgsAttestationHostGroup|Get-HgsAttestationPolicy|Get-HgsAttestationSignerCertificate|Get-HgsAttestationTpmHost|Remove-HgsAttestationHostGroup|Remove-HgsAttestationPolicy|Remove-HgsAttestationTpmHost|" + + "ConvertTo-HgsKeyProtector|Export-HgsGuardian|Get-HgsAttestationBaselinePolicy|Get-HgsClientConfiguration|Get-HgsGuardian|Grant-HgsKeyProtectorAccess|Import-HgsGuardian|New-HgsGuardian|New-HgsKeyProtector|Remove-HgsGuardian|Revoke-HgsKeyProtectorAccess|Set-HgsClientConfiguration|Test-HgsClientConfiguration|" + + "Get-HgsTrace|Get-HgsTraceFileData|New-HgsTraceTarget|Test-HgsTraceTarget|" + + "Add-HgsKeyProtectionAttestationSignerCertificate|Add-HgsKeyProtectionCertificate|Export-HgsKeyProtectionState|Get-HgsKeyProtectionAttestationSignerCertificate|Get-HgsKeyProtectionCertificate|Get-HgsKeyProtectionConfiguration|Import-HgsKeyProtectionState|Remove-HgsKeyProtectionAttestationSignerCertificate|Remove-HgsKeyProtectionCertificate|Set-HgsKeyProtectionAttestationSignerCertificatePolicy|Set-HgsKeyProtectionCertificate|Set-HgsKeyProtectionConfiguration|" + + "Clear-HgsServer|Export-HgsServerState|Get-HgsServer|Import-HgsServerState|Initialize-HgsServer|Install-HgsServer|Set-HgsServer|Test-HgsServer|Uninstall-HgsServer|" + + "Debug-SlbDatapath|Debug-VirtualMachineQueueOperation|Disable-MuxEchoResponder|Enable-MuxEchoResponder|Get-CustomerRoute|Get-NetworkControllerVipResource|Get-PACAMapping|Get-ProviderAddress|Get-VipHostMapping|Get-VMNetworkAdapterPortId|Get-VMSwitchExternalPortId|Test-DipHostReachability|Test-EncapOverheadSettings|Test-LogicalNetworkConnection|Test-LogicalNetworkSupportsJumboPacket|Test-VipReachability|Test-VirtualNetworkConnection|" + + "Get-ComputeProcess|Stop-ComputeProcess|" + + "Add-VMDvdDrive|Add-VMFibreChannelHba|Add-VMGpuPartitionAdapter|Add-VMGroupMember|Add-VMHardDiskDrive|Add-VMMigrationNetwork|Add-VMNetworkAdapter|Add-VMNetworkAdapterAcl|Add-VMNetworkAdapterExtendedAcl|Add-VmNetworkAdapterRoutingDomainMapping|Add-VMRemoteFx3dVideoAdapter|Add-VMScsiController|Add-VMStoragePath|Add-VMSwitch|Add-VMSwitchExtensionPortFeature|Add-VMSwitchExtensionSwitchFeature|Add-VMSwitchTeamMember|Checkpoint-VM|Compare-VM|Complete-VMFailover|Connect-VMNetworkAdapter|Connect-VMSan|Convert-VHD|Copy-VMFile|Debug-VM|Disable-VMConsoleSupport|Disable-VMEventing|Disable-VMIntegrationService|Disable-VMMigration|Disable-VMRemoteFXPhysicalVideoAdapter|Disable-VMResourceMetering|Disable-VMSwitchExtension|Disable-VMTPM|Disconnect-VMNetworkAdapter|Disconnect-VMSan|Dismount-VHD|Enable-VMConsoleSupport|Enable-VMEventing|Enable-VMIntegrationService|Enable-VMMigration|Enable-VMRemoteFXPhysicalVideoAdapter|Enable-VMReplication|Enable-VMResourceMetering|Enable-VMSwitchExtension|Enable-VMTPM|Export-VM|Export-VMSnapshot|Get-VHD|Get-VHDSet|Get-VHDSnapshot|Get-VM|Get-VMBios|Get-VMComPort|Get-VMConnectAccess|Get-VMDvdDrive|Get-VMFibreChannelHba|Get-VMFirmware|Get-VMFloppyDiskDrive|Get-VMGpuPartitionAdapter|Get-VMGroup|Get-VMHardDiskDrive|Get-VMHost|Get-VMHostCluster|Get-VMHostNumaNode|Get-VMHostNumaNodeStatus|Get-VMHostPartitionableGpu|Get-VMHostSupportedVersion|Get-VMIdeController|Get-VMIntegrationService|Get-VMKeyProtector|Get-VMMemory|Get-VMMigrationNetwork|Get-VMNetworkAdapter|Get-VMNetworkAdapterAcl|Get-VMNetworkAdapterExtendedAcl|Get-VMNetworkAdapterFailoverConfiguration|Get-VmNetworkAdapterIsolation|Get-VMNetworkAdapterRoutingDomainMapping|Get-VMNetworkAdapterTeamMapping|Get-VMNetworkAdapterVlan|Get-VMProcessor|Get-VMRemoteFx3dVideoAdapter|Get-VMRemoteFXPhysicalVideoAdapter|Get-VMReplication|Get-VMReplicationAuthorizationEntry|Get-VMReplicationServer|Get-VMResourcePool|Get-VMSan|Get-VMScsiController|Get-VMSecurity|Get-VMSnapshot|Get-VMStoragePath|Get-VMSwitch|Get-VMSwitchExtension|Get-VMSwitchExtensionPortData|Get-VMSwitchExtensionPortFeature|Get-VMSwitchExtensionSwitchData|Get-VMSwitchExtensionSwitchFeature|Get-VMSwitchTeam|Get-VMSystemSwitchExtension|Get-VMSystemSwitchExtensionPortFeature|Get-VMSystemSwitchExtensionSwitchFeature|Get-VMVideo|Grant-VMConnectAccess|Import-VM|Import-VMInitialReplication|Measure-VM|Measure-VMReplication|Measure-VMResourcePool|Merge-VHD|Mount-VHD|Move-VM|Move-VMStorage|New-VFD|New-VHD|New-VM|New-VMGroup|||New-VMReplicationAuthorizationEntry|New-VMResourcePool|New-VMSan|New-VMSwitch|Optimize-VHD|Optimize-VHDSet|Remove-VHDSnapshot|Remove-VM|Remove-VMDvdDrive|Remove-VMFibreChannelHba|Remove-VMGpuPartitionAdapter|Remove-VMGroup|Remove-VMGroupMember|Remove-VMHardDiskDrive|Remove-VMMigrationNetwork|Remove-VMNetworkAdapter|Remove-VMNetworkAdapterAcl|Remove-VMNetworkAdapterExtendedAcl|Remove-VMNetworkAdapterRoutingDomainMapping|Remove-VMNetworkAdapterTeamMapping|Remove-VMRemoteFx3dVideoAdapter|Remove-VMReplication|Remove-VMReplicationAuthorizationEntry|Remove-VMResourcePool|Remove-VMSan|Remove-VMSavedState|Remove-VMScsiController|Remove-VMSnapshot|Remove-VMStoragePath|Remove-VMSwitch|Remove-VMSwitchExtensionPortFeature|Remove-VMSwitchExtensionSwitchFeature|Remove-VMSwitchTeamMember|Rename-VM|Rename-VMGroup|Rename-VMNetworkAdapter|Rename-VMResourcePool|Rename-VMSan|Rename-VMSnapshot|Rename-VMSwitch|Repair-VM|Reset-VMReplicationStatistics|Reset-VMResourceMetering|Resize-VHD|Restart-VM|Restore-VMSnapshot|Resume-VM|Resume-VMReplication|Revoke-VMConnectAccess|Save-VM|Set-VHD|Set-VM|Set-VMBios|Set-VMComPort|Set-VMDvdDrive|Set-VMFibreChannelHba|Set-VMFirmware|Set-VMFloppyDiskDrive|Set-VMGpuPartitionAdapter|Set-VMHardDiskDrive|Set-VMHost|Set-VMHostCluster|Set-VMHostPartitionableGpu|Set-VMKeyProtector|Set-VMMemory|Set-VMMigrationNetwork|Set-VMNetworkAdapter|Set-VMNetworkAdapterFailoverConfiguration|Set-VmNetworkAdapterIsolation|Set-VmNetworkAdapterRoutingDomainMapping|Set-VMNetworkAdapterTeamMapping|Set-VMNetworkAdapterVlan|Set-VMProcessor|Set-VMRemoteFx3dVideoAdapter|Set-VMReplication|Set-VMReplicationAuthorizationEntry|Set-VMReplicationServer|Set-VMResourcePool|Set-VMSan|Set-VMSecurity|Set-VMSecurityPolicy|Set-VMSwitch|Set-VMSwitchExtensionPortFeature|Set-VMSwitchExtensionSwitchFeature|Set-VMSwitchTeam|Set-VMVideo|Start-VM|Start-VMFailover|Start-VMInitialReplication|Start-VMTrace|Stop-VM|Stop-VMFailover|Stop-VMInitialReplication|Stop-VMReplication|Stop-VMTrace|Suspend-VM|Suspend-VMReplication|Test-VHD|Test-VMNetworkAdapter|Test-VMReplicationConnection|Update-VMVersion|" + + "Clear-IISCentralCertProvider|Clear-IISConfigCollection|Disable-IISCentralCertProvider|Disable-IISSharedConfig|Enable-IISCentralCertProvider|Enable-IISSharedConfig|Export-IISConfiguration|Get-IISAppPool|Get-IISCentralCertProvider|Get-IISConfigAttributeValue|Get-IISConfigCollection|Get-IISConfigCollectionElement|Get-IISConfigElement|Get-IISConfigSection|Get-IISServerManager|Get-IISSharedConfig|Get-IISSite|Get-IISSiteBinding|New-IISConfigCollectionElement|New-IISSite|New-IISSiteBinding|Remove-IISConfigAttribute|Remove-IISConfigCollectionElement|Remove-IISConfigElement|Remove-IISSite|Remove-IISSiteBinding|Reset-IISServerManager|Set-IISCentralCertProvider|Set-IISCentralCertProviderCredential|Set-IISConfigAttributeValue|Start-IISCommitDelay|Start-IISSite|Stop-IISCommitDelay|Stop-IISSite|" + + "Copy-UserInternationalSettingsToSystem|Get-WinAcceptLanguageFromLanguageListOptOut|Get-WinCultureFromLanguageListOptOut|Get-WinDefaultInputMethodOverride|Get-WinHomeLocation|Get-WinLanguageBarOption|Get-WinSystemLocale|Get-WinUILanguageOverride|Get-WinUserLanguageList|New-WinUserLanguageList|Set-Culture|Set-WinAcceptLanguageFromLanguageListOptOut|Set-WinCultureFromLanguageListOptOut|Set-WinDefaultInputMethodOverride|Set-WinHomeLocation|Set-WinLanguageBarOption|Set-WinSystemLocale|Set-WinUILanguageOverride|Set-WinUserLanguageList|" + + "Add-IpamAddress|Add-IpamAddressSpace|Add-IpamBlock|Add-IpamCustomField|Add-IpamCustomFieldAssociation|Add-IpamCustomValue|Add-IpamDiscoveryDomain|" + + "Connect-IscsiTarget|Disconnect-IscsiTarget|Get-IscsiConnection|Get-IscsiSession|Get-IscsiTarget|Get-IscsiTargetPortal|New-IscsiTargetPortal|Register-IscsiSession|Remove-IscsiTargetPortal|Set-IscsiChapSecret|Unregister-IscsiSession|Update-IscsiTarget|Update-IscsiTargetPortal|" + + "Add-IscsiVirtualDiskTargetMapping|Checkpoint-IscsiVirtualDisk|Convert-IscsiVirtualDisk|Dismount-IscsiVirtualDiskSnapshot|Export-IscsiTargetServerConfiguration|Export-IscsiVirtualDiskSnapshot|Get-IscsiServerTarget|Get-IscsiTargetServerSetting|Get-IscsiVirtualDisk|Get-IscsiVirtualDiskSnapshot|Import-IscsiTargetServerConfiguration|Import-IscsiVirtualDisk|Mount-IscsiVirtualDiskSnapshot|New-IscsiServerTarget|New-IscsiVirtualDisk|Remove-IscsiServerTarget|Remove-IscsiVirtualDisk|Remove-IscsiVirtualDiskSnapshot|Remove-IscsiVirtualDiskTargetMapping|Resize-IscsiVirtualDisk|Restore-IscsiVirtualDisk|Set-IscsiServerTarget|Set-IscsiTargetServerSetting|Set-IscsiVirtualDisk|Set-IscsiVirtualDiskSnapshot|Stop-IscsiVirtualDiskOperation|" + + "Get-IseSnippet|Import-IseSnippet|New-IseSnippet|" + + "Add-KdsRootKey|Clear-KdsCache|Get-KdsConfiguration|Get-KdsRootKey|Set-KdsConfiguration|Test-KdsRootKey|" + + "Get-InstalledLanguage|Get-SystemPreferredUILanguage|Install-Language|Set-SystemPreferredUILanguage|Uninstall-Language|" + + "Find-LapsADExtendedRights|Get-LapsAADPassword|Get-LapsADPassword|Get-LapsDiagnostics|Invoke-LapsPolicyProcessing|Reset-LapsPassword|Set-LapsADAuditing|Set-LapsADComputerSelfPermission|Set-LapsADPasswordExpirationTime|Set-LapsADReadPasswordPermission|Set-LapsADResetPasswordPermission|Update-LapsADSchema|" + + "Disable-DiagnosticDataViewing|Enable-DiagnosticDataViewing|Get-DiagnosticData|Get-DiagnosticDataTypes|Get-DiagnosticDataViewingSetting|Get-DiagnosticStoreCapacity|Set-DiagnosticStoreCapacity|" + + "Compress-Archive|Expand-Archive|" + + "Export-Counter|Get-Counter|Get-WinEvent|Import-Counter|New-WinEvent|" + + "Start-Transcript|Stop-Transcript|" + + "Add-Computer|Add-Content|Checkpoint-Computer|Clear-Content|Clear-EventLog|Clear-Item|Clear-ItemProperty|Clear-RecycleBin|Complete-Transaction|Convert-Path|Copy-Item|Copy-ItemProperty|Debug-Process|Disable-ComputerRestore|Enable-ComputerRestore|Get-ChildItem|Get-Clipboard|Get-ComputerRestorePoint|Get-Content|Get-ControlPanelItem|Get-EventLog|Get-HotFix|Get-Item|Get-ItemProperty|Get-ItemPropertyValue|Get-Location|Get-Process|Get-PSDrive|Get-PSProvider|Get-Service|Get-Transaction|Get-WmiObject|Invoke-Item|Invoke-WmiMethod|Join-Path|Limit-EventLog|Move-Item|Move-ItemProperty|New-EventLog|New-Item|New-ItemProperty|New-PSDrive|New-Service|New-WebServiceProxy|Pop-Location|Push-Location|Register-WmiEvent|Remove-Computer|Remove-EventLog|Remove-Item|Remove-ItemProperty|Remove-PSDrive|Remove-WmiObject|Rename-Computer|Rename-Item|Rename-ItemProperty|Reset-ComputerMachinePassword|Resolve-Path|Restart-Computer|Restart-Service|Restore-Computer|Resume-Service|Set-Clipboard|Set-Content|Set-Item|Set-ItemProperty|Set-Location|Set-Service|Set-WmiInstance|Show-ControlPanelItem|Show-EventLog|Split-Path|Start-Process|Start-Service|Start-Transaction|Stop-Computer|Stop-Process|Stop-Service|Suspend-Service|Test-ComputerSecureChannel|Test-Connection|Test-Path|Undo-Transaction|Use-Transaction|Wait-Process|Write-EventLog|" + + "Export-ODataEndpointProxy|" + + "ConvertFrom-SecureString|ConvertTo-SecureString|Get-Acl|Get-AuthenticodeSignature|Get-CmsMessage|Get-Credential|Get-ExecutionPolicy|Get-PfxCertificate|Protect-CmsMessage|Set-Acl|Set-AuthenticodeSignature|Set-ExecutionPolicy|Unprotect-CmsMessage|" + + "ConvertFrom-SddlString|Format-Hex|Get-FileHash|Import-PowerShellDataFile|New-Guid|New-TemporaryFile|Add-Member|Add-Type|Clear-Variable|Compare-Object|ConvertFrom-Csv|ConvertFrom-Json|ConvertFrom-String|ConvertFrom-StringData|Convert-String|ConvertTo-Csv|ConvertTo-Html|ConvertTo-Json|ConvertTo-Xml|Debug-Runspace|Disable-PSBreakpoint|Disable-RunspaceDebug|Enable-PSBreakpoint|Enable-RunspaceDebug|Export-Alias|Export-Clixml|Export-Csv|Export-FormatData|Export-PSSession|Format-Custom|Format-List|Format-Table|Format-Wide|Get-Alias|Get-Culture|Get-Date|Get-Event|Get-EventSubscriber|Get-FormatData|Get-Host|Get-Member|Get-PSBreakpoint|Get-PSCallStack|Get-Random|Get-Runspace|Get-RunspaceDebug|Get-TraceSource|Get-TypeData|Get-UICulture|Get-Unique|Get-Variable|Group-Object|Import-Alias|Import-Clixml|Import-Csv|Import-LocalizedData|Import-PSSession|Invoke-Expression|Invoke-RestMethod|Invoke-WebRequest|Measure-Command|Measure-Object|New-Alias|New-Event|New-Object|New-TimeSpan|New-Variable|Out-File|Out-GridView|Out-Printer|Out-String|Read-Host|Register-EngineEvent|Register-ObjectEvent|Remove-Event|Remove-PSBreakpoint|Remove-TypeData|Remove-Variable|Select-Object|Select-String|Select-Xml|Send-MailMessage|Set-Alias|Set-Date|Set-PSBreakpoint|Set-TraceSource|Set-Variable|Show-Command|Sort-Object|Start-Sleep|Tee-Object|Trace-Command|Unblock-File|Unregister-Event|Update-FormatData|Update-List|Update-TypeData|Wait-Debugger|Wait-Event|Write-Debug|Write-Error|Write-Host|Write-Information|Write-Output|Write-Progress|Write-Verbose|Write-Warning|" + + "Connect-WSMan|Disable-WSManCredSSP|Disconnect-WSMan|Enable-WSManCredSSP|Get-WSManCredSSP|Get-WSManInstance|Invoke-WSManAction|New-WSManInstance|New-WSManSessionOption|Remove-WSManInstance|Set-WSManInstance|Set-WSManQuickConfig|Test-WSMan|" + + "Debug-MMAppPrelaunch|Disable-MMAgent|Enable-MMAgent|Get-MMAgent|Set-MMAgent|" + + "Clear-MSDSMSupportedHW|Disable-MSDSMAutomaticClaim|Enable-MSDSMAutomaticClaim|Get-MPIOAvailableHW|Get-MPIOSetting|Get-MSDSMAutomaticClaimSettings|Get-MSDSMGlobalDefaultLoadBalancePolicy|Get-MSDSMSupportedHW|New-MSDSMSupportedHW|Remove-MSDSMSupportedHW|Set-MPIOSetting|Set-MSDSMGlobalDefaultLoadBalancePolicy|Update-MPIOClaimedHW|" + + "Add-DtcClusterTMMapping|Complete-DtcDiagnosticTransaction|Get-Dtc|Get-DtcAdvancedHostSetting|Get-DtcAdvancedSetting|Get-DtcClusterDefault|Get-DtcClusterTMMapping|Get-DtcDefault|Get-DtcLog|Get-DtcNetworkSetting|Get-DtcTransaction|Get-DtcTransactionsStatistics|Get-DtcTransactionsTraceSession|Get-DtcTransactionsTraceSetting|Install-Dtc|Join-DtcDiagnosticResourceManager|New-DtcDiagnosticTransaction|Receive-DtcDiagnosticTransaction|Remove-DtcClusterTMMapping|Reset-DtcLog|Send-DtcDiagnosticTransaction|Set-DtcAdvancedHostSetting|Set-DtcAdvancedSetting|Set-DtcClusterDefault|Set-DtcClusterTMMapping|Set-DtcDefault|Set-DtcLog|Set-DtcNetworkSetting|Set-DtcTransaction|Set-DtcTransactionsTraceSession|Set-DtcTransactionsTraceSetting|Start-Dtc|Start-DtcDiagnosticResourceManager|Start-DtcTransactionsTraceSession|Stop-Dtc|Stop-DtcDiagnosticResourceManager|Stop-DtcTransactionsTraceSession|Test-Dtc|Undo-DtcDiagnosticTransaction|Uninstall-Dtc|Write-DtcTransactionsTraceSession|" + + "Clear-MSMQOutgoingQueue|Clear-MSMQQueue|Enable-MSMQCertificate|Get-MSMQCertificate|Get-MSMQOutgoingQueue|Get-MsmqQueue|Get-MsmqQueueACL|Get-MsmqQueueManager|Get-MsmqQueueManagerACL|Move-MsmqMessage|New-MsmqMessage|New-MsmqQueue|Receive-MsmqQueue|Remove-MsmqCertificate|Remove-MsmqQueue|Resume-MsmqOutgoingQueue|Send-MsmqQueue|Set-MsmqQueue|Set-MsmqQueueACL|Set-MsmqQueueManager|Set-MsmqQueueManagerACL|Suspend-MsmqOutgoingQueue|" + + "Add-WmsSystem|Clear-WmsStation|Close-WmsApp|Close-WmsSession|Disable-WmsDiskProtection|Disable-WmsScheduledUpdate|Disable-WmsWebLimiting|Disconnect-WmsSession|Enable-WmsDiskProtection|Enable-WmsScheduledUpdate|Enable-WmsWebLimiting|Get-WmsAlert|Get-WmsApp|Get-WmsDiskProtection|Get-WmsScheduledUpdate|Get-WmsSession|Get-WmsStation|Get-WmsSystem|Get-WmsUser|Get-WmsVersion|Get-WmsWebLimiting|Hide-WmsIdentifier|Join-WmsStation|Lock-WmsSession|Lock-WmsUsbStorage|New-WmsUser|Open-WmsApp|Publish-WmsDesktop|Remove-WmsSystem|Remove-WmsUser|Restart-WmsSystem|Resume-WmsDiskProtection|Search-WmsSystem|Set-WmsScheduledUpdate|Set-WmsStation|Set-WmsSystem|Set-WmsUser|Set-WmsWebLimiting|Show-WmsDesktop|Show-WmsIdentifier|Split-WmsStation|Stop-WmsSystem|Suspend-WmsDiskProtection|Unlock-WmsSession|Unlock-WmsUsbStorage|Unpublish-WmsDesktop|Update-WmsStation|" + + "Disable-WmsVirtualDesktopRole|Enable-WmsVirtualDesktopRole|Get-WmsVirtualDesktop|Import-WmsVirtualDesktop|New-WmsVirtualDesktop|New-WmsVirtualDesktopTemplate|Open-WmsVirtualDesktop|" + + "Edit-NanoServerImage|Get-NanoServerPackage|New-NanoServerImage|" + + "Disable-NetAdapter|Disable-NetAdapterBinding|Disable-NetAdapterChecksumOffload|Disable-NetAdapterEncapsulatedPacketTaskOffload|Disable-NetAdapterIPsecOffload|Disable-NetAdapterLso|Disable-NetAdapterPowerManagement|Disable-NetAdapterQos|Disable-NetAdapterRdma|Disable-NetAdapterRsc|Disable-NetAdapterRss|Disable-NetAdapterSriov|Disable-NetAdapterUso|Disable-NetAdapterVmq|Enable-NetAdapter|Enable-NetAdapterBinding|Enable-NetAdapterChecksumOffload|Enable-NetAdapterEncapsulatedPacketTaskOffload|Enable-NetAdapterIPsecOffload|Enable-NetAdapterLso|Enable-NetAdapterPowerManagement|Enable-NetAdapterQos|Enable-NetAdapterRdma|Enable-NetAdapterRsc|Enable-NetAdapterRss|Enable-NetAdapterSriov|Enable-NetAdapterUso|Enable-NetAdapterVmq|Get-NetAdapter|Get-NetAdapterAdvancedProperty|Get-NetAdapterBinding|Get-NetAdapterChecksumOffload|Get-NetAdapterDataPathConfiguration|Get-NetAdapterEncapsulatedPacketTaskOffload|Get-NetAdapterHardwareInfo|Get-NetAdapterIPsecOffload|Get-NetAdapterLso|Get-NetAdapterPowerManagement|Get-NetAdapterQos|Get-NetAdapterRdma|Get-NetAdapterRsc|Get-NetAdapterRss|Get-NetAdapterSriov|Get-NetAdapterSriovVf|Get-NetAdapterStatistics|Get-NetAdapterUso|Get-NetAdapterVmq|Get-NetAdapterVmqQueue|Get-NetAdapterVPort|New-NetAdapterAdvancedProperty|Remove-NetAdapterAdvancedProperty|Rename-NetAdapter|Reset-NetAdapterAdvancedProperty|Restart-NetAdapter|Set-NetAdapter|Set-NetAdapterAdvancedProperty|Set-NetAdapterBinding|Set-NetAdapterChecksumOffload|Set-NetAdapterDataPathConfiguration|Set-NetAdapterEncapsulatedPacketTaskOffload|Set-NetAdapterIPsecOffload|Set-NetAdapterLso|Set-NetAdapterPowerManagement|Set-NetAdapterQos|Set-NetAdapterRdma|Set-NetAdapterRsc|Set-NetAdapterRss|Set-NetAdapterSriov|Set-NetAdapterUso|Set-NetAdapterVmq|" + + "Get-NetConnectionProfile|Set-NetConnectionProfile|" + + "Add-NetEventNetworkAdapter|Add-NetEventPacketCaptureProvider|Add-NetEventProvider|Add-NetEventVFPProvider|Add-NetEventVmNetworkAdapter|Add-NetEventVmSwitch|Add-NetEventVmSwitchProvider|Add-NetEventWFPCaptureProvider|Get-NetEventNetworkAdapter|Get-NetEventPacketCaptureProvider|Get-NetEventProvider|Get-NetEventSession|Get-NetEventVFPProvider|Get-NetEventVmNetworkAdapter|Get-NetEventVmSwitch|Get-NetEventVmSwitchProvider|Get-NetEventWFPCaptureProvider|New-NetEventSession|Remove-NetEventNetworkAdapter|Remove-NetEventPacketCaptureProvider|Remove-NetEventProvider|Remove-NetEventSession|Remove-NetEventVFPProvider|Remove-NetEventVmNetworkAdapter|Remove-NetEventVmSwitch|Remove-NetEventVmSwitchProvider|Remove-NetEventWFPCaptureProvider|Set-NetEventPacketCaptureProvider|Set-NetEventProvider|Set-NetEventSession|Set-NetEventVFPProvider|Set-NetEventVmSwitchProvider|Set-NetEventWFPCaptureProvider|Start-NetEventSession|Stop-NetEventSession|" + + "Add-NetLbfoTeamMember|Add-NetLbfoTeamNic|Get-NetLbfoTeam|Get-NetLbfoTeamMember|Get-NetLbfoTeamNic|New-NetLbfoTeam|Remove-NetLbfoTeam|Remove-NetLbfoTeamMember|Remove-NetLbfoTeamNic|Rename-NetLbfoTeam|Set-NetLbfoTeam|Set-NetLbfoTeamMember|Set-NetLbfoTeamNic|" + + "Disable-NetLldpAgent|Enable-NetLldpAgent|Get-NetLldpAgent|" + + "Add-NetNatExternalAddress|Add-NetNatStaticMapping|Get-NetNat|Get-NetNatExternalAddress|Get-NetNatGlobal|Get-NetNatSession|Get-NetNatStaticMapping|New-NetNat|Remove-NetNat|Remove-NetNatExternalAddress|Remove-NetNatStaticMapping|Set-NetNat|Set-NetNatGlobal|" + + "Get-NetQosPolicy|New-NetQosPolicy|Remove-NetQosPolicy|Set-NetQosPolicy|" + + "Copy-NetFirewallRule|Copy-NetIPsecMainModeCryptoSet|Copy-NetIPsecMainModeRule|Copy-NetIPsecPhase1AuthSet|Copy-NetIPsecPhase2AuthSet|Copy-NetIPsecQuickModeCryptoSet|Copy-NetIPsecRule|Disable-NetFirewallRule|Disable-NetIPsecMainModeRule|Disable-NetIPsecRule|Enable-NetFirewallRule|Enable-NetIPsecMainModeRule|Enable-NetIPsecRule|Find-NetIPsecRule|Get-DAPolicyChange|Get-NetFirewallAddressFilter|Get-NetFirewallApplicationFilter|Get-NetFirewallDynamicKeywordAddress|Get-NetFirewallInterfaceFilter|Get-NetFirewallInterfaceTypeFilter|Get-NetFirewallPortFilter|Get-NetFirewallProfile|Get-NetFirewallRule|Get-NetFirewallSecurityFilter|Get-NetFirewallServiceFilter|Get-NetFirewallSetting|Get-NetIPsecDospSetting|Get-NetIPsecMainModeCryptoSet|Get-NetIPsecMainModeRule|Get-NetIPsecMainModeSA|Get-NetIPsecPhase1AuthSet|Get-NetIPsecPhase2AuthSet|Get-NetIPsecQuickModeCryptoSet|Get-NetIPsecQuickModeSA|Get-NetIPsecRule|New-NetFirewallDynamicKeywordAddress|New-NetFirewallRule|New-NetIPsecAuthProposal|New-NetIPsecDospSetting|New-NetIPsecMainModeCryptoProposal|New-NetIPsecMainModeCryptoSet|New-NetIPsecMainModeRule|New-NetIPsecPhase1AuthSet|New-NetIPsecPhase2AuthSet|New-NetIPsecQuickModeCryptoProposal|New-NetIPsecQuickModeCryptoSet|New-NetIPsecRule|Open-NetGPO|Remove-NetFirewallDynamicKeywordAddress|Remove-NetFirewallRule|Remove-NetIPsecDospSetting|Remove-NetIPsecMainModeCryptoSet|Remove-NetIPsecMainModeRule|Remove-NetIPsecMainModeSA|Remove-NetIPsecPhase1AuthSet|Remove-NetIPsecPhase2AuthSet|Remove-NetIPsecQuickModeCryptoSet|Remove-NetIPsecQuickModeSA|Remove-NetIPsecRule|Rename-NetFirewallRule|Rename-NetIPsecMainModeCryptoSet|Rename-NetIPsecMainModeRule|Rename-NetIPsecPhase1AuthSet|Rename-NetIPsecPhase2AuthSet|Rename-NetIPsecQuickModeCryptoSet|Rename-NetIPsecRule|Save-NetGPO|Set-NetFirewallAddressFilter|Set-NetFirewallApplicationFilter|Set-NetFirewallInterfaceFilter|Set-NetFirewallInterfaceTypeFilter|Set-NetFirewallPortFilter|Set-NetFirewallProfile|Set-NetFirewallRule|Set-NetFirewallSecurityFilter|Set-NetFirewallServiceFilter|Set-NetFirewallSetting|Set-NetIPsecDospSetting|Set-NetIPsecMainModeCryptoSet|Set-NetIPsecMainModeRule|Set-NetIPsecPhase1AuthSet|Set-NetIPsecPhase2AuthSet|Set-NetIPsecQuickModeCryptoSet|Set-NetIPsecRule|Show-NetFirewallRule|Show-NetIPsecRule|Sync-NetIPsecRule|Update-NetFirewallDynamicKeywordAddress|Update-NetIPsecRule|" + + "Add-NetSwitchTeamMember|Get-NetSwitchTeam|Get-NetSwitchTeamMember|New-NetSwitchTeam|Remove-NetSwitchTeam|Remove-NetSwitchTeamMember|Rename-NetSwitchTeam|" + + "Find-NetRoute|Get-NetCompartment|Get-NetIPAddress|Get-NetIPConfiguration|Get-NetIPInterface|Get-NetIPv4Protocol|Get-NetIPv6Protocol|Get-NetNeighbor|Get-NetOffloadGlobalSetting|Get-NetPrefixPolicy|Get-NetRoute|Get-NetTCPConnection|Get-NetTCPSetting|Get-NetTransportFilter|Get-NetUDPEndpoint|Get-NetUDPSetting|New-NetIPAddress|New-NetNeighbor|New-NetRoute|New-NetTransportFilter|Remove-NetIPAddress|Remove-NetNeighbor|Remove-NetRoute|Remove-NetTransportFilter|Set-NetIPAddress|Set-NetIPInterface|Set-NetIPv4Protocol|Set-NetIPv6Protocol|Set-NetNeighbor|Set-NetOffloadGlobalSetting|Set-NetRoute|Set-NetTCPSetting|Set-NetUDPSetting|Test-NetConnection|" + + "Get-NetVirtualizationCustomerRoute|Get-NetVirtualizationGlobal|Get-NetVirtualizationLookupRecord|Get-NetVirtualizationProviderAddress|Get-NetVirtualizationProviderRoute|New-NetVirtualizationCustomerRoute|New-NetVirtualizationLookupRecord|New-NetVirtualizationProviderAddress|New-NetVirtualizationProviderRoute|Remove-NetVirtualizationCustomerRoute|Remove-NetVirtualizationLookupRecord|Remove-NetVirtualizationProviderAddress|Remove-NetVirtualizationProviderRoute|Select-NetVirtualizationNextHop|Set-NetVirtualizationCustomerRoute|Set-NetVirtualizationGlobal|Set-NetVirtualizationLookupRecord|Set-NetVirtualizationProviderAddress|Set-NetVirtualizationProviderRoute|" + + "Get-DAConnectionStatus|Get-NCSIPolicyConfiguration|Reset-NCSIPolicyConfiguration|Set-NCSIPolicyConfiguration|" + + "Add-NetworkControllerNode|Clear-NetworkControllerNodeContent|Disable-NetworkControllerNode|Enable-NetworkControllerNode|Get-NetworkController|Get-NetworkControllerAccessControlList|Get-NetworkControllerAccessControlListRule|Get-NetworkControllerAuditingSettingsConfiguration|Get-NetworkControllerBackup|Get-NetworkControllerCluster|Get-NetworkControllerConnectivityCheck|Get-NetworkControllerConnectivityCheckResult|Get-NetworkControllerCredential|Get-NetworkControllerDiagnostic|Get-NetworkControllerDiscovery|Get-NetworkControllerFabricRoute|Get-NetworkControllerGateway|Get-NetworkControllerGatewayPool|Get-NetworkControllerIDnsServerConfiguration|Get-NetworkControllerInternalResourceInstances|Get-NetworkControllerIpPool|Get-NetworkControllerIpReservation|Get-NetworkControllerLoadBalancer|Get-NetworkControllerLoadBalancerBackendAddressPool|Get-NetworkControllerLoadBalancerConfiguration|Get-NetworkControllerLoadBalancerFrontendIpConfiguration|Get-NetworkControllerLoadBalancerInboundNatRule|Get-NetworkControllerLoadBalancerMux|Get-NetworkControllerLoadBalancerOutboundNatRule|Get-NetworkControllerLoadBalancerProbe|Get-NetworkControllerLoadBalancingRule|Get-NetworkControllerLogicalNetwork|Get-NetworkControllerLogicalSubnet|Get-NetworkControllerMacPool|Get-NetworkControllerNetworkInterface|Get-NetworkControllerNetworkInterfaceIpConfiguration|Get-NetworkControllerNode|Get-NetworkControllerPublicIpAddress|Get-NetworkControllerRestore|Get-NetworkControllerRoute|Get-NetworkControllerRouteTable|Get-NetworkControllerServer|Get-NetworkControllerServerInterface|Get-NetworkControllerServiceInsertion|Get-NetworkControllerState|Get-NetworkControllerStatistics|Get-NetworkControllerSubnetEgressReset|Get-NetworkControllerVirtualGateway|Get-NetworkControllerVirtualGatewayBgpPeer|Get-NetworkControllerVirtualGatewayBgpRouter|Get-NetworkControllerVirtualGatewayNetworkConnection|Get-NetworkControllerVirtualGatewayPolicyMap|Get-NetworkControllerVirtualNetwork|Get-NetworkControllerVirtualNetworkConfiguration|Get-NetworkControllerVirtualNetworkPeering|Get-NetworkControllerVirtualServer|Get-NetworkControllerVirtualSubnet|Get-NetworkControllerVirtualSwitchConfiguration|Install-NetworkController|Install-NetworkControllerCluster|Invoke-NetworkControllerConnectivityCheck|Invoke-NetworkControllerState|Invoke-NetworkControllerSubnetEgressReset|New-NetworkControllerAccessControlList|New-NetworkControllerAccessControlListRule|New-NetworkControllerBackup|New-NetworkControllerCredential|New-NetworkControllerFabricRoute|New-NetworkControllerGateway|New-NetworkControllerGatewayPool|New-NetworkControllerIDnsServerConfiguration|New-NetworkControllerIpPool|New-NetworkControllerIpReservation|New-NetworkControllerLoadBalancer|New-NetworkControllerLoadBalancerBackendAddressPool|New-NetworkControllerLoadBalancerConfiguration|New-NetworkControllerLoadBalancerFrontendIpConfiguration|New-NetworkControllerLoadBalancerInboundNatRule|New-NetworkControllerLoadBalancerMux|New-NetworkControllerLoadBalancerOutboundNatRule|New-NetworkControllerLoadBalancerProbe|New-NetworkControllerLoadBalancingRule|New-NetworkControllerLogicalNetwork|New-NetworkControllerLogicalSubnet|New-NetworkControllerMacPool|New-NetworkControllerNetworkInterface|New-NetworkControllerNetworkInterfaceIpConfiguration|New-NetworkControllerNodeObject|New-NetworkControllerPublicIpAddress|New-NetworkControllerRestore|New-NetworkControllerRoute|New-NetworkControllerRouteTable|New-NetworkControllerServer|New-NetworkControllerServerInterface|New-NetworkControllerServiceInsertion|New-NetworkControllerVirtualGateway|New-NetworkControllerVirtualGatewayBgpPeer|New-NetworkControllerVirtualGatewayBgpRouter|New-NetworkControllerVirtualGatewayNetworkConnection|New-NetworkControllerVirtualGatewayPolicyMap|New-NetworkControllerVirtualNetwork|New-NetworkControllerVirtualNetworkPeering|New-NetworkControllerVirtualServer|New-NetworkControllerVirtualSubnet|Remove-NetworkControllerAccessControlList|Remove-NetworkControllerAccessControlListRule|Remove-NetworkControllerBackup|Remove-NetworkControllerCredential|Remove-NetworkControllerFabricRoute|Remove-NetworkControllerGateway|Remove-NetworkControllerGatewayPool|Remove-NetworkControllerIpPool|Remove-NetworkControllerIpReservation|Remove-NetworkControllerLoadBalancer|Remove-NetworkControllerLoadBalancerBackendAddressPool|Remove-NetworkControllerLoadBalancerConfiguration|Remove-NetworkControllerLoadBalancerFrontendIpConfiguration|Remove-NetworkControllerLoadBalancerInboundNatRule|Remove-NetworkControllerLoadBalancerMux|Remove-NetworkControllerLoadBalancerOutboundNatRule|Remove-NetworkControllerLoadBalancerProbe|Remove-NetworkControllerLoadBalancingRule|Remove-NetworkControllerLogicalNetwork|Remove-NetworkControllerLogicalSubnet|Remove-NetworkControllerMacPool|Remove-NetworkControllerNetworkInterface|Remove-NetworkControllerNetworkInterfaceIpConfiguration|Remove-NetworkControllerNode|Remove-NetworkControllerPublicIpAddress|Remove-NetworkControllerRestore|Remove-NetworkControllerRoute|Remove-NetworkControllerRouteTable|Remove-NetworkControllerServer|Remove-NetworkControllerServerInterface|Remove-NetworkControllerServiceInsertion|Remove-NetworkControllerVirtualGateway|Remove-NetworkControllerVirtualGatewayBgpPeer|Remove-NetworkControllerVirtualGatewayBgpRouter|Remove-NetworkControllerVirtualGatewayNetworkConnection|Remove-NetworkControllerVirtualGatewayPolicyMap|Remove-NetworkControllerVirtualNetwork|Remove-NetworkControllerVirtualNetworkPeering|Remove-NetworkControllerVirtualServer|Remove-NetworkControllerVirtualSubnet|Repair-NetworkControllerCluster|Set-NetworkController|Set-NetworkControllerAuditingSettingsConfiguration|Set-NetworkControllerCluster|Set-NetworkControllerDiagnostic|Set-NetworkControllerNode|Set-NetworkControllerVirtualNetworkConfiguration|Set-NetworkControllerVirtualSwitchConfiguration|Uninstall-NetworkController|Uninstall-NetworkControllerCluster|Update-NetworkController|" + + "Debug-NetworkController|Debug-NetworkControllerConfigurationState|Debug-ServiceFabricNodeStatus|Get-NetworkControllerDeploymentInfo|Get-NetworkControllerManagedDevices|Get-NetworkControllerReplica|" + + "Add-NlbClusterNode|Add-NlbClusterNodeDip|Add-NlbClusterPortRule|Add-NlbClusterVip|Disable-NlbClusterPortRule|Enable-NlbClusterPortRule|Get-NlbCluster|Get-NlbClusterDriverInfo|Get-NlbClusterNode|Get-NlbClusterNodeDip|Get-NlbClusterNodeNetworkInterface|Get-NlbClusterPortRule|Get-NlbClusterVip|New-NlbCluster|New-NlbClusterIpv6Address|Remove-NlbCluster|Remove-NlbClusterNode|Remove-NlbClusterNodeDip|Remove-NlbClusterPortRule|Remove-NlbClusterVip|Resume-NlbCluster|Resume-NlbClusterNode|Set-NlbCluster|Set-NlbClusterNode|Set-NlbClusterNodeDip|Set-NlbClusterPortRule|Set-NlbClusterPortRuleNodeHandlingPriority|Set-NlbClusterPortRuleNodeWeight|Set-NlbClusterVip|Start-NlbCluster|Start-NlbClusterNode|Stop-NlbCluster|Stop-NlbClusterNode|Suspend-NlbCluster|Suspend-NlbClusterNode|" + + "Disable-NetworkSwitchEthernetPort|Disable-NetworkSwitchFeature|Disable-NetworkSwitchVlan|Enable-NetworkSwitchEthernetPort|Enable-NetworkSwitchFeature|Enable-NetworkSwitchVlan|Get-NetworkSwitchEthernetPort|Get-NetworkSwitchFeature|Get-NetworkSwitchGlobalData|Get-NetworkSwitchVlan|New-NetworkSwitchVlan|Remove-NetworkSwitchEthernetPortIPAddress|Remove-NetworkSwitchVlan|Restore-NetworkSwitchConfiguration|Save-NetworkSwitchConfiguration|Set-NetworkSwitchEthernetPortIPAddress|Set-NetworkSwitchPortMode|Set-NetworkSwitchPortProperty|Set-NetworkSwitchVlanProperty|" + + "Add-NetIPHttpsCertBinding|Disable-NetDnsTransitionConfiguration|Disable-NetIPHttpsProfile|Disable-NetNatTransitionConfiguration|Enable-NetDnsTransitionConfiguration|Enable-NetIPHttpsProfile|Enable-NetNatTransitionConfiguration|Get-Net6to4Configuration|Get-NetDnsTransitionConfiguration|Get-NetDnsTransitionMonitoring|Get-NetIPHttpsConfiguration|Get-NetIPHttpsState|Get-NetIsatapConfiguration|Get-NetNatTransitionConfiguration|Get-NetNatTransitionMonitoring|Get-NetTeredoConfiguration|Get-NetTeredoState|New-NetIPHttpsConfiguration|New-NetNatTransitionConfiguration|Remove-NetIPHttpsCertBinding|Remove-NetIPHttpsConfiguration|Remove-NetNatTransitionConfiguration|Rename-NetIPHttpsConfiguration|Reset-Net6to4Configuration|Reset-NetDnsTransitionConfiguration|Reset-NetIPHttpsConfiguration|Reset-NetIsatapConfiguration|Reset-NetTeredoConfiguration|Set-Net6to4Configuration|Set-NetDnsTransitionConfiguration|Set-NetIPHttpsConfiguration|Set-NetIsatapConfiguration|Set-NetNatTransitionConfiguration|Set-NetTeredoConfiguration|" + + "Disconnect-NfsSession|Get-NfsClientConfiguration|Get-NfsClientgroup|Get-NfsClientLock|Get-NfsMappedIdentity|Get-NfsMappingStore|Get-NfsMountedClient|Get-NfsNetgroup|Get-NfsNetgroupStore|Get-NfsOpenFile|Get-NfsServerConfiguration|Get-NfsSession|Get-NfsShare|Get-NfsSharePermission|Get-NfsStatistics|Grant-NfsSharePermission|Install-NfsMappingStore|New-NfsClientgroup|New-NfsMappedIdentity|New-NfsNetgroup|New-NfsShare|Remove-NfsClientgroup|Remove-NfsMappedIdentity|Remove-NfsNetgroup|Remove-NfsShare|Rename-NfsClientgroup|Reset-NfsStatistics|Resolve-NfsMappedIdentity|Revoke-NfsClientLock|Revoke-NfsMountedClient|Revoke-NfsOpenFile|Revoke-NfsSharePermission|Set-NfsClientConfiguration|Set-NfsClientgroup|Set-NfsMappedIdentity|Set-NfsMappingStore|Set-NfsNetgroup|Set-NfsNetgroupStore|Set-NfsServerConfiguration|Set-NfsShare|Test-NfsMappedIdentity|Test-NfsMappingStore|" + + "Export-NpsConfiguration|Get-NpsRadiusClient|Get-NpsSharedSecretTemplate|Import-NpsConfiguration|New-NpsRadiusClient|Remove-NpsRadiusClient|Set-NpsRadiusClient|" + + "Find-Package|Find-PackageProvider|Get-Package|Get-PackageProvider|Get-PackageSource|Import-PackageProvider|Install-Package|Install-PackageProvider|Register-PackageSource|Save-Package|Set-PackageSource|Uninstall-Package|Unregister-PackageSource|" + + "Clear-PcsvDeviceLog|Get-PcsvDevice|Get-PcsvDeviceLog|Restart-PcsvDevice|Set-PcsvDeviceBootConfiguration|Set-PcsvDeviceNetworkConfiguration|Set-PcsvDeviceUserPassword|Start-PcsvDevice|Stop-PcsvDevice|" + + "Get-PmemDedicatedMemory|Get-PmemDisk|Get-PmemPhysicalDevice|Get-PmemUnusedRegion|Initialize-PmemPhysicalDevice|New-PmemDedicatedMemory|New-PmemDisk|Remove-PmemDedicatedMemory|Remove-PmemDisk|" + + "AfterAll|AfterEach|Assert-MockCalled|Assert-VerifiableMocks|BeforeAll|BeforeEach|Context|Describe|Get-MockDynamicParameters|Get-TestDriveItem|In|InModuleScope|Invoke-Mock|Invoke-Pester|It|Mock|New-Fixture|Set-DynamicParameterVariables|Setup|Should|" + + "Add-CertificateEnrollmentPolicyServer|Export-Certificate|Export-PfxCertificate|Get-Certificate|Get-CertificateAutoEnrollmentPolicy|Get-CertificateEnrollmentPolicyServer|Get-CertificateNotificationTask|Get-PfxData|Import-Certificate|Import-PfxCertificate|New-CertificateNotificationTask|New-SelfSignedCertificate|Remove-CertificateEnrollmentPolicyServer|Remove-CertificateNotificationTask|Set-CertificateAutoEnrollmentPolicy|Switch-Certificate|Test-Certificate|" + + "Get-PlatformIdentifier|" + + "Disable-PnpDevice|Enable-PnpDevice|Get-PnpDevice|Get-PnpDeviceProperty|" + + "Find-DscResource|Find-Module|Find-Script|Get-InstalledModule|Get-InstalledScript|Get-PSRepository|Install-Module|Install-Script|New-ScriptFileInfo|Publish-Module|Publish-Script|Register-PSRepository|Save-Module|Save-Script|Set-PSRepository|Test-ScriptFileInfo|Uninstall-Module|Uninstall-Script|Unregister-PSRepository|Update-Module|Update-ModuleManifest|Update-Script|Update-ScriptFileInfo|" + + "Add-Printer|Add-PrinterDriver|Add-PrinterPort|Get-PrintConfiguration|Get-Printer|Get-PrinterDriver|Get-PrinterPort|Get-PrinterProperty|Get-PrintJob|Read-PrinterNfcTag|Remove-Printer|Remove-PrinterDriver|Remove-PrinterPort|Remove-PrintJob|Rename-Printer|Restart-PrintJob|Resume-PrintJob|Set-PrintConfiguration|Set-Printer|Set-PrinterProperty|Suspend-PrintJob|Write-PrinterNfcTag|" + + "ConvertTo-ProcessMitigationPolicy|Get-ProcessMitigation|Set-ProcessMitigation|" + + "Export-ProvisioningPackage|Export-Trace|Get-ProvisioningPackage|Get-TrustedProvisioningCertificate|Install-ProvisioningPackage|Install-TrustedProvisioningCertificate|Uninstall-ProvisioningPackage|Uninstall-TrustedProvisioningCertificate|" + + "Configuration|Disable-DscDebug|Enable-DscDebug|Get-DscConfiguration|Get-DscConfigurationStatus|Get-DscLocalConfigurationManager|Get-DscResource|New-DscChecksum|Remove-DscConfigurationDocument|Restore-DscConfiguration|Stop-DscConfiguration|Invoke-DscResource|Publish-DscConfiguration|Set-DscLocalConfigurationManager|Start-DscConfiguration|Test-DscConfiguration|Update-DscConfiguration|" + + "Disable-PSTrace|Disable-PSWSManCombinedTrace|Disable-WSManTrace|Enable-PSTrace|Enable-PSWSManCombinedTrace|Enable-WSManTrace|Get-LogProperties|Set-LogProperties|Start-Trace|Stop-Trace|" + + "PSConsoleHostReadline|Get-PSReadlineKeyHandler|Get-PSReadlineOption|Remove-PSReadlineKeyHandler|Set-PSReadlineKeyHandler|Set-PSReadlineOption|" + + "Add-JobTrigger|Disable-JobTrigger|Disable-ScheduledJob|Enable-JobTrigger|Enable-ScheduledJob|Get-JobTrigger|Get-ScheduledJob|Get-ScheduledJobOption|New-JobTrigger|New-ScheduledJobOption|Register-ScheduledJob|Remove-JobTrigger|Set-JobTrigger|Set-ScheduledJob|Set-ScheduledJobOption|Unregister-ScheduledJob|" + + "New-PSWorkflowSession|New-PSWorkflowExecutionOption|" + + "Invoke-AsWorkflow|" + + "Add-RDServer|Add-RDSessionHost|Add-RDVirtualDesktopToCollection|Disable-RDVirtualDesktopADMachineAccountReuse|Disconnect-RDUser|Enable-RDVirtualDesktopADMachineAccountReuse|Export-RDPersonalSessionDesktopAssignment|Export-RDPersonalVirtualDesktopAssignment|Get-RDAvailableApp|Get-RDCertificate|Get-RDConnectionBrokerHighAvailability|Get-RDDeploymentGatewayConfiguration|Get-RDFileTypeAssociation|Get-RDLicenseConfiguration|Get-RDPersonalSessionDesktopAssignment|Get-RDPersonalVirtualDesktopAssignment|Get-RDPersonalVirtualDesktopPatchSchedule|Get-RDRemoteApp|Get-RDRemoteDesktop|Get-RDServer|Get-RDSessionCollection|Get-RDSessionCollectionConfiguration|Get-RDSessionHost|Get-RDUserSession|Get-RDVirtualDesktop|Get-RDVirtualDesktopCollection|Get-RDVirtualDesktopCollectionConfiguration|Get-RDVirtualDesktopCollectionJobStatus|Get-RDVirtualDesktopConcurrency|Get-RDVirtualDesktopIdleCount|Get-RDVirtualDesktopTemplateExportPath|Get-RDWorkspace|Grant-RDOUAccess|Import-RDPersonalSessionDesktopAssignment|Import-RDPersonalVirtualDesktopAssignment|Invoke-RDUserLogoff|Move-RDVirtualDesktop|New-RDCertificate|New-RDPersonalVirtualDesktopPatchSchedule|New-RDRemoteApp|New-RDSessionCollection|New-RDSessionDeployment|New-RDVirtualDesktopCollection|New-RDVirtualDesktopDeployment|Remove-RDDatabaseConnectionString|Remove-RDPersonalSessionDesktopAssignment|Remove-RDPersonalVirtualDesktopAssignment|Remove-RDPersonalVirtualDesktopPatchSchedule|Remove-RDRemoteApp|Remove-RDServer|Remove-RDSessionCollection|Remove-RDSessionHost|Remove-RDVirtualDesktopCollection|Remove-RDVirtualDesktopFromCollection|Send-RDUserMessage|Set-RDActiveManagementServer|Set-RDCertificate|Set-RDClientAccessName|Set-RDConnectionBrokerHighAvailability|Set-RDDatabaseConnectionString|Set-RDDeploymentGatewayConfiguration|Set-RDFileTypeAssociation|Set-RDLicenseConfiguration|Set-RDPersonalSessionDesktopAssignment|Set-RDPersonalVirtualDesktopAssignment|Set-RDPersonalVirtualDesktopPatchSchedule|Set-RDRemoteApp|Set-RDRemoteDesktop|Set-RDSessionCollectionConfiguration|Set-RDSessionHost|Set-RDVirtualDesktopCollectionConfiguration|Set-RDVirtualDesktopConcurrency|Set-RDVirtualDesktopIdleCount|Set-RDVirtualDesktopTemplateExportPath|Set-RDWorkspace|Stop-RDVirtualDesktopCollectionJob|Test-RDOUAccess|Test-RDVirtualDesktopADMachineAccountReuse|Update-RDVirtualDesktopCollection|" + + "Add-BgpCustomRoute|Add-BgpPeer|Add-BgpRouteAggregate|Add-BgpRouter|Add-BgpRoutingPolicy|Add-BgpRoutingPolicyForPeer|Add-DAAppServer|Add-DAClient|Add-DAClientDnsConfiguration|Add-DAEntryPoint|Add-DAMgmtServer|Add-RemoteAccessIpFilter|Add-RemoteAccessLoadBalancerNode|Add-RemoteAccessRadius|Add-VpnIPAddressRange|Add-VpnS2SInterface|Add-VpnSstpProxyRule|Clear-BgpRouteFlapDampening|Clear-RemoteAccessInboxAccountingStore|Clear-VpnS2SInterfaceStatistics|Connect-VpnS2SInterface|Disable-BgpRouteFlapDampening|Disable-DAMultiSite|Disable-DAOtpAuthentication|Disable-RemoteAccessRoutingDomain|Disconnect-VpnS2SInterface|Disconnect-VpnUser|Enable-BgpRouteFlapDampening|Enable-DAMultiSite|Enable-DAOtpAuthentication|Enable-RemoteAccessRoutingDomain|Get-BgpCustomRoute|Get-BgpPeer|Get-BgpRouteAggregate|Get-BgpRouteFlapDampening|Get-BgpRouteInformation|Get-BgpRouter|Get-BgpRoutingPolicy|Get-BgpStatistics|Get-DAAppServer|Get-DAClient|Get-DAClientDnsConfiguration|Get-DAEntryPoint|Get-DAEntryPointDC|Get-DAMgmtServer|Get-DAMultiSite|Get-DANetworkLocationServer|Get-DAOtpAuthentication|Get-DAServer|Get-RemoteAccess|Get-RemoteAccessAccounting|Get-RemoteAccessConfiguration|Get-RemoteAccessConnectionStatistics|Get-RemoteAccessConnectionStatisticsSummary|Get-RemoteAccessHealth|Get-RemoteAccessIpFilter|Get-RemoteAccessLoadBalancer|Get-RemoteAccessRadius|Get-RemoteAccessRoutingDomain|Get-RemoteAccessUserActivity|Get-RoutingProtocolPreference|Get-VpnAuthProtocol|Get-VpnS2SInterface|Get-VpnS2SInterfaceStatistics|Get-VpnServerConfiguration|Get-VpnSstpProxyRule|Install-RemoteAccess|New-VpnSstpProxyRule|New-VpnTrafficSelector|Remove-BgpCustomRoute|Remove-BgpPeer|Remove-BgpRouteAggregate|Remove-BgpRouter|Remove-BgpRoutingPolicy|Remove-BgpRoutingPolicyForPeer|Remove-DAAppServer|Remove-DAClient|Remove-DAClientDnsConfiguration|Remove-DAEntryPoint|Remove-DAMgmtServer|Remove-RemoteAccessIpFilter|Remove-RemoteAccessLoadBalancerNode|Remove-RemoteAccessRadius|Remove-VpnIPAddressRange|Remove-VpnS2SInterface|Remove-VpnSstpProxyRule|Set-BgpPeer|Set-BgpRouteAggregate|Set-BgpRouteFlapDampening|Set-BgpRouter|Set-BgpRoutingPolicy|Set-BgpRoutingPolicyForPeer|Set-DAAppServerConnection|Set-DAClient|Set-DAClientDnsConfiguration|Set-DAEntryPoint|Set-DAEntryPointDC|Set-DAMultiSite|Set-DANetworkLocationServer|Set-DAOtpAuthentication|Set-DAServer|Set-RemoteAccess|Set-RemoteAccessAccounting|Set-RemoteAccessConfiguration|Set-RemoteAccessInboxAccountingStore|Set-RemoteAccessIpFilter|Set-RemoteAccessLoadBalancer|Set-RemoteAccessRadius|Set-RemoteAccessRoutingDomain|Set-RoutingProtocolPreference|Set-VpnAuthProtocol|Set-VpnAuthType|Set-VpnIPAddressAssignment|Set-VpnS2SInterface|Set-VpnServerConfiguration|Set-VpnSstpProxyRule|Start-BgpPeer|Stop-BgpPeer|Uninstall-RemoteAccess|Update-DAMgmtServer|" + + "Convert-License|" + + "Disable-ScheduledTask|Enable-ScheduledTask|Export-ScheduledTask|Get-ClusteredScheduledTask|Get-ScheduledTask|Get-ScheduledTaskInfo|New-ScheduledTask|New-ScheduledTaskAction|New-ScheduledTaskPrincipal|New-ScheduledTaskSettingsSet|New-ScheduledTaskTrigger|Register-ClusteredScheduledTask|Register-ScheduledTask|Set-ClusteredScheduledTask|Set-ScheduledTask|Start-ScheduledTask|Stop-ScheduledTask|Unregister-ClusteredScheduledTask|Unregister-ScheduledTask|" + + "Confirm-SecureBootUEFI|Format-SecureBootUEFI|Get-SecureBootPolicy|Get-SecureBootUEFI|Set-SecureBootUEFI|" + + "Get-DisplayResolution|Set-DisplayResolution|" + + "Disable-ServerManagerStandardUserRemoting|Enable-ServerManagerStandardUserRemoting|Get-WindowsFeature|Install-WindowsFeature|Uninstall-WindowsFeature|" + + "Get-SMCounterSample|Get-SMPerformanceCollector|Get-SMServerBpaResult|Get-SMServerClusterName|Get-SMServerEvent|Get-SMServerFeature|Get-SMServerInventory|Get-SMServerService|Remove-SMServerPerformanceLog|Start-SMPerformanceCollector|Stop-SMPerformanceCollector|" + + "Get-KeyProtectorFromShieldingDataFile|Get-ShieldedVMProvisioningStatus|Initialize-ShieldedVM|New-ShieldedVMSpecializationDataFile|Test-ShieldingDataApplicability|" + + "Import-ShieldingDataFile|New-ShieldingDataFile|New-VolumeIDQualifier|Save-ShieldedVMRecoveryKey|Save-VolumeSignatureCatalog|Unprotect-ShieldedVMRecoveryKey|" + + "Initialize-VMShieldingHelperVHD|Protect-TemplateDisk|" + + "Block-SmbShareAccess|Close-SmbOpenFile|Close-SmbSession|Disable-SmbDelegation|Enable-SmbDelegation|Get-SmbBandwidthLimit|Get-SmbClientConfiguration|Get-SmbClientNetworkInterface|Get-SmbConnection|Get-SmbDelegation|Get-SmbGlobalMapping|Get-SmbMapping|Get-SmbMultichannelConnection|Get-SmbMultichannelConstraint|Get-SmbOpenFile|Get-SmbServerCertificateMapping|Get-SmbServerCertProps|Get-SmbServerConfiguration|Get-SmbServerNetworkInterface|Get-SmbSession|Get-SmbShare|Get-SmbShareAccess|Grant-SmbShareAccess|New-SmbGlobalMapping|New-SmbMapping|New-SmbMultichannelConstraint|New-SmbServerCertificateMapping|New-SmbShare|Remove-SmbBandwidthLimit|Remove-SmbComponent|Remove-SmbGlobalMapping|Remove-SmbMapping|Remove-SmbMultichannelConstraint|Remove-SmbServerCertificateMapping|Remove-SmbShare|Reset-SmbClientConfiguration|Reset-SmbServerConfiguration|Revoke-SmbShareAccess|Set-SmbBandwidthLimit|Set-SmbClientConfiguration|Set-SmbPathAcl|Set-SmbServerCertificateMapping|Set-SmbServerConfiguration|Set-SmbShare|Unblock-SmbShareAccess|Update-SmbMultichannelConnection|" + + "Move-SmbClient|Get-SmbWitnessClient|Move-SmbWitnessClient|" + + "Register-SmisProvider|Search-SmisProvider|Unregister-SmisProvider|" + + "Get-SilComputer|Get-SilComputerIdentity|Get-SilData|Get-SilLogging|Get-SilSoftware|Get-SilUalAccess|Get-SilWindowsUpdate|Publish-SilData|Set-SilLogging|Start-SilLogging|Stop-SilLogging|" + + "Get-StartApps|Export-StartLayout|Import-StartLayout|Export-StartLayoutEdgeAssets|" + + "Add-InitiatorIdToMaskingSet|Add-PartitionAccessPath|Add-PhysicalDisk|Add-TargetPortToMaskingSet|Add-VirtualDiskToMaskingSet|Block-FileShareAccess|Clear-Disk|Clear-FileStorageTier|Connect-VirtualDisk|Debug-FileShare|Debug-StorageSubSystem|Debug-Volume|Disable-PhysicalDiskIdentification|Disable-StorageEnclosureIdentification|Disable-StorageHighAvailability|Disable-StorageMaintenanceMode|Disconnect-VirtualDisk|Dismount-DiskImage|Enable-PhysicalDiskIdentification|Enable-StorageEnclosureIdentification|Enable-StorageHighAvailability|Enable-StorageMaintenanceMode|Format-Volume|Get-DedupProperties|Get-Disk|||||Get-DiskImage|Get-DiskStorageNodeView|Get-FileIntegrity|Get-FileShare|Get-FileShareAccessControlEntry|Get-FileStorageTier|Get-InitiatorId|Get-InitiatorPort|Get-MaskingSet|Get-OffloadDataTransferSetting|Get-Partition|Get-PartitionSupportedSize|Get-PhysicalDisk|Get-PhysicalDiskStorageNodeView|Get-PhysicalExtent|Get-PhysicalExtentAssociation|Get-ResiliencySetting|Get-StorageAdvancedProperty|Get-StorageDiagnosticInfo|Get-StorageEnclosure|Get-StorageEnclosureStorageNodeView|Get-StorageEnclosureVendorData|Get-StorageFaultDomain|Get-StorageFileServer|Get-StorageFirmwareInformation|Get-StorageHealthAction|Get-StorageHealthReport|Get-StorageHealthSetting|Get-StorageJob|Get-StorageNode|Get-StoragePool|Get-StorageProvider|Get-StorageReliabilityCounter|Get-StorageSetting|Get-StorageSubSystem|Get-StorageTier|Get-StorageTierSupportedSize|Get-SupportedClusterSizes|Get-SupportedFileSystems|Get-TargetPort|Get-TargetPortal|Get-VirtualDisk|Get-VirtualDiskSupportedSize|Get-Volume|Get-VolumeCorruptionCount|Get-VolumeScrubPolicy|Grant-FileShareAccess|Hide-VirtualDisk|Initialize-Disk|Mount-DiskImage|New-FileShare|New-MaskingSet|New-Partition|New-StorageFileServer|New-StoragePool|New-StorageSubsystemVirtualDisk|New-StorageTier|New-VirtualDisk|New-VirtualDiskClone|New-VirtualDiskSnapshot|New-Volume|Optimize-StoragePool|Optimize-Volume|Register-StorageSubsystem|Remove-FileShare|Remove-InitiatorId|Remove-InitiatorIdFromMaskingSet|Remove-MaskingSet|Remove-Partition|Remove-PartitionAccessPath|Remove-PhysicalDisk|Remove-StorageFileServer|Remove-StorageHealthSetting|Remove-StoragePool|Remove-StorageTier|Remove-TargetPortFromMaskingSet|Remove-VirtualDisk|Remove-VirtualDiskFromMaskingSet|Rename-MaskingSet|Repair-FileIntegrity|Repair-VirtualDisk|Repair-Volume|Reset-PhysicalDisk|Reset-StorageReliabilityCounter|Resize-Partition|Resize-StorageTier|Resize-VirtualDisk|Revoke-FileShareAccess|Set-Disk|Set-FileIntegrity|Set-FileShare|Set-FileStorageTier|Set-InitiatorPort|Set-Partition|Set-PhysicalDisk|Set-ResiliencySetting|Set-StorageFileServer|Set-StorageHealthSetting|Set-StoragePool|Set-StorageProvider|Set-StorageSetting|Set-StorageSubSystem|Set-StorageTier|Set-VirtualDisk|Set-Volume|Set-VolumeScrubPolicy|Show-VirtualDisk|Start-StorageDiagnosticLog|Stop-StorageDiagnosticLog|Stop-StorageJob|Unblock-FileShareAccess|Unregister-StorageSubsystem|Update-Disk|Update-HostStorageCache|Update-StorageFirmware|Update-StoragePool|Update-StorageProviderCache|Write-VolumeCache|" + + "Get-StorageQoSFlow|Get-StorageQosPolicy|Get-StorageQosPolicyStore|Get-StorageQosVolume|New-StorageQosPolicy|Remove-StorageQosPolicy|Set-StorageQosPolicy|Set-StorageQosPolicyStore|" + + "Clear-SRMetadata|Dismount-SRDestination|Export-SRConfiguration|Get-SRAccess|Get-SRDelegation|Get-SRGroup|Get-SRNetworkConstraint|Get-SRPartnership|Grant-SRAccess|Grant-SRDelegation|Mount-SRDestination|New-SRGroup|New-SRPartnership|Remove-SRGroup|Remove-SRNetworkConstraint|Remove-SRPartnership|Revoke-SRAccess|Revoke-SRDelegation|Set-SRGroup|Set-SRNetworkConstraint|Set-SRPartnership|Suspend-SRGroup|Sync-SRGroup|Test-SRTopology|" + + "Disable-SyncShare|Enable-SyncShare|Get-SyncServerSetting|Get-SyncShare|Get-SyncUserStatus|New-SyncShare|Remove-SyncShare|Repair-SyncShare|Set-SyncServerSetting|Set-SyncShare|" + + "Add-InsightsCapability|Disable-InsightsCapability|Disable-InsightsCapabilitySchedule|Enable-InsightsCapability|Enable-InsightsCapabilitySchedule|Get-InsightsCapability|Get-InsightsCapabilityAction|Get-InsightsCapabilityResult|Get-InsightsCapabilitySchedule|Invoke-InsightsCapability|Remove-InsightsCapability|Remove-InsightsCapabilityAction|Set-InsightsCapabilityAction|Set-InsightsCapabilitySchedule|Update-InsightsCapability|" + + "Disable-TlsCipherSuite|Disable-TlsEccCurve|Disable-TlsSessionTicketKey|Enable-TlsCipherSuite|Enable-TlsEccCurve|Enable-TlsSessionTicketKey|Export-TlsSessionTicketKey|Get-TlsCipherSuite|Get-TlsEccCurve|New-TlsSessionTicketKey|" + + "Get-TroubleshootingPack|Invoke-TroubleshootingPack|" + + "Clear-Tpm|ConvertTo-TpmOwnerAuth|Disable-TpmAutoProvisioning|Enable-TpmAutoProvisioning|Get-Tpm|Get-TpmEndorsementKeyInfo|Get-TpmSupportedFeature|Import-TpmOwnerAuth|Initialize-Tpm|Set-TpmOwnerAuth|Unblock-Tpm|" + + "Clear-UevAppxPackage|Clear-UevConfiguration|Disable-Uev|Disable-UevAppxPackage|Disable-UevTemplate|Enable-Uev|Enable-UevAppxPackage|Enable-UevTemplate|Export-UevConfiguration|Export-UevPackage|Get-UevAppxPackage|Get-UevConfiguration|Get-UevStatus|Get-UevTemplate|Get-UevTemplateProgram|Import-UevConfiguration|Register-UevTemplate|Repair-UevTemplateIndex|Restore-UevBackup|Restore-UevUserSetting|Set-UevConfiguration|Set-UevTemplateProfile|Test-UevTemplate|Unregister-UevTemplate|Update-UevTemplate|" + + "Add-WsusComputer|Add-WsusDynamicCategory|Approve-WsusUpdate|Deny-WsusUpdate|Get-WsusClassification|Get-WsusComputer|Get-WsusDynamicCategory|Get-WsusProduct|Get-WsusServer|Get-WsusUpdate|Invoke-WsusServerCleanup|Remove-WsusDynamicCategory|Set-WsusClassification|Set-WsusDynamicCategory|Set-WsusProduct|Set-WsusServerSynchronization|" + + "Disable-Ual|Enable-Ual|Get-Ual|Get-UalDailyAccess|Get-UalDailyDeviceAccess|Get-UalDailyUserAccess|Get-UalDeviceAccess|Get-UalDns|Get-UalHyperV|Get-UalOverview|Get-UalServerDevice|Get-UalServerUser|Get-UalSystemId|Get-UalUserAccess|" + + "Add-VamtProductKey|Export-VamtData|Find-VamtManagedMachine|Get-VamtConfirmationId|Get-VamtProduct|Get-VamtProductKey|Import-VamtData|Initialize-VamtData|Install-VamtConfirmationId|Install-VamtProductActivation|Install-VamtProductKey|Update-VamtProduct|" + + "Add-VpnConnection|Add-VpnConnectionRoute|Add-VpnConnectionTriggerApplication|Add-VpnConnectionTriggerDnsConfiguration|Add-VpnConnectionTriggerTrustedNetwork|Get-VpnConnection|Get-VpnConnectionTrigger|New-EapConfiguration|New-VpnServerAddress|Remove-VpnConnection|Remove-VpnConnectionRoute|Remove-VpnConnectionTriggerApplication|Remove-VpnConnectionTriggerDnsConfiguration|Remove-VpnConnectionTriggerTrustedNetwork|Set-VpnConnection|Set-VpnConnectionIPsecConfiguration|Set-VpnConnectionProxy|Set-VpnConnectionTriggerDnsConfiguration|Set-VpnConnectionTriggerTrustedNetwork|" + + "Add-WdsDriverPackage|Approve-WdsClient|Copy-WdsInstallImage|Deny-WdsClient|Disable-WdsBootImage|Disable-WdsDriverPackage|Disable-WdsInstallImage|Disconnect-WdsMulticastClient|Enable-WdsBootImage|Enable-WdsDriverPackage|Enable-WdsInstallImage|Export-WdsBootImage|Export-WdsInstallImage|Get-WdsBootImage|Get-WdsClient|Get-WdsDriverPackage|Get-WdsInstallImage|Get-WdsInstallImageGroup|Get-WdsMulticastClient|Import-WdsBootImage|Import-WdsDriverPackage|Import-WdsInstallImage|New-WdsClient|New-WdsInstallImageGroup|Remove-WdsBootImage|Remove-WdsClient|Remove-WdsDriverPackage|Remove-WdsInstallImage|Remove-WdsInstallImageGroup|Set-WdsBootImage|Set-WdsClient|Set-WdsInstallImage|Set-WdsInstallImageGroup|" + + "Add-WebConfiguration|Add-WebConfigurationLock|Add-WebConfigurationProperty|Backup-WebConfiguration|Clear-WebCentralCertProvider|Clear-WebConfiguration|Clear-WebRequestTracingSetting|Clear-WebRequestTracingSettings|ConvertTo-WebApplication|Disable-WebCentralCertProvider|Disable-WebGlobalModule|Disable-WebRequestTracing|Enable-WebCentralCertProvider|Enable-WebGlobalModule|Enable-WebRequestTracing|Get-WebAppDomain|Get-WebApplication|Get-WebAppPoolState|Get-WebBinding|Get-WebCentralCertProvider|Get-WebConfigFile|Get-WebConfiguration|Get-WebConfigurationBackup|Get-WebConfigurationLocation|Get-WebConfigurationLock|Get-WebConfigurationProperty|Get-WebFilePath|Get-WebGlobalModule|Get-WebHandler|Get-WebItemState|Get-WebManagedModule|Get-WebRequest|Get-Website|Get-WebsiteState|Get-WebURL|Get-WebVirtualDirectory|New-WebApplication|New-WebAppPool|New-WebBinding|New-WebFtpSite|New-WebGlobalModule|New-WebHandler|New-WebManagedModule|New-Website|New-WebVirtualDirectory|Remove-WebApplication|Remove-WebAppPool|Remove-WebBinding|Remove-WebConfigurationBackup|Remove-WebConfigurationLocation|Remove-WebConfigurationLock|Remove-WebConfigurationProperty|Remove-WebGlobalModule|Remove-WebHandler|Remove-WebManagedModule|Remove-Website|Remove-WebVirtualDirectory|Rename-WebConfigurationLocation|Restart-WebAppPool|Restart-WebItem|Restore-WebConfiguration|Select-WebConfiguration|Set-WebBinding|Set-WebCentralCertProvider|Set-WebCentralCertProviderCredential|Set-WebConfiguration|Set-WebConfigurationProperty|Set-WebGlobalModule|Set-WebHandler|Set-WebManagedModule|Start-WebAppPool|Start-WebCommitDelay|Start-WebItem|Start-Website|Stop-WebAppPool|Stop-WebCommitDelay|Stop-WebItem|Stop-Website|" + + "Add-WebApplicationProxyApplication|Get-WebApplicationProxyApplication|Get-WebApplicationProxyAvailableADFSRelyingParty|Get-WebApplicationProxyConfiguration|Get-WebApplicationProxyHealth|Get-WebApplicationProxySslCertificate|Install-WebApplicationProxy|Remove-WebApplicationProxyApplication|Set-WebApplicationProxyApplication|Set-WebApplicationProxyConfiguration|Set-WebApplicationProxySslCertificate|Update-WebApplicationProxyDeviceRegistration|" + + "Get-WheaMemoryPolicy|Set-WheaMemoryPolicy|" + + "Get-WindowsDeveloperLicense|Show-WindowsDeveloperLicenseRegistration|Unregister-WindowsDeveloperLicense|" + + "Clear-WindowsDiagnosticData|" + + "Disable-WindowsErrorReporting|Enable-WindowsErrorReporting|Get-WindowsErrorReporting|" + + "Get-WindowsSearchSetting|Set-WindowsSearchSetting|" + + "Add-WBBackupTarget|Add-WBBareMetalRecovery|Add-WBFileSpec|Add-WBSystemState|Add-WBVirtualMachine|Add-WBVolume|Backup-ACL|Get-WBBackupSet|Get-WBBackupTarget|Get-WBBackupVolumeBrowsePath|Get-WBBareMetalRecovery|Get-WBDisk|Get-WBFileSpec|Get-WBJob|Get-WBPerformanceConfiguration|Get-WBPolicy|Get-WBSchedule|Get-WBSummary|Get-WBSystemState|Get-WBVirtualMachine|Get-WBVolume|Get-WBVssBackupOption|New-WBBackupTarget|New-WBFileSpec|New-WBPolicy|Remove-WBBackupSet|Remove-WBBackupTarget|Remove-WBBareMetalRecovery|Remove-WBCatalog|Remove-WBFileSpec|Remove-WBPolicy|Remove-WBSystemState|Remove-WBVirtualMachine|Remove-WBVolume|Restore-ACL|Restore-WBCatalog|Resume-WBBackup|Resume-WBVolumeRecovery|Set-WBPerformanceConfiguration|Set-WBPolicy|Set-WBSchedule|Set-WBVssBackupOption|Start-WBApplicationRecovery|Start-WBBackup|Start-WBFileRecovery|Start-WBHyperVRecovery|Start-WBSystemStateRecovery|Start-WBVolumeRecovery|Stop-WBJob|" + + "Get-WindowsUpdateLog"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords + }, "identifier"); + var binaryOperatorsRe = ( + "eq|ne|gt|lt|le|ge|like|notlike|match|notmatch|contains|notcontains|in|notin|band|bor|bxor|bnot|" + + "ceq|cne|cgt|clt|cle|cge|clike|cnotlike|cmatch|cnotmatch|ccontains|cnotcontains|cin|cnotin|" + + "ieq|ine|igt|ilt|ile|ige|ilike|inotlike|imatch|inotmatch|icontains|inotcontains|iin|inotin|" + + "and|or|xor|not|" + + "split|join|replace|f|" + + "csplit|creplace|" + + "isplit|ireplace|" + + "is|isnot|as|" + + "shl|shr"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "comment.start", + regex: "<#", + next: "comment" + }, { + token: "string", // multi line + regex: /@'$/, + push: [ + { + token: "string", + regex: /^'@/, + next: "pop" + }, + { + defaultToken: "string" + } + ] + }, { + token: "string", // multi line + regex: /@"$/, + push: [ + { + token: "string", + regex: /^"@/, + next: "pop" + }, + { include: "expressions" }, + { include: "expandable-strings" }, + { + defaultToken: "string" + } + ] + }, + { include: "strings" }, + { include: "variables" }, + { include: "statements" }, + { include: "expressions" }, + { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, + { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment.end", + regex: "#>", + next: "start" + }, { + token: "doc.comment.tag", + regex: "^\\.\\w+" + }, { + defaultToken: "comment" + } + ], + "expandable-strings": [ + { + token: "constant.language.escape", + regex: /`./ + }, + { include: "variables" } + ], + "variables": [ + { + token: "variable.instance", + regex: "[$]" + identifierRe + "\\b" + }, + { + token: "variable.braced", + regex: /\$\{/, + push: [ + { + token: "variable.braced", + regex: /\}/, + next: "pop" + }, + { + token: "constant.language.escape", + regex: /`./ + }, + { defaultToken: "variable.braced" } + ] + } + ], + "statements": [ + { + token: "punctuation", + regex: ";" + }, + { + token: "keyword.operator", + regex: "\\-(?:" + binaryOperatorsRe + ")" + }, { + token: "keyword.operator", + regex: "&|\\+|\\-|\\*|\\/|\\%|\\=|\\>|\\&|\\!|\\|" + }, + { include: "constants" }, + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" + } + ], + "constants": [ + { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "[$](?:[Tt]rue|[Ff]alse)\\b" + }, { + token: "constant.language", + regex: "[$][Nn]ull\\b" + } + ], + "strings": [ + { + token: "string", // single line + regex: "['][^']*[']" + }, + { + token: "string", // single line + regex: /"/, + push: [ + { + token: "string", + regex: /"|$/, + next: "pop" + }, + { include: "expressions" }, + { include: "expandable-strings" }, + { + defaultToken: "string" + } + ] + } + ], + "expressions": [ + { + token: "keyword.operator", + regex: /[$@]\(/, + push: [ + { + token: "keyword.operator", + regex: /\)/, + next: "pop" + }, + { include: "parens-block" }, + { include: "expressions" }, + { include: "strings" }, + { include: "variables" }, + { include: "statements" } + ] + }, + { + token: "keyword.operator", + regex: /@\{/, + push: [ + { + token: "keyword.operator", + regex: /\}/, + next: "pop" + }, + { include: "parens-block" }, + { include: "strings" }, + { include: "variables" }, + { include: "statements" } + ] + } + ], + "parens-block": [ + { + token: "paren.lparen", + regex: /\(/, + push: [ + { + token: "paren.rparen", + regex: /\)/, + next: "pop" + }, + { include: "parens-block" }, + { include: "strings" }, + { include: "variables" }, + { include: "statements" } + ] + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(PowershellHighlightRules, TextHighlightRules); +exports.PowershellHighlightRules = PowershellHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = PowershellHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode({ start: "^\\s*(<#)", end: "^[#\\s]>\\s*$" }); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = { start: "<#", end: "#>" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/powershell"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/powershell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-praat.js b/ui/base1/ace/mode-praat.js new file mode 100644 index 0000000..c248526 --- /dev/null +++ b/ui/base1/ace/mode-praat.js @@ -0,0 +1,412 @@ +define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PraatHighlightRules = function () { + var keywords = ("if|then|else|elsif|elif|endif|fi|" + + "endfor|endproc|" + // related keywords specified below + "while|endwhile|" + + "repeat|until|" + + "select|plus|minus|" + + "assert|asserterror"); + var predefinedVariables = ("macintosh|windows|unix|" + + "praatVersion|praatVersion\\$" + + "pi|undefined|" + + "newline\\$|tab\\$|" + + "shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|" + + "temporaryDirectory\\$|defaultDirectory\\$"); + var directives = ("clearinfo|endSendPraat"); + var functions = ( + "writeInfo|writeInfoLine|appendInfo|appendInfoLine|info\\$|" + + "writeFile|writeFileLine|appendFile|appendFileLine|" + + "abs|round|floor|ceiling|min|max|imin|imax|" + + "sqrt|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi|" + + "exp|ln|lnBeta|lnGamma|log10|log2|" + + "sinh|cosh|tanh|arcsinh|arccosh|arctanh|" + + "sigmoid|invSigmoid|erf|erfc|" + + "random(?:Uniform|Integer|Gauss|Poisson|Binomial)|" + + "gaussP|gaussQ|invGaussQ|incompleteGammaP|incompleteBeta|" + + "chiSquareP|chiSquareQ|invChiSquareQ|studentP|studentQ|invStudentQ|" + + "fisherP|fisherQ|invFisherQ|" + + "binomialP|binomialQ|invBinomialP|invBinomialQ|" + + "hertzToBark|barkToHerz|" + + "hertzToMel|melToHertz|" + + "hertzToSemitones|semitonesToHerz|" + + "erb|hertzToErb|erbToHertz|" + + "phonToDifferenceLimens|differenceLimensToPhon|" + + "soundPressureToPhon|" + + "beta|beta2|besselI|besselK|" + + "numberOfColumns|numberOfRows|" + + "selected|selected\\$|numberOfSelected|variableExists|" + + "index|rindex|startsWith|endsWith|" + + "index_regex|rindex_regex|replace_regex\\$|" + + "length|extractWord\\$|extractLine\\$|extractNumber|" + + "left\\$|right\\$|mid\\$|replace\\$|" + + "date\\$|fixed\\$|percent\\$|" + + "zero#|linear#|randomUniform#|randomInteger#|randomGauss#|" + + "beginPause|endPause|" + + "demoShow|demoWindowTitle|demoInput|demoWaitForInput|" + + "demoClicked|demoClickedIn|demoX|demoY|" + + "demoKeyPressed|demoKey\\$|" + + "demoExtraControlKeyPressed|demoShiftKeyPressed|" + + "demoCommandKeyPressed|demoOptionKeyPressed|" + + "environment\\$|chooseReadFile\\$|" + + "chooseDirectory\\$|createDirectory|fileReadable|deleteFile|" + + "selectObject|removeObject|plusObject|minusObject|" + + "runScript|exitScript|" + + "beginSendPraat|endSendPraat|" + + "objectsAreIdentical"); + var objectTypes = ("Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|" + + "BarkFilter|CCA|Categories|Cepstrum|Cepstrumc|ChebyshevSeries|" + + "ClassificationTable|Cochleagram|Collection|Configuration|" + + "Confusion|ContingencyTable|Corpus|Correlation|Covariance|" + + "CrossCorrelationTable|CrossCorrelationTables|DTW|Diagonalizer|" + + "Discriminant|Dissimilarity|Distance|Distributions|DurationTier|" + + "EEG|ERP|ERPTier|Eigen|Excitation|Excitations|ExperimentMFC|FFNet|" + + "FeatureWeights|Formant|FormantFilter|FormantGrid|FormantPoint|" + + "FormantTier|GaussianMixture|HMM|HMM_Observation|" + + "HMM_ObservationSequence|HMM_State|HMM_StateSequence|Harmonicity|" + + "ISpline|Index|Intensity|IntensityTier|IntervalTier|KNN|KlattGrid|" + + "KlattTable|LFCC|LPC|Label|LegendreSeries|LinearRegression|" + + "LogisticRegression|LongSound|Ltas|MFCC|MSpline|ManPages|" + + "Manipulation|Matrix|MelFilter|MixingMatrix|Movie|Network|" + + "OTGrammar|OTHistory|OTMulti|PCA|PairDistribution|ParamCurve|" + + "Pattern|Permutation|Pitch|PitchTier|PointProcess|Polygon|" + + "Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|SPINET|" + + "SSCP|SVD|Salience|ScalarProduct|Similarity|SimpleString|" + + "SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|" + + "SpeechSynthesizer|SpellingChecker|Strings|StringsIndex|Table|" + + "TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|" + + "Transition|VocalTract|Weight|WordList"); + this.$rules = { + "start": [ + { + token: "string.interpolated", + regex: /'((?:\.?[a-z][a-zA-Z0-9_.]*)(?:\$|#|:[0-9]+)?)'/ + }, { + token: ["text", "text", "keyword.operator", "text", "keyword"], + regex: /(^\s*)(?:(\.?[a-z][a-zA-Z0-9_.]*\$?\s+)(=)(\s+))?(stopwatch)/ + }, { + token: ["text", "keyword", "text", "string"], + regex: /(^\s*)(print(?:line|tab)?|echo|exit|pause|send(?:praat|socket)|include|execute|system(?:_nocheck)?)(\s+)(.*)/ + }, { + token: ["text", "keyword"], + regex: "(^\\s*)(" + directives + ")$" + }, { + token: ["text", "keyword.operator", "text"], + regex: /(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/ + }, { + token: ["text", "text", "keyword.operator", "text", "keyword", "text", "keyword"], + regex: /(^\s*)(?:(\.?[a-z][a-zA-Z0-9_.]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|(?:unix_)?nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ + }, { + token: ["text", "keyword", "text", "keyword"], + regex: /(^\s*)((?:no(?:warn|check))?)(\s*)(\b(?:editor(?::?)|endeditor)\b)/ + }, { + token: ["text", "keyword", "text", "keyword"], + regex: /(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ + }, { + token: ["text", "keyword", "text", "keyword"], + regex: /^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/ + }, { + token: ["text", "support.function", "text"], + regex: /(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/ + }, { + token: "entity.name.type", + regex: "(" + objectTypes + ")" + }, { + token: "variable.language", + regex: "(" + predefinedVariables + ")" + }, { + token: ["support.function", "text"], + regex: "((?:" + functions + ")\\$?)(\\s*(?::|\\())" + }, { + token: "keyword", + regex: /(\bfor\b)/, + next: "for" + }, { + token: "keyword", + regex: "(\\b(?:" + keywords + ")\\b)" + }, { + token: "string", + regex: /"[^"]*"/ + }, { + token: "string", + regex: /"[^"]*$/, + next: "brokenstring" + }, { + token: ["text", "keyword", "text", "entity.name.section"], + regex: /(^\s*)(\bform\b)(\s+)(.*)/, + next: "form" + }, { + token: "constant.numeric", + regex: /\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token: ["keyword", "text", "entity.name.function"], + regex: /(procedure)(\s+)([^:\s]+)/ + }, { + token: ["entity.name.function", "text"], + regex: /(@\S+)(:|\s*\()/ + }, { + token: ["text", "keyword", "text", "entity.name.function"], + regex: /(^\s*)(call)(\s+)(\S+)/ + }, { + token: "comment", + regex: /(^\s*#|;).*$/ + }, { + token: "text", + regex: /\s+/ + } + ], + "form": [ + { + token: ["keyword", "text", "constant.numeric"], + regex: /((?:optionmenu|choice)\s+)(\S+:\s+)([0-9]+)/ + }, { + token: ["keyword", "constant.numeric"], + regex: /((?:option|button)\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/ + }, { + token: ["keyword", "string"], + regex: /((?:option|button)\s+)(.*)/ + }, { + token: ["keyword", "text", "string"], + regex: /((?:sentence|text)\s+)(\S+\s*)(.*)/ + }, { + token: ["keyword", "text", "string", "invalid.illegal"], + regex: /(word\s+)(\S+\s*)(\S+)?(\s.*)?/ + }, { + token: ["keyword", "text", "constant.language"], + regex: /(boolean\s+)(\S+\s*)(0|1|"?(?:yes|no)"?)/ + }, { + token: ["keyword", "text", "constant.numeric"], + regex: /((?:real|natural|positive|integer)\s+)(\S+\s*)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/ + }, { + token: ["keyword", "string"], + regex: /(comment\s+)(.*)/ + }, { + token: "keyword", + regex: 'endform', + next: "start" + } + ], + "for": [ + { + token: ["keyword", "text", "constant.numeric", "text"], + regex: /(from|to)(\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?)(\s*)/ + }, { + token: ["keyword", "text"], + regex: /(from|to)(\s+\S+\s*)/ + }, { + token: "text", + regex: /$/, + next: "start" + } + ], + "brokenstring": [ + { + token: ["text", "string"], + regex: /(\s*\.{3})([^"]*)/ + }, { + token: "string", + regex: /"/, + next: "start" + } + ] + }; +}; +oop.inherits(PraatHighlightRules, TextHighlightRules); +exports.PraatHighlightRules = PraatHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PraatHighlightRules = require("./praat_highlight_rules").PraatHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = PraatHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/praat"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/praat"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-prisma.js b/ui/base1/ace/mode-prisma.js new file mode 100644 index 0000000..5863166 --- /dev/null +++ b/ui/base1/ace/mode-prisma.js @@ -0,0 +1,457 @@ +define("ace/mode/prisma_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from ../convert.json (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PrismaHighlightRules = function () { + this.$rules = { + start: [{ + include: "#triple_comment" + }, { + include: "#double_comment" + }, { + include: "#model_block_definition" + }, { + include: "#config_block_definition" + }, { + include: "#enum_block_definition" + }, { + include: "#type_definition" + }], + "#model_block_definition": [{ + token: [ + "source.prisma.embedded.source", + "storage.type.model.prisma", + "source.prisma.embedded.source", + "entity.name.type.model.prisma", + "source.prisma.embedded.source", + "punctuation.definition.tag.prisma" + ], + regex: /^(\s*)(model|type)(\s+)([A-Za-z][\w]*)(\s+)({)/, + push: [{ + token: "punctuation.definition.tag.prisma", + regex: /\s*\}/, + next: "pop" + }, { + include: "#triple_comment" + }, { + include: "#double_comment" + }, { + include: "#field_definition" + }, { + defaultToken: "source.prisma.embedded.source" + }] + }], + "#enum_block_definition": [{ + token: [ + "source.prisma.embedded.source", + "storage.type.enum.prisma", + "source.prisma.embedded.source", + "entity.name.type.enum.prisma", + "source.prisma.embedded.source", + "punctuation.definition.tag.prisma" + ], + regex: /^(\s*)(enum)(\s+)([A-Za-z][\w]*)(\s+)({)/, + push: [{ + token: "punctuation.definition.tag.prisma", + regex: /\s*\}/, + next: "pop" + }, { + include: "#triple_comment" + }, { + include: "#double_comment" + }, { + include: "#enum_value_definition" + }, { + defaultToken: "source.prisma.embedded.source" + }] + }], + "#config_block_definition": [{ + token: [ + "source.prisma.embedded.source", + "storage.type.config.prisma", + "source.prisma.embedded.source", + "entity.name.type.config.prisma", + "source.prisma.embedded.source", + "punctuation.definition.tag.prisma" + ], + regex: /^(\s*)(generator|datasource)(\s+)([A-Za-z][\w]*)(\s+)({)/, + push: [{ + token: "source.prisma.embedded.source", + regex: /\s*\}/, + next: "pop" + }, { + include: "#triple_comment" + }, { + include: "#double_comment" + }, { + include: "#assignment" + }, { + defaultToken: "source.prisma.embedded.source" + }] + }], + "#assignment": [{ + token: [ + "text", + "variable.other.assignment.prisma", + "text", + "keyword.operator.terraform", + "text" + ], + regex: /^(\s*)(\w+)(\s*)(=)(\s*)/, + push: [{ + token: "text", + regex: /$/, + next: "pop" + }, { + include: "#value" + }, { + include: "#double_comment_inline" + }] + }], + "#field_definition": [{ + token: [ + "text", + "variable.other.assignment.prisma", + "invalid.illegal.colon.prisma", + "text", + "support.type.primitive.prisma", + "keyword.operator.list_type.prisma", + "keyword.operator.optional_type.prisma", + "invalid.illegal.required_type.prisma" + ], + regex: /^(\s*)(\w+)((?:\s*:)?)(\s+)(\w+)((?:\[\])?)((?:\?)?)((?:\!)?)/ + }, { + include: "#attribute_with_arguments" + }, { + include: "#attribute" + }], + "#type_definition": [{ + token: [ + "text", + "storage.type.type.prisma", + "text", + "entity.name.type.type.prisma", + "text", + "support.type.primitive.prisma" + ], + regex: /^(\s*)(type)(\s+)(\w+)(\s*=\s*)(\w+)/ + }, { + include: "#attribute_with_arguments" + }, { + include: "#attribute" + }], + "#enum_value_definition": [{ + token: [ + "text", + "variable.other.assignment.prisma", + "text" + ], + regex: /^(\s*)(\w+)(\s*$)/ + }, { + include: "#attribute_with_arguments" + }, { + include: "#attribute" + }], + "#attribute_with_arguments": [{ + token: [ + "entity.name.function.attribute.prisma", + "punctuation.definition.tag.prisma" + ], + regex: /(@@?[\w\.]+)(\()/, + push: [{ + token: "punctuation.definition.tag.prisma", + regex: /\)/, + next: "pop" + }, { + include: "#named_argument" + }, { + include: "#value" + }, { + defaultToken: "source.prisma.attribute.with_arguments" + }] + }], + "#attribute": [{ + token: "entity.name.function.attribute.prisma", + regex: /@@?[\w\.]+/ + }], + "#array": [{ + token: "source.prisma.array", + regex: /\[/, + push: [{ + token: "source.prisma.array", + regex: /\]/, + next: "pop" + }, { + include: "#value" + }, { + defaultToken: "source.prisma.array" + }] + }], + "#value": [{ + include: "#array" + }, { + include: "#functional" + }, { + include: "#literal" + }], + "#functional": [{ + token: [ + "support.function.functional.prisma", + "punctuation.definition.tag.prisma" + ], + regex: /(\w+)(\()/, + push: [{ + token: "punctuation.definition.tag.prisma", + regex: /\)/, + next: "pop" + }, { + include: "#value" + }, { + defaultToken: "source.prisma.functional" + }] + }], + "#literal": [{ + include: "#boolean" + }, { + include: "#number" + }, { + include: "#double_quoted_string" + }, { + include: "#identifier" + }], + "#identifier": [{ + token: "support.constant.constant.prisma", + regex: /\b(?:\w)+\b/ + }], + "#map_key": [{ + token: [ + "variable.parameter.key.prisma", + "text", + "punctuation.definition.separator.key-value.prisma", + "text" + ], + regex: /(\w+)(\s*)(:)(\s*)/ + }], + "#named_argument": [{ + include: "#map_key" + }, { + include: "#value" + }], + "#triple_comment": [{ + token: "comment.prisma", + regex: /\/\/\//, + push: [{ + token: "comment.prisma", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.prisma" + }] + }], + "#double_comment": [{ + token: "comment.prisma", + regex: /\/\//, + push: [{ + token: "comment.prisma", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.prisma" + }] + }], + "#double_comment_inline": [{ + token: "comment.prisma", + regex: /\/\/[^$]*/ + }], + "#boolean": [{ + token: "constant.language.boolean.prisma", + regex: /\b(?:true|false)\b/ + }], + "#number": [{ + token: "constant.numeric.prisma", + regex: /(?:0(?:x|X)[0-9a-fA-F]*|(?:\+|-)?\b(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDdg]|UL|ul)?\b/ + }], + "#double_quoted_string": [{ + token: "string.quoted.double.start.prisma", + regex: /"/, + push: [{ + token: "string.quoted.double.end.prisma", + regex: /"/, + next: "pop" + }, { + include: "#string_interpolation" + }, { + token: "string.quoted.double.prisma", + regex: /[\w\-\/\._\\%@:\?=]+/ + }, { + defaultToken: "unnamed" + }] + }], + "#string_interpolation": [{ + token: "keyword.control.interpolation.start.prisma", + regex: /\$\{/, + push: [{ + token: "keyword.control.interpolation.end.prisma", + regex: /\s*\}/, + next: "pop" + }, { + include: "#value" + }, { + defaultToken: "source.tag.embedded.source.prisma" + }] + }] + }; + this.normalizeRules(); +}; +PrismaHighlightRules.metaData = { + name: "Prisma", + scopeName: "source.prisma" +}; +oop.inherits(PrismaHighlightRules, TextHighlightRules); +exports.PrismaHighlightRules = PrismaHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/prisma",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prisma_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PrismaHighlightRules = require("./prisma_highlight_rules").PrismaHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = PrismaHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/prisma"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/prisma"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-prolog.js b/ui/base1/ace/mode-prolog.js new file mode 100644 index 0000000..e0244d5 --- /dev/null +++ b/ui/base1/ace/mode-prolog.js @@ -0,0 +1,305 @@ +define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.github.com/stephenroller/prolog-tmbundle/master/Syntaxes/Prolog.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PrologHighlightRules = function () { + this.$rules = { start: [{ include: '#comment' }, + { include: '#basic_fact' }, + { include: '#rule' }, + { include: '#directive' }, + { include: '#fact' }], + '#atom': [{ token: 'constant.other.atom.prolog', + regex: '\\b[a-z][a-zA-Z0-9_]*\\b' }, + { token: 'constant.numeric.prolog', + regex: '-?\\d+(?:\\.\\d+)?' }, + { include: '#string' }], + '#basic_elem': [{ include: '#comment' }, + { include: '#statement' }, + { include: '#constants' }, + { include: '#operators' }, + { include: '#builtins' }, + { include: '#list' }, + { include: '#atom' }, + { include: '#variable' }], + '#basic_fact': [{ token: ['entity.name.function.fact.basic.prolog', + 'punctuation.end.fact.basic.prolog'], + regex: '([a-z]\\w*)(\\.)' }], + '#builtins': [{ token: 'support.function.builtin.prolog', + regex: '\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b' }], + '#comment': [{ token: ['punctuation.definition.comment.prolog', + 'comment.line.percentage.prolog'], + regex: '(%)(.*$)' }, + { token: 'punctuation.definition.comment.prolog', + regex: '/\\*', + push: [{ token: 'punctuation.definition.comment.prolog', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.prolog' }] }], + '#constants': [{ token: 'constant.language.prolog', + regex: '\\b(?:true|false|yes|no)\\b' }], + '#directive': [{ token: 'keyword.operator.directive.prolog', + regex: ':-', + push: [{ token: 'meta.directive.prolog', regex: '\\.', next: 'pop' }, + { include: '#comment' }, + { include: '#statement' }, + { defaultToken: 'meta.directive.prolog' }] }], + '#expr': [{ include: '#comments' }, + { token: 'meta.expression.prolog', + regex: '\\(', + push: [{ token: 'meta.expression.prolog', regex: '\\)', next: 'pop' }, + { include: '#expr' }, + { defaultToken: 'meta.expression.prolog' }] }, + { token: 'keyword.control.cutoff.prolog', regex: '!' }, + { token: 'punctuation.control.and.prolog', regex: ',' }, + { token: 'punctuation.control.or.prolog', regex: ';' }, + { include: '#basic_elem' }], + '#fact': [{ token: ['entity.name.function.fact.prolog', + 'punctuation.begin.fact.parameters.prolog'], + regex: '([a-z]\\w*)(\\()(?!.*:-)', + push: [{ token: ['punctuation.end.fact.parameters.prolog', + 'punctuation.end.fact.prolog'], + regex: '(\\))(\\.?)', + next: 'pop' }, + { include: '#parameter' }, + { defaultToken: 'meta.fact.prolog' }] }], + '#list': [{ token: 'punctuation.begin.list.prolog', + regex: '\\[(?=.*\\])', + push: [{ token: 'punctuation.end.list.prolog', + regex: '\\]', + next: 'pop' }, + { include: '#comment' }, + { token: 'punctuation.separator.list.prolog', regex: ',' }, + { token: 'punctuation.concat.list.prolog', + regex: '\\|', + push: [{ token: 'meta.list.concat.prolog', + regex: '(?=\\s*\\])', + next: 'pop' }, + { include: '#basic_elem' }, + { defaultToken: 'meta.list.concat.prolog' }] }, + { include: '#basic_elem' }, + { defaultToken: 'meta.list.prolog' }] }], + '#operators': [{ token: 'keyword.operator.prolog', + regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' }], + '#parameter': [{ token: 'variable.language.anonymous.prolog', + regex: '\\b_\\b' }, + { token: 'variable.parameter.prolog', + regex: '\\b[A-Z_]\\w*\\b' }, + { token: 'punctuation.separator.parameters.prolog', regex: ',' }, + { include: '#basic_elem' }, + { token: 'text', regex: '[^\\s]' }], + '#rule': [{ token: 'meta.rule.prolog', + regex: '(?=[a-z]\\w*.*:-)', + push: [{ token: 'punctuation.rule.end.prolog', + regex: '\\.', + next: 'pop' }, + { token: 'meta.rule.signature.prolog', + regex: '(?=[a-z]\\w*.*:-)', + push: [{ token: 'meta.rule.signature.prolog', + regex: '(?=:-)', + next: 'pop' }, + { token: 'entity.name.function.rule.prolog', + regex: '[a-z]\\w*(?=\\(|\\s*:-)' }, + { token: 'punctuation.rule.parameters.begin.prolog', + regex: '\\(', + push: [{ token: 'punctuation.rule.parameters.end.prolog', + regex: '\\)', + next: 'pop' }, + { include: '#parameter' }, + { defaultToken: 'meta.rule.parameters.prolog' }] }, + { defaultToken: 'meta.rule.signature.prolog' }] }, + { token: 'keyword.operator.definition.prolog', + regex: ':-', + push: [{ token: 'meta.rule.definition.prolog', + regex: '(?=\\.)', + next: 'pop' }, + { include: '#comment' }, + { include: '#expr' }, + { defaultToken: 'meta.rule.definition.prolog' }] }, + { defaultToken: 'meta.rule.prolog' }] }], + '#statement': [{ token: 'meta.statement.prolog', + regex: '(?=[a-z]\\w*\\()', + push: [{ token: 'punctuation.end.statement.parameters.prolog', + regex: '\\)', + next: 'pop' }, + { include: '#builtins' }, + { include: '#atom' }, + { token: 'punctuation.begin.statement.parameters.prolog', + regex: '\\(', + push: [{ token: 'meta.statement.parameters.prolog', + regex: '(?=\\))', + next: 'pop' }, + { token: 'punctuation.separator.statement.prolog', regex: ',' }, + { include: '#basic_elem' }, + { defaultToken: 'meta.statement.parameters.prolog' }] }, + { defaultToken: 'meta.statement.prolog' }] }], + '#string': [{ token: 'punctuation.definition.string.begin.prolog', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.prolog', + regex: '\'', + next: 'pop' }, + { token: 'constant.character.escape.prolog', regex: '\\\\.' }, + { token: 'constant.character.escape.quote.prolog', + regex: '\'\'' }, + { defaultToken: 'string.quoted.single.prolog' }] }], + '#variable': [{ token: 'variable.language.anonymous.prolog', + regex: '\\b_\\b' }, + { token: 'variable.other.prolog', + regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' }] }; + this.normalizeRules(); +}; +PrologHighlightRules.metaData = { fileTypes: ['plg', 'prolog'], + foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)', + foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)', + keyEquivalent: '^~P', + name: 'Prolog', + scopeName: 'source.prolog' }; +oop.inherits(PrologHighlightRules, TextHighlightRules); +exports.PrologHighlightRules = PrologHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = PrologHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "%"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/prolog"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/prolog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-properties.js b/ui/base1/ace/mode-properties.js new file mode 100644 index 0000000..a7b1d8f --- /dev/null +++ b/ui/base1/ace/mode-properties.js @@ -0,0 +1,69 @@ +define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PropertiesHighlightRules = function () { + var escapeRe = /\\u[0-9a-fA-F]{4}|\\/; + this.$rules = { + "start": [ + { + token: "comment", + regex: /[!#].*$/ + }, { + token: "keyword", + regex: /[=:]$/ + }, { + token: "keyword", + regex: /[=:]/, + next: "value" + }, { + token: "constant.language.escape", + regex: escapeRe + }, { + defaultToken: "variable" + } + ], + "value": [ + { + regex: /\\$/, + token: "string", + next: "value" + }, { + regex: /$/, + token: "string", + next: "start" + }, { + token: "constant.language.escape", + regex: escapeRe + }, { + defaultToken: "string" + } + ] + }; +}; +oop.inherits(PropertiesHighlightRules, TextHighlightRules); +exports.PropertiesHighlightRules = PropertiesHighlightRules; + +}); + +define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules; +var Mode = function () { + this.HighlightRules = PropertiesHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/properties"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/properties"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-protobuf.js b/ui/base1/ace/mode-protobuf.js new file mode 100644 index 0000000..966a825 --- /dev/null +++ b/ui/base1/ace/mode-protobuf.js @@ -0,0 +1,498 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "hypot|hypotf|hypotl|sscanf|system|snprintf|scanf|scalbn|scalbnf|scalbnl|scalbln|scalblnf|scalblnl|sin|sinh|sinhf|sinhl|sinf|sinl|signal|signbit|strstr|strspn|strncpy|strncat|strncmp|strcspn|strchr|strcoll|strcpy|strcat|strcmp|strtoimax|strtod|strtoul|strtoull|strtoumax|strtok|strtof|strtol|strtold|strtoll|strerror|strpbrk|strftime|strlen|strrchr|strxfrm|sprintf|setjmp|setvbuf|setlocale|setbuf|sqrt|sqrtf|sqrtl|swscanf|swprintf|srand|nearbyint|nearbyintf|nearbyintl|nexttoward|nexttowardf|nexttowardl|nextafter|nextafterf|nextafterl|nan|nanf|nanl|csin|csinh|csinhf|csinhl|csinf|csinl|csqrt|csqrtf|csqrtl|ccos|ccosh|ccoshf|ccosf|ccosl|cimag|cimagf|cimagl|ctime|ctan|ctanh|ctanhf|ctanhl|ctanf|ctanl|cos|cosh|coshf|coshl|cosf|cosl|conj|conjf|conjl|copysign|copysignf|copysignl|cpow|cpowf|cpowl|cproj|cprojf|cprojl|ceil|ceilf|ceill|cexp|cexpf|cexpl|clock|clog|clogf|clogl|clearerr|casin|casinh|casinhf|casinhl|casinf|casinl|cacos|cacosh|cacoshf|cacoshl|cacosf|cacosl|catan|catanh|catanhf|catanhl|catanf|catanl|calloc|carg|cargf|cargl|cabs|cabsf|cabsl|creal|crealf|creall|cbrt|cbrtf|cbrtl|time|toupper|tolower|tan|tanh|tanhf|tanhl|tanf|tanl|trunc|truncf|truncl|tgamma|tgammaf|tgammal|tmpnam|tmpfile|isspace|isnormal|isnan|iscntrl|isinf|isdigit|isunordered|isupper|ispunct|isprint|isfinite|iswspace|iswcntrl|iswctype|iswdigit|iswupper|iswpunct|iswprint|iswlower|iswalnum|iswalpha|iswgraph|iswxdigit|iswblank|islower|isless|islessequal|islessgreater|isalnum|isalpha|isgreater|isgreaterequal|isgraph|isxdigit|isblank|ilogb|ilogbf|ilogbl|imaxdiv|imaxabs|div|difftime|_Exit|ungetc|ungetwc|pow|powf|powl|puts|putc|putchar|putwc|putwchar|perror|printf|erf|erfc|erfcf|erfcl|erff|erfl|exit|exp|exp2|exp2f|exp2l|expf|expl|expm1|expm1f|expm1l|vsscanf|vsnprintf|vscanf|vsprintf|vswscanf|vswprintf|vprintf|vfscanf|vfprintf|vfwscanf|vfwprintf|vwscanf|vwprintf|va_start|va_copy|va_end|va_arg|qsort|fscanf|fsetpos|fseek|fclose|ftell|fopen|fdim|fdimf|fdiml|fpclassify|fputs|fputc|fputws|fputwc|fprintf|feholdexcept|fesetenv|fesetexceptflag|fesetround|feclearexcept|fetestexcept|feof|feupdateenv|feraiseexcept|ferror|fegetenv|fegetexceptflag|fegetround|fflush|fwscanf|fwide|fwprintf|fwrite|floor|floorf|floorl|fabs|fabsf|fabsl|fgets|fgetc|fgetpos|fgetws|fgetwc|freopen|free|fread|frexp|frexpf|frexpl|fmin|fminf|fminl|fmod|fmodf|fmodl|fma|fmaf|fmal|fmax|fmaxf|fmaxl|ldiv|ldexp|ldexpf|ldexpl|longjmp|localtime|localeconv|log|log1p|log1pf|log1pl|log10|log10f|log10l|log2|log2f|log2l|logf|logl|logb|logbf|logbl|labs|lldiv|llabs|llrint|llrintf|llrintl|llround|llroundf|llroundl|lrint|lrintf|lrintl|lround|lroundf|lroundl|lgamma|lgammaf|lgammal|wscanf|wcsstr|wcsspn|wcsncpy|wcsncat|wcsncmp|wcscspn|wcschr|wcscoll|wcscpy|wcscat|wcscmp|wcstoimax|wcstod|wcstoul|wcstoull|wcstoumax|wcstok|wcstof|wcstol|wcstold|wcstoll|wcstombs|wcspbrk|wcsftime|wcslen|wcsrchr|wcsrtombs|wcsxfrm|wctob|wctomb|wcrtomb|wprintf|wmemset|wmemchr|wmemcpy|wmemcmp|wmemmove|assert|asctime|asin|asinh|asinhf|asinhl|asinf|asinl|acos|acosh|acoshf|acoshl|acosf|acosl|atoi|atof|atol|atoll|atexit|atan|atanh|atanhf|atanhl|atan2|atan2f|atan2l|atanf|atanl|abs|abort|gets|getc|getchar|getenv|getwc|getwchar|gmtime|rint|rintf|rintl|round|roundf|roundl|rename|realloc|rewind|remove|remquo|remquof|remquol|remainder|remainderf|remainderl|rand|raise|bsearch|btowc|modf|modff|modfl|memset|memchr|memcpy|memcmp|memmove|mktime|malloc|mbsinit|mbstowcs|mbsrtowcs|mbtowc|mblen|mbrtowc|mbrlen"; +var c_cppHighlightRules = function (extraKeywords) { + var keywordControls = ("break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using"); + var storageType = ("asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" + + "class|wchar_t|template|char16_t|char32_t"); + var storageModifiers = ("const|extern|register|restrict|static|volatile|inline|private|" + + "protected|public|friend|explicit|virtual|export|mutable|typename|" + + "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"); + var keywordOperators = ("and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"); + var builtinConstants = ("NULL|true|false|TRUE|FALSE|nullptr"); + var keywordMapper = this.$keywords = this.createKeywordMapper(Object.assign({ + "keyword.control": keywordControls, + "storage.type": storageType, + "storage.modifier": storageModifiers, + "keyword.operator": keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants, + "support.function.C99.c": cFunctions + }, extraKeywords), "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type + this.$rules = { + "start": [ + { + token: "comment", + regex: "//$", + next: "start" + }, { + token: "comment", + regex: "//", + next: "singleLineComment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: "'(?:" + escapeRe + "|.)?'" + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "constant.language.escape", regex: formatRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: 'R"\\(', + stateName: "rawString", + next: [ + { token: "string.end", regex: '\\)"', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b", + next: "directive" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }, { + token: "keyword.operator", + regex: /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(c_cppHighlightRules, TextHighlightRules); +exports.c_cppHighlightRules = c_cppHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = c_cppHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/c_cpp"; + this.snippetFileId = "ace/snippets/c_cpp"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ProtobufHighlightRules = function () { + var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" + + "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" + + "string|bytes"; + var keywordDeclaration = "message|required|optional|repeated|package|" + + "import|option|enum"; + var keywordMapper = this.createKeywordMapper({ + "keyword.declaration.protobuf": keywordDeclaration, + "support.type": builtinTypes + }, "identifier"); + this.$rules = { + "start": [{ + token: "comment", + regex: /\/\/.*$/ + }, { + token: "comment", + regex: /\/\*/, + next: "comment" + }, { + token: "constant", + regex: "<[^>]+>" + }, { + regex: "=", + token: "keyword.operator.assignment.protobuf" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: '[\'](?:(?:\\\\.)|(?:[^\'\\\\]))*?[\']' + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }], + "comment": [{ + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ProtobufHighlightRules, TextHighlightRules); +exports.ProtobufHighlightRules = ProtobufHighlightRules; + +}); + +define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var CMode = require("./c_cpp").Mode; +var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + CMode.call(this); + this.foldingRules = new CStyleFoldMode(); + this.HighlightRules = ProtobufHighlightRules; +}; +oop.inherits(Mode, CMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/protobuf"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/protobuf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-prql.js b/ui/base1/ace/mode-prql.js new file mode 100644 index 0000000..f86c0d1 --- /dev/null +++ b/ui/base1/ace/mode-prql.js @@ -0,0 +1,323 @@ +define("ace/mode/prql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){// https://prql-lang.org/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PrqlHighlightRules = function () { + var builtinFunctions = "min|max|sum|average|stddev|every|any|concat_array|count|" + + "lag|lead|first|last|rank|rank_dense|row_number|" + + "round|as|in|" + + "tuple_every|tuple_map|tuple_zip|_eq|_is_null|" + + "from_text|" + + "lower|upper|" + + "read_parquet|read_csv"; + var builtinTypes = [ + "bool", + "int", + "int8", + "int16", + "int32", + "int64", + "int128", + "float", + "text", + "timestamp", + "set" + ].join("|"); + var keywordMapper = this.createKeywordMapper({ + "constant.language": "null", + "constant.language.boolean": "true|false", + "keyword": "let|into|case|prql|type|module|internal", + "storage.type": "let|func", + "support.function": builtinFunctions, + "support.type": builtinTypes, + "variable.language": "date|math" + }, "identifier"); + var escapeRe = /\\(\d+|['"\\&bfnrt]|u\{[0-9a-fA-F]{1,6}\}|x[0-9a-fA-F]{2})/; + var identifierRe = /[A-Za-z_][a-z_A-Z0-9]/.source; + var numRe = /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/.source; + var bidi = "[\\u202A\\u202B\\u202D\\u202E\\u2066\\u2067\\u2068\\u202C\\u2069]"; + this.$rules = { + start: [ + { + token: "string.start", + regex: 's?"', + next: "string" + }, { + token: "string.start", + regex: 'f"', + next: "fstring" + }, { + token: "string.start", + regex: 'r"', + next: "rstring" + }, { + token: "string.single", + start: "'", + end: "'" + }, { + token: "string.character", + regex: "'(?:" + escapeRe.source + "|.)'?" + }, { + token: "constant.language", + regex: "^" + identifierRe + "*" + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(years|months|weeks|days|hours|minutes|seconds|milliseconds|microseconds)" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: numRe + }, { + token: "comment.block.documentation", + regex: "#!.*" + }, { + token: "comment.line.number-sign", + regex: "#.*" + }, { + token: "keyword.operator", + regex: /\|\s*/, + next: "pipe" + }, { + token: "keyword.operator", + regex: /->|=>|==|!=|>=|<=|~=|&&|\|\||\?\?|\/\/|@/ + }, { + token: "invalid.illegal", + regex: bidi + }, { + token: "punctuation.operator", + regex: /[,`]/ + }, { + token: keywordMapper, + regex: "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b" + }, { + token: "paren.lparen", + regex: /[\[({]/ + }, { + token: "paren.rparen", + regex: /[\])}]/ + } + ], + pipe: [{ + token: "constant.language", + regex: identifierRe + "*", + next: "pop" + }, { + token: "error", + regex: "", + next: "pop" + }], + string: [{ + token: "constant.character.escape", + regex: escapeRe + }, { + token: "text", + regex: /\\(\s|$)/, + next: "stringGap" + }, { + token: "string.end", + regex: '"', + next: "start" + }, { + token: "invalid.illegal", + regex: bidi + }, { + defaultToken: "string.double" + }], + stringGap: [{ + token: "text", + regex: /\\/, + next: "string" + }, { + token: "error", + regex: "", + next: "start" + }], + fstring: [{ + token: "constant.character.escape", + regex: escapeRe + }, { + token: "string.end", + regex: '"', + next: "start" + }, { + token: "invalid.illegal", + regex: bidi + }, { + token: "paren.lparen", + regex: "{", + push: "fstringParenRules" + }, { + token: "invalid.illegal", + regex: bidi + }, { + defaultToken: "string" + }], + fstringParenRules: [{ + token: "constant.language", + regex: "^" + identifierRe + "*" + }, { + token: "paren.rparen", + regex: "}", + next: "pop" + }], + rstring: [{ + token: "string.end", + regex: '"', + next: "start" + }, { + token: "invalid.illegal", + regex: bidi + }, { + defaultToken: "string" + }] + }; + this.normalizeRules(); +}; +oop.inherits(PrqlHighlightRules, TextHighlightRules); +exports.PrqlHighlightRules = PrqlHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/prql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prql_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./prql_highlight_rules").PrqlHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/prql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/prql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-puppet.js b/ui/base1/ace/mode-puppet.js new file mode 100644 index 0000000..26168cb --- /dev/null +++ b/ui/base1/ace/mode-puppet.js @@ -0,0 +1,316 @@ +define("ace/mode/puppet_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PuppetHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ['keyword.type.puppet', 'constant.class.puppet', 'keyword.inherits.puppet', 'constant.class.puppet'], + regex: "^\\s*(class)(\\s+(?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+\\s*)(?:(inherits\\s*)(\\s+(?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+\\s*))?" + }, + { + token: ['storage.function.puppet', 'name.function.puppet', 'punctuation.lpar'], + regex: "(^\\s*define)(\\s+[a-zA-Z0-9_:]+\\s*)(\\()", + push: [{ + token: 'punctuation.rpar.puppet', + regex: "\\)", + next: 'pop' + }, + { include: "constants" }, + { include: "variable" }, + { include: "strings" }, + { include: "operators" }, + { defaultToken: 'string' }] + }, + { + token: ["language.support.class", "keyword.operator"], + regex: "\\b([a-zA-Z_]+)(\\s+=>)" + }, + { + token: ["exported.resource.puppet", "keyword.name.resource.puppet", "paren.lparen"], + regex: "(\\@\\@)?(\\s*[a-zA-Z_]*)(\\s*\\{)" + }, + { + token: "qualified.variable.puppet", + regex: "(\\$([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)*::[a-z0-9_][a-zA-Z0-9_]*)" + }, + { + token: "singleline.comment.puppet", + regex: '#(.)*$' + }, + { + token: "multiline.comment.begin.puppet", + regex: '^\\s*\\/\\*', + push: "blockComment" + }, + { + token: "keyword.control.puppet", + regex: "\\b(case|if|unless|else|elsif|in|default:|and|or)\\s+(?!::)" + }, + { + token: "keyword.control.puppet", + regex: "\\b(import|default|inherits|include|require|contain|node|application|consumes|environment|site|function|produces)\\b" + }, + { + token: "support.function.puppet", + regex: "\\b(lest|str2bool|escape|gsub|Timestamp|Timespan|with|alert|crit|debug|notice|sprintf|split|step|strftime|slice|shellquote|type|sha1|defined|scanf|reverse_each|regsubst|return|emerg|reduce|err|failed|fail|versioncmp|file|generate|then|info|realize|search|tag|tagged|template|epp|warning|hiera_include|each|assert_type|binary_file|create_resources|dig|digest|filter|lookup|find_file|fqdn_rand|hiera_array|hiera_hash|inline_epp|inline_template|map|match|md5|new|next)\\b" + }, + { + token: "constant.types.puppet", + regex: "\\b(String|File|Package|Service|Class|Integer|Array|Catalogentry|Variant|Boolean|Undef|Number|Hash|Float|Numeric|NotUndef|Callable|Optional|Any|Regexp|Sensitive|Sensitive.new|Type|Resource|Default|Enum|Scalar|Collection|Data|Pattern|Tuple|Struct)\\b" + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + }, + { include: "variable" }, + { include: "constants" }, + { include: "strings" }, + { include: "operators" }, + { + token: "regexp.begin.string.puppet", + regex: "\\s*(\\/(\\S)+)\\/" + } + ], + blockComment: [{ + regex: "\\*\\/", + token: "multiline.comment.end.puppet", + next: "pop" + }, { + defaultToken: "comment" + }], + "constants": [ + { + token: "constant.language.puppet", + regex: "\\b(false|true|running|stopped|installed|purged|latest|file|directory|held|undef|present|absent|link|mounted|unmounted)\\b" + } + ], + "variable": [ + { + token: "variable.puppet", + regex: "(\\$[a-z0-9_\{][a-zA-Z0-9_]*)" + } + ], + "strings": [ + { + token: "punctuation.quote.puppet", + regex: "'", + push: [{ + token: 'punctuation.quote.puppet', + regex: "'", + next: 'pop' + }, + { include: "escaped_chars" }, + { defaultToken: 'string' }] + }, + { + token: "punctuation.quote.puppet", + regex: '"', + push: [{ + token: 'punctuation.quote.puppet', + regex: '"', + next: 'pop' + }, + { include: "escaped_chars" }, + { include: "variable" }, + { defaultToken: 'string' }] + } + ], + "escaped_chars": [ + { + token: "constant.escaped_char.puppet", + regex: "\\\\." + } + ], + "operators": [ + { + token: "keyword.operator", + regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|::|," + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(PuppetHighlightRules, TextHighlightRules); +exports.PuppetHighlightRules = PuppetHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/puppet",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/puppet_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PuppetHighlightRules = require("./puppet_highlight_rules").PuppetHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + TextMode.call(this); + this.HighlightRules = PuppetHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/puppet"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/puppet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-python.js b/ui/base1/ace/mode-python.js new file mode 100644 index 0000000..27b5b6e --- /dev/null +++ b/ui/base1/ace/mode-python.js @@ -0,0 +1,476 @@ +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * TODO: python delimiters + */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PythonHighlightRules = function () { + var keywords = ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield|async|await|nonlocal"); + var builtinConstants = ("True|False|None|NotImplemented|Ellipsis|__debug__"); + var builtinFunctions = ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes"); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "variable.language": "self|cls", + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + this.$rules = { + "start": [{ + token: "comment", + regex: "#.*$" + }, { + token: "string", // multi line """ string start + regex: strPre + '"{3}', + next: "qqstring3" + }, { + token: "string", // " string + regex: strPre + '"(?=.)', + next: "qqstring" + }, { + token: "string", // multi line ''' string start + regex: strPre + "'{3}", + next: "qstring3" + }, { + token: "string", // ' string + regex: strPre + "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" + }, { + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" + }, { + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" + }, { + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" + }, { + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" + }, { + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" + }, { + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" + }, { + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + }, { + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" + }, { + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" + }, { + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" + }, { + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: ["keyword", "text", "entity.name.function"], + regex: "(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{ + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'[^']*'" + }, { + token: "string", + regex: '"[^"]*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + }, { + token: 'paren.rparen', + regex: "}", + next: 'pop' + }, { + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"], // method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; +oop.inherits(PythonHighlightRules, TextHighlightRules); +exports.PythonHighlightRules = PythonHighlightRules; + +}); + +define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; +var PythonFoldMode = require("./folding/pythonic").FoldMode; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = PythonHighlightRules; + this.foldingRules = new PythonFoldMode("\\:"); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$pairQuotesAfter = { + "'": /[ruf]/i, + '"': /[ruf]/i + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/python"; + this.snippetFileId = "ace/snippets/python"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/python"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-qml.js b/ui/base1/ace/mode-qml.js new file mode 100644 index 0000000..150bbb2 --- /dev/null +++ b/ui/base1/ace/mode-qml.js @@ -0,0 +1,346 @@ +define("ace/mode/qml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var QmlHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|" + + "readonly|string|int|bool|date|color|url|real|double|var|variant|" + + "height|width|anchors|parent|" + + "Abstract3DSeries|AbstractActionInput|AbstractAnimation|AbstractAxis|AbstractAxis3D|AbstractAxisInput|" + + "AbstractBarSeries|AbstractButton|AbstractClipAnimator|AbstractClipBlendNode|AbstractDataProxy|AbstractGraph3D|" + + "AbstractInputHandler3D|AbstractPhysicalDevice|AbstractRayCaster|AbstractSeries|AbstractSkeleton|AbstractTextureImage|" + + "Accelerometer|AccelerometerReading|Accessible|Action|ActionGroup|ActionInput|" + + "AdditiveClipBlend|Address|Affector|Age|AlphaCoverage|AlphaTest|" + + "Altimeter|AltimeterReading|AmbientLightReading|AmbientLightSensor|AmbientTemperatureReading|AmbientTemperatureSensor|" + + "AnalogAxisInput|AnchorAnimation|AnchorChanges|AngleDirection|AnimatedImage|AnimatedSprite|" + + "Animation|AnimationController|AnimationGroup|Animator|ApplicationWindow|ApplicationWindowStyle|" + + "AreaSeries|Armature|AttenuationModelInverse|AttenuationModelLinear|Attractor|Attribute|" + + "Audio|AudioCategory|AudioEngine|AudioListener|AudioSample|AuthenticationDialogRequest|" + + "Axis|AxisAccumulator|AxisSetting|BackspaceKey|Bar3DSeries|BarCategoryAxis|" + + "BarDataProxy|BarSeries|BarSet|Bars3D|BaseKey|Behavior|" + + "Binding|Blend|BlendEquation|BlendEquationArguments|BlendedClipAnimator|BlitFramebuffer|" + + "BluetoothDiscoveryModel|BluetoothService|BluetoothSocket|BorderImage|BorderImageMesh|BoxPlotSeries|" + + "BoxSet|BrightnessContrast|Buffer|BusyIndicator|BusyIndicatorStyle|Button|" + + "ButtonAxisInput|ButtonGroup|ButtonStyle|Calendar|CalendarStyle|Camera|" + + "Camera3D|CameraCapabilities|CameraCapture|CameraExposure|CameraFlash|CameraFocus|" + + "CameraImageProcessing|CameraLens|CameraRecorder|CameraSelector|CandlestickSeries|CandlestickSet|" + + "Canvas|Canvas3D|Canvas3DAbstractObject|Canvas3DActiveInfo|Canvas3DBuffer|Canvas3DContextAttributes|" + + "Canvas3DFrameBuffer|Canvas3DProgram|Canvas3DRenderBuffer|Canvas3DShader|Canvas3DShaderPrecisionFormat|Canvas3DTexture|" + + "Canvas3DTextureProvider|Canvas3DUniformLocation|CanvasGradient|CanvasImageData|CanvasPixelArray|Category|" + + "CategoryAxis|CategoryAxis3D|CategoryModel|CategoryRange|ChangeLanguageKey|ChartView|" + + "CheckBox|CheckBoxStyle|CheckDelegate|CircularGauge|CircularGaugeStyle|ClearBuffers|" + + "ClipAnimator|ClipPlane|CloseEvent|ColorAnimation|ColorDialog|ColorDialogRequest|" + + "ColorGradient|ColorGradientStop|ColorMask|ColorOverlay|Colorize|Column|" + + "ColumnLayout|ComboBox|ComboBoxStyle|Compass|CompassReading|Component|Component3D|" + + "ComputeCommand|ConeGeometry|ConeMesh|ConicalGradient|Connections|ContactDetail|" + + "ContactDetails|Container|Context2D|Context3D|ContextMenuRequest|Control|" + + "CoordinateAnimation|CuboidGeometry|CuboidMesh|CullFace|CumulativeDirection|" + + "Custom3DItem|Custom3DLabel|Custom3DVolume|CustomParticle|CylinderGeometry|CylinderMesh|" + + "Date|DateTimeAxis|DelayButton|DelayButtonStyle|DelegateChoice|DelegateChooser|DelegateModel|" + + "DelegateModelGroup|DepthTest|Desaturate|Dial|DialStyle|Dialog|DialogButtonBox|DiffuseMapMaterial|" + + "DiffuseSpecularMapMaterial|DiffuseSpecularMaterial|Direction|DirectionalBlur|DirectionalLight|DispatchCompute|" + + "Displace|DistanceReading|DistanceSensor|Dithering|DoubleValidator|Drag|DragEvent|DragHandler|Drawer|DropArea|" + + "DropShadow|DwmFeatures|DynamicParameter|EditorialModel|Effect|EllipseShape|Emitter|EnterKey|EnterKeyAction|" + + "Entity|EntityLoader|EnvironmentLight|EventConnection|EventPoint|EventTouchPoint|ExclusiveGroup|ExtendedAttributes|" + + "ExtrudedTextGeometry|ExtrudedTextMesh|FastBlur|FileDialog|FileDialogRequest|FillerKey|FilterKey|FinalState|" + + "FirstPersonCameraController|Flickable|Flipable|Flow|FocusScope|FolderListModel|FontDialog|FontLoader|" + + "FontMetrics|FormValidationMessageRequest|ForwardRenderer|Frame|FrameAction|FrameGraphNode|Friction|" + + "FrontFace|FrustumCulling|FullScreenRequest|GLStateDumpExt|GammaAdjust|Gauge|GaugeStyle|GaussianBlur|" + + "GeocodeModel|Geometry|GeometryRenderer|GestureEvent|Glow|GoochMaterial|Gradient|GradientStop|GraphicsApiFilter|" + + "GraphicsInfo|Gravity|Grid|GridLayout|GridMesh|GridView|GroupBox|GroupGoal|Gyroscope|GyroscopeReading|HBarModelMapper|" + + "HBoxPlotModelMapper|HCandlestickModelMapper|HPieModelMapper|HXYModelMapper|HandlerPoint|HandwritingInputPanel|" + + "HandwritingModeKey|HeightMapSurfaceDataProxy|HideKeyboardKey|HistoryState|HolsterReading|HolsterSensor|HorizontalBarSeries|" + + "|HorizontalPercentBarSeries|HorizontalStackedBarSeries|HoverHandler|HueSaturation|HumidityReading|HumiditySensor|" + + "IRProximityReading|IRProximitySensor|Icon|Image|ImageModel|ImageParticle|InnerShadow|InputChord|InputContext|InputEngine|" + + "InputHandler3D|InputMethod|InputModeKey|InputPanel|InputSequence|InputSettings|Instantiator|IntValidator|InvokedServices|" + + "Item|ItemDelegate|ItemGrabResult|ItemModelBarDataProxy|ItemModelScatterDataProxy|ItemModelSurfaceDataProxy|ItemParticle|" + + "ItemSelectionModel|IviApplication|IviSurface|JavaScriptDialogRequest|Joint|JumpList|JumpListCategory|JumpListDestination|" + + "JumpListLink|JumpListSeparator|Key|KeyEvent|KeyIcon|KeyNavigation|KeyPanel|KeyboardColumn|KeyboardDevice|KeyboardHandler|" + + "KeyboardLayout|KeyboardLayoutLoader|KeyboardRow|KeyboardStyle|KeyframeAnimation|Keys|Label|Layer|LayerFilter|Layout|" + + "LayoutMirroring|Legend|LerpBlend|LevelAdjust|LevelOfDetail|LevelOfDetailBoundingSphere|LevelOfDetailLoader|" + + "LevelOfDetailSwitch|LidReading|LidSensor|Light|Light3D|LightReading|LightSensor|LineSeries|LineShape|LineWidth|" + + "LinearGradient|ListElement|ListModel|ListView|Loader|Locale|Location|LogValueAxis|LogValueAxis3DFormatter|LoggingCategory|" + + "LogicalDevice|Magnetometer|MagnetometerReading|Map|MapCircle|MapCircleObject|MapCopyrightNotice|MapGestureArea|MapIconObject|" + + "MapItemGroup|MapItemView|MapObjectView|MapParameter|MapPinchEvent|MapPolygon|MapPolygonObject|MapPolyline|MapPolylineObject|" + + "MapQuickItem|MapRectangle|MapRoute|MapRouteObject|MapType|Margins|MaskShape|MaskedBlur|Material|Matrix4x4|MediaPlayer|" + + "MemoryBarrier|Menu|MenuBar|MenuBarItem|MenuBarStyle|MenuItem|MenuSeparator|MenuStyle|Mesh|MessageDialog|ModeKey|MorphTarget|" + + "MorphingAnimation|MouseArea|MouseDevice|MouseEvent|MouseHandler|MultiPointHandler|MultiPointTouchArea|MultiSampleAntiAliasing|" + + "Navigator|NdefFilter|NdefMimeRecord|NdefRecord|NdefTextRecord|NdefUriRecord|NearField|NoDepthMask|NoDraw|Node|NodeInstantiator|" + + "NormalDiffuseMapAlphaMaterial|NormalDiffuseMapMaterial|NormalDiffuseSpecularMapMaterial|Number|NumberAnimation|NumberKey|Object3D|" + + "ObjectModel|ObjectPicker|OpacityAnimator|OpacityMask|OpenGLInfo|OrbitCameraController|OrientationReading|OrientationSensor|Overlay|" + + "Package|Page|PageIndicator|Pane|ParallelAnimation|Parameter|ParentAnimation|ParentChange|Particle|ParticleGroup|ParticlePainter|" + + "ParticleSystem|Path|PathAngleArc|PathAnimation|PathArc|PathAttribute|PathCubic|PathCurve|PathElement|PathInterpolator|PathLine|" + + "PathMove|PathPercent|PathQuad|PathSvg|PathView|PauseAnimation|PerVertexColorMaterial|PercentBarSeries|PhongAlphaMaterial|" + + "PhongMaterial|PickEvent|PickLineEvent|PickPointEvent|PickTriangleEvent|PickingSettings|Picture|PieMenu|PieMenuStyle|PieSeries|" + + "PieSlice|PinchArea|PinchEvent|PinchHandler|Place|PlaceAttribute|PlaceSearchModel|PlaceSearchSuggestionModel|PlaneGeometry|" + + "PlaneMesh|PlayVariation|Playlist|PlaylistItem|Plugin|PluginParameter|PointDirection|PointHandler|PointLight|PointSize|" + + "PointerDevice|PointerDeviceHandler|PointerEvent|PointerHandler|PolarChartView|PolygonOffset|Popup|Position|PositionSource|" + + "Positioner|PressureReading|PressureSensor|Product|ProgressBar|ProgressBarStyle|PropertyAction|PropertyAnimation|PropertyChanges|" + + "ProximityFilter|ProximityReading|ProximitySensor|QAbstractState|QAbstractTransition|QSignalTransition|" + + "QVirtualKeyboardSelectionListModel|Qt|QtMultimedia|QtObject|QtPositioning|QuaternionAnimation|QuotaRequest|RadialBlur|" + + "RadialGradient|Radio|RadioButton|RadioButtonStyle|RadioData|RadioDelegate|RangeSlider|Ratings|RayCaster|Rectangle|" + + "RectangleShape|RectangularGlow|RecursiveBlur|RegExpValidator|RegisterProtocolHandlerRequest|RenderCapture|" + + "RenderCaptureReply|RenderPass|RenderPassFilter|RenderSettings|RenderState|RenderStateSet|RenderSurfaceSelector|" + + "RenderTarget|RenderTargetOutput|RenderTargetSelector|Repeater|ReviewModel|Rotation|RotationAnimation|RotationAnimator|" + + "RotationReading|RotationSensor|RoundButton|Route|RouteLeg|RouteManeuver|RouteModel|RouteQuery|RouteSegment|Row|" + + "RowLayout|Scale|ScaleAnimator|Scatter3D|Scatter3DSeries|ScatterDataProxy|ScatterSeries|Scene2D|Scene3D|SceneLoader|" + + "ScissorTest|Screen|ScreenRayCaster|ScriptAction|ScrollBar|ScrollIndicator|ScrollView|ScrollViewStyle|ScxmlStateMachine|" + + "SeamlessCubemap|SelectionListItem|Sensor|SensorGesture|SensorGlobal|SensorReading|SequentialAnimation|Settings|" + + "SettingsStore|ShaderEffect|ShaderEffectSource|ShaderProgram|ShaderProgramBuilder|Shape|ShellSurface|ShellSurfaceItem|" + + "ShiftHandler|ShiftKey|Shortcut|SignalSpy|SignalTransition|SinglePointHandler|Skeleton|SkeletonLoader|Slider|SliderStyle|" + + "SmoothedAnimation|SortPolicy|Sound|SoundEffect|SoundInstance|SpaceKey|SphereGeometry|SphereMesh|SpinBox|SpinBoxStyle|" + + "SplineSeries|SplitView|SpotLight|SpringAnimation|Sprite|SpriteGoal|SpriteSequence|Stack|StackLayout|StackView|" + + "StackViewDelegate|StackedBarSeries|State|StateChangeScript|StateGroup|StateMachine|StateMachineLoader|StatusBar|" + + "StatusBarStyle|StatusIndicator|StatusIndicatorStyle|StencilMask|StencilOperation|StencilOperationArguments|StencilTest|" + + "StencilTestArguments|Store|String|Supplier|Surface3D|Surface3DSeries|SurfaceDataProxy|SwipeDelegate|SwipeView|Switch|" + + "SwitchDelegate|SwitchStyle|SymbolModeKey|SystemPalette|Tab|TabBar|TabButton|TabView|TabViewStyle|TableView|TableViewColumn|" + + "TableViewStyle|TapHandler|TapReading|TapSensor|TargetDirection|TaskbarButton|Technique|TechniqueFilter|TestCase|Text|TextArea|" + + "TextAreaStyle|TextEdit|TextField|TextFieldStyle|TextInput|TextMetrics|TextureImage|TextureImageFactory|Theme3D|ThemeColor|" + + "ThresholdMask|ThumbnailToolBar|ThumbnailToolButton|TiltReading|TiltSensor|TimeoutTransition|Timer|ToggleButton|" + + "ToggleButtonStyle|ToolBar|ToolBarStyle|ToolButton|ToolSeparator|ToolTip|Torch|TorusGeometry|TorusMesh|TouchEventSequence|" + + "TouchInputHandler3D|TouchPoint|Trace|TraceCanvas|TraceInputArea|TraceInputKey|TraceInputKeyPanel|TrailEmitter|Transaction|" + + "Transform|Transition|Translate|TreeView|TreeViewStyle|Tumbler|TumblerColumn|TumblerStyle|Turbulence|UniformAnimator|User|" + + "VBarModelMapper|VBoxPlotModelMapper|VCandlestickModelMapper|VPieModelMapper|VXYModelMapper|ValueAxis|ValueAxis3D|" + + "ValueAxis3DFormatter|Vector3dAnimation|VertexBlendAnimation|Video|VideoOutput|ViewTransition|Viewport|" + + "VirtualKeyboardSettings|Wander|WavefrontMesh|WaylandClient|WaylandCompositor|WaylandHardwareLayer|" + + "WaylandOutput|WaylandQuickItem|WaylandSeat|WaylandSurface|WaylandView|Waypoint|" + + "WebChannel|WebEngine|WebEngineAction|WebEngineCertificateError|WebEngineDownloadItem|WebEngineHistory|" + + "WebEngineHistoryListModel|WebEngineLoadRequest|WebEngineNavigationRequest|WebEngineNewViewRequest|WebEngineProfile|WebEngineScript|" + + "WebEngineSettings|WebEngineView|WebSocket|WebSocketServer|WebView|WebViewLoadRequest|" + + "WheelEvent|Window|WlShell|WlShellSurface|WorkerScript|XAnimator|" + + "XYPoint|XYSeries|XdgDecorationManagerV1|XdgPopup|XdgPopupV5|XdgPopupV6|" + + "XdgShell|XdgShellV5|XdgShellV6|XdgSurface|XdgSurfaceV5|XdgSurfaceV6|" + + "XdgToplevel|XdgToplevelV6|XmlListModel|XmlRole|YAnimator|ZoomBlur", + "storage.type": "const|let|var|function|" + // js + "property|", // qml + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "print|console\\.log", + "constant.language.boolean": "true|false" + }, "identifier"); + this.$rules = { + "start": [ + { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "text", + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "comment", + regex: "\\/\\/.*$" + }, { + token: "comment.start", + regex: "\\/\\*", + next: "comment" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + token: keywordMapper, + regex: "\\b\\w+\\b" + } + ], + "string": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + } + ], + "comment": [ + { + token: "comment.end", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; +}; +oop.inherits(QmlHighlightRules, TextHighlightRules); +exports.QmlHighlightRules = QmlHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/qml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/qml_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var QmlHighlightRules = require("./qml_highlight_rules").QmlHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = QmlHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'" }; + this.$id = "ace/mode/qml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/qml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-r.js b/ui/base1/ace/mode-r.js new file mode 100644 index 0000000..4115911 --- /dev/null +++ b/ui/base1/ace/mode-r.js @@ -0,0 +1,387 @@ +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * tex_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = function (textClass) { + if (!textClass) + textClass = "text"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "%.*$" + }, { + token: textClass, // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", + next: "nospell" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])}]" + }, { + token: textClass, + regex: "\\s+" + } + ], + "nospell": [ + { + token: "comment", + regex: "%.*$", + next: "start" + }, { + token: "nospell." + textClass, // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])", + next: "start" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])]" + }, { + token: "paren.keyword.operator", + regex: "}", + next: "start" + }, { + token: "nospell." + textClass, + regex: "\\s+" + }, { + token: "nospell." + textClass, + regex: "\\w+" + } + ] + }; +}; +oop.inherits(TexHighlightRules, TextHighlightRules); +exports.TexHighlightRules = TexHighlightRules; + +}); + +define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module){/* + * r_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; +var RHighlightRules = function () { + var keywords = lang.arrayToMap(("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") + .split("|")); + var buildinConstants = lang.arrayToMap(("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + + "NA_complex_").split("|")); + this.$rules = { + "start": [ + { + token: "comment.sectionhead", + regex: "#+(?!').*(?:----|====|####)\\s*$" + }, + { + token: "comment", + regex: "#+'", + next: "rd-start" + }, + { + token: "comment", + regex: "#.*$" + }, + { + token: "string", // multi line string start + regex: '["]', + next: "qqstring" + }, + { + token: "string", // multi line string start + regex: "[']", + next: "qstring" + }, + { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+[Li]?\\b" + }, + { + token: "constant.numeric", // explicit integer + regex: "\\d+L\\b" + }, + { + token: "constant.numeric", // number + regex: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token: "constant.numeric", // number with leading decimal + regex: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token: "constant.language.boolean", + regex: "(?:TRUE|FALSE|T|F)\\b" + }, + { + token: "identifier", + regex: "`.*?`" + }, + { + onMatch: function (value) { + if (keywords[value]) + return "keyword"; + else if (buildinConstants[value]) + return "constant.language"; + else if (value == '...' || value.match(/^\.\.\d+$/)) + return "variable.language"; + else + return "identifier"; + }, + regex: "[a-zA-Z.][a-zA-Z0-9._]*\\b" + }, + { + token: "keyword.operator", + regex: "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" + }, + { + token: "keyword.operator", // infix operators + regex: "%.*?%" + }, + { + token: "paren.keyword.operator", + regex: "[[({]" + }, + { + token: "paren.keyword.operator", + regex: "[\\])}]" + }, + { + token: "text", + regex: "\\s+" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, + { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, + { + token: "string", + regex: '.+' + } + ] + }; + var rdRules = new TexHighlightRules("comment").getRules(); + for (var i = 0; i < rdRules["start"].length; i++) { + rdRules["start"][i].token += ".virtual-comment"; + } + this.addRules(rdRules, "rd-"); + this.$rules["rd-start"].unshift({ + token: "text", + regex: "^", + next: "start" + }); + this.$rules["rd-start"].unshift({ + token: "keyword", + regex: "@(?!@)[^ ]*" + }); + this.$rules["rd-start"].unshift({ + token: "comment", + regex: "@@" + }); + this.$rules["rd-start"].push({ + token: "comment", + regex: "[^%\\\\[({\\])}]+" + }); +}; +oop.inherits(RHighlightRules, TextHighlightRules); +exports.RHighlightRules = RHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/r",["require","exports","module","ace/unicode","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module){/* + * r.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var unicode = require("../unicode"); +var Range = require("../range").Range; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var RHighlightRules = require("./r_highlight_rules").RHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + this.HighlightRules = RHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.tokenRe = new RegExp("^[" + unicode.wordChars + "._]+", "g"); + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "._]|\s])+", "g"); + this.$id = "ace/mode/r"; + this.snippetFileId = "ace/snippets/r"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/r"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-raku.js b/ui/base1/ace/mode-raku.js new file mode 100644 index 0000000..77b40c3 --- /dev/null +++ b/ui/base1/ace/mode-raku.js @@ -0,0 +1,516 @@ +define("ace/mode/raku_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var RakuHighlightRules = function () { + var keywords = ("my|our|class|role|grammar|is|does|sub|method|submethod|try|" + + "default|when|if|elsif|else|unless|with|orwith|without|for|given|proceed|" + + "succeed|loop|while|until|repeat|module|use|need|import|require|unit|" + + "constant|enum|multi|return|has|token|rule|make|made|proto|state|augment|" + + "but|anon|supersede|let|subset|gather|returns|return-rw|temp|" + + "BEGIN|CHECK|INIT|END|CLOSE|ENTER|LEAVE|KEEP|UNDO|PRE|POST|FIRST|NEXT|LAST|CATCH|CONTROL|QUIT|DOC"); + var types = ("Any|Array|Associative|AST|atomicint|Attribute|Backtrace|Backtrace::Frame|" + + "Bag|Baggy|BagHash|Blob|Block|Bool|Buf|Callable|CallFrame|Cancellation|" + + "Capture|Channel|Code|compiler|Complex|ComplexStr|Cool|CurrentThreadScheduler|" + + "Cursor|Date|Dateish|DateTime|Distro|Duration|Encoding|Exception|Failure|" + + "FatRat|Grammar|Hash|HyperWhatever|Instant|Int|IntStr|IO|IO::ArgFiles|" + + "IO::CatHandle|IO::Handle|IO::Notification|IO::Path|IO::Path::Cygwin|" + + "IO::Path::QNX|IO::Path::Unix|IO::Path::Win32|IO::Pipe|IO::Socket|" + + "IO::Socket::Async|IO::Socket::INET|IO::Spec|IO::Spec::Cygwin|IO::Spec::QNX|" + + "IO::Spec::Unix|IO::Spec::Win32|IO::Special|Iterable|Iterator|Junction|Kernel|" + + "Label|List|Lock|Lock::Async|Macro|Map|Match|Metamodel::AttributeContainer|" + + "Metamodel::C3MRO|Metamodel::ClassHOW|Metamodel::EnumHOW|Metamodel::Finalization|" + + "Metamodel::MethodContainer|Metamodel::MROBasedMethodDispatch|Metamodel::MultipleInheritance|" + + "Metamodel::Naming|Metamodel::Primitives|Metamodel::PrivateMethodContainer|" + + "Metamodel::RoleContainer|Metamodel::Trusting|Method|Mix|MixHash|Mixy|Mu|" + + "NFC|NFD|NFKC|NFKD|Nil|Num|Numeric|NumStr|ObjAt|Order|Pair|Parameter|Perl|" + + "Pod::Block|Pod::Block::Code|Pod::Block::Comment|Pod::Block::Declarator|" + + "Pod::Block::Named|Pod::Block::Para|Pod::Block::Table|Pod::Heading|Pod::Item|" + + "Positional|PositionalBindFailover|Proc|Proc::Async|Promise|Proxy|PseudoStash|" + + "Raku|QuantHash|Range|Rat|Rational|RatStr|Real|Regex|Routine|Scalar|Scheduler|" + + "Semaphore|Seq|Set|SetHash|Setty|Signature|Slip|Stash|Str|StrDistance|Stringy|" + + "Sub|Submethod|Supplier|Supplier::Preserving|Supply|Systemic|Tap|Telemetry|" + + "Telemetry::Instrument::Thread|Telemetry::Instrument::Usage|Telemetry::Period|" + + "Telemetry::Sampler|Thread|ThreadPoolScheduler|UInt|Uni|utf8|Variable|Version|" + + "VM|Whatever|WhateverCode|WrapHandle|int|uint|num|str|" + + "int8|int16|int32|int64|uint8|uint16|uint32|uint64|long|longlong|num32|num64|size_t|bool|CArray|Pointer|" + + "Backtrace|Backtrace::Frame|Exception|Failure|X::AdHoc|X::Anon::Augment|X::Anon::Multi|" + + "X::Assignment::RO|X::Attribute::NoPackage|X::Attribute::Package|X::Attribute::Undeclared|" + + "X::Augment::NoSuchType|X::Bind|X::Bind::NativeType|X::Bind::Slice|X::Caller::NotDynamic|" + + "X::Channel::ReceiveOnClosed|X::Channel::SendOnClosed|X::Comp|X::Composition::NotComposable|" + + "X::Constructor::Positional|X::ControlFlow|X::ControlFlow::Return|X::DateTime::TimezoneClash|" + + "X::Declaration::Scope|X::Declaration::Scope::Multi|X::Does::TypeObject|X::Eval::NoSuchLang|" + + "X::Export::NameClash|X::IO|X::IO::Chdir|X::IO::Chmod|X::IO::Copy|X::IO::Cwd|X::IO::Dir|" + + "X::IO::DoesNotExist|X::IO::Link|X::IO::Mkdir|X::IO::Move|X::IO::Rename|X::IO::Rmdir|X::IO::Symlink|" + + "X::IO::Unlink|X::Inheritance::NotComposed|X::Inheritance::Unsupported|X::Method::InvalidQualifier|" + + "X::Method::NotFound|X::Method::Private::Permission|X::Method::Private::Unqualified|" + + "X::Mixin::NotComposable|X::NYI|X::NoDispatcher|X::Numeric::Real|X::OS|X::Obsolete|X::OutOfRange|" + + "X::Package::Stubbed|X::Parameter::Default|X::Parameter::MultipleTypeConstraints|" + + "X::Parameter::Placeholder|X::Parameter::Twigil|X::Parameter::WrongOrder|X::Phaser::Multiple|" + + "X::Phaser::PrePost|X::Placeholder::Block|X::Placeholder::Mainline|X::Pod|X::Proc::Async|" + + "X::Proc::Async::AlreadyStarted|X::Proc::Async::CharsOrBytes|X::Proc::Async::MustBeStarted|" + + "X::Proc::Async::OpenForWriting|X::Proc::Async::TapBeforeSpawn|X::Proc::Unsuccessful|" + + "X::Promise::CauseOnlyValidOnBroken|X::Promise::Vowed|X::Redeclaration|X::Role::Initialization|" + + "X::Seq::Consumed|X::Sequence::Deduction|X::Signature::NameClash|X::Signature::Placeholder|" + + "X::Str::Numeric|X::StubCode|X::Syntax|X::Syntax::Augment::WithoutMonkeyTyping|" + + "X::Syntax::Comment::Embedded|X::Syntax::Confused|X::Syntax::InfixInTermPosition|" + + "X::Syntax::Malformed|X::Syntax::Missing|X::Syntax::NegatedPair|X::Syntax::NoSelf|" + + "X::Syntax::Number::RadixOutOfRange|X::Syntax::P5|X::Syntax::Regex::Adverb|" + + "X::Syntax::Regex::SolitaryQuantifier|X::Syntax::Reserved|X::Syntax::Self::WithoutObject|" + + "X::Syntax::Signature::InvocantMarker|X::Syntax::Term::MissingInitializer|X::Syntax::UnlessElse|" + + "X::Syntax::Variable::Match|X::Syntax::Variable::Numeric|X::Syntax::Variable::Twigil|X::Temporal|" + + "X::Temporal::InvalidFormat|X::TypeCheck|X::TypeCheck::Assignment|X::TypeCheck::Binding|" + + "X::TypeCheck::Return|X::TypeCheck::Splice|X::Undeclared"); + var builtinFunctions = ("abs|abs2rel|absolute|accept|ACCEPTS|accessed|acos|acosec|acosech|acosh|" + + "acotan|acotanh|acquire|act|action|actions|add|add_attribute|add_enum_value|" + + "add_fallback|add_method|add_parent|add_private_method|add_role|add_trustee|" + + "adverb|after|all|allocate|allof|allowed|alternative-names|annotations|antipair|" + + "antipairs|any|anyof|app_lifetime|append|arch|archname|args|arity|asec|asech|" + + "asin|asinh|ASSIGN-KEY|ASSIGN-POS|assuming|ast|at|atan|atan2|atanh|AT-KEY|" + + "atomic-assign|atomic-dec-fetch|atomic-fetch|atomic-fetch-add|atomic-fetch-dec|" + + "atomic-fetch-inc|atomic-fetch-sub|atomic-inc-fetch|AT-POS|attributes|auth|await|" + + "backtrace|Bag|BagHash|base|basename|base-repeating|batch|BIND-KEY|BIND-POS|" + + "bind-stderr|bind-stdin|bind-stdout|bind-udp|bits|bless|block|bool-only|" + + "bounds|break|Bridge|broken|BUILD|build-date|bytes|cache|callframe|calling-package|" + + "CALL-ME|callsame|callwith|can|cancel|candidates|cando|canonpath|caps|caption|" + + "Capture|cas|catdir|categorize|categorize-list|catfile|catpath|cause|ceiling|" + + "cglobal|changed|Channel|chars|chdir|child|child-name|child-typename|chmod|chomp|" + + "chop|chr|chrs|chunks|cis|classify|classify-list|cleanup|clone|close|closed|" + + "close-stdin|code|codes|collate|column|comb|combinations|command|comment|" + + "compiler|Complex|compose|compose_type|composer|condition|config|configure_destroy|" + + "configure_type_checking|conj|connect|constraints|construct|contains|contents|copy|" + + "cos|cosec|cosech|cosh|cotan|cotanh|count|count-only|cpu-cores|cpu-usage|CREATE|" + + "create_type|cross|cue|curdir|curupdir|d|Date|DateTime|day|daycount|day-of-month|" + + "day-of-week|day-of-year|days-in-month|declaration|decode|decoder|deepmap|" + + "defined|DEFINITE|delayed|DELETE-KEY|DELETE-POS|denominator|desc|DESTROY|destroyers|" + + "devnull|did-you-mean|die|dir|dirname|dir-sep|DISTROnames|do|done|duckmap|dynamic|" + + "e|eager|earlier|elems|emit|enclosing|encode|encoder|encoding|end|ends-with|enum_from_value|" + + "enum_value_list|enum_values|enums|eof|EVAL|EVALFILE|exception|excludes-max|excludes-min|" + + "EXISTS-KEY|EXISTS-POS|exit|exitcode|exp|expected|explicitly-manage|expmod|extension|f|" + + "fail|fc|feature|file|filename|find_method|find_method_qualified|finish|first|flat|flatmap|" + + "flip|floor|flush|fmt|format|formatter|freeze|from|from-list|from-loop|from-posix|full|" + + "full-barrier|get|get_value|getc|gist|got|grab|grabpairs|grep|handle|handled|handles|" + + "hardware|has_accessor|head|headers|hh-mm-ss|hidden|hides|hour|how|hyper|id|illegal|" + + "im|in|indent|index|indices|indir|infinite|infix|install_method_cache|" + + "Instant|instead|int-bounds|interval|in-timezone|invalid-str|invert|invocant|IO|" + + "IO::Notification.watch-path|is_trusted|is_type|isa|is-absolute|is-hidden|is-initial-thread|" + + "is-int|is-lazy|is-leap-year|isNaN|is-prime|is-relative|is-routine|is-setting|is-win|item|" + + "iterator|join|keep|kept|KERNELnames|key|keyof|keys|kill|kv|kxxv|l|lang|last|lastcall|later|" + + "lazy|lc|leading|level|line|lines|link|listen|live|local|lock|log|log10|lookup|lsb|" + + "MAIN|match|max|maxpairs|merge|message|method_table|methods|migrate|min|minmax|" + + "minpairs|minute|misplaced|Mix|MixHash|mkdir|mode|modified|month|move|mro|msb|multiness|" + + "name|named|named_names|narrow|nativecast|native-descriptor|nativesizeof|new|new_type|" + + "new-from-daycount|new-from-pairs|next|nextcallee|next-handle|nextsame|nextwith|NFC|NFD|" + + "NFKC|NFKD|nl-in|nl-out|nodemap|none|norm|not|note|now|nude|numerator|Numeric|of|" + + "offset|offset-in-hours|offset-in-minutes|old|on-close|one|on-switch|open|opened|" + + "operation|optional|ord|ords|orig|os-error|osname|out-buffer|pack|package|package-kind|" + + "package-name|packages|pair|pairs|pairup|parameter|params|parent|parent-name|parents|parse|" + + "parse-base|parsefile|parse-names|parts|path|path-sep|payload|peer-host|peer-port|periods|" + + "perl|permutations|phaser|pick|pickpairs|pid|placeholder|plus|polar|poll|polymod|pop|pos|" + + "positional|posix|postfix|postmatch|precomp-ext|precomp-target|pred|prefix|prematch|prepend|" + + "print|printf|print-nl|print-to|private|private_method_table|proc|produce|Promise|prompt|" + + "protect|pull-one|push|push-all|push-at-least|push-exactly|push-until-lazy|put|" + + "qualifier-type|quit|r|race|radix|raku|rand|range|raw|re|read|readchars|readonly|" + + "ready|Real|reallocate|reals|reason|rebless|receive|recv|redispatcher|redo|reduce|" + + "rel2abs|relative|release|rename|repeated|replacement|report|reserved|resolve|" + + "restore|result|resume|rethrow|reverse|right|rindex|rmdir|roles_to_compose|" + + "rolish|roll|rootdir|roots|rotate|rotor|round|roundrobin|routine-type|run|rwx|s|" + + "samecase|samemark|samewith|say|schedule-on|scheduler|scope|sec|sech|second|seek|" + + "self|send|Set|set_hidden|set_name|set_package|set_rw|set_value|SetHash|" + + "set-instruments|setup_finalization|shape|share|shell|shift|sibling|sigil|" + + "sign|signal|signals|signature|sin|sinh|sink|sink-all|skip|skip-at-least|" + + "skip-at-least-pull-one|skip-one|sleep|sleep-timer|sleep-until|Slip|slurp|" + + "slurp-rest|slurpy|snap|snapper|so|socket-host|socket-port|sort|source|" + + "source-package|spawn|SPEC|splice|split|splitdir|splitpath|sprintf|spurt|" + + "sqrt|squish|srand|stable|start|started|starts-with|status|stderr|stdout|" + + "sub_signature|subbuf|subbuf-rw|subname|subparse|subst|subst-mutate|" + + "substr|substr-eq|substr-rw|succ|sum|Supply|symlink|t|tail|take|take-rw|" + + "tan|tanh|tap|target|target-name|tc|tclc|tell|then|throttle|throw|timezone|" + + "tmpdir|to|today|toggle|to-posix|total|trailing|trans|tree|trim|trim-leading|" + + "trim-trailing|truncate|truncated-to|trusts|try_acquire|trying|twigil|type|" + + "type_captures|typename|uc|udp|uncaught_handler|unimatch|uniname|uninames|" + + "uniparse|uniprop|uniprops|unique|unival|univals|unlink|unlock|unpack|unpolar|" + + "unshift|unwrap|updir|USAGE|utc|val|value|values|VAR|variable|verbose-config|" + + "version|VMnames|volume|vow|w|wait|warn|watch|watch-path|week|weekday-of-month|" + + "week-number|week-year|WHAT|WHERE|WHEREFORE|WHICH|WHO|whole-second|WHY|" + + "wordcase|words|workaround|wrap|write|write-to|yada|year|yield|yyyy-mm-dd|" + + "z|zip|zip-latest|" + + "plan|done-testing|bail-out|todo|skip|skip-rest|diag|subtest|pass|flunk|ok|" + + "nok|cmp-ok|is-deeply|isnt|is-approx|like|unlike|use-ok|isa-ok|does-ok|" + + "can-ok|dies-ok|lives-ok|eval-dies-ok|eval-lives-ok|throws-like|fails-like|" + + "rw|required|native|repr|export|symbol"); + var constants_ascii = ("pi|Inf|tau|time"); + var ops_txt = ("eq|ne|gt|lt|le|ge|div|gcd|lcm|leg|cmp|ff|fff|" + + "x|before|after|Z|X|and|or|andthen|notandthen|orelse|xor"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "storage.type": types, + "constant.language": constants_ascii, + "support.function": builtinFunctions, + "keyword.operator": ops_txt + }, "identifier"); + var moduleName = "[a-zA-Z_][a-zA-Z_0-9:-]*\\b"; + var hex = { token: "constant.numeric", regex: "0x[0-9a-fA-F]+\\b" }; + var num_rat = { token: "constant.numeric", regex: "[+-.]?\\d[\\d_]*(?:(?:\\.\\d[\\d_]*)?(?:[eE][+-]?\\d[\\d_]*)?)?i?\\b" }; + var booleans = { token: "constant.language.boolean", regex: "(?:True|False)\\b" }; + var versions = { token: "constant.other", regex: "v[0-9](?:\\.[a-zA-Z0-9*])*\\b" }; + var lang_keywords = { token: keywordMapper, regex: "[a-zA-Z][\\:a-zA-Z0-9_-]*\\b" }; + var variables = { token: "variable.language", regex: "[$@%&][?*!.]?[a-zA-Z0-9_-]+\\b" }; + var vars_special = { token: "variable.language", regex: "\\$[/|!]?|@\\$/" }; + var ops_char = { token: "keyword.operator", regex: "=|<|>|\\+|\\*|-|/|~|%|\\?|!|\\^|\\.|\\:|\\,|" + + "»|«|\\||\\&|⚛|∘" }; + var constants_unicode = { token: "constant.language", regex: "𝑒|π|τ|∞" }; + var qstrings = { token: "string.quoted.single", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }; + var word_quoting = { token: "string.quoted.single", regex: "[<](?:[a-zA-Z0-9 ])*[>]" }; + var regexp = { + token: "string.regexp", + regex: "[m|rx]?[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }; + this.$rules = { + "start": [ + { + token: "comment.block", // Embedded Comments - Parentheses + regex: "#[`|=]\\(.*\\)" + }, { + token: "comment.block", // Embedded Comments - Brackets + regex: "#[`|=]\\[.*\\]" + }, { + token: "comment.doc", // Multiline Comments + regex: "^=(?:begin)\\b", + next: "block_comment" + }, { + token: "string.unquoted", // q Heredocs + regex: "q[x|w]?\\:to/END/;", + next: "qheredoc" + }, { + token: "string.unquoted", // qq Heredocs + regex: "qq[x|w]?\\:to/END/;", + next: "qqheredoc" + }, + regexp, + qstrings, + { + token: "string.quoted.double", // Double Quoted String + regex: '"', + next: "qqstring" + }, + word_quoting, + { + token: ["keyword", "text", "variable.module"], // use - Module Names, Pragmas, etc. + regex: "(use)(\\s+)((?:" + moduleName + "\\.?)*)" + }, + hex, + num_rat, + booleans, + versions, + lang_keywords, + variables, + vars_special, + ops_char, + constants_unicode, + { + token: "comment", // Sigle Line Comments + regex: "#.*$" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: '\\\\(?:[nrtef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, + variables, + vars_special, + { + token: "lparen", + regex: "{", + next: "qqinterpolation" + }, { + token: "string.quoted.double", + regex: '"', + next: "start" + }, { + defaultToken: "string.quoted.double" + } + ], + "qqinterpolation": [ + hex, + num_rat, + booleans, + versions, + lang_keywords, + variables, + vars_special, + ops_char, + constants_unicode, + qstrings, + regexp, + { + token: "rparen", + regex: "}", + next: "qqstring" + } + ], + "block_comment": [ + { + token: "comment.doc", + regex: "^=end +[a-zA-Z_0-9]*", + next: "start" + }, + { + defaultToken: "comment.doc" + } + ], + "qheredoc": [ + { + token: "string.unquoted", + regex: "END$", + next: "start" + }, { + defaultToken: "string.unquoted" + } + ], + "qqheredoc": [ + variables, + vars_special, + { + token: "lparen", + regex: "{", + next: "qqheredocinterpolation" + }, { + token: "string.unquoted", + regex: "END$", + next: "start" + }, { + defaultToken: "string.unquoted" + } + ], + "qqheredocinterpolation": [ + hex, + num_rat, + booleans, + versions, + lang_keywords, + variables, + vars_special, + ops_char, + constants_unicode, + qstrings, + regexp, + { + token: "rparen", + regex: "}", + next: "qqheredoc" + } + ] + }; +}; +oop.inherits(RakuHighlightRules, TextHighlightRules); +exports.RakuHighlightRules = RakuHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/raku",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/raku_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RakuHighlightRules = require("./raku_highlight_rules").RakuHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = RakuHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode({ start: "^=(begin)\\b", end: "^=(end)\\b" }); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.blockComment = [ + { start: "=begin", end: "=end", lineStartOnly: true }, + { start: "=item", end: "=end", lineStartOnly: true } + ]; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/raku"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/raku"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-razor.js b/ui/base1/ace/mode-razor.js new file mode 100644 index 0000000..4156bde --- /dev/null +++ b/ui/base1/ace/mode-razor.js @@ -0,0 +1,2691 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CSharpHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": "abstract|async|await|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|partial|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", + "constant.language": "null|true|false" + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))?'/ + }, { + token: "string", start: '"', end: '"|$', next: [ + { token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/ }, + { token: "invalid", regex: /\\./ } + ] + }, { + token: "string", start: '@"', end: '"', next: [ + { token: "constant.language.escape", regex: '""' } + ] + }, { + token: "string", start: /\$"/, end: '"|$', next: [ + { token: "constant.language.escape", regex: /\\(:?$)|{{/ }, + { token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/ }, + { token: "invalid", regex: /\\./ } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "keyword", + regex: "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)" + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(CSharpHighlightRules, TextHighlightRules); +exports.CSharpHighlightRules = CSharpHighlightRules; + +}); + +define("ace/mode/razor_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/html_highlight_rules","ace/mode/csharp_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules; +var blockPrefix = 'razor-block-'; +var RazorLangHighlightRules = function () { + CSharpHighlightRules.call(this); + var processPotentialCallback = function (value, stackItem) { + if (typeof stackItem === "function") + return stackItem(value); + return stackItem; + }; + var inBraces = 'in-braces'; + this.$rules.start.unshift({ + regex: '[\\[({]', + onMatch: function (value, state, stack) { + var prefix = /razor-[^\-]+-/.exec(state)[0]; + stack.unshift(value); + stack.unshift(prefix + inBraces); + this.next = prefix + inBraces; + return 'paren.lparen'; + } + }, { + start: "@\\*", + end: "\\*@", + token: "comment" + }); + var parentCloseMap = { + '{': '}', + '[': ']', + '(': ')' + }; + this.$rules[inBraces] = lang.deepCopy(this.$rules.start); + this.$rules[inBraces].unshift({ + regex: '[\\])}]', + onMatch: function (value, state, stack) { + var open = stack[1]; + if (parentCloseMap[open] !== value) + return 'invalid.illegal'; + stack.shift(); // exit in-braces block + stack.shift(); // exit brace marker + this.next = processPotentialCallback(value, stack[0]) || 'start'; + return 'paren.rparen'; + } + }); +}; +oop.inherits(RazorLangHighlightRules, CSharpHighlightRules); +var RazorHighlightRules = function () { + HtmlHighlightRules.call(this); + var blockStartRule = { + regex: '@[({]|@functions{', + onMatch: function (value, state, stack) { + stack.unshift(value); + stack.unshift('razor-block-start'); + this.next = 'razor-block-start'; + return 'punctuation.block.razor'; + } + }; + var blockEndMap = { + '@{': '}', + '@(': ')', + '@functions{': '}' + }; + var blockEndRule = { + regex: '[})]', + onMatch: function (value, state, stack) { + var blockStart = stack[1]; + if (blockEndMap[blockStart] !== value) + return 'invalid.illegal'; + stack.shift(); // exit razor block + stack.shift(); // remove block type marker + this.next = stack.shift() || 'start'; + return 'punctuation.block.razor'; + } + }; + var shortStartRule = { + regex: "@(?![{(])", + onMatch: function (value, state, stack) { + stack.unshift("razor-short-start"); + this.next = "razor-short-start"; + return 'punctuation.short.razor'; + } + }; + var shortEndRule = { + token: "", + regex: "(?=[^A-Za-z_\\.()\\[\\]])", + next: 'pop' + }; + var ifStartRule = { + regex: "@(?=if)", + onMatch: function (value, state, stack) { + stack.unshift(function (value) { + if (value !== '}') + return 'start'; + return stack.shift() || 'start'; + }); + this.next = 'razor-block-start'; + return 'punctuation.control.razor'; + } + }; + var razorStartRules = [ + { + start: "@\\*", + end: "\\*@", + token: "comment" + }, + { + token: ["meta.directive.razor", "text", "identifier"], + regex: "^(\\s*@model)(\\s+)(.+)$" + }, + blockStartRule, + shortStartRule + ]; + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], razorStartRules); + this.embedRules(RazorLangHighlightRules, "razor-block-", [blockEndRule], ["start"]); + this.embedRules(RazorLangHighlightRules, "razor-short-", [shortEndRule], ["start"]); + this.normalizeRules(); +}; +oop.inherits(RazorHighlightRules, HtmlHighlightRules); +exports.RazorHighlightRules = RazorHighlightRules; +exports.RazorLangHighlightRules = RazorLangHighlightRules; + +}); + +define("ace/mode/razor_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var keywords = [ + "abstract", "as", "base", "bool", + "break", "byte", "case", "catch", + "char", "checked", "class", "const", + "continue", "decimal", "default", "delegate", + "do", "double", "else", "enum", + "event", "explicit", "extern", "false", + "finally", "fixed", "float", "for", + "foreach", "goto", "if", "implicit", + "in", "int", "interface", "internal", + "is", "lock", "long", "namespace", + "new", "null", "object", "operator", + "out", "override", "params", "private", + "protected", "public", "readonly", "ref", + "return", "sbyte", "sealed", "short", + "sizeof", "stackalloc", "static", "string", + "struct", "switch", "this", "throw", + "true", "try", "typeof", "uint", + "ulong", "unchecked", "unsafe", "ushort", + "using", "var", "virtual", "void", + "volatile", "while" +]; +var shortHands = [ + "Html", "Model", "Url", "Layout" +]; +var RazorCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + if (state.lastIndexOf("razor-short-start") == -1 && state.lastIndexOf("razor-block-start") == -1) + return []; + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (state.lastIndexOf("razor-short-start") != -1) { + return this.getShortStartCompletions(state, session, pos, prefix); + } + if (state.lastIndexOf("razor-block-start") != -1) { + return this.getKeywordCompletions(state, session, pos, prefix); + } + }; + this.getShortStartCompletions = function (state, session, pos, prefix) { + return shortHands.map(function (element) { + return { + value: element, + meta: "keyword", + score: 1000000 + }; + }); + }; + this.getKeywordCompletions = function (state, session, pos, prefix) { + return shortHands.concat(keywords).map(function (element) { + return { + value: element, + meta: "keyword", + score: 1000000 + }; + }); + }; +}).call(RazorCompletions.prototype); +exports.RazorCompletions = RazorCompletions; + +}); + +define("ace/mode/razor",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/razor_highlight_rules","ace/mode/razor_completions","ace/mode/html_completions"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var RazorHighlightRules = require("./razor_highlight_rules").RazorHighlightRules; +var RazorCompletions = require("./razor_completions").RazorCompletions; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var Mode = function () { + HtmlMode.call(this); + this.$highlightRules = new RazorHighlightRules(); + this.$completer = new RazorCompletions(); + this.$htmlCompleter = new HtmlCompletions(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var razorToken = this.$completer.getCompletions(state, session, pos, prefix); + var htmlToken = this.$htmlCompleter.getCompletions(state, session, pos, prefix); + return razorToken.concat(htmlToken); + }; + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/razor"; + this.snippetFileId = "ace/snippets/razor"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/razor"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-rdoc.js b/ui/base1/ace/mode-rdoc.js new file mode 100644 index 0000000..a135783 --- /dev/null +++ b/ui/base1/ace/mode-rdoc.js @@ -0,0 +1,286 @@ +define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LatexHighlightRules = function () { + this.$rules = { + "start": [{ + token: "comment", + regex: "%.*$" + }, { + token: ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"], + regex: "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})" + }, { + token: ["keyword", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?" + }, { + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\begin)({)(verbatim)(})", + next: "verbatim" + }, { + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\begin)({)(lstlisting)(})", + next: "lstlisting" + }, { + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\(?:begin|end))({)([\\w*]*)(})" + }, { + token: "storage.type", + regex: /\\verb\b\*?/, + next: [{ + token: ["keyword.operator", "string", "keyword.operator"], + regex: "(.)(.*?)(\\1|$)|", + next: "start" + }] + }, { + token: "storage.type", + regex: "\\\\[a-zA-Z]+" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "constant.character.escape", + regex: "\\\\[^a-zA-Z]?" + }, { + token: "string", + regex: "\\${1,2}", + next: "equation" + }], + "equation": [{ + token: "comment", + regex: "%.*$" + }, { + token: "string", + regex: "\\${1,2}", + next: "start" + }, { + token: "constant.character.escape", + regex: "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" + }, { + token: "error", + regex: "^\\s*$", + next: "start" + }, { + defaultToken: "string" + }], + "verbatim": [{ + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\end)({)(verbatim)(})", + next: "start" + }, { + defaultToken: "text" + }], + "lstlisting": [{ + token: ["storage.type", "lparen", "variable.parameter", "rparen"], + regex: "(\\\\end)({)(lstlisting)(})", + next: "start" + }, { + defaultToken: "text" + }] + }; + this.normalizeRules(); +}; +oop.inherits(LatexHighlightRules, TextHighlightRules); +exports.LatexHighlightRules = LatexHighlightRules; + +}); + +define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"], function(require, exports, module){/* + * rdoc_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var LaTeXHighlightRules = require("./latex_highlight_rules"); +var RDocHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment", + regex: "%.*$" + }, { + token: "text", // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b", + next: "nospell" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "nospell": [ + { + token: "comment", + regex: "%.*$", + next: "start" + }, { + token: "nospell.text", // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])", + next: "start" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])]" + }, { + token: "paren.keyword.operator", + regex: "}", + next: "start" + }, { + token: "nospell.text", + regex: "\\s+" + }, { + token: "nospell.text", + regex: "\\w+" + } + ] + }; +}; +oop.inherits(RDocHighlightRules, TextHighlightRules); +exports.RDocHighlightRules = RDocHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module){/* + * rdoc.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function (suppressHighlighting) { + this.HighlightRules = RDocHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.$id = "ace/mode/rdoc"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/rdoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-red.js b/ui/base1/ace/mode-red.js new file mode 100644 index 0000000..3e74c35 --- /dev/null +++ b/ui/base1/ace/mode-red.js @@ -0,0 +1,388 @@ +define("ace/mode/red_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var RedHighlightRules = function () { + var compoundKeywords = ""; + this.$rules = { + "start": [ + { token: "keyword.operator", + regex: /\s([\-+%/=<>*]|(?:\*\*\|\/\/|==|>>>?|<>|<<|=>|<=|=\?))(\s|(?=:))/ }, + { token: "string.email", regex: /\w[-\w._]*\@\w[-\w._]*/ }, + { token: "value.time", regex: /\b\d+:\d+(:\d+)?/ }, + { token: "string.url", regex: /\w[-\w_]*\:(\/\/)?\w[-\w._]*(:\d+)?/ }, + { token: "value.date", regex: /(\b\d{1,4}[-/]\d{1,2}[-/]\d{1,2}|\d{1,2}[-/]\d{1,2}[-/]\d{1,4})\b/ }, + { token: "value.tuple", regex: /\b\d{1,3}\.\d{1,3}\.\d{1,3}(\.\d{1,3}){0,9}/ }, + { token: "value.pair", regex: /[+-]?\d+x[-+]?\d+/ }, + { token: "value.binary", regex: /\b2#{([01]{8})+}/ }, + { token: "value.binary", regex: /\b64#{([\w/=+])+}/ }, + { token: "value.binary", regex: /(16)?#{([\dabcdefABCDEF][\dabcdefABCDEF])*}/ }, + { token: "value.issue", regex: /#\w[-\w'*.]*/ }, + { token: "value.numeric", regex: /[+-]?\d['\d]*(?:\.\d+)?e[-+]?\d{1,3}\%?(?!\w)/ }, + { token: "invalid.illegal", regex: /[+-]?\d['\d]*(?:\.\d+)?\%?[a-zA-Z]/ }, + { token: "value.numeric", regex: /[+-]?\d['\d]*(?:\.\d+)?\%?(?![a-zA-Z])/ }, + { token: "value.character", regex: /#"(\^[-@/_~^"HKLM\[]|.)"/ }, + { token: "string.file", regex: /%[-\w\.\/]+/ }, + { token: "string.tag", regex: //, next: "start" }, + { defaultToken: "string.tag" } + ], + "comment": [ + { token: "comment", regex: /}/, next: "start" }, + { defaultToken: "comment" } + ] + }; +}; +oop.inherits(RedHighlightRules, TextHighlightRules); +exports.RedHighlightRules = RedHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/red",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/red_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RedHighlightRules = require("./red_highlight_rules").RedHighlightRules; +var RedFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = RedHighlightRules; + this.foldingRules = new RedFoldMode(); + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.blockComment = { start: "comment {", end: "}" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\[\(]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/red"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/red"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-redshift.js b/ui/base1/ace/mode-redshift.js new file mode 100644 index 0000000..8ffec17 --- /dev/null +++ b/ui/base1/ace/mode-redshift.js @@ -0,0 +1,321 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "variable", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token: "string", // single line + regex: '"', + next: "string" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "text", // single quoted strings are not allowed + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "comment", // comments are not allowed, but who cares? + regex: "\\/\\/.*$" + }, { + token: "comment.start", // comments are not allowed, but who cares? + regex: "\\/\\*", + next: "comment" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "punctuation.operator", + regex: /[,]/ + }, { + token: "text", + regex: "\\s+" + } + ], + "string": [ + { + token: "constant.language.escape", + regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + } + ], + "comment": [ + { + token: "comment.end", // comments are not allowed, but who cares? + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; +}; +oop.inherits(JsonHighlightRules, TextHighlightRules); +exports.JsonHighlightRules = JsonHighlightRules; + +}); + +define("ace/mode/redshift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/json_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules; +var RedshiftHighlightRules = function () { + var keywords = ("aes128|aes256|all|allowoverwrite|analyse|analyze|and|any|array|as|asc|authorization|backup|" + + "between|binary|blanksasnull|both|bytedict|bzip2|case|cast|check|collate|column|constraint|create|credentials|" + + "cross|current_date|current_time|current_timestamp|current_user|current_user_id|default|deferrable|deflate|defrag|delta|" + + "delta32k|desc|disable|distinct|do|else|emptyasnull|enable|encode|encrypt|encryption|end|except|explicit|false|for|foreign|" + + "freeze|from|full|globaldict256|globaldict64k|grant|group|gzip|having|identity|ignore|ilike|in|initially|inner|intersect|into|is|" + + "isnull|join|leading|left|like|limit|localtime|localtimestamp|lun|luns|lzo|lzop|minus|mostly13|mostly32|mostly8|natural|new|not|notnull|" + + "null|nulls|off|offline|offset|old|on|only|open|or|order|outer|overlaps|parallel|partition|percent|permissions|placing|primary|raw|readratio|" + + "recover|references|rejectlog|resort|restore|right|select|session_user|similar|some|sysdate|system|table|tag|tdes|text255|text32k|then|timestamp|" + + "to|top|trailing|true|truncatecolumns|union|unique|user|using|verbose|wallet|when|where|with|without"); + var builtinFunctions = ("current_schema|current_schemas|has_database_privilege|has_schema_privilege|has_table_privilege|age|current_time|current_timestamp|localtime|" + + "isfinite|now|ascii|get_bit|get_byte|octet_length|set_bit|set_byte|to_ascii|avg|count|listagg|max|min|stddev_samp|stddev_pop|sum|var_samp|var_pop|" + + "bit_and|bit_or|bool_and|bool_or|avg|count|cume_dist|dense_rank|first_value|last_value|lag|lead|listagg|max|median|min|nth_value|ntile|percent_rank|" + + "percentile_cont|percentile_disc|rank|ratio_to_report|row_number|case|coalesce|decode|greatest|least|nvl|nvl2|nullif|add_months|age|convert_timezone|" + + "current_date|timeofday|current_time|current_timestamp|date_cmp|date_cmp_timestamp|date_part_year|dateadd|datediff|date_part|date_trunc|extract|getdate|" + + "interval_cmp|isfinite|last_day|localtime|localtimestamp|months_between|next_day|now|sysdate|timestamp_cmp|timestamp_cmp_date|trunc|abs|acos|asin|atan|" + + "atan2|cbrt|ceiling|ceil|checksum|cos|cot|degrees|dexp|dlog1|dlog10|exp|floor|ln|log|mod|pi|power|radians|random|round|sin|sign|sqrt|tan|trunc|ascii|" + + "bpcharcmp|btrim|bttext_pattern_cmp|char_length|character_length|charindex|chr|concat|crc32|func_sha1|get_bit|get_byte|initcap|left|right|len|length|" + + "lower|lpad|rpad|ltrim|md5|octet_length|position|quote_ident|quote_literal|regexp_count|regexp_instr|regexp_replace|regexp_substr|repeat|replace|replicate|" + + "reverse|rtrim|set_bit|set_byte|split_part|strpos|strtol|substring|textlen|to_ascii|to_hex|translate|trim|upper|json_array_length|json_extract_array_element_text|" + + "json_extract_path_text|cast|convert|to_char|to_date|to_number|current_database|current_schema|current_schemas|current_user|current_user_id|has_database_privilege|" + + "has_schema_privilege|has_table_privilege|pg_backend_pid|pg_last_copy_count|pg_last_copy_id|pg_last_query_id|pg_last_unload_count|session_user|slice_num|user|version"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords + }, "identifier", true); + var sqlRules = [{ + token: "string", // single line string -- assume dollar strings if multi-line for now + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "variable.language", // pg identifier + regex: '".*?"' + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers + }, { + token: "keyword.operator", + regex: "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" + + "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" + + "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" + + "~=|~>=~|~>~|~~|~~\\*" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + } + ]; + this.$rules = { + "start": [{ + token: "comment", + regex: "--.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi-line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "keyword.statementBegin", + regex: "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. + next: "statement" + }, { + token: "support.buildin", // psql directive + regex: "^\\\\[\\S]+.*$" + } + ], + "statement": [{ + token: "comment", + regex: "--.*$" + }, { + token: "comment", // multi-line comment + regex: "\\/\\*", + next: "commentStatement" + }, { + token: "statementEnd", + regex: ";", + next: "start" + }, { + token: "string", + regex: "\\$json\\$", + next: "json-start" + }, { + token: "string", + regex: "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line + next: "dollarSql" + }, { + token: "string", + regex: "\\$[\\w_0-9]*\\$", + next: "dollarStatementString" + } + ].concat(sqlRules), + "dollarSql": [{ + token: "comment", + regex: "--.*$" + }, { + token: "comment", // multi-line comment + regex: "\\/\\*", + next: "commentDollarSql" + }, { + token: "string", // end quoting with dollar at the start of a line + regex: "^\\$[\\w_0-9]*\\$", + next: "statement" + }, { + token: "string", + regex: "\\$[\\w_0-9]*\\$", + next: "dollarSqlString" + } + ].concat(sqlRules), + "comment": [{ + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "commentStatement": [{ + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "statement" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "commentDollarSql": [{ + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "dollarSql" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "dollarStatementString": [{ + token: "string", // closing dollarstring + regex: ".*?\\$[\\w_0-9]*\\$", + next: "statement" + }, { + token: "string", // dollarstring spanning whole line + regex: ".+" + } + ], + "dollarSqlString": [{ + token: "string", // closing dollarstring + regex: ".*?\\$[\\w_0-9]*\\$", + next: "dollarSql" + }, { + token: "string", // dollarstring spanning whole line + regex: ".+" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.embedRules(JsonHighlightRules, "json-", [{ token: "string", regex: "\\$json\\$", next: "statement" }]); +}; +oop.inherits(RedshiftHighlightRules, TextHighlightRules); +exports.RedshiftHighlightRules = RedshiftHighlightRules; + +}); + +define("ace/mode/redshift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/redshift_highlight_rules"], function(require, exports, module){var oop = require("../lib/oop"); +var TextMode = require("../mode/text").Mode; +var RedshiftHighlightRules = require("./redshift_highlight_rules").RedshiftHighlightRules; +var Mode = function () { + this.HighlightRules = RedshiftHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + if (state == "start" || state == "keyword.statementEnd") { + return ""; + } + else { + return this.$getIndent(line); // Keep whatever indent the previous line has + } + }; + this.$id = "ace/mode/redshift"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/redshift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-rhtml.js b/ui/base1/ace/mode-rhtml.js new file mode 100644 index 0000000..12dcb91 --- /dev/null +++ b/ui/base1/ace/mode-rhtml.js @@ -0,0 +1,2750 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * tex_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = function (textClass) { + if (!textClass) + textClass = "text"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "%.*$" + }, { + token: textClass, // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", + next: "nospell" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])}]" + }, { + token: textClass, + regex: "\\s+" + } + ], + "nospell": [ + { + token: "comment", + regex: "%.*$", + next: "start" + }, { + token: "nospell." + textClass, // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])", + next: "start" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])]" + }, { + token: "paren.keyword.operator", + regex: "}", + next: "start" + }, { + token: "nospell." + textClass, + regex: "\\s+" + }, { + token: "nospell." + textClass, + regex: "\\w+" + } + ] + }; +}; +oop.inherits(TexHighlightRules, TextHighlightRules); +exports.TexHighlightRules = TexHighlightRules; + +}); + +define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module){/* + * r_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; +var RHighlightRules = function () { + var keywords = lang.arrayToMap(("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") + .split("|")); + var buildinConstants = lang.arrayToMap(("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + + "NA_complex_").split("|")); + this.$rules = { + "start": [ + { + token: "comment.sectionhead", + regex: "#+(?!').*(?:----|====|####)\\s*$" + }, + { + token: "comment", + regex: "#+'", + next: "rd-start" + }, + { + token: "comment", + regex: "#.*$" + }, + { + token: "string", // multi line string start + regex: '["]', + next: "qqstring" + }, + { + token: "string", // multi line string start + regex: "[']", + next: "qstring" + }, + { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+[Li]?\\b" + }, + { + token: "constant.numeric", // explicit integer + regex: "\\d+L\\b" + }, + { + token: "constant.numeric", // number + regex: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token: "constant.numeric", // number with leading decimal + regex: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token: "constant.language.boolean", + regex: "(?:TRUE|FALSE|T|F)\\b" + }, + { + token: "identifier", + regex: "`.*?`" + }, + { + onMatch: function (value) { + if (keywords[value]) + return "keyword"; + else if (buildinConstants[value]) + return "constant.language"; + else if (value == '...' || value.match(/^\.\.\d+$/)) + return "variable.language"; + else + return "identifier"; + }, + regex: "[a-zA-Z.][a-zA-Z0-9._]*\\b" + }, + { + token: "keyword.operator", + regex: "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" + }, + { + token: "keyword.operator", // infix operators + regex: "%.*?%" + }, + { + token: "paren.keyword.operator", + regex: "[[({]" + }, + { + token: "paren.keyword.operator", + regex: "[\\])}]" + }, + { + token: "text", + regex: "\\s+" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, + { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, + { + token: "string", + regex: '.+' + } + ] + }; + var rdRules = new TexHighlightRules("comment").getRules(); + for (var i = 0; i < rdRules["start"].length; i++) { + rdRules["start"][i].token += ".virtual-comment"; + } + this.addRules(rdRules, "rd-"); + this.$rules["rd-start"].unshift({ + token: "text", + regex: "^", + next: "start" + }); + this.$rules["rd-start"].unshift({ + token: "keyword", + regex: "@(?!@)[^ ]*" + }); + this.$rules["rd-start"].unshift({ + token: "comment", + regex: "@@" + }); + this.$rules["rd-start"].push({ + token: "comment", + regex: "[^%\\\\[({\\])}]+" + }); +}; +oop.inherits(RHighlightRules, TextHighlightRules); +exports.RHighlightRules = RHighlightRules; + +}); + +define("ace/mode/rhtml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/r_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * rhtml_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var RHighlightRules = require("./r_highlight_rules").RHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var RHtmlHighlightRules = function () { + HtmlHighlightRules.call(this); + this.$rules["start"].unshift({ + token: "support.function.codebegin", + regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)", + next: "r-start" + }); + this.embedRules(RHighlightRules, "r-", [{ + token: "support.function.codeend", + regex: "^\\s*end.rcode\\s*-->", + next: "start" + }], ["start"]); + this.normalizeRules(); +}; +oop.inherits(RHtmlHighlightRules, TextHighlightRules); +exports.RHtmlHighlightRules = RHtmlHighlightRules; + +}); + +define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"], function(require, exports, module){/* + * rhtml.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules; +var Mode = function (doc, session) { + HtmlMode.call(this); + this.$session = session; + this.HighlightRules = RHtmlHighlightRules; +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.insertChunkInfo = { + value: "\n", + position: { row: 0, column: 15 } + }; + this.getLanguageMode = function (position) { + return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML'; + }; + this.$id = "ace/mode/rhtml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/rhtml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-robot.js b/ui/base1/ace/mode-robot.js new file mode 100644 index 0000000..26f6cdf --- /dev/null +++ b/ui/base1/ace/mode-robot.js @@ -0,0 +1,168 @@ +define("ace/mode/robot_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){'use strict'; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var RobotHighlightRules = function () { + var builtinConstantsRegex = new RegExp(/\$\{CURDIR\}|\$\{TEMPDIR\}|\$\{EXECDIR\}|\$\{\/\}|\$\{\:\}|\$\{\\n\}|\$\{true\}|\$\{false\}|\$\{none\}|\$\{null\}|\$\{space(?:\s*\*\s+[0-9]+)?\}|\$\{empty\}|&\{empty\}|@\{empty\}|\$\{TEST NAME\}|@\{TEST[\s_]TAGS\}|\$\{TEST[\s_]DOCUMENTATION\}|\$\{TEST[\s_]STATUS\}|\$\{TEST[\s_]MESSAGE\}|\$\{PREV[\s_]TEST[\s_]NAME\}|\$\{PREV[\s_]TEST[\s_]STATUS\}|\$\{PREV[\s_]TEST[\s_]MESSAGE\}|\$\{SUITE[\s_]NAME\}|\$\{SUITE[\s_]SOURCE\}|\$\{SUITE[\s_]DOCUMENTATION\}|&\{SUITE[\s_]METADATA\}|\$\{SUITE[\s_]STATUS\}|\$\{SUITE[\s_]MESSAGE\}|\$\{KEYWORD[\s_]STATUS\}|\$\{KEYWORD[\s_]MESSAGE\}|\$\{LOG[\s_]LEVEL\}|\$\{OUTPUT[\s_]FILE\}|\$\{LOG[\s_]FILE\}|\$\{REPORT[\s_]FILE\}|\$\{DEBUG[\s_]FILE\}|\$\{OUTPUT[\s_]DIR\}/); + this.$rules = { + "start": [{ + token: "string.robot.header", + regex: /^\*{3}\s+(?:settings?|metadata|(?:user )?keywords?|test ?cases?|tasks?|variables?)/, + caseInsensitive: true, + push: [{ + token: "string.robot.header", + regex: /$/, + next: "pop" + }, { + defaultToken: "string.robot.header" + }], + comment: "start of a table" + }, { + token: "comment.robot", + regex: /(?:^|\s{2,}|\t|\|\s{1,})(?=[^\\])#/, + push: [{ + token: "comment.robot", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.robot" + }] + }, { + token: "comment", + regex: /^\s*\[?Documentation\]?/, + caseInsensitive: true, + push: [{ + token: "comment", + regex: /^(?!\s*\.\.\.)/, + next: "pop" + }, { + defaultToken: "comment" + }] + }, { + token: "storage.type.method.robot", + regex: /\[(?:Arguments|Setup|Teardown|Precondition|Postcondition|Template|Return|Timeout)\]/, + caseInsensitive: true, + comment: "testcase settings" + }, { + token: "storage.type.method.robot", + regex: /\[Tags\]/, + caseInsensitive: true, + push: [{ + token: "storage.type.method.robot", + regex: /^(?!\s*\.\.\.)/, + next: "pop" + }, { + token: "comment", + regex: /^\s*\.\.\./ + }, { + defaultToken: "storage.type.method.robot" + }], + comment: "test tags" + }, { + token: "constant.language", + regex: builtinConstantsRegex, + caseInsensitive: true + }, { + token: "entity.name.variable.wrapper", + regex: /[$@&%]\{\{?/, + push: [{ + token: "entity.name.variable.wrapper", + regex: /\}\}?(\s?=)?/, + next: "pop" + }, { + include: "$self" + }, { + token: "entity.name.variable", + regex: /./ + }, { + defaultToken: "entity.name.variable" + }] + }, { + token: "keyword.control.robot", + regex: /^[^\s\t*$|]+|(?=^\|)\s+[^\s\t*$|]+/, + push: [{ + token: "keyword.control.robot", + regex: /(?=\s{2})|\t|$|\s+(?=\|)/, + next: "pop" + }, { + defaultToken: "keyword.control.robot" + }] + }, { + token: "constant.numeric.robot", + regex: /\b[0-9]+(?:\.[0-9]+)?\b/ + }, { + token: "keyword", + regex: /\s{2,}(for|in range|in|end|else if|if|else|with name)(\s{2,}|$)/, + caseInsensitive: true + }, { + token: "storage.type.function", + regex: /^(?:\s{2,}\s+)[^ \t*$@&%[.|]+/, + push: [{ + token: "storage.type.function", + regex: /(?=\s{2})|\t|$|\s+(?=\|)/, + next: "pop" + }, { + defaultToken: "storage.type.function" + }] + }] + }; + this.normalizeRules(); +}; +RobotHighlightRules.metadata = { + fileTypes: ['robot'], + name: 'Robot', + scopeName: 'source.robot' +}; +oop.inherits(RobotHighlightRules, TextHighlightRules); +exports.RobotHighlightRules = RobotHighlightRules; + +}); + +define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/robot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/robot_highlight_rules","ace/mode/folding/pythonic"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RobotHighlightRules = require("./robot_highlight_rules").RobotHighlightRules; +var FoldMode = require("./folding/pythonic").FoldMode; +var Mode = function () { + this.HighlightRules = RobotHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/robot"; + this.snippetFileId = "ace/snippets/robot"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/robot"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-rst.js b/ui/base1/ace/mode-rst.js new file mode 100644 index 0000000..b831bd3 --- /dev/null +++ b/ui/base1/ace/mode-rst.js @@ -0,0 +1,245 @@ +define("ace/mode/rst_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var RSTHighlightRules = function () { + var tokens = { + title: "markup.heading", + list: "markup.heading", + table: "constant", + directive: "keyword.operator", + entity: "string", + link: "markup.underline.list", + bold: "markup.bold", + italic: "markup.italic", + literal: "support.function", + comment: "comment" + }; + var startStringPrefix = "(^|\\s|[\"'(<\\[{\\-/:])"; + var endStringSuffix = "(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))"; + this.$rules = { + "start": [ + { + token: tokens.title, + regex: "(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)" + }, + { + token: ["text", tokens.directive, tokens.literal], + regex: "(^\\s*\\.\\. )([^: ]+::)(.*$)", + next: "codeblock" + }, + { + token: tokens.directive, + regex: "::$", + next: "codeblock" + }, + { + token: [tokens.entity, tokens.link], + regex: "(^\\.\\. _[^:]+:)(.*$)" + }, + { + token: [tokens.entity, tokens.link], + regex: "(^__ )(https?://.*$)" + }, + { + token: tokens.entity, + regex: "^\\.\\. \\[[^\\]]+\\] " + }, + { + token: tokens.comment, + regex: "^\\.\\. .*$", + next: "comment" + }, + { + token: tokens.list, + regex: "^\\s*[\\*\\+-] " + }, + { + token: tokens.list, + regex: "^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. " + }, + { + token: tokens.list, + regex: "^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) " + }, + { + token: tokens.table, + regex: "^={2,}(?: +={2,})+$" + }, + { + token: tokens.table, + regex: "^\\+-{2,}(?:\\+-{2,})+\\+$" + }, + { + token: tokens.table, + regex: "^\\+={2,}(?:\\+={2,})+\\+$" + }, + { + token: ["text", tokens.literal], + regex: startStringPrefix + "(``)(?=\\S)", + next: "code" + }, + { + token: ["text", tokens.bold], + regex: startStringPrefix + "(\\*\\*)(?=\\S)", + next: "bold" + }, + { + token: ["text", tokens.italic], + regex: startStringPrefix + "(\\*)(?=\\S)", + next: "italic" + }, + { + token: tokens.entity, + regex: "\\|[\\w\\-]+?\\|" + }, + { + token: tokens.entity, + regex: ":[\\w-:]+:`\\S", + next: "entity" + }, + { + token: ["text", tokens.entity], + regex: startStringPrefix + "(_`)(?=\\S)", + next: "entity" + }, + { + token: tokens.entity, + regex: "_[A-Za-z0-9\\-]+?" + }, + { + token: ["text", tokens.link], + regex: startStringPrefix + "(`)(?=\\S)", + next: "link" + }, + { + token: tokens.link, + regex: "[A-Za-z0-9\\-]+?__?" + }, + { + token: tokens.link, + regex: "\\[[^\\]]+?\\]_" + }, + { + token: tokens.link, + regex: "https?://\\S+" + }, + { + token: tokens.table, + regex: "\\|" + } + ], + "codeblock": [ + { + token: tokens.literal, + regex: "^ +.+$", + next: "codeblock" + }, + { + token: tokens.literal, + regex: '^$', + next: "codeblock" + }, + { + token: "empty", + regex: "", + next: "start" + } + ], + "code": [ + { + token: tokens.literal, + regex: "\\S``" + endStringSuffix, + next: "start" + }, + { + defaultToken: tokens.literal + } + ], + "bold": [ + { + token: tokens.bold, + regex: "\\S\\*\\*" + endStringSuffix, + next: "start" + }, + { + defaultToken: tokens.bold + } + ], + "italic": [ + { + token: tokens.italic, + regex: "\\S\\*" + endStringSuffix, + next: "start" + }, + { + defaultToken: tokens.italic + } + ], + "entity": [ + { + token: tokens.entity, + regex: "\\S`" + endStringSuffix, + next: "start" + }, + { + defaultToken: tokens.entity + } + ], + "link": [ + { + token: tokens.link, + regex: "\\S`__?" + endStringSuffix, + next: "start" + }, + { + defaultToken: tokens.link + } + ], + "comment": [ + { + token: tokens.comment, + regex: "^ +.+$", + next: "comment" + }, + { + token: tokens.comment, + regex: '^$', + next: "comment" + }, + { + token: "empty", + regex: "", + next: "start" + } + ] + }; +}; +oop.inherits(RSTHighlightRules, TextHighlightRules); +exports.RSTHighlightRules = RSTHighlightRules; + +}); + +define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RSTHighlightRules = require("./rst_highlight_rules").RSTHighlightRules; +var Mode = function () { + this.HighlightRules = RSTHighlightRules; +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.$id = "ace/mode/rst"; + this.snippetFileId = "ace/snippets/rst"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/rst"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-ruby.js b/ui/base1/ace/mode-ruby.js new file mode 100644 index 0000000..432f647 --- /dev/null +++ b/ui/base1/ace/mode-ruby.js @@ -0,0 +1,921 @@ +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token: "constant.other.symbol.ruby", // symbol + regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; +exports.qString = { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; +exports.qqString = { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; +exports.tString = { + token: "string", // backtick string + regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; +var constantNumericHex = exports.constantNumericHex = { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; +var constantNumericBinary = exports.constantNumericBinary = { + token: "constant.numeric", + regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/ +}; +var constantNumericDecimal = exports.constantNumericDecimal = { + token: "constant.numeric", + regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/ +}; +var constantNumericOctal = exports.constantNumericOctal = { + token: "constant.numeric", + regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/ +}; +var constantNumericRational = exports.constantNumericRational = { + token: "constant.numeric", //rational + complex + regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/ +}; +var constantNumericComplex = exports.constantNumericComplex = { + token: "constant.numeric", //simple complex numbers + regex: /\b([\d]i)\b/ +}; +var constantNumericFloat = exports.constantNumericFloat = { + token: "constant.numeric", // float + complex + regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b" +}; +var instanceVariable = exports.instanceVariable = { + token: "variable.instance", // instance variable + regex: "@{1,2}[a-zA-Z_\\d]+" +}; +var RubyHighlightRules = function () { + var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" + + "private_class_method|remove_method|undef_method"); + var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"); + var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"); + var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})"; + var closeParen = { + "(": ")", + "[": "]", + "{": "}", + "<": ">", + "^": "^", + "|": "|", + "%": "%" + }; + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "comment.multiline", // multi line comment + regex: "^=begin(?=$|\\s.*$)", + next: "comment" + }, { + token: "string.regexp", + regex: /[/](?=.*\/)/, + next: "regex" + }, + [{ + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(")/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(')/, + push: [{ + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "string.end", + regex: /'/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithoutInterpolation"; + return this.token; + } + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithoutInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithInterpolation"; + return this.token; + } + }, { + token: "string.regexp", + regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "rState"; + return this.token; + } + }], + { + token: "punctuation", // namespaces aren't symbols + regex: "::" + }, + instanceVariable, + { + token: "variable.global", // global variable + regex: "[$][a-zA-Z_\\d]+" + }, { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]*" + }, { + token: ["punctuation.operator", "support.function"], + regex: /(\.)([a-zA-Z_\d]+)(?=\()/ + }, { + token: ["punctuation.operator", "identifier"], + regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/ + }, { + token: "string.character", + regex: "\\B\\?(?:" + escapedChars + "|\\S)" + }, { + token: "punctuation.operator", + regex: /\?(?=.+:)/ + }, + constantNumericRational, + constantNumericComplex, + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + constantNumericBinary, + constantNumericDecimal, + constantNumericOctal, + { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "punctuation.separator.key-value", + regex: "=>" + }, { + stateName: "heredoc", + onMatch: function (value, currentState, stack) { + var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + { type: "constant", value: tokens[1] }, + { type: "string", value: tokens[2] }, + { type: "support.class", value: tokens[3] }, + { type: "string", value: tokens[4] } + ]; + }, + regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]", + onMatch: function (value, currentState, stack) { + this.next = ''; + if (value == "}" && stack.length > 1 && stack[1] != "start") { + stack.shift(); + this.next = stack.shift(); + } + return this.token; + } + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + } + ], + "comment": [ + { + token: "comment.multiline", // closing comment + regex: "^=end(?=$|\\s.*$)", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "qStateWithInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "qStateWithoutInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "sStateWithoutInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "sStateWithInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "rState": [{ + token: "string.regexp", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.language.escape"; + } + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.regexp", + regex: /\// + }, { + token: "string.regexp", + regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) { + if (stack.length && val[0] === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.language.escape"; + } + }, + { include: "regex" }, + { + defaultToken: "string.regexp" + }], + "regex": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "constant.language.escape", + regex: /\\[AGbBzZ]/ + }, { + token: "constant.language.escape", + regex: /\\g<[a-zA-Z0-9]*>/ + }, { + token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"], + regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/ + }, { + token: ["constant.language.escape", "invalid", "constant.language.escape"], + regex: /(\\p{\^?)([^/]*)(})/ + }, { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: /[/][imxouesn]*/, + next: "start" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "regexp.keyword", + regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + push: "regex_character_class" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: /&?&?\[\^?/, + push: "regex_character_class" + }, { + token: "constant.language.escape", + regex: "]", + next: "pop" + }, { + token: "constant.language.escape", + regex: "-" + }, { + defaultToken: "string.regexp.characterclass" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(RubyHighlightRules, TextHighlightRules); +exports.RubyHighlightRules = RubyHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.indentKeywords = { + "class": 1, + "def": 1, + "module": 1, + "do": 1, + "unless": 1, + "if": 1, + "while": 1, + "for": 1, + "until": 1, + "begin": 1, + "else": 0, + "elsif": 0, + "rescue": 0, + "ensure": 0, + "when": 0, + "end": -1, + "case": 1, + "=begin": 1, + "=end": -1 + }; + this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/; + this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1]) { + if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") { + if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) { + return; + } + if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) { + return; + } + } + if (match[1] == "when") { + if (/\sthen\s/.test(line) === true) { + return; + } + } + if (session.getTokenAt(row, match.index + 2).type === "keyword") + return "start"; + } + else if (match[3]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "start"; + } + else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + var match = line.match(this.foldingStopMarker); + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } + else if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "end"; + } + else + return "end"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1] || match[3]) + return this.rubyBlock(session, row, match.index + 2); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.rubyBlock(session, row, match.index + 1); + } + if (match[1] === "=end") { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return this.rubyBlock(session, row, match.index + 1); + } + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.rubyBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || (token.type != "keyword" && token.type != "comment.multiline")) + return; + var val = token.value; + var line = session.getLine(row); + switch (token.value) { + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + return; + } + var dir = this.indentKeywords[val]; + break; + case "when": + if (/\sthen\s/.test(line)) { + return; + } + case "elsif": + case "rescue": + case "ensure": + var dir = 1; + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line)) { + return; + } + var dir = 1; + break; + default: + var dir = this.indentKeywords[val]; + break; + } + var stack = [val]; + if (!dir) + return; + var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length; + var startRow = row; + var ranges = []; + ranges.push(stream.getCurrentTokenRange()); + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + if (token.type == "comment.multiline") { + while (token = stream.step()) { + if (token.type !== "comment.multiline") + continue; + if (dir == 1) { + startColumn = 6; + if (token.value == "=end") { + break; + } + } + else { + if (token.value == "=begin") { + break; + } + } + } + } + else { + while (token = stream.step()) { + var ignore = false; + if (token.type !== "keyword") + continue; + var level = dir * this.indentKeywords[token.value]; + line = session.getLine(stream.getCurrentTokenRow()); + switch (token.value) { + case "do": + for (var i = stream.$tokenIndex - 1; i >= 0; i--) { + var prevToken = stream.$rowTokens[i]; + if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) { + level = 0; + break; + } + } + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + level = 0; + ignore = true; + } + break; + case "when": + if (/\sthen\s/.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + } + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0 && ignore === false) { + stack.shift(); + if (!stack.length) { + if ((val == "while" || val == "until" || val == "for") && token.value != "do") { + break; + } + if (token.value == "do" && dir == -1 && level != 0) + break; + if (token.value != "do") + break; + } + if (level === 0) { + stack.unshift(token.value); + } + } + } + } + if (!token) + return null; + if (tokenRange) { + ranges.push(stream.getCurrentTokenRange()); + return ranges; + } + var row = stream.getCurrentTokenRow(); + if (dir === -1) { + if (token.type === "comment.multiline") { + var endColumn = 6; + } + else { + var endColumn = session.getLine(row).length; + } + return new Range(row, endColumn, startRow - 1, startColumn); + } + else + return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var FoldMode = require("./folding/ruby").FoldMode; +var Mode = function () { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new FoldMode(); + this.indentKeywords = this.foldingRules.indentKeywords; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/); + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + if (/}/.test(line)) + return this.$outdent.autoOutdent(session, row); + var indent = this.$getIndent(line); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine); + var tab = session.getTabString(); + if (prevIndent.length <= indent.length) { + if (indent.slice(-tab.length) == tab) + session.remove(new Range(row, indent.length - tab.length, row, indent.length)); + } + }; + this.getMatching = function (session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in this.indentKeywords) + return this.foldingRules.rubyBlock(session, row, column, true); + }; + this.$id = "ace/mode/ruby"; + this.snippetFileId = "ace/snippets/ruby"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/ruby"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-rust.js b/ui/base1/ace/mode-rust.js new file mode 100644 index 0000000..c9ffaa3 --- /dev/null +++ b/ui/base1/ace/mode-rust.js @@ -0,0 +1,392 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/rust_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.github.com/dbp/sublime-rust/master/Rust.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var stringEscape = /\\(?:[nrt0'"\\]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source; +var wordPattern = /[a-zA-Z_\xa1-\uffff][a-zA-Z0-9_\xa1-\uffff]*/.source; +var RustHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword.source.rust": "abstract|alignof|as|async|await|become|box|break|catch|continue|const|crate|" + + "default|do|dyn|else|enum|extern|for|final|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|" + + "override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|" + + "unsafe|unsized|use|virtual|where|while|yield|try", + "storage.type.source.rust": "Self|isize|usize|char|bool|u8|u16|u32|u64|u128|f16|f32|f64|i8|i16|i32|i64|" + + "i128|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|" + + "c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|" + + "uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t", + "constant.language.source.rust": "true|false|Some|None|Ok|Err|FALSE|TRUE", + "support.constant.source.rust": "EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|" + + "_IONBF|_IOLBF|" + + "BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|" + + "S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|" + + "F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO", + "constant.language": "macro_rules|mac_variant" + }, "identifier"); + this.$rules = { + start: [ + { + token: 'variable.other.source.rust', // `(?![\\\'])` to keep a lifetime name highlighting from continuing one character + regex: '\'' + wordPattern + '(?![\\\'])' + }, { + token: 'string.quoted.single.source.rust', + regex: "'(?:[^'\\\\]|" + stringEscape + ")'" + }, { + token: 'identifier', + regex: "r#" + wordPattern + "\\b" + }, { + stateName: "bracketedComment", + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length - 1, currentState); + return "string.quoted.raw.source.rust"; + }, + regex: /r#*"/, + next: [ + { + onMatch: function (value, currentState, stack) { + var token = "string.quoted.raw.source.rust"; + if (value.length >= stack[1]) { + if (value.length > stack[1]) + token = "invalid"; + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } + else { + this.next = ""; + } + return token; + }, + regex: /"#*/, + next: "start" + }, { + defaultToken: "string.quoted.raw.source.rust" + } + ] + }, { + token: 'string.quoted.double.source.rust', + regex: '"', + push: [ + { + token: 'string.quoted.double.source.rust', + regex: '"', + next: 'pop' + }, { + token: 'constant.character.escape.source.rust', + regex: stringEscape + }, { defaultToken: 'string.quoted.double.source.rust' } + ] + }, { + token: ['keyword.source.rust', 'text', 'entity.name.function.source.rust', 'punctuation'], + regex: '\\b(fn)(\\s+)((?:r#)?' + wordPattern + ')(<)(?!<)', + push: "generics" + }, { + token: ['keyword.source.rust', 'text', 'entity.name.function.source.rust'], + regex: '\\b(fn)(\\s+)((?:r#)?' + wordPattern + ')' + }, { + token: ['support.constant', "punctuation"], + regex: "(" + wordPattern + '::)(<)(?!<)', + push: "generics" + }, { + token: 'support.constant', + regex: wordPattern + '::' + }, { + token: 'variable.language.source.rust', + regex: '\\bself\\b' + }, DocCommentHighlightRules.getStartRule("doc-start"), { + token: 'comment.line.doc.source.rust', + regex: '///.*$' + }, { + token: 'comment.line.doc.source.rust', + regex: '//!.*$' + }, { + token: 'comment.line.double-dash.source.rust', + regex: '//.*$' + }, { + token: 'comment.start.block.source.rust', + regex: '/\\*', + stateName: 'comment', + push: [ + { + token: 'comment.start.block.source.rust', + regex: '/\\*', + push: 'comment' + }, { + token: 'comment.end.block.source.rust', + regex: '\\*/', + next: 'pop' + }, { defaultToken: 'comment.block.source.rust' } + ] + }, { + token: ["keyword.source.rust", "identifier", "punctuaction"], + regex: "(?:(impl)|(" + wordPattern + "))(<)(?!<)", + stateName: 'generics', + push: [ + { + token: 'keyword.operator', + regex: /<<|=/ + }, { + token: "punctuaction", + regex: "<(?!<)", + push: "generics" + }, { + token: 'variable.other.source.rust', // `(?![\\\'])` to keep a lifetime name highlighting from continuing one character + regex: '\'' + wordPattern + '(?![\\\'])' + }, { + token: "storage.type.source.rust", + regex: "\\b(u8|u16|u32|u64|u128|usize|i8|i16|i32|i64|i128|isize|char|bool)\\b" + }, { + token: "keyword", + regex: "\\b(?:const|dyn)\\b" + }, { + token: "punctuation", + regex: ">", + next: "pop" + }, + { include: "punctuation" }, + { include: "operators" }, + { include: "constants" }, + { + token: "identifier", + regex: "\\b" + wordPattern + "\\b" + } + ] + }, { + token: keywordMapper, + regex: wordPattern + }, { + token: 'meta.preprocessor.source.rust', + regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' + }, + { include: "punctuation" }, + { include: "operators" }, + { include: "constants" } + ], + punctuation: [ + { + token: "paren.lparen", + regex: /[\[({]/ + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + } + ], + operators: [ + { + token: 'keyword.operator', // `[*/](?![*/])=?` is separated because `//` and `/* */` become comments and must be + regex: /\$|[-=]>|[-+%^=!&|<>]=?|[*/](?![*/])=?/ + } + ], + constants: [ + { + token: 'constant.numeric.source.rust', + regex: /\b(?:0x[a-fA-F0-9_]+|0o[0-7_]+|0b[01_]+|[0-9][0-9_]*(?!\.))(?:[iu](?:size|8|16|32|64|128))?\b/ + }, { + token: 'constant.numeric.source.rust', + regex: /\b(?:[0-9][0-9_]*)(?:\.[0-9][0-9_]*)?(?:[Ee][+-][0-9][0-9_]*)?(?:f32|f64)?\b/ + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +RustHighlightRules.metaData = { fileTypes: ['rs', 'rc'], + foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$', + foldingStopMarker: '^\\s*\\}', + name: 'Rust', + scopeName: 'source.rust' }; +oop.inherits(RustHighlightRules, TextHighlightRules); +exports.RustHighlightRules = RustHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = RustHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/", nestable: true }; + this.$quotes = { '"': '"' }; + this.$id = "ace/mode/rust"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/rust"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sac.js b/ui/base1/ace/mode-sac.js new file mode 100644 index 0000000..a5c462e --- /dev/null +++ b/ui/base1/ace/mode-sac.js @@ -0,0 +1,349 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/sac_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var sacHighlightRules = function () { + var keywordControls = ("break|continue|do|else|for|if|" + + "return|with|while|use|class|all|void"); + var storageType = ("bool|char|complex|double|float|" + + "byte|int|short|long|longlong|" + + "ubyte|uint|ushort|ulong|ulonglong|" + + "struct|typedef"); + var storageModifiers = ("inline|external|specialize"); + var keywordOperators = ("step|width"); + var builtinConstants = ("true|false"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.control": keywordControls, + "storage.type": storageType, + "storage.modifier": storageModifiers, + "keyword.operator": keywordOperators, + "constant.language": builtinConstants + }, "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type + this.$rules = { + "start": [ + { + token: "comment", + regex: "//$", + next: "start" + }, { + token: "comment", + regex: "//", + next: "singleLineComment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // character + regex: "'(?:" + escapeRe + "|.)?'" + }, { + token: "string.start", + regex: '"', + stateName: "qqstring", + next: [ + { token: "string", regex: /\\\s*$/, next: "qqstring" }, + { token: "constant.language.escape", regex: escapeRe }, + { token: "constant.language.escape", regex: formatRe }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string.start", + regex: 'R"\\(', + stateName: "rawString", + next: [ + { token: "string.end", regex: '\\)"', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b", + next: "directive" + }, { + token: "keyword", // special case pre-compiler directive + regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b" + }, { + token: "support.function", + regex: "fold|foldfix|genarray|modarray|propagate" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*" + }, { + token: "keyword.operator", + regex: /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ + }, { + token: "punctuation.operator", + regex: "\\?|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "singleLineComment": [ + { + token: "comment", + regex: /\\$/, + next: "singleLineComment" + }, { + token: "comment", + regex: /$/, + next: "start" + }, { + defaultToken: "comment" + } + ], + "directive": [ + { + token: "constant.other.multiline", + regex: /\\/ + }, + { + token: "constant.other.multiline", + regex: /.*\\/ + }, + { + token: "constant.other", + regex: "\\s*<.+?>", + next: "start" + }, + { + token: "constant.other", // single line + regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next: "start" + }, + { + token: "constant.other", // single line + regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next: "start" + }, + { + token: "constant.other", + regex: /[^\\\/]+/, + next: "start" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(sacHighlightRules, TextHighlightRules); +exports.sacHighlightRules = sacHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sac",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sac_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SaCHighlightRules = require("./sac_highlight_rules").sacHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = SaCHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/sac"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sac"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sass.js b/ui/base1/ace/mode-sass.js new file mode 100644 index 0000000..2be8443 --- /dev/null +++ b/ui/base1/ace/mode-sass.js @@ -0,0 +1,480 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var ScssHighlightRules = function () { + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|")); + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")); + var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", + regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "string", "support.function"], + regex: "(url\\()(.*)(\\))" + }, { + token: function (value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable", + regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; +}; +oop.inherits(ScssHighlightRules, TextHighlightRules); +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var SassHighlightRules = function () { + ScssHighlightRules.call(this); + var start = this.$rules.start; + if (start[1].token == "comment") { + start.splice(1, 1, { + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, -1, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\*/, + next: "comment" + }, { + token: "error.invalid", + regex: "/\\*|[{;}]" + }, { + token: "support.type", + regex: /^\s*:[\w\-]+\s/ + }); + this.$rules.comment = [ + { regex: /^\s*/, onMatch: function (value, currentState, stack) { + if (stack[1] === -1) + stack[1] = Math.max(stack[2], value.length - 1); + if (value.length <= stack[1]) { stack.shift(); + stack.shift(); + stack.shift(); + this.next = stack.shift(); + return "text"; + } + else { + this.next = ""; + return "comment"; + } + }, next: "start" }, + { defaultToken: "comment" } + ]; + } +}; +oop.inherits(SassHighlightRules, ScssHighlightRules); +exports.SassHighlightRules = SassHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = SassHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/sass"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sass"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-scad.js b/ui/base1/ace/mode-scad.js new file mode 100644 index 0000000..7bad49a --- /dev/null +++ b/ui/base1/ace/mode-scad.js @@ -0,0 +1,350 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var scadHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": "module|if|else|for", + "constant.language": "NULL" + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant", // + regex: "<[a-zA-Z0-9.]+>" + }, { + token: "keyword", // pre-compiler directivs + regex: "(?:use|include)" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(scadHighlightRules, TextHighlightRules); +exports.scadHighlightRules = scadHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = scadHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/scad"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/scad"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-scala.js b/ui/base1/ace/mode-scala.js new file mode 100644 index 0000000..75e8e0e --- /dev/null +++ b/ui/base1/ace/mode-scala.js @@ -0,0 +1,1394 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ScalaHighlightRules = function () { + var keywords = ("case|default|do|else|for|if|match|while|throw|return|try|trye|catch|finally|yield|" + + "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|null|" + + "override|package|private|protected|sealed|super|this|trait|type|val|var|with|" + + "assert|assume|require|print|println|printf|readLine|readBoolean|readByte|readShort|" + // package scala + "readChar|readInt|readLong|readFloat|readDouble" // package scala + ); + var buildinConstants = ("true|false"); + var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" + + "ClassFormatError|Deprecated|EnumConstantNotPresentException|" + + "ExceptionInInitializerError|IllegalAccessError|" + + "IllegalThreadStateException|InstantiationError|InternalError|" + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|" + + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" + + "SuppressWarnings|TypeNotPresentException|UnknownError|" + + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" + + "InstantiationException|IndexOutOfBoundsException|" + + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" + + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" + + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" + + "InterruptedException|NoSuchMethodException|IllegalAccessException|" + + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" + + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" + + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" + + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" + + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" + + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" + + "StackOverflowError|OutOfMemoryError|VirtualMachineError|" + + "ArrayStoreException|ClassCastException|LinkageError|" + + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" + + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" + + "Cloneable|Class|CharSequence|Comparable|String|Object|" + + "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" + + "Option|Array|Char|Byte|Int|Long|Nothing|" + + "App|Application|BufferedIterator|BigDecimal|BigInt|Console|Either|" + + "Enumeration|Equiv|Fractional|Function|IndexedSeq|Integral|Iterator|" + + "Map|Numeric|Nil|NotNull|Ordered|Ordering|PartialFunction|PartialOrdering|" + + "Product|Proxy|Range|Responder|Seq|Serializable|Set|Specializable|Stream|" + + "StringContext|Symbol|Traversable|TraversableOnce|Tuple|Vector|Pair|Triple"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "support.function": langClasses, + "constant.language": buildinConstants + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", + regex: '"""', + next: "tstring" + }, { + token: "string", + regex: '"(?=.)', // " strings can't span multiple lines + next: "string" + }, { + token: "symbol.constant", // single line + regex: "'[\\w\\d_]+" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "string": [ + { + token: "escape", + regex: '\\\\"' + }, { + token: "string", + regex: '"', + next: "start" + }, { + token: "string.invalid", + regex: '[^"\\\\]*$', + next: "start" + }, { + token: "string", + regex: '[^"\\\\]+' + } + ], + "tstring": [ + { + token: "string", + regex: '"{3,5}', + next: "start" + }, { + defaultToken: "string" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(ScalaHighlightRules, TextHighlightRules); +exports.ScalaHighlightRules = ScalaHighlightRules; + +}); + +define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptMode = require("./javascript").Mode; +var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules; +var Mode = function () { + JavaScriptMode.call(this); + this.HighlightRules = ScalaHighlightRules; +}; +oop.inherits(Mode, JavaScriptMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/scala"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/scala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-scheme.js b/ui/base1/ace/mode-scheme.js new file mode 100644 index 0000000..ba17f59 --- /dev/null +++ b/ui/base1/ace/mode-scheme.js @@ -0,0 +1,210 @@ +define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SchemeHighlightRules = function () { + var keywordControl = "case|do|let|loop|if|else|when"; + var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?"; + var constantLanguage = "#t|#f"; + var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load"; + var keywordMapper = this.createKeywordMapper({ + "keyword.control": keywordControl, + "keyword.operator": keywordOperator, + "constant.language": constantLanguage, + "support.function": supportFunctions + }, "identifier", true); + this.$rules = + { + "start": [ + { + token: "comment", + regex: ";.*$" + }, + { + "token": ["storage.type.function-type.scheme", "text", "entity.name.function.scheme"], + "regex": "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" + }, + { + "token": "punctuation.definition.constant.character.scheme", + "regex": "#:\\S+" + }, + { + "token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"], + "regex": "(\\*)(\\S*)(\\*)" + }, + { + "token": "constant.numeric", // hex + "regex": "#[xXoObB][0-9a-fA-F]+" + }, + { + "token": "constant.numeric", // float + "regex": "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?" + }, + { + "token": keywordMapper, + "regex": "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*" + }, + { + "token": "string", + "regex": '"(?=.)', + "next": "qqstring" + } + ], + "qqstring": [ + { + "token": "constant.character.escape.scheme", + "regex": "\\\\." + }, + { + "token": "string", + "regex": '[^"\\\\]+', + "merge": true + }, { + "token": "string", + "regex": "\\\\$", + "next": "qqstring", + "merge": true + }, { + "token": "string", + "regex": '"|$', + "next": "start", + "merge": true + } + ] + }; +}; +oop.inherits(SchemeHighlightRules, TextHighlightRules); +exports.SchemeHighlightRules = SchemeHighlightRules; + +}); + +define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingParensOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\)/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\))/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + var match = line.match(/^(\s+)/); + if (match) { + return match[1]; + } + return ""; + }; +}).call(MatchingParensOutdent.prototype); +exports.MatchingParensOutdent = MatchingParensOutdent; + +}); + +define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules; +var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent; +var Mode = function () { + this.HighlightRules = SchemeHighlightRules; + this.$outdent = new MatchingParensOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ";"; + this.minorIndentFunctions = ["define", "lambda", "define-macro", "define-syntax", "syntax-rules", "define-record-type", "define-structure"]; + this.$toIndent = function (str) { + return str.split('').map(function (ch) { + if (/\s/.exec(ch)) { + return ch; + } + else { + return ' '; + } + }).join(''); + }; + this.$calculateIndent = function (line, tab) { + var baseIndent = this.$getIndent(line); + var delta = 0; + var isParen, ch; + for (var i = line.length - 1; i >= 0; i--) { + ch = line[i]; + if (ch === '(') { + delta--; + isParen = true; + } + else if (ch === '(' || ch === '[' || ch === '{') { + delta--; + isParen = false; + } + else if (ch === ')' || ch === ']' || ch === '}') { + delta++; + } + if (delta < 0) { + break; + } + } + if (delta < 0 && isParen) { + i += 1; + var iBefore = i; + var fn = ''; + while (true) { + ch = line[i]; + if (ch === ' ' || ch === '\t') { + if (this.minorIndentFunctions.indexOf(fn) !== -1) { + return this.$toIndent(line.substring(0, iBefore - 1) + tab); + } + else { + return this.$toIndent(line.substring(0, i + 1)); + } + } + else if (ch === undefined) { + return this.$toIndent(line.substring(0, iBefore - 1) + tab); + } + fn += line[i]; + i++; + } + } + else if (delta < 0 && !isParen) { + return this.$toIndent(line.substring(0, i + 1)); + } + else if (delta > 0) { + baseIndent = baseIndent.substring(0, baseIndent.length - tab.length); + return baseIndent; + } + else { + return baseIndent; + } + }; + this.getNextLineIndent = function (state, line, tab) { + return this.$calculateIndent(line, tab); + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/scheme"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/scheme"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-scrypt.js b/ui/base1/ace/mode-scrypt.js new file mode 100644 index 0000000..7c837d5 --- /dev/null +++ b/ui/base1/ace/mode-scrypt.js @@ -0,0 +1,317 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/scrypt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from ./tmthemes/tmscrypt.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var scryptHighlightRules = function () { + var keywords = ("contract|library|loop|new|private|" + + "public|if|else|struct|type|" + + "require|static|const|import|exit|return|asm"); + var buildinConstants = ("true|false"); + var langClasses = ("function|auto|constructor|bytes|int|bool|SigHashPreimage|PrivKey|PubKey|Sig|Ripemd160|Sha1|Sha256|" + + "SigHashType|SigHashPreimage|OpCodeType"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ + }, { + token: "constant.numeric", // float + regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, + { + token: ["support.function.math.scrypt", "text", "text"], + regex: /\b(abs|min|max|within|ripemd160|sha1|sha256|hash160|hash256|checkSig|checkMultiSig|num2bin|pack|unpack|len|reverseBytes|repeat)(\s*)(\()/ + }, { + token: [ + "entity.name.type.scrypt", + "text", + "text", + "text", + "variable.object.property.scrypt" + ], + regex: /\b(SigHash)(\s*)(\.)(\s*)(ANYONECANPAY|ALL|FORKID|NONE|SINGLE)\b/ + }, + { + token: [ + "entity.name.type.scrypt", + "text", + "text", + "text", + "variable.object.property.scrypt" + ], + regex: /\b(OpCode)(\s*)(\.)(\s*)(OP_PUSHDATA1|OP_PUSHDATA2|OP_PUSHDATA4|OP_0|OP_FALSE|OP_1NEGATE|OP_1|OP_TRUE|OP_2|OP_3|OP_4|OP_5|OP_6|OP_7|OP_8|OP_9|OP_10|OP_11|OP_12|OP_13|OP_14|OP_15|OP_16|OP_1ADD|OP_1SUB|OP_NEGATE|OP_ABS|OP_NOT|OP_0NOTEQUAL|OP_ADD|OP_SUB|OP_MUL|OP_DIV|OP_MOD|OP_LSHIFT|OP_RSHIFT|OP_BOOLAND|OP_BOOLOR|OP_NUMEQUAL|OP_NUMEQUALVERIFY|OP_NUMNOTEQUAL|OP_LESSTHAN|OP_GREATERTHAN|OP_LESSTHANOREQUAL|OP_GREATERTHANOREQUAL|OP_MIN|OP_MAX|OP_WITHIN|OP_CAT|OP_SPLIT|OP_BIN2NUM|OP_NUM2BIN|OP_SIZE|OP_NOP|OP_IF|OP_NOTIF|OP_ELSE|OP_ENDIF|OP_VERIFY|OP_RETURN|OP_TOALTSTACK|OP_FROMALTSTACK|OP_IFDUP|OP_DEPTH|OP_DROP|OP_DUP|OP_NIP|OP_OVER|OP_PICK|OP_ROLL|OP_ROT|OP_SWAP|OP_TUCK|OP_2DROP|OP_2DUP|OP_3DUP|OP_2OVER|OP_2ROT|OP_2SWAP|OP_RIPEMD160|OP_SHA1|OP_SHA256|OP_HASH160|OP_HASH256|OP_CODESEPARATOR|OP_CHECKSIG|OP_CHECKSIGVERIFY|OP_CHECKMULTISIG|OP_CHECKMULTISIGVERIFY|OP_INVERT|OP_AND|OP_OR|OP_XOR|OP_EQUAL|OP_EQUALVERIFY)\b/ + }, { + token: "entity.name.type.scrypt", + regex: /\b(?:P2PKH|P2PK|Tx|HashPuzzleRipemd160|HashPuzzleSha1|HashPuzzleSha256|HashPuzzleHash160|OpCode|SigHash)\b/ + }, { + token: [ + "punctuation.separator.period.scrypt", + 'text', + "entity.name.function.scrypt", + "text", + "punctuation.definition.parameters.begin.bracket.round.scrypt" + ], + regex: /(\.)([^\S$\r]*)([\w][\w\d]*)(\s*)(\()/, + push: [{ + token: "punctuation.definition.parameters.end.bracket.round.scrypt", + regex: /\)/, + next: "pop" + }, { + defaultToken: "start" + }] + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(scryptHighlightRules, TextHighlightRules); +exports.scryptHighlightRules = scryptHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/scrypt",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scrypt_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var scryptHighlightRules = require("./scrypt_highlight_rules").scryptHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = scryptHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { + start: "/*", + end: "*/" + }; + this.$quotes = { + '"': '"', + "'": "'" + }; + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/scrypt"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/scrypt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-scss.js b/ui/base1/ace/mode-scss.js new file mode 100644 index 0000000..2ac2b28 --- /dev/null +++ b/ui/base1/ace/mode-scss.js @@ -0,0 +1,768 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var ScssHighlightRules = function () { + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|")); + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")); + var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", + regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "string", "support.function"], + regex: "(url\\()(.*)(\\))" + }, { + token: function (value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable", + regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; +}; +oop.inherits(ScssHighlightRules, TextHighlightRules); +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CssCompletions = require("./css_completions").CssCompletions; +var Mode = function () { + this.HighlightRules = ScssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.$id = "ace/mode/scss"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/scss"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sh.js b/ui/base1/ace/mode-sh.js new file mode 100644 index 0000000..ad24fe5 --- /dev/null +++ b/ui/base1/ace/mode-sh.js @@ -0,0 +1,387 @@ +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var reservedKeywords = exports.reservedKeywords = ('!|{|}|case|do|done|elif|else|' + + 'esac|fi|for|if|in|then|until|while|' + + '&|;|export|local|read|typeset|unset|' + + 'elif|select|set|function|declare|readonly'); +var languageConstructs = exports.languageConstructs = ('[|]|alias|bg|bind|break|builtin|' + + 'cd|command|compgen|complete|continue|' + + 'dirs|disown|echo|enable|eval|exec|' + + 'exit|fc|fg|getopts|hash|help|history|' + + 'jobs|kill|let|logout|popd|printf|pushd|' + + 'pwd|return|set|shift|shopt|source|' + + 'suspend|test|times|trap|type|ulimit|' + + 'umask|unalias|wait'); +var ShHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + var func = "(?:" + variableName + "\\s*\\(\\))"; + this.$rules = { + "start": [{ + token: "constant", + regex: /\\./ + }, { + token: ["text", "comment"], + regex: /(^|\s)(#.*)$/ + }, { + token: "string.start", + regex: '"', + push: [{ + token: "constant.language.escape", + regex: /\\(?:[$`"\\]|$)/ + }, { + include: "variables" + }, { + token: "keyword.operator", + regex: /`/ // TODO highlight ` + }, { + token: "string.end", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\$'", + push: [{ + token: "constant.language.escape", + regex: /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex: "<<<", + token: "keyword.operator" + }, { + stateName: "heredoc", + regex: "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch: function (value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + { type: "constant", value: tokens[1] }, + { type: "text", value: tokens[2] }, + { type: "string", value: tokens[3] }, + { type: "support.class", value: tokens[4] }, + { type: "string", value: tokens[5] } + ]; + }, + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: ["keyword", "text", "text", "text", "variable"], + regex: /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token: "variable.language", + regex: builtinVariable + }, { + token: "variable", + regex: variable + }, { + include: "variables" + }, { + token: "support.function", + regex: func + }, { + token: "support.function", + regex: fileDescriptor + }, { + token: "string", // ' string + start: "'", end: "'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token: "punctuation.operator", + regex: ";" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]]" + }, { + token: "paren.rparen", + regex: "[\\)\\}]", + next: "pop" + }], + variables: [{ + token: "variable", + regex: /(\$)(\w+)/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\()/, + push: "start" + }, { + token: ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex: /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push: "start" + }, { + token: "variable", + regex: /\$[*@#?\-$!0_]/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\{)/, + push: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ShHighlightRules, TextHighlightRules); +exports.ShHighlightRules = ShHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var Range = require("../range").Range; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/sh"; + this.snippetFileId = "ace/snippets/sh"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sh"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sjs.js b/ui/base1/ace/mode-sjs.js new file mode 100644 index 0000000..a41ab68 --- /dev/null +++ b/ui/base1/ace/mode-sjs.js @@ -0,0 +1,1393 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SJSHighlightRules = function () { + var parent = new JavaScriptHighlightRules({ noES6: true }); + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var contextAware = function (f) { + f.isContextAware = true; + return f; + }; + var ctxBegin = function (opts) { + return { + token: opts.token, + regex: opts.regex, + next: contextAware(function (currentState, stack) { + if (stack.length === 0) + stack.unshift(currentState); + stack.unshift(opts.next); + return opts.next; + }) + }; + }; + var ctxEnd = function (opts) { + return { + token: opts.token, + regex: opts.regex, + next: contextAware(function (currentState, stack) { + stack.shift(); + return stack[0] || "start"; + }) + }; + }; + this.$rules = parent.$rules; + this.$rules.no_regex = [ + { + token: "keyword", + regex: "(waitfor|or|and|collapse|spawn|retract)\\b" + }, + { + token: "keyword.operator", + regex: "(->|=>|\\.\\.)" + }, + { + token: "variable.language", + regex: "(hold|default)\\b" + }, + ctxBegin({ + token: "string", + regex: "`", + next: "bstring" + }), + ctxBegin({ + token: "string", + regex: '"', + next: "qqstring" + }), + ctxBegin({ + token: "string", + regex: '"', + next: "qqstring" + }), + { + token: ["paren.lparen", "text", "paren.rparen"], + regex: "(\\{)(\\s*)(\\|)", + next: "block_arguments" + } + ].concat(this.$rules.no_regex); + this.$rules.block_arguments = [ + { + token: "paren.rparen", + regex: "\\|", + next: "no_regex" + } + ].concat(this.$rules.function_arguments); + this.$rules.bstring = [ + { + token: "constant.language.escape", + regex: escapedRe + }, + { + token: "string", + regex: "\\\\$", + next: "bstring" + }, + ctxBegin({ + token: "paren.lparen", + regex: "\\$\\{", + next: "string_interp" + }), + ctxBegin({ + token: "paren.lparen", + regex: "\\$", + next: "bstring_interp_single" + }), + ctxEnd({ + token: "string", + regex: "`" + }), + { + defaultToken: "string" + } + ]; + this.$rules.qqstring = [ + { + token: "constant.language.escape", + regex: escapedRe + }, + { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, + ctxBegin({ + token: "paren.lparen", + regex: "#\\{", + next: "string_interp" + }), + ctxEnd({ + token: "string", + regex: '"' + }), + { + defaultToken: "string" + } + ]; + var embeddableRules = []; + for (var i = 0; i < this.$rules.no_regex.length; i++) { + var rule = this.$rules.no_regex[i]; + var token = String(rule.token); + if (token.indexOf('paren') == -1 && (!rule.next || rule.next.isContextAware)) { + embeddableRules.push(rule); + } + } + this.$rules.string_interp = [ + ctxEnd({ + token: "paren.rparen", + regex: "\\}" + }), + ctxBegin({ + token: "paren.lparen", + regex: '{', + next: "string_interp" + }) + ].concat(embeddableRules); + this.$rules.bstring_interp_single = [ + { + token: ["identifier", "paren.lparen"], + regex: '(\\w+)(\\()', + next: 'bstring_interp_single_call' + }, + ctxEnd({ + token: "identifier", + regex: "\\w*" + }) + ]; + this.$rules.bstring_interp_single_call = [ + ctxBegin({ + token: "paren.lparen", + regex: "\\(", + next: "bstring_interp_single_call" + }), + ctxEnd({ + token: "paren.rparen", + regex: "\\)" + }) + ].concat(embeddableRules); +}; +oop.inherits(SJSHighlightRules, TextHighlightRules); +exports.SJSHighlightRules = SJSHighlightRules; + +}); + +define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JSMode = require("./javascript").Mode; +var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = SJSHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, JSMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/sjs"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sjs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-slim.js b/ui/base1/ace/mode-slim.js new file mode 100644 index 0000000..3bcc3da --- /dev/null +++ b/ui/base1/ace/mode-slim.js @@ -0,0 +1,4770 @@ +define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SlimHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "keyword", + regex: /^(\s*)(\w+):\s*/, + onMatch: function (value, state, stack, line) { + var indent = /^\s*/.exec(line)[0]; + var m = value.match(/^(\s*)(\w+):/); + var language = m[2]; + if (!/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(language)) + language = ""; + stack.unshift("language-embed", [], [indent, language], state); + return this.token; + }, + stateName: "language-embed", + next: [{ + token: "string", + regex: /^(\s*)/, + onMatch: function (value, state, stack, line) { + var indent = stack[2][0]; + if (indent.length >= value.length) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + return [{ type: "text", value: indent }]; + }, + next: "" + }, { + token: "string", + regex: /.+/, + onMatch: function (value, state, stack, line) { + var indent = stack[2][0]; + var language = stack[2][1]; + var embedState = stack[1]; + if (modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }] + }, + { + token: 'constant.begin.javascript.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(ruby):$' + }, { + token: 'constant.begin.coffeescript.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(markdown):$' + }, { + token: 'constant.begin.css.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin.scss.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(sass):$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(less):$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(erb):$' + }, { + token: 'keyword.html.tags.slim', + regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b' + }, { + token: 'keyword.slim', + regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)' + }, { + token: "string", + regex: /^(\s*)('|\||\/|(\/!))\s*/, + onMatch: function (val, state, stack, line) { + var indent = /^\s*/.exec(line)[0]; + if (stack.length < 1) { + stack.push(this.next); + } + else { + stack[0] = "mlString"; + } + if (stack.length < 2) { + stack.push(indent.length); + } + else { + stack[1] = indent.length; + } + return this.token; + }, + next: "mlString" + }, { + token: 'keyword.control.slim', + regex: '^(\\s*)(\\-|==|=)', + push: [{ + token: 'control.end.slim', + regex: '$', + next: "pop" + }, { + include: "rubyline" + }, { + include: "misc" + }] + }, { + token: 'paren', + regex: '\\(', + push: [{ + token: 'paren', + regex: '\\)', + next: "pop" + }, { + include: "misc" + }] + }, { + token: 'paren', + regex: '\\[', + push: [{ + token: 'paren', + regex: '\\]', + next: "pop" + }, { + include: "misc" + }] + }, { + include: "misc" + } + ], + "mlString": [{ + token: "indent", + regex: /^\s*/, + onMatch: function (val, state, stack) { + var curIndent = stack[1]; + if (curIndent >= val.length) { + this.next = "start"; + stack.splice(0); + } + else { + this.next = "mlString"; + } + return this.token; + }, + next: "start" + }, { + defaultToken: "string" + }], + "rubyline": [{ + token: "keyword.operator.ruby.embedded.slim", + regex: "(==|=)(<>|><|<'|'<|<|>)?|-" + }, { + token: "list.ruby.operators.slim", + regex: "(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b" + }, { + token: "string", + regex: "['](.)*?[']" + }, { + token: "string", + regex: "[\"](.)*?[\"]" + }], + "misc": [{ + token: 'class.variable.slim', + regex: '\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b' + }, { + token: "list.meta.slim", + regex: "(\\b)(true|false|nil)(\\b)" + }, { + token: 'keyword.operator.equals.slim', + regex: '=' + }, { + token: "string", + regex: "['](.)*?[']" + }, { + token: "string", + regex: "[\"](.)*?[\"]" + }] + }; + this.normalizeRules(); +}; +oop.inherits(SlimHighlightRules, TextHighlightRules); +exports.SlimHighlightRules = SlimHighlightRules; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var escaped = function (ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +}; +var MarkdownHighlightRules = function () { + HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token: "support.function", + regex: /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function (value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next: "githubblock" + }; + var codeBlockRules = [{ + token: "support.function", + regex: ".*", + onMatch: function (value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if (m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; + this.$rules["start"].unshift({ + token: "empty_line", + regex: '^$', + next: "allowBlock" + }, { + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token: function (value) { + return "markup.heading." + value.length; + }, + regex: /^#{1,6}(?=\s|$)/, + next: "header" + }, codeBlockStartRule, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + token: "constant", + regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic" + }); + this.addRules({ + "basic": [{ + token: "constant.language.escape", + regex: /\\[\\`*_{}\[\]()#+\-.!]/ + }, { + token: "support.function", + regex: "(`+)(.*?[^`])(\\1)" + }, { + token: ["text", "constant", "text", "url", "string", "text"], + regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { + token: ["text", "string", "text", "constant", "text"], + regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])" + }, { + token: ["text", "string", "text", "markup.underline", "string", "text"], + regex: "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text + ")(\\]\\()" + // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { + token: "string.strong", + regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: "string.emphasis", + regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: ["text", "url", "text"], + regex: "(<)(" + + "(?:https?|ftp|dict):[^'\">\\s]+" + + "|" + + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" + + ")(>)" + }], + "allowBlock": [ + { token: "support.function", regex: "^ {4}.+", next: "allowBlock" }, + { token: "empty_line", regex: '^$', next: "allowBlock" }, + { token: "empty", regex: "", next: "start" } + ], + "header": [{ + regex: "$", + next: "start" + }, { + include: "basic" + }, { + defaultToken: "heading" + }], + "listblock-start": [{ + token: "support.variable", + regex: /(?:\[[ x]\])?/, + next: "listblock" + }], + "listblock": [{ + token: "empty_line", + regex: "^$", + next: "start" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic", noEscape: true + }, + codeBlockStartRule, + { + defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly + }], + "blockquote": [{ + token: "empty_line", + regex: "^\\s*$", + next: "start" + }, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + include: "basic", noEscape: true + }, { + defaultToken: "string.blockquote" + }], + "githubblock": codeBlockRules + }); + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); +exports.MarkdownHighlightRules = MarkdownHighlightRules; + +}); + +define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (!this.foldingStartMarker.test(line)) + return ""; + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) == "start") + return "end"; + return "start"; + } + return "start"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (!line.match(this.foldingStartMarker)) + return; + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) !== "start") { + while (++row < maxRow) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(startRow, startColumn, row, 0); + } + else { + while (row-- > 0) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(row, line.length, startRow, 0); + } + } + var token; + function isHeading(row) { + token = session.getTokens(row)[0]; + return token && token.type.lastIndexOf(heading, 0) === 0; + } + var heading = "markup.heading"; + function getLevel() { + var ch = token.value[0]; + if (ch == "=") + return 6; + if (ch == "-") + return 5; + return 7 - token.value.search(/[^#]|$/); + } + if (isHeading(row)) { + var startHeadingLevel = getLevel(); + while (++row < maxRow) { + if (!isHeading(row)) + continue; + var level = getLevel(); + if (level >= startHeadingLevel) + break; + } + endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2); + if (endRow > startRow) { + while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) + endRow--; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var reservedKeywords = exports.reservedKeywords = ('!|{|}|case|do|done|elif|else|' + + 'esac|fi|for|if|in|then|until|while|' + + '&|;|export|local|read|typeset|unset|' + + 'elif|select|set|function|declare|readonly'); +var languageConstructs = exports.languageConstructs = ('[|]|alias|bg|bind|break|builtin|' + + 'cd|command|compgen|complete|continue|' + + 'dirs|disown|echo|enable|eval|exec|' + + 'exit|fc|fg|getopts|hash|help|history|' + + 'jobs|kill|let|logout|popd|printf|pushd|' + + 'pwd|return|set|shift|shopt|source|' + + 'suspend|test|times|trap|type|ulimit|' + + 'umask|unalias|wait'); +var ShHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + var func = "(?:" + variableName + "\\s*\\(\\))"; + this.$rules = { + "start": [{ + token: "constant", + regex: /\\./ + }, { + token: ["text", "comment"], + regex: /(^|\s)(#.*)$/ + }, { + token: "string.start", + regex: '"', + push: [{ + token: "constant.language.escape", + regex: /\\(?:[$`"\\]|$)/ + }, { + include: "variables" + }, { + token: "keyword.operator", + regex: /`/ // TODO highlight ` + }, { + token: "string.end", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\$'", + push: [{ + token: "constant.language.escape", + regex: /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex: "<<<", + token: "keyword.operator" + }, { + stateName: "heredoc", + regex: "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch: function (value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + { type: "constant", value: tokens[1] }, + { type: "text", value: tokens[2] }, + { type: "string", value: tokens[3] }, + { type: "support.class", value: tokens[4] }, + { type: "string", value: tokens[5] } + ]; + }, + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: ["keyword", "text", "text", "text", "variable"], + regex: /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token: "variable.language", + regex: builtinVariable + }, { + token: "variable", + regex: variable + }, { + include: "variables" + }, { + token: "support.function", + regex: func + }, { + token: "support.function", + regex: fileDescriptor + }, { + token: "string", // ' string + start: "'", end: "'" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token: "punctuation.operator", + regex: ";" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]]" + }, { + token: "paren.rparen", + regex: "[\\)\\}]", + next: "pop" + }], + variables: [{ + token: "variable", + regex: /(\$)(\w+)/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\()/, + push: "start" + }, { + token: ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex: /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push: "start" + }, { + token: "variable", + regex: /\$[*@#?\-$!0_]/ + }, { + token: ["variable", "paren.lparen"], + regex: /(\$)(\{)/, + push: "start" + }] + }; + this.normalizeRules(); +}; +oop.inherits(ShHighlightRules, TextHighlightRules); +exports.ShHighlightRules = ShHighlightRules; + +}); + +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var Range = require("../range").Range; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + this.checkOutdent = function (state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + if (!last) + return false; + return (last.type == "keyword" && outdents[last.value]); + }; + this.autoOutdent = function (state, doc, row) { + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length - tab.length, row, indent.length)); + }; + this.$id = "ace/mode/sh"; + this.snippetFileId = "ace/snippets/sh"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = require("./folding/xml").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.voidElements = lang.arrayToMap([]); + this.blockComment = { start: "" }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/xml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var TextMode = require("./text").Mode; +var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; +var MarkdownFoldMode = require("./folding/markdown").FoldMode; +var Mode = function () { + this.HighlightRules = MarkdownHighlightRules; + this.createModeDelegates({ + javascript: require("./javascript").Mode, + html: require("./html").Mode, + bash: require("./sh").Mode, + sh: require("./sh").Mode, + xml: require("./xml").Mode, + css: require("./css").Mode + }); + this.foldingRules = new MarkdownFoldMode(); + this.$behaviour = new CstyleBehaviour({ braces: true }); +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.blockComment = { start: "" }; + this.$quotes = { '"': '"', "`": "`" }; + this.getNextLineIndent = function (state, line, tab) { + if (state == "listblock") { + var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line); + if (!match) + return ""; + var marker = match[2]; + if (!marker) + marker = parseInt(match[3], 10) + 1 + "."; + return match[1] + marker + match[4]; + } + else { + return this.$getIndent(line); + } + }; + this.$id = "ace/mode/markdown"; + this.snippetFileId = "ace/snippets/markdown"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +oop.inherits(CoffeeHighlightRules, TextHighlightRules); +function CoffeeHighlightRules() { + var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + var keywords = ("this|throw|then|try|typeof|super|switch|return|break|by|continue|" + + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + + "or|on|unless|until|and|yes|yield|export|import|default"); + var langConstant = ("true|false|null|undefined|NaN|Infinity"); + var illegal = ("case|const|function|var|void|with|enum|implements|" + + "interface|let|package|private|protected|public|static"); + var supportClass = ("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + + "SyntaxError|TypeError|URIError|" + + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"); + var supportFunction = ("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + + "encodeURIComponent|decodeURI|decodeURIComponent|String|"); + var variableLanguage = ("window|arguments|prototype|document"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": langConstant, + "invalid.illegal": illegal, + "language.support.class": supportClass, + "language.support.function": supportFunction, + "variable.language": variableLanguage + }, "identifier"); + var functionRule = { + token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], + regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source + }; + var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; + this.$rules = { + start: [ + { + token: "constant.numeric", + regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" + }, { + stateName: "qdoc", + token: "string", regex: "'''", next: [ + { token: "string", regex: "'''", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqdoc", + token: "string", + regex: '"""', + next: [ + { token: "string", regex: '"""', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qstring", + token: "string", regex: "'", next: [ + { token: "string", regex: "'", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqstring", + token: "string.start", regex: '"', next: [ + { token: "string.end", regex: '"', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "js", + token: "string", regex: "`", next: [ + { token: "string", regex: "`", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift() || ""; + if (this.next.indexOf("string") != -1) + return "paren.string"; + } + return "paren"; + } + }, { + token: "string.regex", + regex: "///", + next: "heregex" + }, { + token: "string.regex", + regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ + }, { + token: "comment", + regex: "###(?!#)", + next: "comment" + }, { + token: "comment", + regex: "#.*" + }, { + token: ["punctuation.operator", "text", "identifier"], + regex: "(\\.)(\\s*)(" + illegal + ")" + }, { + token: "punctuation.operator", + regex: "\\.{1,3}" + }, { + token: ["keyword", "text", "language.support.class", + "text", "keyword", "text", "language.support.class"], + regex: "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" + }, { + token: ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), + regex: "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex + }, + functionRule, + { + token: "variable", + regex: "@(?:" + identifier + ")?" + }, { + token: keywordMapper, + regex: identifier + }, { + token: "punctuation.operator", + regex: "\\,|\\." + }, { + token: "storage.type", + regex: "[\\-=]>" + }, { + token: "keyword.operator", + regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" + }, { + token: "paren.lparen", + regex: "[({[]" + }, { + token: "paren.rparen", + regex: "[\\]})]" + }, { + token: "text", + regex: "\\s+" + } + ], + heregex: [{ + token: "string.regex", + regex: '.*?///[imgy]{0,4}', + next: "start" + }, { + token: "comment.regex", + regex: "\\s+(?:#.*)?" + }, { + token: "string.regex", + regex: "\\S+" + }], + comment: [{ + token: "comment", + regex: '###', + next: "start" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +} +exports.CoffeeHighlightRules = CoffeeHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module){"use strict"; +var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; +var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var FoldMode = require("./folding/coffee").FoldMode; +var Range = require("../range").Range; +var TextMode = require("./text").Mode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var oop = require("../lib/oop"); +function Mode() { + this.HighlightRules = Rules; + this.$outdent = new Outdent(); + this.foldingRules = new FoldMode(); +} +oop.inherits(Mode, TextMode); +(function () { + var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; + this.lineCommentStart = "#"; + this.blockComment = { start: "###", end: "###" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && + state === 'start' && indenter.test(line)) + indent += tab; + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/coffee"; + this.snippetFileId = "ace/snippets/coffee"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var ScssHighlightRules = function () { + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|")); + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")); + var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", + regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "string", "support.function"], + regex: "(url\\()(.*)(\\))" + }, { + token: function (value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable", + regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; +}; +oop.inherits(ScssHighlightRules, TextHighlightRules); +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CssCompletions = require("./css_completions").CssCompletions; +var Mode = function () { + this.HighlightRules = ScssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.$id = "ace/mode/scss"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var SassHighlightRules = function () { + ScssHighlightRules.call(this); + var start = this.$rules.start; + if (start[1].token == "comment") { + start.splice(1, 1, { + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, -1, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\*/, + next: "comment" + }, { + token: "error.invalid", + regex: "/\\*|[{;}]" + }, { + token: "support.type", + regex: /^\s*:[\w\-]+\s/ + }); + this.$rules.comment = [ + { regex: /^\s*/, onMatch: function (value, currentState, stack) { + if (stack[1] === -1) + stack[1] = Math.max(stack[2], value.length - 1); + if (value.length <= stack[1]) { stack.shift(); + stack.shift(); + stack.shift(); + this.next = stack.shift(); + return "text"; + } + else { + this.next = ""; + return "comment"; + } + }, next: "start" }, + { defaultToken: "comment" } + ]; + } +}; +oop.inherits(SassHighlightRules, ScssHighlightRules); +exports.SassHighlightRules = SassHighlightRules; + +}); + +define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = SassHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/sass"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require('./css_highlight_rules'); +var LessHighlightRules = function () { + var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" + + "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" + + "or|and|when|not"; + var keywords = keywordList.split('|'); + var properties = CssHighlightRules.supportType.split('|'); + var keywordMapper = this.createKeywordMapper({ + "support.constant": CssHighlightRules.supportConstant, + "keyword": keywordList, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "identifier", true); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "paren.lparen", "string", "paren.rparen"], + regex: "(url)(\\()(.*)(\\))" + }, { + token: ["support.function", "paren.lparen"], + regex: "(:extend|[a-z0-9_\\-]+)(\\()" + }, { + token: function (value) { + if (keywords.indexOf(value.toLowerCase()) > -1) + return "keyword"; + else + return "variable"; + }, + regex: "[@\\$][a-z0-9_\\-@\\$]*\\b" + }, { + token: "variable", + regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}" + }, { + token: function (first, second) { + if (properties.indexOf(first.toLowerCase()) > -1) { + return ["support.type.property", "text"]; + } + else { + return ["support.type.unknownProperty", "text"]; + } + }, + regex: "([a-z0-9-_]+)(\\s*:)" + }, { + token: "keyword", + regex: "&" // special case - always treat as keyword + }, { + token: keywordMapper, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z_][a-z0-9-_]*" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(LessHighlightRules, TextHighlightRules); +exports.LessHighlightRules = LessHighlightRules; + +}); + +define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CssCompletions = require("./css_completions").CssCompletions; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = LessHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions("ruleset", session, pos, prefix); + }; + this.$id = "ace/mode/less"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token: "constant.other.symbol.ruby", // symbol + regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; +exports.qString = { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; +exports.qqString = { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; +exports.tString = { + token: "string", // backtick string + regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; +var constantNumericHex = exports.constantNumericHex = { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; +var constantNumericBinary = exports.constantNumericBinary = { + token: "constant.numeric", + regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/ +}; +var constantNumericDecimal = exports.constantNumericDecimal = { + token: "constant.numeric", + regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/ +}; +var constantNumericOctal = exports.constantNumericOctal = { + token: "constant.numeric", + regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/ +}; +var constantNumericRational = exports.constantNumericRational = { + token: "constant.numeric", //rational + complex + regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/ +}; +var constantNumericComplex = exports.constantNumericComplex = { + token: "constant.numeric", //simple complex numbers + regex: /\b([\d]i)\b/ +}; +var constantNumericFloat = exports.constantNumericFloat = { + token: "constant.numeric", // float + complex + regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b" +}; +var instanceVariable = exports.instanceVariable = { + token: "variable.instance", // instance variable + regex: "@{1,2}[a-zA-Z_\\d]+" +}; +var RubyHighlightRules = function () { + var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" + + "private_class_method|remove_method|undef_method"); + var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"); + var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"); + var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self"); + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})"; + var closeParen = { + "(": ")", + "[": "]", + "{": "}", + "<": ">", + "^": "^", + "|": "|", + "%": "%" + }; + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "comment.multiline", // multi line comment + regex: "^=begin(?=$|\\s.*$)", + next: "comment" + }, { + token: "string.regexp", + regex: /[/](?=.*\/)/, + next: "regex" + }, + [{ + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(")/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /"/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedChars + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: ["constant.other.symbol.ruby", "string.start"], + regex: /(:)?(')/, + push: [{ + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "string.end", + regex: /'/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithoutInterpolation"; + return this.token; + } + }, { + token: "string.start", //doesn't see any differences between strings and array of strings in highlighting + regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "qStateWithInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithoutInterpolation"; + return this.token; + } + }, { + token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting + regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "sStateWithInterpolation"; + return this.token; + } + }, { + token: "string.regexp", + regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) { + if (stack.length) + stack = []; + var paren = val[val.length - 1]; + stack.unshift(paren, state); + this.next = "rState"; + return this.token; + } + }], + { + token: "punctuation", // namespaces aren't symbols + regex: "::" + }, + instanceVariable, + { + token: "variable.global", // global variable + regex: "[$][a-zA-Z_\\d]+" + }, { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]*" + }, { + token: ["punctuation.operator", "support.function"], + regex: /(\.)([a-zA-Z_\d]+)(?=\()/ + }, { + token: ["punctuation.operator", "identifier"], + regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/ + }, { + token: "string.character", + regex: "\\B\\?(?:" + escapedChars + "|\\S)" + }, { + token: "punctuation.operator", + regex: /\?(?=.+:)/ + }, + constantNumericRational, + constantNumericComplex, + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + constantNumericBinary, + constantNumericDecimal, + constantNumericOctal, + { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "punctuation.separator.key-value", + regex: "=>" + }, { + stateName: "heredoc", + onMatch: function (value, currentState, stack) { + var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + { type: "constant", value: tokens[1] }, + { type: "string", value: tokens[2] }, + { type: "support.class", value: tokens[3] }, + { type: "string", value: tokens[4] } + ]; + }, + regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]", + onMatch: function (value, currentState, stack) { + this.next = ''; + if (value == "}" && stack.length > 1 && stack[1] != "start") { + stack.shift(); + this.next = stack.shift(); + } + return this.token; + } + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + } + ], + "comment": [ + { + token: "comment.multiline", // closing comment + regex: "^=end(?=$|\\s.*$)", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ], + "qStateWithInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "qStateWithoutInterpolation": [{ + token: "string.start", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "string"; + } + }, { + token: "constant.language.escape", + regex: /\\['\\]/ + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "string.end", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "string"; + } + }, { + defaultToken: "string" + }], + "sStateWithoutInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "sStateWithInterpolation": [{ + token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.other.symbol.ruby"; + } + }, { + token: "constant.language.escape", + regex: escapedChars + }, { + token: "constant.language.escape", + regex: /\\./ + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "constant.other.symbol.ruby", + regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) { + if (stack.length && val === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.other.symbol.ruby"; + } + }, { + defaultToken: "constant.other.symbol.ruby" + }], + "rState": [{ + token: "string.regexp", // excluded nested |^% due to difficulty in realization + regex: /[(\[<{]/, onMatch: function (val, state, stack) { + if (stack.length && val === stack[0]) { + stack.unshift(val, state); + return this.token; + } + return "constant.language.escape"; + } + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + token: "string.regexp", + regex: /\// + }, { + token: "string.regexp", + regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) { + if (stack.length && val[0] === closeParen[stack[0]]) { + stack.shift(); + this.next = stack.shift(); + return this.token; + } + this.next = ''; + return "constant.language.escape"; + } + }, + { include: "regex" }, + { + defaultToken: "string.regexp" + }], + "regex": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "constant.language.escape", + regex: /\\[AGbBzZ]/ + }, { + token: "constant.language.escape", + regex: /\\g<[a-zA-Z0-9]*>/ + }, { + token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"], + regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/ + }, { + token: ["constant.language.escape", "invalid", "constant.language.escape"], + regex: /(\\p{\^?)([^/]*)(})/ + }, { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: /[/][imxouesn]*/, + next: "start" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "regexp.keyword", + regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + push: "regex_character_class" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword", + regex: /\\[wWdDhHsS]/ + }, { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: /&?&?\[\^?/, + push: "regex_character_class" + }, { + token: "constant.language.escape", + regex: "]", + next: "pop" + }, { + token: "constant.language.escape", + regex: "-" + }, { + defaultToken: "string.regexp.characterclass" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(RubyHighlightRules, TextHighlightRules); +exports.RubyHighlightRules = RubyHighlightRules; + +}); + +define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.indentKeywords = { + "class": 1, + "def": 1, + "module": 1, + "do": 1, + "unless": 1, + "if": 1, + "while": 1, + "for": 1, + "until": 1, + "begin": 1, + "else": 0, + "elsif": 0, + "rescue": 0, + "ensure": 0, + "when": 0, + "end": -1, + "case": 1, + "=begin": 1, + "=end": -1 + }; + this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/; + this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1]) { + if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") { + if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) { + return; + } + if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) { + return; + } + } + if (match[1] == "when") { + if (/\sthen\s/.test(line) === true) { + return; + } + } + if (session.getTokenAt(row, match.index + 2).type === "keyword") + return "start"; + } + else if (match[3]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "start"; + } + else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + var match = line.match(this.foldingStopMarker); + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } + else if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return "end"; + } + else + return "end"; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1] || match[3]) + return this.rubyBlock(session, row, match.index + 2); + return this.openingBracketBlock(session, "{", row, match.index); + } + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[3] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.rubyBlock(session, row, match.index + 1); + } + if (match[1] === "=end") { + if (session.getTokenAt(row, match.index + 1).type === "comment.multiline") + return this.rubyBlock(session, row, match.index + 1); + } + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + this.rubyBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || (token.type != "keyword" && token.type != "comment.multiline")) + return; + var val = token.value; + var line = session.getLine(row); + switch (token.value) { + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + return; + } + var dir = this.indentKeywords[val]; + break; + case "when": + if (/\sthen\s/.test(line)) { + return; + } + case "elsif": + case "rescue": + case "ensure": + var dir = 1; + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line)) { + return; + } + var dir = 1; + break; + default: + var dir = this.indentKeywords[val]; + break; + } + var stack = [val]; + if (!dir) + return; + var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length; + var startRow = row; + var ranges = []; + ranges.push(stream.getCurrentTokenRange()); + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + if (token.type == "comment.multiline") { + while (token = stream.step()) { + if (token.type !== "comment.multiline") + continue; + if (dir == 1) { + startColumn = 6; + if (token.value == "=end") { + break; + } + } + else { + if (token.value == "=begin") { + break; + } + } + } + } + else { + while (token = stream.step()) { + var ignore = false; + if (token.type !== "keyword") + continue; + var level = dir * this.indentKeywords[token.value]; + line = session.getLine(stream.getCurrentTokenRow()); + switch (token.value) { + case "do": + for (var i = stream.$tokenIndex - 1; i >= 0; i--) { + var prevToken = stream.$rowTokens[i]; + if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) { + level = 0; + break; + } + } + break; + case "else": + var checkToken = new RegExp("^\\s*" + token.value + "\\s*$"); + if (!checkToken.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + case "if": + case "unless": + case "while": + case "until": + var checkToken = new RegExp("^\\s*" + token.value); + if (!checkToken.test(line)) { + level = 0; + ignore = true; + } + break; + case "when": + if (/\sthen\s/.test(line) || val == "case") { + level = 0; + ignore = true; + } + break; + } + if (level > 0) { + stack.unshift(token.value); + } + else if (level <= 0 && ignore === false) { + stack.shift(); + if (!stack.length) { + if ((val == "while" || val == "until" || val == "for") && token.value != "do") { + break; + } + if (token.value == "do" && dir == -1 && level != 0) + break; + if (token.value != "do") + break; + } + if (level === 0) { + stack.unshift(token.value); + } + } + } + } + if (!token) + return null; + if (tokenRange) { + ranges.push(stream.getCurrentTokenRange()); + return ranges; + } + var row = stream.getCurrentTokenRow(); + if (dir === -1) { + if (token.type === "comment.multiline") { + var endColumn = 6; + } + else { + var endColumn = session.getLine(row).length; + } + return new Range(row, endColumn, startRow - 1, startColumn); + } + else + return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var FoldMode = require("./folding/ruby").FoldMode; +var Mode = function () { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new FoldMode(); + this.indentKeywords = this.foldingRules.indentKeywords; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/); + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + if (/}/.test(line)) + return this.$outdent.autoOutdent(session, row); + var indent = this.$getIndent(line); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine); + var tab = session.getTabString(); + if (prevIndent.length <= indent.length) { + if (indent.slice(-tab.length) == tab) + session.remove(new Range(row, indent.length - tab.length, row, indent.length)); + } + }; + this.getMatching = function (session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in this.indentKeywords) + return this.foldingRules.rubyBlock(session, row, column, true); + }; + this.$id = "ace/mode/ruby"; + this.snippetFileId = "ace/snippets/ruby"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/slim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/slim_highlight_rules","ace/mode/javascript","ace/mode/markdown","ace/mode/coffee","ace/mode/scss","ace/mode/sass","ace/mode/less","ace/mode/ruby","ace/mode/css"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SlimHighlightRules = require("./slim_highlight_rules").SlimHighlightRules; +var Mode = function () { + TextMode.call(this); + this.HighlightRules = SlimHighlightRules; + this.createModeDelegates({ + javascript: require("./javascript").Mode, + markdown: require("./markdown").Mode, + coffee: require("./coffee").Mode, + scss: require("./scss").Mode, + sass: require("./sass").Mode, + less: require("./less").Mode, + ruby: require("./ruby").Mode, + css: require("./css").Mode + }); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/slim"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/slim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-smarty.js b/ui/base1/ace/mode-smarty.js new file mode 100644 index 0000000..ceb26c7 --- /dev/null +++ b/ui/base1/ace/mode-smarty.js @@ -0,0 +1,2436 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.github.com/amitsnyderman/sublime-smarty/master/Syntaxes/Smarty.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var SmartyHighlightRules = function () { + HtmlHighlightRules.call(this); + var smartyRules = { start: [{ include: '#comments' }, + { include: '#blocks' }], + '#blocks': [{ token: 'punctuation.section.embedded.begin.smarty', + regex: '\\{%?', + push: [{ token: 'punctuation.section.embedded.end.smarty', + regex: '%?\\}', + next: 'pop' }, + { include: '#strings' }, + { include: '#variables' }, + { include: '#lang' }, + { defaultToken: 'source.smarty' }] }], + '#comments': [{ token: ['punctuation.definition.comment.smarty', + 'comment.block.smarty'], + regex: '(\\{%?)(\\*)', + push: [{ token: 'comment.block.smarty', regex: '\\*%?\\}', next: 'pop' }, + { defaultToken: 'comment.block.smarty' }] }], + '#lang': [{ token: 'keyword.operator.smarty', + regex: '(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b' }, + { token: 'constant.language.smarty', + regex: '\\b(?:TRUE|FALSE|true|false)\\b' }, + { token: 'keyword.control.smarty', + regex: '\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b' }, + { token: 'variable.parameter.smarty', regex: '\\b[a-zA-Z]+=' }, + { token: 'support.function.built-in.smarty', + regex: '\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b' }, + { token: 'support.function.variable-modifier.smarty', + regex: '\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)' }], + '#strings': [{ token: 'punctuation.definition.string.begin.smarty', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.smarty', + regex: '\'', + next: 'pop' }, + { token: 'constant.character.escape.smarty', regex: '\\\\.' }, + { defaultToken: 'string.quoted.single.smarty' }] }, + { token: 'punctuation.definition.string.begin.smarty', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.smarty', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.smarty', regex: '\\\\.' }, + { defaultToken: 'string.quoted.double.smarty' }] }], + '#variables': [{ token: ['punctuation.definition.variable.smarty', + 'variable.other.global.smarty'], + regex: '\\b(\\$)(Smarty\\.)' }, + { token: ['punctuation.definition.variable.smarty', + 'variable.other.smarty'], + regex: '(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b' }, + { token: ['keyword.operator.smarty', 'variable.other.property.smarty'], + regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b' }, + { token: ['keyword.operator.smarty', + 'meta.function-call.object.smarty', + 'punctuation.definition.variable.smarty', + 'variable.other.smarty', + 'punctuation.definition.variable.smarty'], + regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' }] }; + var smartyStart = smartyRules.start; + for (var rule in this.$rules) { + this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart); + } + Object.keys(smartyRules).forEach(function (x) { + if (!this.$rules[x]) + this.$rules[x] = smartyRules[x]; + }, this); + this.normalizeRules(); +}; +SmartyHighlightRules.metaData = { fileTypes: ['tpl'], + foldingStartMarker: '\\{%?', + foldingStopMarker: '%?\\}', + name: 'Smarty', + scopeName: 'text.html.smarty' }; +oop.inherits(SmartyHighlightRules, HtmlHighlightRules); +exports.SmartyHighlightRules = SmartyHighlightRules; + +}); + +define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = SmartyHighlightRules; +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.$id = "ace/mode/smarty"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/smarty"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-smithy.js b/ui/base1/ace/mode-smithy.js new file mode 100644 index 0000000..1269209 --- /dev/null +++ b/ui/base1/ace/mode-smithy.js @@ -0,0 +1,456 @@ +define("ace/mode/smithy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.githubusercontent.com/awslabs/smithy-vscode/master/syntaxes/smithy.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SmithyHighlightRules = function () { + this.$rules = { + start: [{ + include: "#comment" + }, { + token: [ + "meta.keyword.statement.smithy", + "variable.other.smithy", + "text", + "keyword.operator.smithy" + ], + regex: /^(\$)(\s+.+)(\s*)(=)/ + }, { + token: [ + "keyword.statement.smithy", + "text", + "entity.name.type.namespace.smithy" + ], + regex: /^(namespace)(\s+)([A-Z-a-z0-9_\.#$-]+)/ + }, { + token: [ + "keyword.statement.smithy", + "text", + "keyword.statement.smithy", + "text", + "entity.name.type.smithy" + ], + regex: /^(use)(\s+)(shape|trait)(\s+)([A-Z-a-z0-9_\.#$-]+)\b/ + }, { + token: [ + "keyword.statement.smithy", + "variable.other.smithy", + "text", + "keyword.operator.smithy" + ], + regex: /^(metadata)(\s+.+)(\s*)(=)/ + }, { + token: [ + "keyword.statement.smithy", + "text", + "entity.name.type.smithy" + ], + regex: /^(apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|service|resource|trait|list|map|set|structure|union|document)(\s+)([A-Z-a-z0-9_\.#$-]+)\b/ + }, { + token: [ + "keyword.operator.smithy", + "text", + "entity.name.type.smithy", + "text", + "text", + "support.function.smithy", + "text", + "text", + "support.function.smithy" + ], + regex: /^(operation)(\s+)([A-Z-a-z0-9_\.#$-]+)(\(.*\))(?:(\s*)(->)(\s*[A-Z-a-z0-9_\.#$-]+))?(?:(\s+)(errors))?/ + }, { + include: "#trait" + }, { + token: [ + "support.type.property-name.smithy", + "punctuation.separator.dictionary.pair.smithy" + ], + regex: /([A-Z-a-z0-9_\.#$-]+)(:)/ + }, { + include: "#value" + }, { + token: "keyword.other.smithy", + regex: /\->/ + }], + "#comment": [{ + include: "#doc_comment" + }, { + include: "#line_comment" + }], + "#doc_comment": [{ + token: "comment.block.documentation.smithy", + regex: /\/\/\/.*/ + }], + "#line_comment": [{ + token: "comment.line.double-slash.smithy", + regex: /\/\/.*/ + }], + "#trait": [{ + token: [ + "punctuation.definition.annotation.smithy", + "storage.type.annotation.smithy" + ], + regex: /(@)([0-9a-zA-Z\.#-]+)/ + }, { + token: [ + "punctuation.definition.annotation.smithy", + "punctuation.definition.object.end.smithy", + "meta.structure.smithy" + ], + regex: /(@)([0-9a-zA-Z\.#-]+)(\()/, + push: [{ + token: "punctuation.definition.object.end.smithy", + regex: /\)/, + next: "pop" + }, { + include: "#value" + }, { + include: "#object_inner" + }, { + defaultToken: "meta.structure.smithy" + }] + }], + "#value": [{ + include: "#constant" + }, { + include: "#number" + }, { + include: "#string" + }, { + include: "#array" + }, { + include: "#object" + }], + "#array": [{ + token: "punctuation.definition.array.begin.smithy", + regex: /\[/, + push: [{ + token: "punctuation.definition.array.end.smithy", + regex: /\]/, + next: "pop" + }, { + include: "#comment" + }, { + include: "#value" + }, { + token: "punctuation.separator.array.smithy", + regex: /,/ + }, { + token: "invalid.illegal.expected-array-separator.smithy", + regex: /[^\s\]]/ + }, { + defaultToken: "meta.structure.array.smithy" + }] + }], + "#constant": [{ + token: "constant.language.smithy", + regex: /\b(?:true|false|null)\b/ + }], + "#number": [{ + token: "constant.numeric.smithy", + regex: /-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/ + }], + "#object": [{ + token: "punctuation.definition.dictionary.begin.smithy", + regex: /\{/, + push: [{ + token: "punctuation.definition.dictionary.end.smithy", + regex: /\}/, + next: "pop" + }, { + include: "#trait" + }, { + include: "#object_inner" + }, { + defaultToken: "meta.structure.dictionary.smithy" + }] + }], + "#object_inner": [{ + include: "#comment" + }, { + include: "#string_key" + }, { + token: "punctuation.separator.dictionary.key-value.smithy", + regex: /:/, + push: [{ + token: "punctuation.separator.dictionary.pair.smithy", + regex: /,|(?=\})/, + next: "pop" + }, { + include: "#value" + }, { + token: "invalid.illegal.expected-dictionary-separator.smithy", + regex: /[^\s,]/ + }, { + defaultToken: "meta.structure.dictionary.value.smithy" + }] + }, { + token: "invalid.illegal.expected-dictionary-separator.smithy", + regex: /[^\s\}]/ + }], + "#string_key": [{ + include: "#identifier_key" + }, { + include: "#dquote_key" + }, { + include: "#squote_key" + }], + "#identifier_key": [{ + token: "support.type.property-name.smithy", + regex: /[A-Z-a-z0-9_\.#$-]+/ + }], + "#dquote_key": [{ + include: "#dquote" + }], + "#squote_key": [{ + include: "#squote" + }], + "#string": [{ + include: "#textblock" + }, { + include: "#dquote" + }, { + include: "#squote" + }, { + include: "#identifier" + }], + "#textblock": [{ + token: "punctuation.definition.string.begin.smithy", + regex: /"""/, + push: [{ + token: "punctuation.definition.string.end.smithy", + regex: /"""/, + next: "pop" + }, { + token: "constant.character.escape.smithy", + regex: /\\./ + }, { + defaultToken: "string.quoted.double.smithy" + }] + }], + "#dquote": [{ + token: "punctuation.definition.string.begin.smithy", + regex: /"/, + push: [{ + token: "punctuation.definition.string.end.smithy", + regex: /"/, + next: "pop" + }, { + token: "constant.character.escape.smithy", + regex: /\\./ + }, { + defaultToken: "string.quoted.double.smithy" + }] + }], + "#squote": [{ + token: "punctuation.definition.string.begin.smithy", + regex: /'/, + push: [{ + token: "punctuation.definition.string.end.smithy", + regex: /'/, + next: "pop" + }, { + token: "constant.character.escape.smithy", + regex: /\\./ + }, { + defaultToken: "string.quoted.single.smithy" + }] + }], + "#identifier": [{ + token: "storage.type.smithy", + regex: /[A-Z-a-z_][A-Z-a-z0-9_\.#$-]*/ + }] + }; + this.normalizeRules(); +}; +SmithyHighlightRules.metaData = { + name: "Smithy", + fileTypes: ["smithy"], + scopeName: "source.smithy", + foldingStartMarker: "(\\{|\\[)\\s*", + foldingStopMarker: "\\s*(\\}|\\])" +}; +oop.inherits(SmithyHighlightRules, TextHighlightRules); +exports.SmithyHighlightRules = SmithyHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/smithy",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/smithy_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SmithyHighlightRules = require("./smithy_highlight_rules").SmithyHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = SmithyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$quotes = { '"': '"' }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/smithy"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/smithy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-snippets.js b/ui/base1/ace/mode-snippets.js new file mode 100644 index 0000000..7e39996 --- /dev/null +++ b/ui/base1/ace/mode-snippets.js @@ -0,0 +1,183 @@ +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SnippetHighlightRules = function () { + var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" + + "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME"; + this.$rules = { + "start": [ + { token: "constant.language.escape", regex: /\\[\$}`\\]/ }, + { token: "keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b" }, + { token: "variable", regex: "\\$\\w+" }, + { onMatch: function (value, state, stack) { + if (stack[1]) + stack[1]++; + else + stack.unshift(state, 1); + return this.tokenName; + }, tokenName: "markup.list", regex: "\\${", next: "varDecl" }, + { onMatch: function (value, state, stack) { + if (!stack[1]) + return "text"; + stack[1]--; + if (!stack[1]) + stack.splice(0, 2); + return this.tokenName; + }, tokenName: "markup.list", regex: "}" }, + { token: "doc.comment", regex: /^\${2}-{5,}$/ } + ], + "varDecl": [ + { regex: /\d+\b/, token: "constant.numeric" }, + { token: "keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b" }, + { token: "variable", regex: "\\w+" }, + { regex: /:/, token: "punctuation.operator", next: "start" }, + { regex: /\//, token: "string.regex", next: "regexp" }, + { regex: "", next: "start" } + ], + "regexp": [ + { regex: /\\./, token: "escape" }, + { regex: /\[/, token: "regex.start", next: "charClass" }, + { regex: "/", token: "string.regex", next: "format" }, + { "token": "string.regex", regex: "." } + ], + charClass: [ + { regex: "\\.", token: "escape" }, + { regex: "\\]", token: "regex.end", next: "regexp" }, + { "token": "string.regex", regex: "." } + ], + "format": [ + { regex: /\\[ulULE]/, token: "keyword" }, + { regex: /\$\d+/, token: "variable" }, + { regex: "/[gim]*:?", token: "string.regex", next: "start" }, + { "token": "string", regex: "." } + ] + }; +}; +oop.inherits(SnippetHighlightRules, TextHighlightRules); +exports.SnippetHighlightRules = SnippetHighlightRules; +var SnippetGroupHighlightRules = function () { + this.$rules = { + "start": [ + { token: "text", regex: "^\\t", next: "sn-start" }, + { token: "invalid", regex: /^ \s*/ }, + { token: "comment", regex: /^#.*/ }, + { token: "constant.language.escape", regex: "^regex ", next: "regex" }, + { token: "constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b" } + ], + "regex": [ + { token: "text", regex: "\\." }, + { token: "keyword", regex: "/" }, + { token: "empty", regex: "$", next: "start" } + ] + }; + this.embedRules(SnippetHighlightRules, "sn-", [ + { token: "text", regex: "^\\t", next: "sn-start" }, + { onMatch: function (value, state, stack) { + stack.splice(stack.length); + return this.tokenName; + }, tokenName: "text", regex: "^(?!\t)", next: "start" } + ]); +}; +oop.inherits(SnippetGroupHighlightRules, TextHighlightRules); +exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = SnippetGroupHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$indentWithTabs = true; + this.lineCommentStart = "#"; + this.$id = "ace/mode/snippets"; + this.snippetFileId = "ace/snippets/snippets"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/snippets"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-soy_template.js b/ui/base1/ace/mode-soy_template.js new file mode 100644 index 0000000..b9bb5a3 --- /dev/null +++ b/ui/base1/ace/mode-soy_template.js @@ -0,0 +1,2611 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module){/* This file was autogenerated from tm bundles\SoyTemplate\Syntaxes\SoyTemplate.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var SoyTemplateHighlightRules = function () { + HtmlHighlightRules.call(this); + var soyRules = { start: [{ include: '#template' }, + { include: '#if' }, + { include: '#comment-line' }, + { include: '#comment-block' }, + { include: '#comment-doc' }, + { include: '#call' }, + { include: '#css' }, + { include: '#param' }, + { include: '#print' }, + { include: '#msg' }, + { include: '#for' }, + { include: '#foreach' }, + { include: '#switch' }, + { include: '#tag' }, + { include: 'text.html.basic' }], + '#call': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.call.soy'], + regex: '(\\{/?)(\\s*)(?=call|delcall)', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { token: ['entity.name.tag.soy', 'variable.parameter.soy'], + regex: '(call|delcall)(\\s+[\\.\\w]+)' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy'], + regex: '\\b(data)(\\s*)(=)' }, + { defaultToken: 'meta.tag.call.soy' }] }], + '#comment-line': [{ token: ['comment.line.double-slash.soy', + 'comment.line.double-slash.soy'], + regex: '(//)(.*$)' }], + '#comment-block': [{ token: 'punctuation.definition.comment.begin.soy', + regex: '/\\*(?!\\*)', + push: [{ token: 'punctuation.definition.comment.end.soy', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.soy' }] }], + '#comment-doc': [{ token: 'punctuation.definition.comment.begin.soy', + regex: '/\\*\\*(?!/)', + push: [{ token: 'punctuation.definition.comment.end.soy', + regex: '\\*/', + next: 'pop' }, + { token: ['support.type.soy', 'text', 'variable.parameter.soy'], + regex: '(@param|@param\\?)(\\s+)(\\w+)' }, + { defaultToken: 'comment.block.documentation.soy' }] }], + '#css': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.css.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(css)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: 'support.constant.soy', + regex: '\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b' }, + { defaultToken: 'meta.tag.css.soy' }] }], + '#for': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.for.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(for)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: 'keyword.operator.soy', regex: '\\bin\\b' }, + { token: 'support.function.soy', regex: '\\brange\\b' }, + { include: '#variable' }, + { include: '#number' }, + { include: '#primitive' }, + { defaultToken: 'meta.tag.for.soy' }] }], + '#foreach': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.foreach.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(foreach)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: 'keyword.operator.soy', regex: '\\bin\\b' }, + { include: '#variable' }, + { defaultToken: 'meta.tag.foreach.soy' }] }], + '#function': [{ token: 'support.function.soy', + regex: '\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b' }], + '#if': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.if.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(if|elseif)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { include: '#operator' }, + { include: '#function' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { defaultToken: 'meta.tag.if.soy' }] }], + '#namespace': [{ token: ['entity.name.tag.soy', 'text', 'variable.parameter.soy'], + regex: '(namespace|delpackage)(\\s+)([\\w\\.]+)' }], + '#number': [{ token: 'constant.numeric', regex: '[\\d]+' }], + '#operator': [{ token: 'keyword.operator.soy', + regex: '==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:' }], + '#param': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.param.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(param)', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy'], + regex: '\\b([\\w]+)(\\s*)((?::)?)' }, + { defaultToken: 'meta.tag.param.soy' }] }], + '#primitive': [{ token: 'constant.language.soy', + regex: '\\b(?:null|false|true)\\b' }], + '#msg': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.msg.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(msg)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy'], + regex: '\\b(meaning|desc)(\\s*)(=)' }, + { defaultToken: 'meta.tag.msg.soy' }] }], + '#print': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.print.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(print)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { include: '#print-parameter' }, + { include: '#number' }, + { include: '#primitive' }, + { include: '#attribute-lookup' }, + { defaultToken: 'meta.tag.print.soy' }] }], + '#print-parameter': [{ token: 'keyword.operator.soy', regex: '\\|' }, + { token: 'variable.parameter.soy', + regex: 'noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate' }], + '#special-character': [{ token: 'support.constant.soy', + regex: '\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b' }], + '#string-quoted-double': [{ token: 'string.quoted.double', regex: '"[^"]*"' }], + '#string-quoted-single': [{ token: 'string.quoted.single', regex: '\'[^\']*\'' }], + '#switch': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.switch.soy', + 'entity.name.tag.soy'], + regex: '(\\{/?)(\\s*)(switch|case)\\b', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { include: '#function' }, + { include: '#number' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { defaultToken: 'meta.tag.switch.soy' }] }], + '#attribute-lookup': [{ token: 'punctuation.definition.attribute-lookup.begin.soy', + regex: '\\[', + push: [{ token: 'punctuation.definition.attribute-lookup.end.soy', + regex: '\\]', + next: 'pop' }, + { include: '#variable' }, + { include: '#function' }, + { include: '#operator' }, + { include: '#number' }, + { include: '#primitive' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }] }], + '#tag': [{ token: 'punctuation.definition.tag.begin.soy', + regex: '\\{', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#namespace' }, + { include: '#variable' }, + { include: '#special-character' }, + { include: '#tag-simple' }, + { include: '#function' }, + { include: '#operator' }, + { include: '#attribute-lookup' }, + { include: '#number' }, + { include: '#primitive' }, + { include: '#print-parameter' }] }], + '#tag-simple': [{ token: 'entity.name.tag.soy', + regex: '{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})' }], + '#template': [{ token: ['punctuation.definition.tag.begin.soy', + 'meta.tag.template.soy'], + regex: '(\\{/?)(\\s*)(?=template|deltemplate)', + push: [{ token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: ['entity.name.tag.soy', 'text', 'entity.name.function.soy'], + regex: '(template|deltemplate)(\\s+)([\\.\\w]+)', + originalRegex: '(?<=template|deltemplate)\\s+([\\.\\w]+)' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.double.soy'], + regex: '\\b(private)(\\s*)(=)(\\s*)("true"|"false")' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.single.soy'], + regex: '\\b(private)(\\s*)(=)(\\s*)(\'true\'|\'false\')' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.double.soy'], + regex: '\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")' }, + { token: ['entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.single.soy'], + regex: '\\b(autoescape)(\\s*)(=)(\\s*)(\'true\'|\'false\'|\'contextual\')' }, + { defaultToken: 'meta.tag.template.soy' }] }], + '#variable': [{ token: 'variable.other.soy', regex: '\\$[\\w\\.]+' }] }; + for (var i in soyRules) { + if (this.$rules[i]) { + this.$rules[i].unshift.apply(this.$rules[i], soyRules[i]); + } + else { + this.$rules[i] = soyRules[i]; + } + } + this.normalizeRules(); +}; +SoyTemplateHighlightRules.metaData = { comment: 'SoyTemplate', + fileTypes: ['soy'], + firstLineMatch: '\\{\\s*namespace\\b', + foldingStartMarker: '\\{\\s*template\\s+[^\\}]*\\}', + foldingStopMarker: '\\{\\s*/\\s*template\\s*\\}', + name: 'SoyTemplate', + scopeName: 'source.soy' }; +oop.inherits(SoyTemplateHighlightRules, HtmlHighlightRules); +exports.SoyTemplateHighlightRules = SoyTemplateHighlightRules; + +}); + +define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var SoyTemplateHighlightRules = require("./soy_template_highlight_rules").SoyTemplateHighlightRules; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = SoyTemplateHighlightRules; +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/soy_template"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/soy_template"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-space.js b/ui/base1/ace/mode-space.js new file mode 100644 index 0000000..8ec3b15 --- /dev/null +++ b/ui/base1/ace/mode-space.js @@ -0,0 +1,151 @@ +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/space_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SpaceHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "empty_line", + regex: / */, + next: "key" + }, + { + token: "empty_line", + regex: /$/, + next: "key" + } + ], + "key": [ + { + token: "variable", + regex: /\S+/ + }, + { + token: "empty_line", + regex: /$/, + next: "start" + }, { + token: "keyword.operator", + regex: / /, + next: "value" + } + ], + "value": [ + { + token: "keyword.operator", + regex: /$/, + next: "start" + }, + { + token: "string", + regex: /[^$]/ + } + ] + }; +}; +oop.inherits(SpaceHighlightRules, TextHighlightRules); +exports.SpaceHighlightRules = SpaceHighlightRules; + +}); + +define("ace/mode/space",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/coffee","ace/mode/space_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var FoldMode = require("./folding/coffee").FoldMode; +var SpaceHighlightRules = require("./space_highlight_rules").SpaceHighlightRules; +var Mode = function () { + this.HighlightRules = SpaceHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/space"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/space"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sparql.js b/ui/base1/ace/mode-sparql.js new file mode 100644 index 0000000..ffce6ee --- /dev/null +++ b/ui/base1/ace/mode-sparql.js @@ -0,0 +1,288 @@ +define("ace/mode/sparql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from sparql.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SPARQLHighlightRules = function () { + this.$rules = { + start: [{ + include: "#comments" + }, { + include: "#strings" + }, { + include: "#string-language-suffixes" + }, { + include: "#string-datatype-suffixes" + }, { + include: "#logic-operators" + }, { + include: "#relative-urls" + }, { + include: "#xml-schema-types" + }, { + include: "#rdf-schema-types" + }, { + include: "#owl-types" + }, { + include: "#qnames" + }, { + include: "#keywords" + }, { + include: "#built-in-functions" + }, { + include: "#variables" + }, { + include: "#boolean-literal" + }, { + include: "#punctuation-operators" + }], + "#boolean-literal": [{ + token: "constant.language.boolean.sparql", + regex: /true|false/ + }], + "#built-in-functions": [{ + token: "support.function.sparql", + regex: /[Aa][Bb][Ss]|[Aa][Vv][Gg]|[Bb][Nn][Oo][Dd][Ee]|[Bb][Oo][Uu][Nn][Dd]|[Cc][Ee][Ii][Ll]|[Cc][Oo][Aa][Ll][Ee][Ss][Cc][Ee]|[Cc][Oo][Nn][Cc][Aa][Tt]|[Cc][Oo][Nn][Tt][Aa][Ii][Nn][Ss]|[Cc][Oo][Uu][Nn][Tt]|[Dd][Aa][Tt][Aa][Tt][Yy][Pp][Ee]|[Dd][Aa][Yy]|[Ee][Nn][Cc][Oo][Dd][Ee]_[Ff][Oo][Rr]_[Uu][Rr][Ii]|[Ee][Xx][Ii][Ss][Tt][Ss]|[Ff][Ll][Oo][Oo][Rr]|[Gg][Rr][Oo][Uu][Pp]_[Cc][Oo][Nn][Cc][Aa][Tt]|[Hh][Oo][Uu][Rr][Ss]|[Ii][Ff]|[Ii][Rr][Ii]|[Ii][Ss][Bb][Ll][Aa][Nn][Kk]|[Ii][Ss][Ii][Rr][Ii]|[Ii][Ss][Ll][Ii][Tt][Ee][Rr][Aa][Ll]|[Ii][Ss][Nn][Uu][Mm][Ee][Rr][Ii][Cc]|[Ii][Ss][Uu][Rr][Ii]|[Ll][Aa][Nn][Gg]|[Ll][Aa][Nn][Gg][Mm][Aa][Tt][Cc][Hh][Ee][Ss]|[Ll][Cc][Aa][Ss][Ee]|[Mm][Aa][Xx]|[Mm][Dd]5|[Mm][Ii][Nn]|[Mm][Ii][Nn][Uu][Tt][Ee][Ss]|[Mm][Oo][Nn][Tt][Hh]|[Nn][Oo][Ww]|[Rr][Aa][Nn][Dd]|[Rr][Ee][Gg][Ee][Xx]|[Rr][Ee][Pp][Ll][Aa][Cc][Ee]|[Rr][Oo][Uu][Nn][Dd]|[Ss][Aa][Mm][Ee][Tt][Ee][Rr][Mm]|[Ss][Aa][Mm][Pp][Ll][Ee]|[Ss][Ee][Cc][Oo][Nn][Dd][Ss]|[Ss][Ee][Pp][Aa][Rr][Aa][Tt][Oo][Rr]|[Ss][Hh][Aa](?:1|256|384|512)|[Ss][Tt][Rr]|[Ss][Tt][Rr][Aa][Ff][Tt][Ee][Rr]|[Ss][Tt][Rr][Bb][Ee][Ff][Oo][Rr][Ee]|[Ss][Tt][Rr][Dd][Tt]|[Ss][Tt][Rr][Ee][Nn][Dd][Ss]|[Ss][Tt][Rr][Ll][Aa][Nn][Gg]|[Ss][Tt][Rr][Ll][Ee][Nn]|[Ss][Tt][Rr][Ss][Tt][Aa][Rr][Tt][Ss]|[Ss][Tt][Rr][Uu][Uu][Ii][Dd]|[Ss][Uu][Bb][Ss][Tt][Rr]|[Ss][Uu][Mm]|[Tt][Ii][Mm][Ee][Zz][Oo][Nn][Ee]|[Tt][Zz]|[Uu][Cc][Aa][Ss][Ee]|[Uu][Rr][Ii]|[Uu][Uu][Ii][Dd]|[Yy][Ee][Aa][Rr]/ + }], + "#comments": [{ + token: [ + "punctuation.definition.comment.sparql", + "comment.line.hash.sparql" + ], + regex: /(#)(.*$)/ + }], + "#keywords": [{ + token: "keyword.other.sparql", + regex: /[Aa][Dd][Dd]|[Aa][Ll][Ll]|[Aa][Ss]|[As][Ss][Cc]|[Aa][Ss][Kk]|[Bb][Aa][Ss][Ee]|[Bb][Ii][Nn][Dd]|[Bb][Yy]|[Cc][Ll][Ee][Aa][Rr]|[Cc][Oo][Nn][Ss][Tt][Rr][Uu][Cc][Tt]|[Cc][Oo][Pp][Yy]|[Cc][Rr][Ee][Aa][Tt][Ee]|[Dd][Aa][Tt][Aa]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt]|[Dd][Ee][Ll][Ee][Tt][Ee]|[Dd][Ee][Sc][Cc]|[Dd][Ee][Ss][Cc][Rr][Ii][Bb][Ee]|[Dd][Ii][Ss][Tt][Ii][Nn][Cc][Tt]|[Dd][Rr][Oo][Pp]|[Ff][Ii][Ll][Tt][Ee][Rr]|[Ff][Rr][Oo][Mm]|[Gg][Rr][Aa][Pp][Hh]|[Gg][Rr][Oo][Uu][Pp]|[Hh][Aa][Vv][Ii][Nn][Gg]|[Ii][Nn][Ss][Ee][Rr][Tt]|[Ll][Ii][Mm][Ii][Tt]|[Ll][Oo][Aa][Dd]|[Mm][Ii][Nn][Uu][Ss]|[Mm][Oo][Vv][Ee]|[Nn][Aa][Mm][Ee][Dd]|[Oo][Ff][Ff][Ss][Ee][Tt]|[Oo][Pp][Tt][Ii][Oo][Nn][Aa][Ll]|[Oo][Rr][Dd][Ee][Rr]|[Pp][Rr][Ee][Ff][Ii][Xx]|[Rr][Ee][Dd][Uu][Cc][Ee][Dd]|[Ss][Ee][Ll][Ee][Cc][Tt]|[Ss][Ee][Pp][Aa][Rr][Aa][Tt][Oo][Rr]|[Ss][Ee][Rr][Vv][Ii][Cc][Ee]|[Ss][Ii][Ll][Ee][Nn][Tt]|[Tt][Oo]|[Uu][Nn][Dd][Ee][Ff]|[Uu][Nn][Ii][Oo][Nn]|[Uu][Ss][Ii][Nn][Gg]|[Vv][Aa][Ll][Uu][Ee][Ss]|[Ww][He][Ee][Rr][Ee]|[Ww][Ii][Tt][Hh]/ + }], + "#logic-operators": [{ + token: "keyword.operator.logical.sparql", + regex: /\|\||&&|=|!=|<|>|<=|>=|(?:^|!?\s)IN(?:!?\s|$)|(?:^|!?\s)NOT(?:!?\s|$)|-|\+|\*|\/|\!/ + }], + "#owl-types": [{ + token: "support.type.datatype.owl.sparql", + regex: /owl:[a-zA-Z]+/ + }], + "#punctuation-operators": [{ + token: "keyword.operator.punctuation.sparql", + regex: /;|,|\.|\(|\)|\{|\}|\|/ + }], + "#qnames": [{ + token: "entity.name.other.qname.sparql", + regex: /(?:[a-zA-Z][-_a-zA-Z0-9]*)?:(?:[_a-zA-Z][-_a-zA-Z0-9]*)?/ + }], + "#rdf-schema-types": [{ + token: "support.type.datatype.rdf.schema.sparql", + regex: /rdfs?:[a-zA-Z]+|(?:^|\s)a(?:\s|$)/ + }], + "#relative-urls": [{ + token: "string.quoted.other.relative.url.sparql", + regex: //, + next: "pop" + }, { + defaultToken: "string.quoted.other.relative.url.sparql" + }] + }], + "#string-datatype-suffixes": [{ + token: "keyword.operator.datatype.suffix.sparql", + regex: /\^\^/ + }], + "#string-language-suffixes": [{ + token: [ + "keyword.operator.language.suffix.sparql", + "constant.language.suffix.sparql" + ], + regex: /(?!")(@)([a-z]+(?:\-[a-z0-9]+)*)/ + }], + "#strings": [{ + token: "string.quoted.triple.sparql", + regex: /"""/, + push: [{ + token: "string.quoted.triple.sparql", + regex: /"""/, + next: "pop" + }, { + defaultToken: "string.quoted.triple.sparql" + }] + }, { + token: "string.quoted.double.sparql", + regex: /"/, + push: [{ + token: "string.quoted.double.sparql", + regex: /"/, + next: "pop" + }, { + token: "invalid.string.newline", + regex: /$/ + }, { + token: "constant.character.escape.sparql", + regex: /\\./ + }, { + defaultToken: "string.quoted.double.sparql" + }] + }], + "#variables": [{ + token: "variable.other.sparql", + regex: /(?:\?|\$)[-_a-zA-Z0-9]+/ + }], + "#xml-schema-types": [{ + token: "support.type.datatype.schema.sparql", + regex: /xsd?:[a-z][a-zA-Z]+/ + }] + }; + this.normalizeRules(); +}; +SPARQLHighlightRules.metaData = { + fileTypes: ["rq", "sparql"], + name: "SPARQL", + scopeName: "source.sparql" +}; +oop.inherits(SPARQLHighlightRules, TextHighlightRules); +exports.SPARQLHighlightRules = SPARQLHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sparql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sparql_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SPARQLHighlightRules = require("./sparql_highlight_rules").SPARQLHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = SPARQLHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/sparql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sparql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sql.js b/ui/base1/ace/mode-sql.js new file mode 100644 index 0000000..66572d8 --- /dev/null +++ b/ui/base1/ace/mode-sql.js @@ -0,0 +1,221 @@ +define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SqlHighlightRules = function () { + var keywords = ("select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" + + "when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|" + + "foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct|is|in|" + + "all|alter|any|array|at|authorization|between|both|cast|check|collate|column|commit|constraint|" + + "cube|current|current_date|current_time|current_timestamp|current_user|describe|escape|except|" + + "exists|external|extract|fetch|filter|for|full|function|global|grouping|intersect|interval|" + + "into|leading|like|local|no|of|only|out|overlaps|partition|position|range|revoke|rollback|rollup|" + + "row|rows|session_user|set|some|start|tablesample|time|to|trailing|truncate|unique|unknown|" + + "user|using|values|window|with"); + var builtinConstants = ("true|false"); + var builtinFunctions = ("avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|" + + "coalesce|ifnull|isnull|nvl"); + var dataTypes = ("int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|" + + "money|real|number|integer|string"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants, + "storage.type": dataTypes + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "--.*$" + }, { + token: "comment", + start: "/\\*", + end: "\\*/" + }, { + token: "string", // " string + regex: '".*?"' + }, { + token: "string", // ' string + regex: "'.*?'" + }, { + token: "string", // ` string (apache drill) + regex: "`.*?`" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(SqlHighlightRules, TextHighlightRules); +exports.SqlHighlightRules = SqlHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules; +var SqlFoldMode = require("./folding/sql").FoldMode; +var Mode = function () { + this.HighlightRules = SqlHighlightRules; + this.foldingRules = new SqlFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/sql"; + this.snippetFileId = "ace/snippets/sql"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-sqlserver.js b/ui/base1/ace/mode-sqlserver.js new file mode 100644 index 0000000..3e0a155 --- /dev/null +++ b/ui/base1/ace/mode-sqlserver.js @@ -0,0 +1,391 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/sqlserver_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SqlServerHighlightRules = function () { + var logicalOperators = "ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME"; + logicalOperators += "|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS"; //SSMS colors these gray too + var builtinFunctions = ( + "OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|" + + "AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|" + + "DENSE_RANK|NTILE|RANK|ROW_NUMBER" + + "@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|" + + "CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE" + + "@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|" + + "@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|DATETRUNC|" + + "CHOOSE|IIF|" + + "ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|" + + "@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|" + + "CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|" + + "ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|" + + "$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|ERROR_PROCEDURE|ERROR_SEVERITY|ERROR_STATE|FORMATMESSAGE|GETANSINULL|GET_FILESTREAM_TRANSACTION_CONTEXT|HOST_ID|HOST_NAME|ISNULL|ISNUMERIC|MIN_ACTIVE_ROWVERSION|NEWID|NEWSEQUENTIALID|ROWCOUNT_BIG|XACT_STATE|" + + "@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|" + + "PATINDEX|TEXTPTR|TEXTVALID|" + + "GREATEST|LEAST|" + + "GENERATE_SERIES|DATE_BUCKET|" + + "JSON_ARRAY|JSON_OBJECT|JSON_PATH_EXISTS|ISJSON|" + + "FIRST_VALUE|LAST_VALUE|" + + "COALESCE|NULLIF"); + var dataTypes = ("BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML"); + var builtInStoredProcedures = "sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool"; + var keywords = "ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|STRING_SPLIT|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE"; + keywords += "|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT"; + keywords += "|LOOP|HASH|MERGE|REMOTE"; + keywords += "|TRY|CATCH|THROW"; + keywords += "|TYPE"; + keywords = keywords.split('|'); + keywords = keywords.filter(function (value, index, self) { + return logicalOperators.split('|').indexOf(value) === -1 && builtinFunctions.split('|').indexOf(value) === -1 && dataTypes.split('|').indexOf(value) === -1; + }); + keywords = keywords.sort().join('|'); + var keywordMapper = this.createKeywordMapper({ + "constant.language": logicalOperators, + "storage.type": dataTypes, + "support.function": builtinFunctions, + "support.storedprocedure": builtInStoredProcedures, + "keyword": keywords + }, "identifier", true); + var setStatements = "SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split('|'); + var isolationLevels = "READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split('|'); + for (var i = 0; i < isolationLevels.length; i++) { + setStatements.push('SET TRANSACTION ISOLATION LEVEL ' + isolationLevels[i]); + } + this.$rules = { + start: [{ + token: "string.start", + regex: "'", + next: [{ + token: "constant.language.escape", + regex: /''/ + }, { + token: "string.end", + next: "start", + regex: "'" + }, { + defaultToken: "string" + }] + }, + DocCommentHighlightRules.getStartRule("doc-start"), { + token: "comment", + regex: "--.*$" + }, { + token: "comment", + start: "/\\*", + end: "\\*/" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "@{0,2}[a-zA-Z_$][a-zA-Z0-9_$]*\\b(?!])" //up to 2 @symbols for some built in functions + }, { + token: "constant.class", + regex: "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "punctuation", + regex: ",|;" + }, { + token: "text", + regex: "\\s+" + }], + comment: [ + DocCommentHighlightRules.getTagRule(), { + token: "comment", + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment", + caseInsensitive: true + } + ] + }; + for (var i = 0; i < setStatements.length; i++) { + this.$rules.start.unshift({ + token: "set.statement", + regex: setStatements[i] + }); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); + var completions = []; + var addCompletions = function (arr, meta) { + arr.forEach(function (v) { + completions.push({ + name: v, + value: v, + score: 0, + meta: meta + }); + }); + }; + addCompletions(builtInStoredProcedures.split('|'), 'procedure'); + addCompletions(logicalOperators.split('|'), 'operator'); + addCompletions(builtinFunctions.split('|'), 'function'); + addCompletions(dataTypes.split('|'), 'type'); + addCompletions(setStatements, 'statement'); + addCompletions(keywords.split('|'), 'keyword'); + this.completions = completions; +}; +oop.inherits(SqlServerHighlightRules, TextHighlightRules); +exports.SqlHighlightRules = SqlServerHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/sqlserver",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i; + this.startRegionRe = /^\s*(\/\*|--)#?region\b/; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.getBeginEndBlock(session, row, i, match[1]); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + return; + }; + this.getBeginEndBlock = function (session, row, column, matchSequence) { + var start = { + row: row, + column: column + matchSequence.length + }; + var maxRow = session.getLength(); + var line; + var depth = 1; + var re = /(\bCASE\b|\bBEGIN\b)|(\bEND\b)/i; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth++; + else + depth--; + if (!depth) + break; + } + var endRow = row; + if (endRow > start.row) { + return new Range(start.row, start.column, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sqlserver",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sqlserver_highlight_rules","ace/mode/folding/sqlserver"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SqlServerHighlightRules = require("./sqlserver_highlight_rules").SqlHighlightRules; +var SqlServerFoldMode = require("./folding/sqlserver").FoldMode; +var Mode = function () { + this.HighlightRules = SqlServerHighlightRules; + this.foldingRules = new SqlServerFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.blockComment = { start: "/*", end: "*/" }; + this.getCompletions = function (state, session, pos, prefix) { + return session.$mode.$highlightRules.completions; + }; + this.$id = "ace/mode/sqlserver"; + this.snippetFileId = "ace/snippets/sqlserver"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sqlserver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-stylus.js b/ui/base1/ace/mode-stylus.js new file mode 100644 index 0000000..2fd12b1 --- /dev/null +++ b/ui/base1/ace/mode-stylus.js @@ -0,0 +1,443 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY Stylus.tmlanguage (UUID: 60519324-6A3A-4382-9E0B-546993A3869A) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var StylusHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.type": CssHighlightRules.supportType, + "support.function": CssHighlightRules.supportFunction, + "support.constant": CssHighlightRules.supportConstant, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "text", true); + this.$rules = { + start: [ + { + token: "comment", + regex: /\/\/.*$/ + }, + { + token: "comment", // multi line comment + regex: /\/\*/, + next: "comment" + }, + { + token: ["entity.name.function.stylus", "text"], + regex: "^([-a-zA-Z_][-\\w]*)?(\\()" + }, + { + token: ["entity.other.attribute-name.class.stylus"], + regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*" + }, + { + token: ["entity.language.stylus"], + regex: "^ *&" + }, + { + token: ["variable.language.stylus"], + regex: "(arguments)" + }, + { + token: ["keyword.stylus"], + regex: "@[-\\w]+" + }, + { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: CssHighlightRules.pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: CssHighlightRules.pseudoClasses + }, + { + token: ["entity.name.tag.stylus"], + regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)" + }, + { + token: "constant.numeric", // hex6 color + regex: "#[a-fA-F0-9]{6}" + }, + { + token: "constant.numeric", // hex3 color + regex: "#[a-fA-F0-9]{3}" + }, + { + token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"], + regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)" + }, + { + token: "meta.vendor-prefix.stylus", + regex: "-webkit-|-moz\\-|-ms-|-o-" + }, + { + token: "keyword.control.stylus", + regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b" + }, + { + token: "keyword.operator.stylus", + regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=" + }, + { + token: "keyword.operator.stylus", + regex: "(?:in|is(?:nt)?|not)\\b" + }, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: "constant.numeric", + regex: CssHighlightRules.numRe + }, + { + token: "keyword", + regex: "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b" + }, + { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '[^"\\\\]+' + }, + { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, + { + token: "string", + regex: '"|$', + next: "start" + } + ], + "qstring": [ + { + token: "string", + regex: "[^'\\\\]+" + }, + { + token: "string", + regex: "\\\\$", + next: "qstring" + }, + { + token: "string", + regex: "'|$", + next: "start" + } + ] + }; +}; +oop.inherits(StylusHighlightRules, TextHighlightRules); +exports.StylusHighlightRules = StylusHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/stylus",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/stylus_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; +var Mode = function () { + this.HighlightRules = StylusHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/stylus"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/stylus"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-svg.js b/ui/base1/ace/mode-svg.js new file mode 100644 index 0000000..772b3b9 --- /dev/null +++ b/ui/base1/ace/mode-svg.js @@ -0,0 +1,1487 @@ +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === " -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = require("./folding/xml").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.voidElements = lang.arrayToMap([]); + this.blockComment = { start: "" }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/xml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var TokenIterator = require("../../token_iterator").TokenIterator; +var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour; +var XmlBehaviour = require("../behaviour/xml").XmlBehaviour; +var JavaScriptBehaviour = function () { + var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours(); + this.addBehaviours(xmlBehaviours); + this.inherit(CstyleBehaviour); + this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var SvgHighlightRules = function () { + XmlHighlightRules.call(this); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + this.normalizeRules(); +}; +oop.inherits(SvgHighlightRules, XmlHighlightRules); +exports.SvgHighlightRules = SvgHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var XmlMode = require("./xml").Mode; +var JavaScriptMode = require("./javascript").Mode; +var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules; +var MixedFoldMode = require("./folding/mixed").FoldMode; +var XmlFoldMode = require("./folding/xml").FoldMode; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + XmlMode.call(this); + this.HighlightRules = SvgHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode + }); + this.foldingRules = new MixedFoldMode(new XmlFoldMode(), { + "js-": new CStyleFoldMode() + }); +}; +oop.inherits(Mode, XmlMode); +(function () { + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.$id = "ace/mode/svg"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/svg"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-swift.js b/ui/base1/ace/mode-swift.js new file mode 100644 index 0000000..169cb9d --- /dev/null +++ b/ui/base1/ace/mode-swift.js @@ -0,0 +1,342 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/swift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SwiftHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "", + "keyword": "__COLUMN__|__FILE__|__FUNCTION__|__LINE__" + + "|as|associativity|break|case|class|continue|default|deinit|didSet" + + "|do|dynamicType|else|enum|extension|fallthrough|for|func|get|if|import" + + "|in|infix|init|inout|is|left|let|let|mutating|new|none|nonmutating" + + "|operator|override|postfix|precedence|prefix|protocol|return|right" + + "|safe|Self|self|set|struct|subscript|switch|Type|typealias" + + "|unowned|unsafe|var|weak|where|while|willSet" + + "|convenience|dynamic|final|infix|lazy|mutating|nonmutating|optional|override|postfix" + + "|prefix|required|static|guard|defer", + "storage.type": "bool|double|Double" + + "|extension|float|Float|int|Int|open|internal|fileprivate|private|public|string|String", + "constant.language": "false|Infinity|NaN|nil|no|null|null|off|on|super|this|true|undefined|yes", + "support.function": "" + }, "identifier"); + function string(start, options) { + var nestable = options.nestable || options.interpolation; + var interpStart = options.interpolation && options.interpolation.nextState || "start"; + var mainRule = { + regex: start + (options.multiline ? "" : "(?=.)"), + token: "string.start" + }; + var nextState = [ + options.escape && { + regex: options.escape, + token: "character.escape" + }, + options.interpolation && { + token: "paren.quasi.start", + regex: lang.escapeRegExp(options.interpolation.lead + options.interpolation.open), + push: interpStart + }, + options.error && { + regex: options.error, + token: "error.invalid" + }, + { + regex: start + (options.multiline ? "" : "|$"), + token: "string.end", + next: nestable ? "pop" : "start" + }, { + defaultToken: "string" + } + ].filter(Boolean); + if (nestable) + mainRule.push = nextState; + else + mainRule.next = nextState; + if (!options.interpolation) + return mainRule; + var open = options.interpolation.open; + var close = options.interpolation.close; + var counter = { + regex: "[" + lang.escapeRegExp(open + close) + "]", + onMatch: function (val, state, stack) { + this.next = val == open ? this.nextState : ""; + if (val == open && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == close && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1) + return "paren.quasi.end"; + } + return val == open ? "paren.lparen" : "paren.rparen"; + }, + nextState: interpStart + }; + return [counter, mainRule]; + } + function comments() { + return [{ + token: "comment", + regex: /\/\//, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: "start" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment.start", + regex: /\/\*/, + stateName: "nested_comment", + push: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment.start", regex: /\/\*/, push: "nested_comment" }, + { token: "comment.end", regex: "\\*\\/", next: "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; + } + this.$rules = { + start: [ + string('"""', { + escape: /\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/, + interpolation: { lead: "\\", open: "(", close: ")" }, + error: /\\./, + multiline: true + }), + string('"', { + escape: /\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/, + interpolation: { lead: "\\", open: "(", close: ")" }, + error: /\\./, + multiline: false + }), + comments(), + { + regex: /@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, + token: "variable.parameter" + }, + { + regex: /[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, + token: keywordMapper + }, + { + token: "constant.numeric", + regex: /[+-]?(?:0(?:b[01]+|o[0-7]+|x[\da-fA-F])|\d+(?:(?:\.\d*)?(?:[PpEe][+-]?\d+)?)\b)/ + }, { + token: "keyword.operator", + regex: /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); + this.normalizeRules(); +}; +oop.inherits(SwiftHighlightRules, TextHighlightRules); +exports.HighlightRules = SwiftHighlightRules; +exports.SwiftHighlightRules = SwiftHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HighlightRules = require("./swift_highlight_rules").HighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = HighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/", nestable: true }; + this.$id = "ace/mode/swift"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/swift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-tcl.js b/ui/base1/ace/mode-tcl.js new file mode 100644 index 0000000..8dab707 --- /dev/null +++ b/ui/base1/ace/mode-tcl.js @@ -0,0 +1,338 @@ +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TclHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*\\\\$", + next: "commentfollow" + }, { + token: "comment", + regex: "#.*$" + }, { + token: "support.function", + regex: '[\\\\]$', + next: "splitlineStart" + }, { + token: "text", + regex: /\\(?:["{}\[\]$\\])/ + }, { + token: "text", // last value before command + regex: '^|[^{][;][^}]|[/\r/]', + next: "commandItem" + }, { + token: "string", // single line + regex: '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line """ string start + regex: '[ ]*["]', + next: "qqstring" + }, { + token: "variable.instance", + regex: "[$]", + next: "variable" + }, { + token: "support.function", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" + }, { + token: "identifier", + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "paren.lparen", + regex: "[[{]", + next: "commandItem" + }, { + token: "paren.lparen", + regex: "[(]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "commandItem": [ + { + token: "comment", + regex: "#.*\\\\$", + next: "commentfollow" + }, { + token: "comment", + regex: "#.*$", + next: "start" + }, { + token: "string", // single line + regex: '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "variable.instance", + regex: "[$]", + next: "variable" + }, { + token: "support.function", + regex: "(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])", + next: "commandItem" + }, { + token: "support.function", + regex: "[a-zA-Z0-9_/]+(?:[:][:])", + next: "commandItem" + }, { + token: "support.function", + regex: "(?:[:][:])", + next: "commandItem" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "support.function", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" + }, { + token: "keyword", + regex: "[a-zA-Z0-9_/]+", + next: "start" + } + ], + "commentfollow": [ + { + token: "comment", + regex: ".*\\\\$", + next: "commentfollow" + }, { + token: "comment", + regex: '.+', + next: "start" + } + ], + "splitlineStart": [ + { + token: "text", + regex: "^.", + next: "start" + } + ], + "variable": [ + { + token: "variable.instance", // variable tcl + regex: "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?", + next: "start" + }, { + token: "variable.instance", // variable tcl with braces + regex: "{?[a-zA-Z_\\d]+}?", + next: "start" + } + ], + "qqstring": [{ + token: "string", // multi line """ string end + regex: '(?:[^\\\\]|\\\\.)*?["]', + next: "start" + }, { + token: "string", + regex: '.+' + }] + }; +}; +oop.inherits(TclHighlightRules, TextHighlightRules); +exports.TclHighlightRules = TclHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = TclHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/tcl"; + this.snippetFileId = "ace/snippets/tcl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/tcl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-terraform.js b/ui/base1/ace/mode-terraform.js new file mode 100644 index 0000000..489770d --- /dev/null +++ b/ui/base1/ace/mode-terraform.js @@ -0,0 +1,346 @@ +define("ace/mode/terraform_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TerraformHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ['storage.function.terraform'], + regex: '\\b(output|resource|data|variable|module|export)\\b' + }, + { + token: "variable.terraform", + regex: "\\$\\s", + push: [ + { + token: "keyword.terraform", + regex: "(-var-file|-var)" + }, + { + token: "variable.terraform", + regex: "\\n|$", + next: "pop" + }, + { include: "strings" }, + { include: "variables" }, + { include: "operators" }, + { defaultToken: "text" } + ] + }, + { + token: "language.support.class", + regex: "\\b(timeouts|provider|connection|provisioner|lifecycleprovider|atlas)\\b" + }, + { + token: "singleline.comment.terraform", + regex: '#.*$' + }, + { + token: "singleline.comment.terraform", + regex: '//.*$' + }, + { + token: "multiline.comment.begin.terraform", + regex: /\/\*/, + push: "blockComment" + }, + { + token: "storage.function.terraform", + regex: "^\\s*(locals|terraform)\\s*{" + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + }, + { include: "constants" }, + { include: "strings" }, + { include: "operators" }, + { include: "variables" } + ], + blockComment: [{ + regex: /\*\//, + token: "multiline.comment.end.terraform", + next: "pop" + }, { + defaultToken: "comment" + }], + "constants": [ + { + token: "constant.language.terraform", + regex: "\\b(true|false|yes|no|on|off|EOF)\\b" + }, + { + token: "constant.numeric.terraform", + regex: "(\\b([0-9]+)([kKmMgG]b?)?\\b)|(\\b(0x[0-9A-Fa-f]+)([kKmMgG]b?)?\\b)" + } + ], + "variables": [ + { + token: ["variable.assignment.terraform", "keyword.operator"], + regex: "\\b([a-zA-Z_]+)(\\s*=)" + } + ], + "interpolated_variables": [ + { + token: "variable.terraform", + regex: "\\b(var|self|count|path|local)\\b(?:\\.*[a-zA-Z_-]*)?" + } + ], + "strings": [ + { + token: "punctuation.quote.terraform", + regex: "'", + push: [{ + token: 'punctuation.quote.terraform', + regex: "'", + next: 'pop' + }, + { include: "escaped_chars" }, + { defaultToken: 'string' }] + }, + { + token: "punctuation.quote.terraform", + regex: '"', + push: [{ + token: 'punctuation.quote.terraform', + regex: '"', + next: 'pop' + }, + { include: "interpolation" }, + { include: "escaped_chars" }, + { defaultToken: 'string' }] + } + ], + "escaped_chars": [ + { + token: "constant.escaped_char.terraform", + regex: "\\\\." + } + ], + "operators": [ + { + token: "keyword.operator", + regex: "\\?|:|==|!=|>|<|>=|<=|&&|\\|\\\||!|%|&|\\*|\\+|\\-|/|=" + } + ], + "interpolation": [ + { + token: "punctuation.interpolated.begin.terraform", + regex: "\\$?\\$\\{", + push: [{ + token: "punctuation.interpolated.end.terraform", + regex: "\\}", + next: "pop" + }, + { include: "interpolated_variables" }, + { include: "operators" }, + { include: "constants" }, + { include: "strings" }, + { include: "functions" }, + { include: "parenthesis" }, + { defaultToken: "punctuation" } + ] + } + ], + "functions": [ + { + token: "keyword.function.terraform", + regex: "\\b(abs|basename|base64decode|base64encode|base64gzip|base64sha256|base64sha512|bcrypt|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|coalesce|coalescelist|compact|concat|contains|dirname|distinct|element|file|floor|flatten|format|formatlist|indent|index|join|jsonencode|keys|length|list|log|lookup|lower|map|matchkeys|max|merge|min|md5|pathexpand|pow|replace|rsadecrypt|sha1|sha256|sha512|signum|slice|sort|split|substr|timestamp|timeadd|title|transpose|trimspace|upper|urlencode|uuid|values|zipmap)\\b" + } + ], + "parenthesis": [ + { + token: "paren.lparen", + regex: "\\[" + }, + { + token: "paren.rparen", + regex: "\\]" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(TerraformHighlightRules, TextHighlightRules); +exports.TerraformHighlightRules = TerraformHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/terraform",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/terraform_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TerraformHighlightRules = require("./terraform_highlight_rules").TerraformHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + TextMode.call(this); + this.HighlightRules = TerraformHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["#", "//"]; + this.blockComment = { start: "/*", end: "*/" }; + this.$id = "ace/mode/terraform"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/terraform"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-tex.js b/ui/base1/ace/mode-tex.js new file mode 100644 index 0000000..3721dd5 --- /dev/null +++ b/ui/base1/ace/mode-tex.js @@ -0,0 +1,212 @@ +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){/* + * tex_highlight_rules.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = function (textClass) { + if (!textClass) + textClass = "text"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "%.*$" + }, { + token: textClass, // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", + next: "nospell" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])}]" + }, { + token: textClass, + regex: "\\s+" + } + ], + "nospell": [ + { + token: "comment", + regex: "%.*$", + next: "start" + }, { + token: "nospell." + textClass, // non-command + regex: "\\\\[$&%#\\{\\}]" + }, { + token: "keyword", // command + regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" + }, { + token: "keyword", // command + regex: "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])", + next: "start" + }, { + token: "paren.keyword.operator", + regex: "[[({]" + }, { + token: "paren.keyword.operator", + regex: "[\\])]" + }, { + token: "paren.keyword.operator", + regex: "}", + next: "start" + }, { + token: "nospell." + textClass, + regex: "\\s+" + }, { + token: "nospell." + textClass, + regex: "\\w+" + } + ] + }; +}; +oop.inherits(TexHighlightRules, TextHighlightRules); +exports.TexHighlightRules = TexHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module){/* + * tex.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function (suppressHighlighting) { + if (suppressHighlighting) + this.HighlightRules = TextHighlightRules; + else + this.HighlightRules = TexHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "%"; + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.allowAutoInsert = function () { + return false; + }; + this.$id = "ace/mode/tex"; + this.snippetFileId = "ace/snippets/tex"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/tex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-text.js b/ui/base1/ace/mode-text.js new file mode 100644 index 0000000..13aa31f --- /dev/null +++ b/ui/base1/ace/mode-text.js @@ -0,0 +1,9 @@ + +; (function() { + window.require(["ace/mode/text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-textile.js b/ui/base1/ace/mode-textile.js new file mode 100644 index 0000000..3cad20d --- /dev/null +++ b/ui/base1/ace/mode-textile.js @@ -0,0 +1,125 @@ +define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TextileHighlightRules = function () { + this.$rules = { + "start": [ + { + token: function (value) { + if (value.charAt(0) == "h") + return "markup.heading." + value.charAt(1); + else + return "markup.heading"; + }, + regex: "h1|h2|h3|h4|h5|h6|bq|p|bc|pre", + next: "blocktag" + }, + { + token: "keyword", + regex: "[\\*]+|[#]+" + }, + { + token: "text", + regex: ".+" + } + ], + "blocktag": [ + { + token: "keyword", + regex: "\\. ", + next: "start" + }, + { + token: "keyword", + regex: "\\(", + next: "blocktagproperties" + } + ], + "blocktagproperties": [ + { + token: "keyword", + regex: "\\)", + next: "blocktag" + }, + { + token: "string", + regex: "[a-zA-Z0-9\\-_]+" + }, + { + token: "keyword", + regex: "#" + } + ] + }; +}; +oop.inherits(TextileHighlightRules, TextHighlightRules); +exports.TextileHighlightRules = TextileHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + this.HighlightRules = TextileHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.type = "text"; + this.getNextLineIndent = function (state, line, tab) { + if (state == "intag") + return tab; + return ""; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/textile"; + this.snippetFileId = "ace/snippets/textile"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/textile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-toml.js b/ui/base1/ace/mode-toml.js new file mode 100644 index 0000000..bc8c26a --- /dev/null +++ b/ui/base1/ace/mode-toml.js @@ -0,0 +1,129 @@ +define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TomlHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "constant.language.boolean": "true|false" + }, "identifier"); + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + this.$rules = { + "start": [ + { + token: "comment.toml", + regex: /#.*$/ + }, + { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: ["variable.keygroup.toml"], + regex: "(?:^\\s*)(\\[\\[([^\\]]+)\\]\\])" + }, + { + token: ["variable.keygroup.toml"], + regex: "(?:^\\s*)(\\[([^\\]]+)\\])" + }, + { + token: keywordMapper, + regex: identifierRe + }, + { + token: "support.date.toml", + regex: "\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)" + }, + { + token: "constant.numeric.toml", + regex: "-?\\d+(\\.?\\d+)?" + } + ], + "qqstring": [ + { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, + { + token: "constant.language.escape", + regex: '\\\\[0tnr"\\\\]' + }, + { + token: "string", + regex: '"|$', + next: "start" + }, + { + defaultToken: "string" + } + ] + }; +}; +oop.inherits(TomlHighlightRules, TextHighlightRules); +exports.TomlHighlightRules = TomlHighlightRules; + +}); + +define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function () { +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var re = this.foldingStartMarker; + var line = session.getLine(row); + var m = line.match(re); + if (!m) + return; + var startName = m[1] + "."; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + if (/^\s*$/.test(line)) + continue; + m = line.match(re); + if (m && m[1].lastIndexOf(startName, 0) !== 0) + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules; +var FoldMode = require("./folding/ini").FoldMode; +var Mode = function () { + this.HighlightRules = TomlHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/toml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/toml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-tsx.js b/ui/base1/ace/mode-tsx.js new file mode 100644 index 0000000..2ca2e1a --- /dev/null +++ b/ui/base1/ace/mode-tsx.js @@ -0,0 +1,1276 @@ +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 21e323af-f665-4161-96e7-5087d262557e) */ +"use strict"; +var oop = require("../lib/oop"); +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var TypeScriptHighlightRules = function (options) { + var tsRules = [ + { + token: ["storage.type", "text", "entity.name.function.ts"], + regex: "(function)(\\s+)([a-zA-Z0-9\$_\u00a1-\uffff][a-zA-Z0-9\d\$_\u00a1-\uffff]*)" + }, + { + token: "keyword", + regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)" + }, + { + token: ["keyword", "storage.type.variable.ts"], + regex: "(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)" + }, + { + token: "keyword", + regex: "\\b(?:super|export|import|keyof|infer)\\b" + }, + { + token: ["storage.type.variable.ts"], + regex: "(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))" + } + ]; + var JSRules = new JavaScriptHighlightRules({ jsx: (options && options.jsx) == true }).getRules(); + JSRules.no_regex = tsRules.concat(JSRules.no_regex); + this.$rules = JSRules; +}; +oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); +exports.TypeScriptHighlightRules = TypeScriptHighlightRules; + +}); + +define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var jsMode = require("./javascript").Mode; +var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + this.HighlightRules = TypeScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, jsMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/typescript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/tsx",["require","exports","module","ace/lib/oop","ace/mode/behaviour/javascript","ace/mode/folding/javascript","ace/mode/typescript"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var tsMode = require("./typescript").Mode; +var Mode = function () { + tsMode.call(this); + this.$highlightRuleConfig = { jsx: true }; + this.foldingRules = new JavaScriptFoldMode(); + this.$behaviour = new JavaScriptBehaviour(); +}; +oop.inherits(Mode, tsMode); +(function () { + this.$id = "ace/mode/tsx"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/tsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-turtle.js b/ui/base1/ace/mode-turtle.js new file mode 100644 index 0000000..92cc6ba --- /dev/null +++ b/ui/base1/ace/mode-turtle.js @@ -0,0 +1,264 @@ +define("ace/mode/turtle_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from turtle.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TurtleHighlightRules = function () { + this.$rules = { + start: [{ + include: "#comments" + }, { + include: "#strings" + }, { + include: "#base-prefix-declarations" + }, { + include: "#string-language-suffixes" + }, { + include: "#string-datatype-suffixes" + }, { + include: "#relative-urls" + }, { + include: "#xml-schema-types" + }, { + include: "#rdf-schema-types" + }, { + include: "#owl-types" + }, { + include: "#qnames" + }, { + include: "#punctuation-operators" + }], + "#base-prefix-declarations": [{ + token: "keyword.other.prefix.turtle", + regex: /@(?:base|prefix)/ + }], + "#comments": [{ + token: [ + "punctuation.definition.comment.turtle", + "comment.line.hash.turtle" + ], + regex: /(#)(.*$)/ + }], + "#owl-types": [{ + token: "support.type.datatype.owl.turtle", + regex: /owl:[a-zA-Z]+/ + }], + "#punctuation-operators": [{ + token: "keyword.operator.punctuation.turtle", + regex: /;|,|\.|\(|\)|\[|\]/ + }], + "#qnames": [{ + token: "entity.name.other.qname.turtle", + regex: /(?:[a-zA-Z][-_a-zA-Z0-9]*)?:(?:[_a-zA-Z][-_a-zA-Z0-9]*)?/ + }], + "#rdf-schema-types": [{ + token: "support.type.datatype.rdf.schema.turtle", + regex: /rdfs?:[a-zA-Z]+|(?:^|\s)a(?:\s|$)/ + }], + "#relative-urls": [{ + token: "string.quoted.other.relative.url.turtle", + regex: //, + next: "pop" + }, { + defaultToken: "string.quoted.other.relative.url.turtle" + }] + }], + "#string-datatype-suffixes": [{ + token: "keyword.operator.datatype.suffix.turtle", + regex: /\^\^/ + }], + "#string-language-suffixes": [{ + token: [ + "keyword.operator.language.suffix.turtle", + "constant.language.suffix.turtle" + ], + regex: /(?!")(@)([a-z]+(?:\-[a-z0-9]+)*)/ + }], + "#strings": [{ + token: "string.quoted.triple.turtle", + regex: /"""/, + push: [{ + token: "string.quoted.triple.turtle", + regex: /"""/, + next: "pop" + }, { + defaultToken: "string.quoted.triple.turtle" + }] + }, { + token: "string.quoted.double.turtle", + regex: /"/, + push: [{ + token: "string.quoted.double.turtle", + regex: /"/, + next: "pop" + }, { + token: "invalid.string.newline", + regex: /$/ + }, { + token: "constant.character.escape.turtle", + regex: /\\./ + }, { + defaultToken: "string.quoted.double.turtle" + }] + }], + "#xml-schema-types": [{ + token: "support.type.datatype.xml.schema.turtle", + regex: /xsd?:[a-z][a-zA-Z]+/ + }] + }; + this.normalizeRules(); +}; +TurtleHighlightRules.metaData = { + fileTypes: ["ttl", "nt"], + name: "Turtle", + scopeName: "source.turtle" +}; +oop.inherits(TurtleHighlightRules, TextHighlightRules); +exports.TurtleHighlightRules = TurtleHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/turtle",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/turtle_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TurtleHighlightRules = require("./turtle_highlight_rules").TurtleHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = TurtleHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.$id = "ace/mode/turtle"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/turtle"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-twig.js b/ui/base1/ace/mode-twig.js new file mode 100644 index 0000000..d7b98de --- /dev/null +++ b/ui/base1/ace/mode-twig.js @@ -0,0 +1,2502 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/twig_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TwigHighlightRules = function () { + HtmlHighlightRules.call(this); + var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim"; + tags = tags + "|end" + tags.replace(/\|/g, "|end"); + var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode"; + var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string"; + var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd"; + var constants = "null|none|true|false"; + var operators = "b-and|b-xor|b-or|in|is|and|or|not"; + var keywordMapper = this.createKeywordMapper({ + "keyword.control.twig": tags, + "support.function.twig": [filters, functions, tests].join("|"), + "keyword.operator.twig": operators, + "constant.language.twig": constants + }, "identifier"); + for (var rule in this.$rules) { + this.$rules[rule].unshift({ + token: "variable.other.readwrite.local.twig", + regex: "\\{\\{-?", + push: "twig-start" + }, { + token: "meta.tag.twig", + regex: "\\{%-?", + push: "twig-start" + }, { + token: "comment.block.twig", + regex: "\\{#-?", + push: "twig-comment" + }); + } + this.$rules["twig-comment"] = [{ + token: "comment.block.twig", + regex: ".*-?#\\}", + next: "pop" + }]; + this.$rules["twig-start"] = [{ + token: "variable.other.readwrite.local.twig", + regex: "-?\\}\\}", + next: "pop" + }, { + token: "meta.tag.twig", + regex: "-?%\\}", + next: "pop" + }, { + token: "string", + regex: "'", + next: "twig-qstring" + }, { + token: "string", + regex: '"', + next: "twig-qqstring" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator.assignment", + regex: "=|~" + }, { + token: "keyword.operator.comparison", + regex: "==|!=|<|>|>=|<=|===" + }, { + token: "keyword.operator.arithmetic", + regex: "\\+|-|/|%|//|\\*|\\*\\*" + }, { + token: "keyword.operator.other", + regex: "\\.\\.|\\|" + }, { + token: "punctuation.operator", + regex: /\?|:|,|;|\./ + }, { + token: "paren.lparen", + regex: /[\[\({]/ + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "text", + regex: "\\s+" + }]; + this.$rules["twig-qqstring"] = [{ + token: "constant.language.escape", + regex: /\\[\\"$#ntr]|#{[^"}]*}/ + }, { + token: "string", + regex: '"', + next: "twig-start" + }, { + defaultToken: "string" + } + ]; + this.$rules["twig-qstring"] = [{ + token: "constant.language.escape", + regex: /\\[\\'ntr]}/ + }, { + token: "string", + regex: "'", + next: "twig-start" + }, { + defaultToken: "string" + } + ]; + this.normalizeRules(); +}; +oop.inherits(TwigHighlightRules, TextHighlightRules); +exports.TwigHighlightRules = TwigHighlightRules; + +}); + +define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = TwigHighlightRules; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.blockComment = { start: "{#", end: "#}" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/twig"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/twig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-typescript.js b/ui/base1/ace/mode-typescript.js new file mode 100644 index 0000000..1b369da --- /dev/null +++ b/ui/base1/ace/mode-typescript.js @@ -0,0 +1,1254 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 21e323af-f665-4161-96e7-5087d262557e) */ +"use strict"; +var oop = require("../lib/oop"); +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var TypeScriptHighlightRules = function (options) { + var tsRules = [ + { + token: ["storage.type", "text", "entity.name.function.ts"], + regex: "(function)(\\s+)([a-zA-Z0-9\$_\u00a1-\uffff][a-zA-Z0-9\d\$_\u00a1-\uffff]*)" + }, + { + token: "keyword", + regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)" + }, + { + token: ["keyword", "storage.type.variable.ts"], + regex: "(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)" + }, + { + token: "keyword", + regex: "\\b(?:super|export|import|keyof|infer)\\b" + }, + { + token: ["storage.type.variable.ts"], + regex: "(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))" + } + ]; + var JSRules = new JavaScriptHighlightRules({ jsx: (options && options.jsx) == true }).getRules(); + JSRules.no_regex = tsRules.concat(JSRules.no_regex); + this.$rules = JSRules; +}; +oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); +exports.TypeScriptHighlightRules = TypeScriptHighlightRules; + +}); + +define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var jsMode = require("./javascript").Mode; +var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + this.HighlightRules = TypeScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, jsMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/typescript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/typescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-vala.js b/ui/base1/ace/mode-vala.js new file mode 100644 index 0000000..58d0fa9 --- /dev/null +++ b/ui/base1/ace/mode-vala.js @@ -0,0 +1,554 @@ +define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* This file was autogenerated from https://raw.githubusercontent.com/technosophos/Vala-TMBundle/master/Syntaxes/Vala.tmLanguage (uuid: ) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ValaHighlightRules = function () { + this.$rules = { start: [{ token: ['meta.using.vala', + 'keyword.other.using.vala', + 'meta.using.vala', + 'storage.modifier.using.vala', + 'meta.using.vala', + 'punctuation.terminator.vala'], + regex: '^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?' }, + { include: '#code' }], + '#all-types': [{ include: '#primitive-arrays' }, + { include: '#primitive-types' }, + { include: '#object-types' }], + '#annotations': [{ token: ['storage.type.annotation.vala', + 'punctuation.definition.annotation-arguments.begin.vala'], + regex: '(@[^ (]+)(\\()', + push: [{ token: 'punctuation.definition.annotation-arguments.end.vala', + regex: '\\)', + next: 'pop' }, + { token: ['constant.other.key.vala', + 'text', + 'keyword.operator.assignment.vala'], + regex: '(\\w*)(\\s*)(=)' }, + { include: '#code' }, + { token: 'punctuation.seperator.property.vala', regex: ',' }, + { defaultToken: 'meta.declaration.annotation.vala' }] }, + { token: 'storage.type.annotation.vala', regex: '@\\w*' }], + '#anonymous-classes-and-new': [{ token: 'keyword.control.new.vala', + regex: '\\bnew\\b', + push_disabled: [{ token: 'text', + regex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)', + next: 'pop' }, + { token: ['storage.type.vala', 'text'], + regex: '(\\w+)(\\s*)(?=\\[)', + push: [{ token: 'text', regex: '}|(?=;|\\))', next: 'pop' }, + { token: 'text', + regex: '\\[', + push: [{ token: 'text', regex: '\\]', next: 'pop' }, + { include: '#code' }] }, + { token: 'text', + regex: '{', + push: [{ token: 'text', regex: '(?=})', next: 'pop' }, + { include: '#code' }] }] }, + { token: 'text', + regex: '(?=\\w.*\\()', + push: [{ token: 'text', + regex: '(?<=\\))', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '(?<=\\))', + next: 'pop' }, + { include: '#object-types' }, + { token: 'text', + regex: '\\(', + push: [{ token: 'text', regex: '\\)', next: 'pop' }, + { include: '#code' }] }] }, + { token: 'meta.inner-class.vala', + regex: '{', + push: [{ token: 'meta.inner-class.vala', regex: '}', next: 'pop' }, + { include: '#class-body' }, + { defaultToken: 'meta.inner-class.vala' }] }] }], + '#assertions': [{ token: ['keyword.control.assert.vala', + 'meta.declaration.assertion.vala'], + regex: '\\b(assert|requires|ensures)(\\s)', + push: [{ token: 'meta.declaration.assertion.vala', + regex: '$', + next: 'pop' }, + { token: 'keyword.operator.assert.expression-seperator.vala', + regex: ':' }, + { include: '#code' }, + { defaultToken: 'meta.declaration.assertion.vala' }] }], + '#class': [{ token: 'meta.class.vala', + regex: '(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)', + push: [{ token: 'paren.vala', + regex: '}', + next: 'pop' }, + { include: '#storage-modifiers' }, + { include: '#comments' }, + { token: ['storage.modifier.vala', + 'meta.class.identifier.vala', + 'entity.name.type.class.vala'], + regex: '(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)' }, + { token: 'storage.modifier.extends.vala', + regex: ':', + push: [{ token: 'meta.definition.class.inherited.classes.vala', + regex: '(?={|,)', + next: 'pop' }, + { include: '#object-types-inherited' }, + { include: '#comments' }, + { defaultToken: 'meta.definition.class.inherited.classes.vala' }] }, + { token: ['storage.modifier.implements.vala', + 'meta.definition.class.implemented.interfaces.vala'], + regex: '(,)(\\s)', + push: [{ token: 'meta.definition.class.implemented.interfaces.vala', + regex: '(?=\\{)', + next: 'pop' }, + { include: '#object-types-inherited' }, + { include: '#comments' }, + { defaultToken: 'meta.definition.class.implemented.interfaces.vala' }] }, + { token: 'paren.vala', + regex: '{', + push: [{ token: 'paren.vala', regex: '(?=})', next: 'pop' }, + { include: '#class-body' }, + { defaultToken: 'meta.class.body.vala' }] }, + { defaultToken: 'meta.class.vala' }], + comment: 'attempting to put namespace in here.' }], + '#class-body': [{ include: '#comments' }, + { include: '#class' }, + { include: '#enums' }, + { include: '#methods' }, + { include: '#annotations' }, + { include: '#storage-modifiers' }, + { include: '#code' }], + '#code': [{ include: '#comments' }, + { include: '#class' }, + { token: 'text', + regex: '{', + push: [{ token: 'text', regex: '}', next: 'pop' }, + { include: '#code' }] }, + { include: '#assertions' }, + { include: '#parens' }, + { include: '#constants-and-special-vars' }, + { include: '#anonymous-classes-and-new' }, + { include: '#keywords' }, + { include: '#storage-modifiers' }, + { include: '#strings' }, + { include: '#all-types' }], + '#comments': [{ token: 'punctuation.definition.comment.vala', + regex: '/\\*\\*/' }, + { include: 'text.html.javadoc' }, + { include: '#comments-inline' }], + '#comments-inline': [{ token: 'punctuation.definition.comment.vala', + regex: '/\\*', + push: [{ token: 'punctuation.definition.comment.vala', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.vala' }] }, + { token: ['text', + 'punctuation.definition.comment.vala', + 'comment.line.double-slash.vala'], + regex: '(\\s*)(//)(.*$)' }], + '#constants-and-special-vars': [{ token: 'constant.language.vala', + regex: '\\b(?:true|false|null)\\b' }, + { token: 'variable.language.vala', + regex: '\\b(?:this|base)\\b' }, + { token: 'constant.numeric.vala', + regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' }, + { token: ['keyword.operator.dereference.vala', 'constant.other.vala'], + regex: '((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b' }], + '#enums': [{ token: 'text', + regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))', + push: [{ token: 'text', regex: '(?=;|})', next: 'pop' }, + { token: 'constant.other.enum.vala', + regex: '\\w+', + push: [{ token: 'meta.enum.vala', regex: '(?=,|;|})', next: 'pop' }, + { include: '#parens' }, + { token: 'text', + regex: '{', + push: [{ token: 'text', regex: '}', next: 'pop' }, + { include: '#class-body' }] }, + { defaultToken: 'meta.enum.vala' }] }] }], + '#keywords': [{ token: 'keyword.control.catch-exception.vala', + regex: '\\b(?:try|catch|finally|throw)\\b' }, + { token: 'keyword.control.vala', regex: '\\?|:|\\?\\?' }, + { token: 'keyword.control.vala', + regex: '\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b' }, + { token: 'keyword.operator.vala', + regex: '\\b(?:typeof|is|as)\\b' }, + { token: 'keyword.operator.comparison.vala', + regex: '==|!=|<=|>=|<>|<|>' }, + { token: 'keyword.operator.assignment.vala', regex: '=' }, + { token: 'keyword.operator.increment-decrement.vala', + regex: '\\-\\-|\\+\\+' }, + { token: 'keyword.operator.arithmetic.vala', + regex: '\\-|\\+|\\*|\\/|%' }, + { token: 'keyword.operator.logical.vala', regex: '!|&&|\\|\\|' }, + { token: 'keyword.operator.dereference.vala', + regex: '\\.(?=\\S)', + originalRegex: '(?<=\\S)\\.(?=\\S)' }, + { token: 'punctuation.terminator.vala', regex: ';' }, + { token: 'keyword.operator.ownership', regex: 'owned|unowned' }], + '#methods': [{ token: 'meta.method.vala', + regex: '(?!new)(?=\\w.*\\s+)(?=[^=]+\\()', + push: [{ token: 'paren.vala', regex: '}|(?=;)', next: 'pop' }, + { include: '#storage-modifiers' }, + { token: ['entity.name.function.vala', 'meta.method.identifier.vala'], + regex: '([\\~\\w\\.]+)(\\s*\\()', + push: [{ token: 'meta.method.identifier.vala', + regex: '\\)', + next: 'pop' }, + { include: '#parameters' }, + { defaultToken: 'meta.method.identifier.vala' }] }, + { token: 'meta.method.return-type.vala', + regex: '(?=\\w.*\\s+\\w+\\s*\\()', + push: [{ token: 'meta.method.return-type.vala', + regex: '(?=\\w+\\s*\\()', + next: 'pop' }, + { include: '#all-types' }, + { defaultToken: 'meta.method.return-type.vala' }] }, + { include: '#throws' }, + { token: 'paren.vala', + regex: '{', + push: [{ token: 'paren.vala', regex: '(?=})', next: 'pop' }, + { include: '#code' }, + { defaultToken: 'meta.method.body.vala' }] }, + { defaultToken: 'meta.method.vala' }] }], + '#namespace': [{ token: 'text', + regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))', + push: [{ token: 'text', regex: '(?=;|})', next: 'pop' }, + { token: 'constant.other.namespace.vala', + regex: '\\w+', + push: [{ token: 'meta.namespace.vala', regex: '(?=,|;|})', next: 'pop' }, + { include: '#parens' }, + { token: 'text', + regex: '{', + push: [{ token: 'text', regex: '}', next: 'pop' }, + { include: '#code' }] }, + { defaultToken: 'meta.namespace.vala' }] }], + comment: 'This is not quite right. See the class grammar right now' }], + '#object-types': [{ token: 'storage.type.generic.vala', + regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<', + push: [{ token: 'storage.type.generic.vala', + regex: '>|[^\\w\\s,\\?<\\[()\\]]', + TODO: 'FIXME: regexp doesn\'t have js equivalent', + originalRegex: '>|[^\\w\\s,\\?<\\[(?:[,]+)\\]]', + next: 'pop' }, + { include: '#object-types' }, + { token: 'storage.type.generic.vala', + regex: '<', + push: [{ token: 'storage.type.generic.vala', + regex: '>|[^\\w\\s,\\[\\]<]', + next: 'pop' }, + { defaultToken: 'storage.type.generic.vala' }], + comment: 'This is just to support <>\'s with no actual type prefix' }, + { defaultToken: 'storage.type.generic.vala' }] }, + { token: 'storage.type.object.array.vala', + regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)', + push: [{ token: 'storage.type.object.array.vala', + regex: '(?=[^\\]\\s])', + next: 'pop' }, + { token: 'text', + regex: '\\[', + push: [{ token: 'text', regex: '\\]', next: 'pop' }, + { include: '#code' }] }, + { defaultToken: 'storage.type.object.array.vala' }] }, + { token: ['storage.type.vala', + 'keyword.operator.dereference.vala', + 'storage.type.vala'], + regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)' }], + '#object-types-inherited': [{ token: 'entity.other.inherited-class.vala', + regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<', + push: [{ token: 'entity.other.inherited-class.vala', + regex: '>|[^\\w\\s,<]', + next: 'pop' }, + { include: '#object-types' }, + { token: 'storage.type.generic.vala', + regex: '<', + push: [{ token: 'storage.type.generic.vala', + regex: '>|[^\\w\\s,<]', + next: 'pop' }, + { defaultToken: 'storage.type.generic.vala' }], + comment: 'This is just to support <>\'s with no actual type prefix' }, + { defaultToken: 'entity.other.inherited-class.vala' }] }, + { token: ['entity.other.inherited-class.vala', + 'keyword.operator.dereference.vala', + 'entity.other.inherited-class.vala'], + regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)' }], + '#parameters': [{ token: 'storage.modifier.vala', regex: 'final' }, + { include: '#primitive-arrays' }, + { include: '#primitive-types' }, + { include: '#object-types' }, + { token: 'variable.parameter.vala', regex: '\\w+' }], + '#parens': [{ token: 'text', + regex: '\\(', + push: [{ token: 'text', regex: '\\)', next: 'pop' }, + { include: '#code' }] }], + '#primitive-arrays': [{ token: 'storage.type.primitive.array.vala', + regex: '\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b' }], + '#primitive-types': [{ token: 'storage.type.primitive.vala', + regex: '\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b', + comment: 'var is not really a primitive, but acts like one in most cases' }], + '#storage-modifiers': [{ token: 'storage.modifier.vala', + regex: '\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b', + comment: 'Not sure about unsafe and readonly' }], + '#strings': [{ token: 'punctuation.definition.string.begin.vala', + regex: '@"', + push: [{ token: 'punctuation.definition.string.end.vala', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.vala', + regex: '\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))' }, + { defaultToken: 'string.quoted.interpolated.vala' }] }, + { token: 'punctuation.definition.string.begin.vala', + regex: '"', + push: [{ token: 'punctuation.definition.string.end.vala', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.vala', regex: '\\\\.' }, + { token: 'constant.character.escape.vala', + regex: '%[\\w\\.\\-]+' }, + { defaultToken: 'string.quoted.double.vala' }] }, + { token: 'punctuation.definition.string.begin.vala', + regex: '\'', + push: [{ token: 'punctuation.definition.string.end.vala', + regex: '\'', + next: 'pop' }, + { token: 'constant.character.escape.vala', regex: '\\\\.' }, + { defaultToken: 'string.quoted.single.vala' }] }, + { token: 'punctuation.definition.string.begin.vala', + regex: '"""', + push: [{ token: 'punctuation.definition.string.end.vala', + regex: '"""', + next: 'pop' }, + { token: 'constant.character.escape.vala', + regex: '%[\\w\\.\\-]+' }, + { defaultToken: 'string.quoted.triple.vala' }] }], + '#throws': [{ token: 'storage.modifier.vala', + regex: 'throws', + push: [{ token: 'meta.throwables.vala', regex: '(?={|;)', next: 'pop' }, + { include: '#object-types' }, + { defaultToken: 'meta.throwables.vala' }] }], + '#values': [{ include: '#strings' }, + { include: '#object-types' }, + { include: '#constants-and-special-vars' }] }; + this.normalizeRules(); +}; +ValaHighlightRules.metaData = { + comment: 'Based heavily on the Java bundle\'s language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n', + fileTypes: ['vala'], + foldingStartMarker: '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)', + foldingStopMarker: '^\\s*(\\}|// \\}\\}\\}$)', + name: 'Vala', + scopeName: 'source.vala' +}; +oop.inherits(ValaHighlightRules, TextHighlightRules); +exports.ValaHighlightRules = ValaHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ValaHighlightRules = require("./vala_highlight_rules").ValaHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Mode = function () { + this.HighlightRules = ValaHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.$id = "ace/mode/vala"; + this.snippetFileId = "ace/snippets/vala"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/vala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-vbscript.js b/ui/base1/ace/mode-vbscript.js new file mode 100644 index 0000000..9f0368a --- /dev/null +++ b/ui/base1/ace/mode-vbscript.js @@ -0,0 +1,602 @@ +define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 7F9C9343-D48E-4E7D-BFE8-F680714DCD3E) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var VBScriptHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "keyword.control.asp": "If|Then|Else|ElseIf|End|While|Wend|For|To|Each|Case|Select|Return" + + "|Continue|Do|Until|Loop|Next|With|Exit|Function|Property|Type|Enum|Sub|IIf|Class", + "storage.type.asp": "Dim|Call|Const|Redim|Set|Let|Get|New|Randomize|Option|Explicit|Preserve|Erase|Execute|ExecuteGlobal", + "storage.modifier.asp": "Private|Public|Default", + "keyword.operator.asp": "Mod|And|Not|Or|Xor|As|Eqv|Imp|Is", + "constant.language.asp": "Empty|False|Nothing|Null|True", + "variable.language.vb.asp": "Me", + "support.class.vb.asp": "RegExp", + "support.class.asp": "Application|ObjectContext|Request|Response|Server|Session", + "support.class.collection.asp": "Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables", + "support.constant.asp": "TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute" + + "|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout", + "support.function.asp": "Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog" + + "|BinaryWrite|Clear|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex", + "support.function.event.asp": "Application_OnEnd|Application_OnStart" + + "|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart", + "support.function.vb.asp": "Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng" + + "|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial" + + "|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency" + + "|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex" + + "|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric" + + "|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim" + + "|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace" + + "|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion" + + "|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse" + + "|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year" + + "|AscB|AscW|ChrB|ChrW|InStrB|LeftB|LenB|MidB|RightB|Abs|GetUILanguage", + "support.type.vb.asp": "vbTrue|vbFalse|vbCr|vbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString" + + "|vbTab|vbVerticalTab|vbBinaryCompare|vbTextCompare|vbSunday|vbMonday|vbTuesday|vbWednesday" + + "|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek|vbFirstJan1|vbFirstFourDays|vbFirstFullWeek" + + "|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime|vbObjectError|vbEmpty|vbNull|vbInteger" + + "|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant" + + "|vbDataObject|vbDecimal|vbByte|vbArray|vbOKOnly|vbOKCancel|vbAbortRetryIgnore|vbYesNoCancel|vbYesNo" + + "|vbRetryCancel|vbCritical|vbQuestion|vbExclamation|vbInformation|vbDefaultButton1|vbDefaultButton2" + + "|vbDefaultButton3|vbDefaultButton4|vbApplicationModal|vbSystemModal|vbOK|vbCancel|vbAbort|vbRetry|vbIgnore|vbYes|vbNo" + + "|vbUseDefault" + }, "identifier", true); + this.$rules = { + "start": [ + { + token: [ + "meta.ending-space" + ], + regex: "$" + }, + { + token: [null], + regex: "^(?=\\t)", + next: "state_3" + }, + { + token: [null], + regex: "^(?= )", + next: "state_4" + }, + { + token: [ + "text", + "storage.type.function.asp", + "text", + "entity.name.function.asp", + "text", + "punctuation.definition.parameters.asp", + "variable.parameter.function.asp", + "punctuation.definition.parameters.asp" + ], + regex: "^(\\s*)(Function|Sub)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))" + }, + { + token: "punctuation.definition.comment.asp", + regex: "'|REM(?=\\s|$)", + next: "comment", + caseInsensitive: true + }, + { + token: "storage.type.asp", + regex: "On\\s+Error\\s+(?:Resume\\s+Next|GoTo)\\b", + caseInsensitive: true + }, + { + token: "punctuation.definition.string.begin.asp", + regex: '"', + next: "string" + }, + { + token: [ + "punctuation.definition.variable.asp" + ], + regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*" + }, + { + token: "constant.numeric.asp", + regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b" + }, + { + regex: "\\w+", + token: keywordMapper + }, + { + token: ["entity.name.function.asp"], + regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))" + }, + { + token: ["keyword.operator.asp"], + regex: "\\-|\\+|\\*|\\/|\\>|\\<|\\=|\\&|\\\\|\\^" + } + ], + "state_3": [ + { + token: [ + "meta.odd-tab.tabs", + "meta.even-tab.tabs" + ], + regex: "(\\t)(\\t)?" + }, + { + token: "meta.leading-space", + regex: "(?=[^\\t])", + next: "start" + }, + { + token: "meta.leading-space", + regex: ".", + next: "state_3" + } + ], + "state_4": [ + { + token: ["meta.odd-tab.spaces", "meta.even-tab.spaces"], + regex: "( )( )?" + }, + { + token: "meta.leading-space", + regex: "(?=[^ ])", + next: "start" + }, + { + defaultToken: "meta.leading-space" + } + ], + "comment": [ + { + token: "comment.line.apostrophe.asp", + regex: "$", + next: "start" + }, + { + defaultToken: "comment.line.apostrophe.asp" + } + ], + "string": [ + { + token: "constant.character.escape.apostrophe.asp", + regex: '""' + }, + { + token: "string.quoted.double.asp", + regex: '"', + next: "start" + }, + { + defaultToken: "string.quoted.double.asp" + } + ] + }; +}; +oop.inherits(VBScriptHighlightRules, TextHighlightRules); +exports.VBScriptHighlightRules = VBScriptHighlightRules; + +}); + +define("ace/mode/folding/vbscript",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var TokenIterator = require("../../token_iterator").TokenIterator; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.indentKeywords = { + "class": 1, + "function": 1, + "sub": 1, + "if": 1, + "select": 1, + "do": 1, + "for": 1, + "while": 1, + "with": 1, + "property": 1, + "else": 1, + "elseif": 1, + "end": -1, + "loop": -1, + "next": -1, + "wend": -1 + }; + this.foldingStartMarker = /(?:\s|^)(class|function|sub|if|select|do|for|while|with|property|else|elseif)\b/i; + this.foldingStopMarker = /\b(end|loop|next|wend)\b/i; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart || isEnd) { + var match = (isEnd) ? this.foldingStopMarker.exec(line) : this.foldingStartMarker.exec(line); + var keyword = match && match[1].toLowerCase(); + if (keyword) { + var type = session.getTokenAt(row, match.index + 2).type; + if (type === "keyword.control.asp" || type === "storage.type.function.asp") + return this.vbsBlock(session, row, match.index + 2); + } + } + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + if (isStart && !isEnd) { + var match = this.foldingStartMarker.exec(line); + var keyword = match && match[1].toLowerCase(); + if (keyword) { + var type = session.getTokenAt(row, match.index + 2).type; + if (type == "keyword.control.asp" || type == "storage.type.function.asp") { + if (keyword == "if" && !/then\s*('|$)/i.test(line)) + return ""; + return "start"; + } + } + } + return ""; + }; + this.vbsBlock = function (session, row, column, tokenRange) { + var stream = new TokenIterator(session, row, column); + var endOpenings = { + "class": 1, + "function": 1, + "sub": 1, + "if": 1, + "select": 1, + "with": 1, + "property": 1, + "else": 1, + "elseif": 1 + }; + var token = stream.getCurrentToken(); + if (!token || (token.type != "keyword.control.asp" && token.type != "storage.type.function.asp")) + return; + var startTokenValue = token.value.toLowerCase(); + var val = token.value.toLowerCase(); + var stack = [val]; + var dir = this.indentKeywords[val]; + if (!dir) + return; + var firstRange = stream.getCurrentTokenRange(); + switch (val) { + case "property": + case "sub": + case "function": + case "if": + case "select": + case "do": + case "for": + case "class": + case "while": + case "with": + var line = session.getLine(row); + var singleLineCondition = /^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(line); + if (singleLineCondition) + return; + var checkToken = new RegExp("(?:^|\\s)" + val, "i"); + var endTest = /^\s*End\s(If|Sub|Select|Function|Class|With|Property)\s*/i.test(line); + if (!checkToken.test(line) && !endTest) { + return; + } + if (endTest) { + var tokenRange = stream.getCurrentTokenRange(); + stream.step = stream.stepBackward; + stream.step(); + stream.step(); + token = stream.getCurrentToken(); + if (token) { + val = token.value.toLowerCase(); + if (val == "end") { + firstRange = stream.getCurrentTokenRange(); + firstRange = new Range(firstRange.start.row, firstRange.start.column, tokenRange.start.row, tokenRange.end.column); + } + } + dir = -1; + } + break; + case "end": + var tokenPos = stream.getCurrentTokenPosition(); + firstRange = stream.getCurrentTokenRange(); + stream.step = stream.stepForward; + stream.step(); + stream.step(); + token = stream.getCurrentToken(); + if (token) { + val = token.value.toLowerCase(); + if (val in endOpenings) { + startTokenValue = val; + var nextTokenPos = stream.getCurrentTokenPosition(); + var endColumn = nextTokenPos.column + val.length; + firstRange = new Range(tokenPos.row, tokenPos.column, nextTokenPos.row, endColumn); + } + } + stream.step = stream.stepBackward; + stream.step(); + stream.step(); + break; + } + var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length; + var startRow = row; + var ranges = []; + ranges.push(firstRange); + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while (token = stream.step()) { + var outputRange = null; + var ignore = false; + if (token.type != "keyword.control.asp" && token.type != "storage.type.function.asp") + continue; + val = token.value.toLowerCase(); + var level = dir * this.indentKeywords[val]; + switch (val) { + case "property": + case "sub": + case "function": + case "if": + case "select": + case "do": + case "for": + case "class": + case "while": + case "with": + var line = session.getLine(stream.getCurrentTokenRow()); + var singleLineCondition = /^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(line); + if (singleLineCondition) { + level = 0; + ignore = true; + } + var checkToken = new RegExp("^\\s* end\\s+" + val, "i"); + if (checkToken.test(line)) { + level = 0; + ignore = true; + } + break; + case "elseif": + case "else": + level = 0; + if (startTokenValue != "elseif") { + ignore = true; + } + break; + } + if (level > 0) { + stack.unshift(val); + } + else if (level <= 0 && ignore === false) { + stack.shift(); + if (!stack.length) { + switch (val) { + case "end": + var tokenPos = stream.getCurrentTokenPosition(); + outputRange = stream.getCurrentTokenRange(); + stream.step(); + stream.step(); + token = stream.getCurrentToken(); + if (token) { + val = token.value.toLowerCase(); + if (val in endOpenings) { + if ((startTokenValue == "else" || startTokenValue == "elseif")) { + if (val !== "if") { + ranges.shift(); + } + } + else { + if (val != startTokenValue) + ranges.shift(); + } + var nextTokenPos = stream.getCurrentTokenPosition(); + var endColumn = nextTokenPos.column + val.length; + outputRange = new Range(tokenPos.row, tokenPos.column, nextTokenPos.row, endColumn); + } + else { + ranges.shift(); + } + } + else { + ranges.shift(); + } + stream.step = stream.stepBackward; + stream.step(); + stream.step(); + token = stream.getCurrentToken(); + val = token.value.toLowerCase(); + break; + case "select": + case "sub": + case "if": + case "function": + case "class": + case "with": + case "property": + if (val != startTokenValue) + ranges.shift(); + break; + case "do": + if (startTokenValue != "loop") + ranges.shift(); + break; + case "loop": + if (startTokenValue != "do") + ranges.shift(); + break; + case "for": + if (startTokenValue != "next") + ranges.shift(); + break; + case "next": + if (startTokenValue != "for") + ranges.shift(); + break; + case "while": + if (startTokenValue != "wend") + ranges.shift(); + break; + case "wend": + if (startTokenValue != "while") + ranges.shift(); + break; + } + break; + } + if (level === 0) { + stack.unshift(val); + } + } + } + if (!token) + return null; + if (tokenRange) { + if (!outputRange) { + ranges.push(stream.getCurrentTokenRange()); + } + else { + ranges.push(outputRange); + } + return ranges; + } + var row = stream.getCurrentTokenRow(); + if (dir === -1) { + var endColumn = session.getLine(row).length; + return new Range(row, endColumn, startRow - 1, startColumn); + } + else + return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules","ace/mode/folding/vbscript","ace/range"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules; +var FoldMode = require("./folding/vbscript").FoldMode; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = VBScriptHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; + this.indentKeywords = this.foldingRules.indentKeywords; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["'", "REM"]; + var outdentKeywords = [ + "else", + "elseif", + "end", + "loop", + "next", + "wend" + ]; + function getNetIndentLevel(tokens, line, indentKeywords) { + var level = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type == "keyword.control.asp" || token.type == "storage.type.function.asp") { + var val = token.value.toLowerCase(); + if (val in indentKeywords) { + switch (val) { + case "property": + case "sub": + case "function": + case "select": + case "do": + case "for": + case "class": + case "while": + case "with": + case "if": + var checkToken = new RegExp("^\\s* end\\s+" + val, "i"); + var singleLineCondition = /^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(line); + if (!singleLineCondition && !checkToken.test(line)) + level += indentKeywords[val]; + break; + default: + level += indentKeywords[val]; + break; + } + } + } + } + if (level < 0) { + return -1; + } + else if (level > 0) { + return 1; + } + else { + return 0; + } + } + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var level = 0; + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + if (state == "start") { + level = getNetIndentLevel(tokens, line, this.indentKeywords); + } + if (level > 0) { + return indent + tab; + } + else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { + if (!this.checkOutdent(state, line, "\n")) { + return indent.substr(0, indent.length - tab.length); + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + if (input != "\n" && input != "\r" && input != "\r\n") + return false; + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + if (!tokens || !tokens.length) + return false; + var val = tokens[0].value.toLowerCase(); + return ((tokens[0].type == "keyword.control.asp" || tokens[0].type == "storage.type.function.asp") && outdentKeywords.indexOf(val) != -1); + }; + this.getMatching = function (session, row, column, tokenRange) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + if (tokenRange == undefined) + tokenRange = true; + var startToken = session.getTokenAt(row, column); + if (startToken) { + var val = startToken.value.toLowerCase(); + if (val in this.indentKeywords) + return this.foldingRules.vbsBlock(session, row, column, tokenRange); + } + }; + this.autoOutdent = function (state, session, row) { + var line = session.getLine(row); + var column = line.match(/^\s*/)[0].length; + if (!column || !row) + return; + var startRange = this.getMatching(session, row, column + 1, false); + if (!startRange || startRange.start.row == row) + return; + var indent = this.$getIndent(session.getLine(startRange.start.row)); + if (indent.length != column) { + session.replace(new Range(row, 0, row, column), indent); + session.outdentRows(new Range(row + 1, 0, row + 1, 0)); + } + }; + this.$id = "ace/mode/vbscript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/vbscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-velocity.js b/ui/base1/ace/mode-velocity.js new file mode 100644 index 0000000..33078a9 --- /dev/null +++ b/ui/base1/ace/mode-velocity.js @@ -0,0 +1,2580 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var VelocityHighlightRules = function () { + HtmlHighlightRules.call(this); + var builtinConstants = lang.arrayToMap(('true|false|null').split('|')); + var builtinFunctions = lang.arrayToMap(("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|')); + var builtinVariables = lang.arrayToMap(('$contentRoot|$foreach').split('|')); + var keywords = lang.arrayToMap(("#set|#macro|#include|#parse|" + + "#if|#elseif|#else|#foreach|" + + "#break|#end|#stop").split('|')); + this.$rules.start.push({ + token: "comment", + regex: "##.*$" + }, { + token: "comment.block", // multi line comment + regex: "#\\*", + next: "vm_comment" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: function (value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else if (value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)) + return "variable"; + return "identifier"; + }, + regex: "[a-zA-Z$#][a-zA-Z0-9_]*\\b" + }, { + token: "keyword.operator", + regex: "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }); + this.$rules["vm_comment"] = [ + { + token: "comment", // closing comment + regex: "\\*#|-->", + next: "start" + }, { + defaultToken: "comment" + } + ]; + this.$rules["vm_start"] = [ + { + token: "variable", + regex: "}", + next: "pop" + }, { + token: "string.regexp", + regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: function (value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else if (value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)) + return "variable"; + return "identifier"; + }, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ]; + for (var i in this.$rules) { + this.$rules[i].unshift({ + token: "variable", + regex: "\\${", + push: "vm_start" + }); + } + this.normalizeRules(); +}; +oop.inherits(VelocityHighlightRules, TextHighlightRules); +exports.VelocityHighlightRules = VelocityHighlightRules; + +}); + +define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "##") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "##") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "##" && next[indent] == "##") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "##" && prev[indent] == "##") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/velocity",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/velocity_highlight_rules","ace/mode/folding/velocity"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules; +var FoldMode = require("./folding/velocity").FoldMode; +var Mode = function () { + HtmlMode.call(this); + this.HighlightRules = VelocityHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, HtmlMode); +(function () { + this.lineCommentStart = "##"; + this.blockComment = { start: "#*", end: "*#" }; + this.$id = "ace/mode/velocity"; + this.snippetFileId = "ace/snippets/velocity"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/velocity"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-verilog.js b/ui/base1/ace/mode-verilog.js new file mode 100644 index 0000000..cf0f673 --- /dev/null +++ b/ui/base1/ace/mode-verilog.js @@ -0,0 +1,98 @@ +define("ace/mode/verilog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var VerilogHighlightRules = function () { + var keywords = "always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|" + + "deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|" + + "endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|" + + "highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|" + + "macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|" + + "posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|" + + "reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|" + + "strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|" + + "unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xor" + + "begin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|" + + "endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|" + + "macromodule|module|primitive|repeat|specify|table|task|while"; + var builtinConstants = ("true|false|null"); + var builtinFunctions = ("count|min|max|avg|sum|rank|now|coalesce|main"); + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "//.*$" + }, { + token: "comment.start", + regex: "/\\*", + next: [ + { token: "comment.end", regex: "\\*/", next: "start" }, + { defaultToken: "comment" } + ] + }, { + token: "string.start", + regex: '"', + next: [ + { token: "constant.language.escape", regex: /\\(?:[ntvfa\\"]|[0-7]{1,3}|\x[a-fA-F\d]{1,2}|)/, consumeLineEnd: true }, + { token: "string.end", regex: '"|$', next: "start" }, + { defaultToken: "string" } + ] + }, { + token: "string", + regex: "'^[']'" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "paren.lparen", + regex: "[\\(]" + }, { + token: "paren.rparen", + regex: "[\\)]" + }, { + token: "text", + regex: "\\s+" + }] + }; + this.normalizeRules(); +}; +oop.inherits(VerilogHighlightRules, TextHighlightRules); +exports.VerilogHighlightRules = VerilogHighlightRules; + +}); + +define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules; +var Range = require("../range").Range; +var Mode = function () { + this.HighlightRules = VerilogHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"' }; + this.$id = "ace/mode/verilog"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/verilog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-vhdl.js b/ui/base1/ace/mode-vhdl.js new file mode 100644 index 0000000..f4ac324 --- /dev/null +++ b/ui/base1/ace/mode-vhdl.js @@ -0,0 +1,94 @@ +define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var VHDLHighlightRules = function () { + var keywords = "access|after|alias|all|architecture|assert|attribute|" + + "begin|block|body|buffer|bus|case|component|configuration|" + + "context|disconnect|downto|else|elsif|end|entity|exit|" + + "file|for|force|function|generate|generic|group|guarded|" + + "if|impure|in|inertial|inout|is|label|library|linkage|" + + "literal|loop|map|new|next|of|on|or|open|others|out|" + + "package|parameter|port|postponed|procedure|process|" + + "protected|pure|range|record|register|reject|release|" + + "report|return|select|severity|shared|signal|subtype|then|" + + "to|transport|type|unaffected|units|until|use|variable|" + + "wait|when|while|with"; + var storageType = "bit|bit_vector|boolean|character|integer|line|natural|" + + "positive|real|register|signed|std_logic|" + + "std_logic_vector|string||text|time|unsigned"; + var storageModifiers = "array|constant"; + var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra" + + "srl|xnor|xor"; + var builtinConstants = ("true|false|null"); + var keywordMapper = this.createKeywordMapper({ + "keyword.operator": keywordOperators, + "keyword": keywords, + "constant.language": builtinConstants, + "storage.modifier": storageModifiers, + "storage.type": storageType + }, "identifier", true); + this.$rules = { + "start": [{ + token: "comment", + regex: "--.*$" + }, { + token: "string", // " string + regex: '".*?"' + }, { + token: "string", // ' string + regex: "'.*?'" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: "keyword", // pre-compiler directives + regex: "\\s*(?:library|package|use)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>" + }, { + token: "punctuation.operator", + regex: "\\'|\\:|\\,|\\;|\\." + }, { + token: "paren.lparen", + regex: "[[(]" + }, { + token: "paren.rparen", + regex: "[\\])]" + }, { + token: "text", + regex: "\\s+" + }] + }; +}; +oop.inherits(VHDLHighlightRules, TextHighlightRules); +exports.VHDLHighlightRules = VHDLHighlightRules; + +}); + +define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules; +var Mode = function () { + this.HighlightRules = VHDLHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "--"; + this.$id = "ace/mode/vhdl"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/vhdl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-visualforce.js b/ui/base1/ace/mode-visualforce.js new file mode 100644 index 0000000..c55acdc --- /dev/null +++ b/ui/base1/ace/mode-visualforce.js @@ -0,0 +1,2454 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; +var globalAttributes = commonAttributes.concat(eventAttributes); +var attributeMap = { + "a": { "href": 1, "target": { "_blank": 1, "top": 1 }, "ping": 1, "rel": { "nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1 }, "media": 1, "hreflang": 1, "type": 1 }, + "abbr": {}, + "address": {}, + "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 }, + "article": { "pubdate": 1 }, + "aside": {}, + "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "b": {}, + "base": { "href": 1, "target": 1 }, + "bdi": {}, + "bdo": {}, + "blockquote": { "cite": 1 }, + "body": { "onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1 }, + "br": {}, + "button": { "autofocus": 1, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": { "button": 1, "submit": 1 } }, + "canvas": { "width": 1, "height": 1 }, + "caption": {}, + "cite": {}, + "code": {}, + "col": { "span": 1 }, + "colgroup": { "span": 1 }, + "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 }, + "data": {}, + "datalist": {}, + "dd": {}, + "del": { "cite": 1, "datetime": 1 }, + "details": { "open": 1 }, + "dfn": {}, + "dialog": { "open": 1 }, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": { "src": 1, "height": 1, "width": 1, "type": 1 }, + "fieldset": { "disabled": 1, "form": 1, "name": 1 }, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": { "accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": { "multipart/form-data": 1, "application/x-www-form-urlencoded": 1 }, "method": { "get": 1, "post": 1 }, "name": 1, "novalidate": 1, "target": { "_blank": 1, "top": 1 } }, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": { "manifest": 1 }, + "i": {}, + "iframe": { "name": 1, "src": 1, "height": 1, "width": 1, "sandbox": { "allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1 }, "seamless": { "seamless": 1 } }, + "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 }, + "input": { + "type": { "text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1 }, + "accept": 1, "alt": 1, "autocomplete": { "on": 1, "off": 1 }, "autofocus": { "autofocus": 1 }, "checked": { "checked": 1 }, "disabled": { "disabled": 1 }, "form": 1, "formaction": 1, "formenctype": { "application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1 }, "formmethod": { "get": 1, "post": 1 }, "formnovalidate": { "formnovalidate": 1 }, "formtarget": { "_blank": 1, "_self": 1, "_parent": 1, "_top": 1 }, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": { "multiple": 1 }, "name": 1, "pattern": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1 + }, + "ins": { "cite": 1, "datetime": 1 }, + "kbd": {}, + "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 }, + "label": { "form": 1, "for": 1 }, + "legend": {}, + "li": { "value": 1 }, + "link": { "href": 1, "hreflang": 1, "rel": { "stylesheet": 1, "icon": 1 }, "media": { "all": 1, "screen": 1, "print": 1 }, "type": { "text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1 }, "sizes": 1 }, + "main": {}, + "map": { "name": 1 }, + "mark": {}, + "math": {}, + "menu": { "type": 1, "label": 1 }, + "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 }, + "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 }, + "nav": {}, + "noscript": { "href": 1 }, + "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 }, + "ol": { "start": 1, "reversed": 1 }, + "optgroup": { "disabled": 1, "label": 1 }, + "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 }, + "output": { "for": 1, "form": 1, "name": 1 }, + "p": {}, + "param": { "name": 1, "value": 1 }, + "pre": {}, + "progress": { "value": 1, "max": 1 }, + "q": { "cite": 1 }, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 }, + "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } }, + "small": {}, + "source": { "src": 1, "type": 1, "media": 1 }, + "span": {}, + "strong": {}, + "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 }, + "sub": {}, + "sup": {}, + "svg": {}, + "table": { "summary": 1 }, + "tbody": {}, + "td": { "headers": 1, "rowspan": 1, "colspan": 1 }, + "textarea": { "autofocus": { "autofocus": 1 }, "disabled": { "disabled": 1 }, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": { "readonly": 1 }, "required": { "required": 1 }, "rows": 1, "cols": 1, "wrap": { "on": 1, "off": 1, "hard": 1, "soft": 1 } }, + "tfoot": {}, + "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 }, + "thead": {}, + "time": { "datetime": 1 }, + "title": {}, + "tr": {}, + "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 }, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "width": 1, "height": 1, "poster": 1, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } }, + "wbr": {} +}; +var elements = Object.keys(attributeMap); +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/visualforce_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module){/* global define */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("../mode/html_highlight_rules").HtmlHighlightRules; +function string(options) { + return { + token: options.token + ".start", + regex: options.start, + push: [{ + token: "constant.language.escape", + regex: options.escape + }, { + token: options.token + ".end", + regex: options.start, + next: "pop" + }, { + defaultToken: options.token + }] + }; +} +var VisualforceHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "$Action|$Api|$Component|$ComponentLabel|$CurrentPage|$FieldSet|$Label|$Label|" + + "$ObjectType|$Organization|$Page|$Permission|$Profile|$Resource|$SControl|" + + "$Setup|$Site|$System.OriginDateTime|$User|$UserRole|" + + "Site|UITheme|UIThemeDisplayed", + "keyword": "", + "storage.type": "", + "constant.language": "true|false|null|TRUE|FALSE|NULL", + "support.function": "DATE|DATEVALUE|DATETIMEVALUE|DAY|MONTH|NOW|TODAY|YEAR|BLANKVALUE|ISBLANK|" + + "NULLVALUE|PRIORVALUE|AND|CASE|IF|ISCHANGED|ISNEW|ISNUMBER|NOT|OR|ABS|" + + "CEILING|EXP|FLOOR|LN|LOG|MAX|MIN|MOD|ROUND|SQRT|BEGINS|BR|CASESAFEID|" + + "CONTAINS|FIND|GETSESSIONID|HTMLENCODE|ISPICKVAL|JSENCODE|JSINHTMLENCODE|" + + "LEFT|LEN|LOWER|LPAD|MID|RIGHT|RPAD|SUBSTITUTE|TEXT|TRIM|UPPER|URLENCODE|VALUE|" + + "GETRECORDIDS|INCLUDE|LINKTO|REGEX|REQUIRESCRIPT|URLFOR|VLOOKUP|HTMLENCODE|JSENCODE|" + + "JSINHTMLENCODE|URLENCODE" + }, "identifier"); + HtmlHighlightRules.call(this); + var hbs = { + token: "keyword.start", + regex: "{!", + push: "Visualforce" + }; + for (var key in this.$rules) { + this.$rules[key].unshift(hbs); + } + this.$rules.Visualforce = [ + string({ + start: '"', + escape: /\\[btnfr"'\\]/, + token: "string", + multiline: true + }), + string({ + start: "'", + escape: /\\[btnfr"'\\]/, + token: "string", + multiline: true + }), + { + token: "comment.start", + regex: "\\/\\*", + push: [ + { token: "comment.end", regex: "\\*\\/|(?=})", next: "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "keyword.end", + regex: "}", + next: "pop" + }, { + token: keywordMapper, + regex: /[a-zA-Z$_\u00a1-\uffff][a-zA-Z\d$_\u00a1-\uffff]*\b/ + }, { + token: "keyword.operator", + regex: /==|<>|!=|<=|>=|&&|\|\||[+\-*/^()=<>&]/ + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + }, { + token: "paren.lparen", + regex: /[\[({]/ + }, { + token: "paren.rparen", + regex: /[\])}]/ + } + ]; + this.normalizeRules(); +}; +oop.inherits(VisualforceHighlightRules, HtmlHighlightRules); +exports.VisualforceHighlightRules = VisualforceHighlightRules; + +}); + +define("ace/mode/visualforce",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/visualforce_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"], function(require, exports, module){/* caption: Visualforce; extensions: component,page,vfp */ +"use strict"; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var VisualforceHighlightRules = require("./visualforce_highlight_rules").VisualforceHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +function VisualforceMode() { + HtmlMode.call(this); + this.HighlightRules = VisualforceHighlightRules; + this.foldingRules = new HtmlFoldMode(); + this.$behaviour = new XmlBehaviour(); +} +oop.inherits(VisualforceMode, HtmlMode); +VisualforceMode.prototype.emmetConfig = { + profile: "xhtml" +}; +exports.Mode = VisualforceMode; + +}); (function() { + window.require(["ace/mode/visualforce"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-vue.js b/ui/base1/ace/mode-vue.js new file mode 100644 index 0000000..4c26d56 --- /dev/null +++ b/ui/base1/ace/mode-vue.js @@ -0,0 +1,3834 @@ +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.$getMode = function (state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + this.$tryMode = function (state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + this.getFoldWidget = function (session, foldStyle, row) { + return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row)); + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var mode = this.$getMode(session.getState(row - 1)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + return mode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === " -1; +} +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")) { + token = iterator.stepBackward(); + } + if (token) + return token.value; +} +var HtmlCompletions = function () { +}; +(function () { + this.getCompletions = function (state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + return []; + }; + this.getTagCompletions = function (state, session, pos, prefix) { + return elements.map(function (element) { + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + this.getAttributeCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function (attribute) { + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + this.getAttributeValueCompletions = function (state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + this.getHTMLEntityCompletions = function (state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; +}).call(HtmlCompletions.prototype); +exports.HtmlCompletions = HtmlCompletions; + +}); + +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var TokenIterator = require("../../token_iterator").TokenIterator; +var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour; +var XmlBehaviour = require("../behaviour/xml").XmlBehaviour; +var JavaScriptBehaviour = function () { + var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours(); + this.addBehaviours(xmlBehaviours); + this.inherit(CstyleBehaviour); + this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; +var CssHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + this.$rules = { + "start": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + "media": [{ + include: ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + "comments": [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token: "comment", + regex: "\\*\\/", + next: "pop" + }, { + defaultToken: "comment" + }] + }], + "ruleset": [{ + regex: "-(webkit|ms|moz|o)-", + token: "text" + }, { + token: "punctuation.operator", + regex: "[:;]" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + include: ["strings", "url", "comments"] + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: pseudoClasses + }, { + include: "url" + }, { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + token: "paren.lparen", + regex: "\\{" + }, { + caseInsensitive: true + }], + url: [{ + token: "support.function", + regex: "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token: "support.function", + regex: "\\)", + next: "pop" + }, { + defaultToken: "string" + }] + }], + strings: [{ + token: "string.start", + regex: "'", + push: [{ + token: "string.end", + regex: "'|$", + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: '"', + push: [{ + token: "string.end", + regex: '"|$', + next: "pop" + }, { + include: "escapes" + }, { + token: "constant.language.escape", + regex: /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token: "constant.language.escape", + regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(CssHighlightRules, TextHighlightRules); +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; +var propertyMap = { + "background": { "#$0": 1 }, + "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, + "background-image": { "url('/$0')": 1 }, + "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, + "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, + "background-attachment": { "scroll": 1, "fixed": 1 }, + "background-size": { "cover": 1, "contain": 1 }, + "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, + "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, + "border-color": { "#$0": 1 }, + "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, + "border-collapse": { "collapse": 1, "separate": 1 }, + "bottom": { "px": 1, "em": 1, "%": 1 }, + "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, + "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, + "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, + "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, + "empty-cells": { "show": 1, "hide": 1 }, + "float": { "left": 1, "right": 1, "none": 1 }, + "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, + "font-size": { "px": 1, "em": 1, "%": 1 }, + "font-weight": { "bold": 1, "normal": 1 }, + "font-style": { "italic": 1, "normal": 1 }, + "font-variant": { "normal": 1, "small-caps": 1 }, + "height": { "px": 1, "em": 1, "%": 1 }, + "left": { "px": 1, "em": 1, "%": 1 }, + "letter-spacing": { "normal": 1 }, + "line-height": { "normal": 1 }, + "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, + "margin": { "px": 1, "em": 1, "%": 1 }, + "margin-right": { "px": 1, "em": 1, "%": 1 }, + "margin-left": { "px": 1, "em": 1, "%": 1 }, + "margin-top": { "px": 1, "em": 1, "%": 1 }, + "margin-bottom": { "px": 1, "em": 1, "%": 1 }, + "max-height": { "px": 1, "em": 1, "%": 1 }, + "max-width": { "px": 1, "em": 1, "%": 1 }, + "min-height": { "px": 1, "em": 1, "%": 1 }, + "min-width": { "px": 1, "em": 1, "%": 1 }, + "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, + "padding": { "px": 1, "em": 1, "%": 1 }, + "padding-top": { "px": 1, "em": 1, "%": 1 }, + "padding-right": { "px": 1, "em": 1, "%": 1 }, + "padding-bottom": { "px": 1, "em": 1, "%": 1 }, + "padding-left": { "px": 1, "em": 1, "%": 1 }, + "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, + "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, + "right": { "px": 1, "em": 1, "%": 1 }, + "table-layout": { "fixed": 1, "auto": 1 }, + "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, + "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, + "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, + "top": { "px": 1, "em": 1, "%": 1 }, + "vertical-align": { "top": 1, "bottom": 1 }, + "visibility": { "hidden": 1, "visible": 1 }, + "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, + "width": { "px": 1, "em": 1, "%": 1 }, + "word-spacing": { "normal": 1 }, + "filter": { "alpha(opacity=$0100)": 1 }, + "text-shadow": { "$02px 2px 2px #777": 1 }, + "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, + "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } +}; +var CssCompletions = function () { +}; +(function () { + this.completionsDefined = false; + this.defineCompletions = function () { + if (document) { + var style = document.createElement('c').style; + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + var name = i.replace(/[A-Z]/g, function (x) { + return '-' + x.toLowerCase(); + }); + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + this.completionsDefined = true; + }; + this.getCompletions = function (state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + var inParens = /\([^)]*$/.test(line); + if (inParens) { + line = line.substr(line.lastIndexOf('(') + 1); + } + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + return this.getPropertyValueCompletions(state, session, pos, prefix); + } + else { + return this.getPropertyCompletions(state, session, pos, prefix, inParens); + } + } + return []; + }; + this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { + skipSemicolon = skipSemicolon || false; + var properties = Object.keys(propertyMap); + return properties.map(function (property) { + return { + caption: property, + snippet: property + ': $0' + (skipSemicolon ? '' : ';'), + meta: "property", + score: 1000000 + }; + }); + }; + this.getPropertyValueCompletions = function (state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function (value) { + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; +}).call(CssCompletions.prototype); +exports.CssCompletions = CssCompletions; + +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var CssBehaviour = function () { + this.inherit(CstyleBehaviour); + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column++; + return range; + } + } + } + }); + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); +}; +oop.inherits(CssBehaviour, CstyleBehaviour); +exports.CssBehaviour = CssBehaviour; + +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.foldingRules = "cStyle"; + this.blockComment = { start: "/*", end: "*/" }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/css"; + this.snippetFileId = "ace/snippets/css"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var tagMap = lang.createMap({ + a: 'anchor', + button: 'form', + form: 'form', + img: 'image', + input: 'form', + label: 'form', + option: 'form', + script: 'script', + select: 'form', + textarea: 'form', + style: 'style', + table: 'table', + tbody: 'table', + td: 'table', + tfoot: 'table', + th: 'table', + tr: 'table' +}); +var HtmlHighlightRules = function () { + XmlHighlightRules.call(this); + this.addRules({ + attributes: [{ + include: "tag_whitespace" + }, { + token: "entity.other.attribute-name.xml", + regex: "[-_a-zA-Z0-9:.]+" + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=", + push: [{ + include: "tag_whitespace" + }, { + token: "string.unquoted.attribute-value.html", + regex: "[^<>='\"`\\s]+", + next: "pop" + }, { + token: "empty", + regex: "", + next: "pop" + }] + }, { + include: "attribute_value" + }], + tag: [{ + token: function (start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex: "(", next: "start" } + ] + }); + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script"); + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; +oop.inherits(HtmlHighlightRules, XmlHighlightRules); +exports.HtmlHighlightRules = HtmlHighlightRules; + +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function (options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); +(function () { + this.blockComment = { start: "" }; + this.voidElements = lang.arrayToMap(voidElements); + this.getNextLineIndent = function (state, line, tab) { + return this.$getIndent(line); + }; + this.checkOutdent = function (state, line, input) { + return false; + }; + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.createWorker = function (session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + if (this.fragmentContext) + worker.call("setOptions", [{ context: this.fragmentContext }]); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/html"; + this.snippetFileId = "ace/snippets/html"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 21e323af-f665-4161-96e7-5087d262557e) */ +"use strict"; +var oop = require("../lib/oop"); +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var TypeScriptHighlightRules = function (options) { + var tsRules = [ + { + token: ["storage.type", "text", "entity.name.function.ts"], + regex: "(function)(\\s+)([a-zA-Z0-9\$_\u00a1-\uffff][a-zA-Z0-9\d\$_\u00a1-\uffff]*)" + }, + { + token: "keyword", + regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)" + }, + { + token: ["keyword", "storage.type.variable.ts"], + regex: "(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)" + }, + { + token: "keyword", + regex: "\\b(?:super|export|import|keyof|infer)\\b" + }, + { + token: ["storage.type.variable.ts"], + regex: "(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))" + } + ]; + var JSRules = new JavaScriptHighlightRules({ jsx: (options && options.jsx) == true }).getRules(); + JSRules.no_regex = tsRules.concat(JSRules.no_regex); + this.$rules = JSRules; +}; +oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); +exports.TypeScriptHighlightRules = TypeScriptHighlightRules; + +}); + +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +oop.inherits(CoffeeHighlightRules, TextHighlightRules); +function CoffeeHighlightRules() { + var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + var keywords = ("this|throw|then|try|typeof|super|switch|return|break|by|continue|" + + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + + "or|on|unless|until|and|yes|yield|export|import|default"); + var langConstant = ("true|false|null|undefined|NaN|Infinity"); + var illegal = ("case|const|function|var|void|with|enum|implements|" + + "interface|let|package|private|protected|public|static"); + var supportClass = ("Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + + "SyntaxError|TypeError|URIError|" + + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"); + var supportFunction = ("Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + + "encodeURIComponent|decodeURI|decodeURIComponent|String|"); + var variableLanguage = ("window|arguments|prototype|document"); + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": langConstant, + "invalid.illegal": illegal, + "language.support.class": supportClass, + "language.support.function": supportFunction, + "variable.language": variableLanguage + }, "identifier"); + var functionRule = { + token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], + regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source + }; + var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; + this.$rules = { + start: [ + { + token: "constant.numeric", + regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" + }, { + stateName: "qdoc", + token: "string", regex: "'''", next: [ + { token: "string", regex: "'''", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqdoc", + token: "string", + regex: '"""', + next: [ + { token: "string", regex: '"""', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qstring", + token: "string", regex: "'", next: [ + { token: "string", regex: "'", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "qqstring", + token: "string.start", regex: '"', next: [ + { token: "string.end", regex: '"', next: "start" }, + { token: "paren.string", regex: '#{', push: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + stateName: "js", + token: "string", regex: "`", next: [ + { token: "string", regex: "`", next: "start" }, + { token: "constant.language.escape", regex: stringEscape }, + { defaultToken: "string" } + ] + }, { + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift() || ""; + if (this.next.indexOf("string") != -1) + return "paren.string"; + } + return "paren"; + } + }, { + token: "string.regex", + regex: "///", + next: "heregex" + }, { + token: "string.regex", + regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ + }, { + token: "comment", + regex: "###(?!#)", + next: "comment" + }, { + token: "comment", + regex: "#.*" + }, { + token: ["punctuation.operator", "text", "identifier"], + regex: "(\\.)(\\s*)(" + illegal + ")" + }, { + token: "punctuation.operator", + regex: "\\.{1,3}" + }, { + token: ["keyword", "text", "language.support.class", + "text", "keyword", "text", "language.support.class"], + regex: "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" + }, { + token: ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), + regex: "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex + }, + functionRule, + { + token: "variable", + regex: "@(?:" + identifier + ")?" + }, { + token: keywordMapper, + regex: identifier + }, { + token: "punctuation.operator", + regex: "\\,|\\." + }, { + token: "storage.type", + regex: "[\\-=]>" + }, { + token: "keyword.operator", + regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" + }, { + token: "paren.lparen", + regex: "[({[]" + }, { + token: "paren.rparen", + regex: "[\\]})]" + }, { + token: "text", + regex: "\\s+" + } + ], + heregex: [{ + token: "string.regex", + regex: '.*?///[imgy]{0,4}', + next: "start" + }, { + token: "comment.regex", + regex: "\\s+(?:#.*)?" + }, { + token: "string.regex", + regex: "\\S+" + }], + comment: [{ + token: "comment", + regex: '###', + next: "start" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +} +exports.CoffeeHighlightRules = CoffeeHighlightRules; + +}); + +define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY Stylus.tmlanguage (UUID: 60519324-6A3A-4382-9E0B-546993A3869A) */ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var StylusHighlightRules = function () { + var keywordMapper = this.createKeywordMapper({ + "support.type": CssHighlightRules.supportType, + "support.function": CssHighlightRules.supportFunction, + "support.constant": CssHighlightRules.supportConstant, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "text", true); + this.$rules = { + start: [ + { + token: "comment", + regex: /\/\/.*$/ + }, + { + token: "comment", // multi line comment + regex: /\/\*/, + next: "comment" + }, + { + token: ["entity.name.function.stylus", "text"], + regex: "^([-a-zA-Z_][-\\w]*)?(\\()" + }, + { + token: ["entity.other.attribute-name.class.stylus"], + regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*" + }, + { + token: ["entity.language.stylus"], + regex: "^ *&" + }, + { + token: ["variable.language.stylus"], + regex: "(arguments)" + }, + { + token: ["keyword.stylus"], + regex: "@[-\\w]+" + }, + { + token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex: CssHighlightRules.pseudoElements + }, { + token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex: CssHighlightRules.pseudoClasses + }, + { + token: ["entity.name.tag.stylus"], + regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)" + }, + { + token: "constant.numeric", // hex6 color + regex: "#[a-fA-F0-9]{6}" + }, + { + token: "constant.numeric", // hex3 color + regex: "#[a-fA-F0-9]{3}" + }, + { + token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"], + regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)" + }, + { + token: "meta.vendor-prefix.stylus", + regex: "-webkit-|-moz\\-|-ms-|-o-" + }, + { + token: "keyword.control.stylus", + regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b" + }, + { + token: "keyword.operator.stylus", + regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=" + }, + { + token: "keyword.operator.stylus", + regex: "(?:in|is(?:nt)?|not)\\b" + }, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: "constant.numeric", + regex: CssHighlightRules.numRe + }, + { + token: "keyword", + regex: "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b" + }, + { + token: keywordMapper, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '[^"\\\\]+' + }, + { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, + { + token: "string", + regex: '"|$', + next: "start" + } + ], + "qstring": [ + { + token: "string", + regex: "[^'\\\\]+" + }, + { + token: "string", + regex: "\\\\$", + next: "qstring" + }, + { + token: "string", + regex: "'|$", + next: "start" + } + ] + }; +}; +oop.inherits(StylusHighlightRules, TextHighlightRules); +exports.StylusHighlightRules = StylusHighlightRules; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); +var ScssHighlightRules = function () { + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|")); + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")); + var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: '["].*\\\\$', + next: "qqstring" + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "string", // multi line string start + regex: "['].*\\\\$", + next: "qstring" + }, { + token: "constant.numeric", + regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "string", "support.function"], + regex: "(url\\()(.*)(\\))" + }, { + token: function (value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable", + regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ], + "qqstring": [ + { + token: "string", + regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next: "start" + }, { + token: "string", + regex: '.+' + } + ], + "qstring": [ + { + token: "string", + regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next: "start" + }, { + token: "string", + regex: '.+' + } + ] + }; +}; +oop.inherits(ScssHighlightRules, TextHighlightRules); +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var SassHighlightRules = function () { + ScssHighlightRules.call(this); + var start = this.$rules.start; + if (start[1].token == "comment") { + start.splice(1, 1, { + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, -1, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\*/, + next: "comment" + }, { + token: "error.invalid", + regex: "/\\*|[{;}]" + }, { + token: "support.type", + regex: /^\s*:[\w\-]+\s/ + }); + this.$rules.comment = [ + { regex: /^\s*/, onMatch: function (value, currentState, stack) { + if (stack[1] === -1) + stack[1] = Math.max(stack[2], value.length - 1); + if (value.length <= stack[1]) { stack.shift(); + stack.shift(); + stack.shift(); + this.next = stack.shift(); + return "text"; + } + else { + this.next = ""; + return "comment"; + } + }, next: "start" }, + { defaultToken: "comment" } + ]; + } +}; +oop.inherits(SassHighlightRules, ScssHighlightRules); +exports.SassHighlightRules = SassHighlightRules; + +}); + +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require('./css_highlight_rules'); +var LessHighlightRules = function () { + var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" + + "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" + + "or|and|when|not"; + var keywords = keywordList.split('|'); + var properties = CssHighlightRules.supportType.split('|'); + var keywordMapper = this.createKeywordMapper({ + "support.constant": CssHighlightRules.supportConstant, + "keyword": keywordList, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "identifier", true); + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: ["constant.numeric", "keyword"], + regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token: "constant.numeric", // hex6 color + regex: "#[a-f0-9]{6}" + }, { + token: "constant.numeric", // hex3 color + regex: "#[a-f0-9]{3}" + }, { + token: "constant.numeric", + regex: numRe + }, { + token: ["support.function", "paren.lparen", "string", "paren.rparen"], + regex: "(url)(\\()(.*)(\\))" + }, { + token: ["support.function", "paren.lparen"], + regex: "(:extend|[a-z0-9_\\-]+)(\\()" + }, { + token: function (value) { + if (keywords.indexOf(value.toLowerCase()) > -1) + return "keyword"; + else + return "variable"; + }, + regex: "[@\\$][a-z0-9_\\-@\\$]*\\b" + }, { + token: "variable", + regex: "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}" + }, { + token: function (first, second) { + if (properties.indexOf(first.toLowerCase()) > -1) { + return ["support.type.property", "text"]; + } + else { + return ["support.type.unknownProperty", "text"]; + } + }, + regex: "([a-z0-9-_]+)(\\s*:)" + }, { + token: "keyword", + regex: "&" // special case - always treat as keyword + }, { + token: keywordMapper, + regex: "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z_][a-z0-9-_]*" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token: "keyword.operator", + regex: "<|>|<=|>=|=|!=|-|%|\\+|\\*" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + }, { + caseInsensitive: true + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: "\\*\\/", + next: "start" + }, { + defaultToken: "comment" + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(LessHighlightRules, TextHighlightRules); +exports.LessHighlightRules = LessHighlightRules; + +}); + +define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SlimHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "keyword", + regex: /^(\s*)(\w+):\s*/, + onMatch: function (value, state, stack, line) { + var indent = /^\s*/.exec(line)[0]; + var m = value.match(/^(\s*)(\w+):/); + var language = m[2]; + if (!/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(language)) + language = ""; + stack.unshift("language-embed", [], [indent, language], state); + return this.token; + }, + stateName: "language-embed", + next: [{ + token: "string", + regex: /^(\s*)/, + onMatch: function (value, state, stack, line) { + var indent = stack[2][0]; + if (indent.length >= value.length) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + return [{ type: "text", value: indent }]; + }, + next: "" + }, { + token: "string", + regex: /.+/, + onMatch: function (value, state, stack, line) { + var indent = stack[2][0]; + var language = stack[2][1]; + var embedState = stack[1]; + if (modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }] + }, + { + token: 'constant.begin.javascript.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(ruby):$' + }, { + token: 'constant.begin.coffeescript.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(markdown):$' + }, { + token: 'constant.begin.css.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin.scss.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(sass):$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(less):$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(erb):$' + }, { + token: 'keyword.html.tags.slim', + regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b' + }, { + token: 'keyword.slim', + regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)' + }, { + token: "string", + regex: /^(\s*)('|\||\/|(\/!))\s*/, + onMatch: function (val, state, stack, line) { + var indent = /^\s*/.exec(line)[0]; + if (stack.length < 1) { + stack.push(this.next); + } + else { + stack[0] = "mlString"; + } + if (stack.length < 2) { + stack.push(indent.length); + } + else { + stack[1] = indent.length; + } + return this.token; + }, + next: "mlString" + }, { + token: 'keyword.control.slim', + regex: '^(\\s*)(\\-|==|=)', + push: [{ + token: 'control.end.slim', + regex: '$', + next: "pop" + }, { + include: "rubyline" + }, { + include: "misc" + }] + }, { + token: 'paren', + regex: '\\(', + push: [{ + token: 'paren', + regex: '\\)', + next: "pop" + }, { + include: "misc" + }] + }, { + token: 'paren', + regex: '\\[', + push: [{ + token: 'paren', + regex: '\\]', + next: "pop" + }, { + include: "misc" + }] + }, { + include: "misc" + } + ], + "mlString": [{ + token: "indent", + regex: /^\s*/, + onMatch: function (val, state, stack) { + var curIndent = stack[1]; + if (curIndent >= val.length) { + this.next = "start"; + stack.splice(0); + } + else { + this.next = "mlString"; + } + return this.token; + }, + next: "start" + }, { + defaultToken: "string" + }], + "rubyline": [{ + token: "keyword.operator.ruby.embedded.slim", + regex: "(==|=)(<>|><|<'|'<|<|>)?|-" + }, { + token: "list.ruby.operators.slim", + regex: "(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b" + }, { + token: "string", + regex: "['](.)*?[']" + }, { + token: "string", + regex: "[\"](.)*?[\"]" + }], + "misc": [{ + token: 'class.variable.slim', + regex: '\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b' + }, { + token: "list.meta.slim", + regex: "(\\b)(true|false|nil)(\\b)" + }, { + token: 'keyword.operator.equals.slim', + regex: '=' + }, { + token: "string", + regex: "['](.)*?[']" + }, { + token: "string", + regex: "[\"](.)*?[\"]" + }] + }; + this.normalizeRules(); +}; +oop.inherits(SlimHighlightRules, TextHighlightRules); +exports.SlimHighlightRules = SlimHighlightRules; + +}); + +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module){"use strict"; +var modes = require("../config").$modes; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var escaped = function (ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +}; +var MarkdownHighlightRules = function () { + HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token: "support.function", + regex: /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function (value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next: "githubblock" + }; + var codeBlockRules = [{ + token: "support.function", + regex: ".*", + onMatch: function (value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if (m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0]) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; + this.$rules["start"].unshift({ + token: "empty_line", + regex: '^$', + next: "allowBlock" + }, { + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token: function (value) { + return "markup.heading." + value.length; + }, + regex: /^#{1,6}(?=\s|$)/, + next: "header" + }, codeBlockStartRule, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + token: "constant", + regex: "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic" + }); + this.addRules({ + "basic": [{ + token: "constant.language.escape", + regex: /\\[\\`*_{}\[\]()#+\-.!]/ + }, { + token: "support.function", + regex: "(`+)(.*?[^`])(\\1)" + }, { + token: ["text", "constant", "text", "url", "string", "text"], + regex: "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { + token: ["text", "string", "text", "constant", "text"], + regex: "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)(" + escaped("]") + ")(\\])" + }, { + token: ["text", "string", "text", "markup.underline", "string", "text"], + regex: "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text + ")(\\]\\()" + // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { + token: "string.strong", + regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: "string.emphasis", + regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { + token: ["text", "url", "text"], + regex: "(<)(" + + "(?:https?|ftp|dict):[^'\">\\s]+" + + "|" + + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+" + + ")(>)" + }], + "allowBlock": [ + { token: "support.function", regex: "^ {4}.+", next: "allowBlock" }, + { token: "empty_line", regex: '^$', next: "allowBlock" }, + { token: "empty", regex: "", next: "start" } + ], + "header": [{ + regex: "$", + next: "start" + }, { + include: "basic" + }, { + defaultToken: "heading" + }], + "listblock-start": [{ + token: "support.variable", + regex: /(?:\[[ x]\])?/, + next: "listblock" + }], + "listblock": [{ + token: "empty_line", + regex: "^$", + next: "start" + }, { + token: "markup.list", + regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next: "listblock-start" + }, { + include: "basic", noEscape: true + }, + codeBlockStartRule, + { + defaultToken: "list" //do not use markup.list to allow stling leading `*` differntly + }], + "blockquote": [{ + token: "empty_line", + regex: "^\\s*$", + next: "start" + }, { + token: "string.blockquote", + regex: "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next: "blockquote" + }, { + include: "basic", noEscape: true + }, { + defaultToken: "string.blockquote" + }], + "githubblock": codeBlockRules + }); + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); +exports.MarkdownHighlightRules = MarkdownHighlightRules; + +}); + +define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: C5B73B98-5F2A-42E3-9F0E-028A74A9FE4B) +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; +var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; +var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +function mixin_embed(tag, prefix) { + return { + token: "entity.name.function.jade", + regex: "^\\s*\\:" + tag, + next: prefix + "start" + }; +} +var JadeHighlightRules = function () { + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + this.$rules = + { + "start": [ + { + token: "keyword.control.import.include.jade", + regex: "\\s*\\binclude\\b" + }, + { + token: "keyword.other.doctype.jade", + regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" + }, + { + onMatch: function (value, currentState, stack) { + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\//, + next: "comment_block" + }, + mixin_embed("markdown", "markdown-"), + mixin_embed("sass", "sass-"), + mixin_embed("less", "less-"), + mixin_embed("coffee", "coffee-"), + { + token: ["storage.type.function.jade", + "entity.name.function.jade", + "punctuation.definition.parameters.begin.jade", + "variable.parameter.function.jade", + "punctuation.definition.parameters.end.jade" + ], + regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))" + }, + { + token: ["storage.type.function.jade", "entity.name.function.jade"], + regex: "^(\\s*mixin)( [\\w\\-]+)" + }, + { + token: "source.js.embedded.jade", + regex: "^\\s*(?:-|=|!=)", + next: "js-start" + }, + { + token: "string.interpolated.jade", + regex: "[#!]\\{[^\\}]+\\}" + }, + { + token: "meta.tag.any.jade", + regex: /^\s*(?!\w+:)(?:[\w-]+|(?=\.|#)])/, + next: "tag_single" + }, + { + token: "suport.type.attribute.id.jade", + regex: "#\\w+" + }, + { + token: "suport.type.attribute.class.jade", + regex: "\\.\\w+" + }, + { + token: "punctuation", + regex: "\\s*(?:\\()", + next: "tag_attributes" + } + ], + "comment_block": [ + { regex: /^\s*(?:\/\/)?/, onMatch: function (value, currentState, stack) { + if (value.length <= stack[1]) { + if (value.slice(-1) == "/") { + stack[1] = value.length - 2; + this.next = ""; + return "comment"; + } + stack.shift(); + stack.shift(); + this.next = stack.shift(); + return "text"; + } + else { + this.next = ""; + return "comment"; + } + }, next: "start" }, + { defaultToken: "comment" } + ], + "tag_single": [ + { + token: "entity.other.attribute-name.class.jade", + regex: "\\.[\\w-]+" + }, + { + token: "entity.other.attribute-name.id.jade", + regex: "#[\\w-]+" + }, + { + token: ["text", "punctuation"], + regex: "($)|((?!\\.|#|=|-))", + next: "start" + } + ], + "tag_attributes": [ + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, + { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: ["entity.other.attribute-name.jade", "punctuation"], + regex: "([a-zA-Z:\\.-]+)(=)?", + next: "attribute_strings" + }, + { + token: "punctuation", + regex: "\\)", + next: "start" + } + ], + "attribute_strings": [ + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, + { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, + { + token: "string", + regex: '(?=\\S)', + next: "tag_attributes" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: '[^"\\\\]+' + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "tag_attributes" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "[^'\\\\]+" + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "tag_attributes" + } + ] + }; + this.embedRules(JavaScriptHighlightRules, "js-", [{ + token: "text", + regex: ".$", + next: "start" + }]); +}; +oop.inherits(JadeHighlightRules, TextHighlightRules); +exports.JadeHighlightRules = JadeHighlightRules; + +}); + +define("ace/mode/vue_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/typescript_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/stylus_highlight_rules","ace/mode/sass_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/tokenizer","ace/mode/slim_highlight_rules","ace/mode/jade_highlight_rules","ace/mode/javascript"], function(require, exports, module){"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var oop = require("../lib/oop"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; +var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules; +var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; +var Tokenizer = require("../tokenizer").Tokenizer; +var SlimHighlightRules = require("./slim_highlight_rules").SlimHighlightRules; +var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules; +var JavaScriptMode = require("./javascript").Mode; +var VueHighlightRules = function (options) { + this.embedLangRules = function (HighlightRules, tag, value, attribute) { + var condition = attribute ? "(?=[^>]*" + attribute + "\\s*=\\s*['\"]" + value + "['\"]))" : "(?=\\s|>|$))"; + this.$rules.start.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + condition, + next: [ + { + token: "meta.tag.punctuation.tag-close." + tag + ".xml", + regex: "/?>", + next: value + "-start" + }, { include: "attributes" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, { + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } + } + ]; + this.embedRules(HighlightRules, value + "-", [ + { + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + } + ]); + }; + var vueRules = [ + { + include: "vue-interpolations" + } + ]; + var VueRules = new HtmlHighlightRules().getRules(); + VueRules.start = vueRules.concat(VueRules.start); + VueRules["vue-interpolations"] = [ + { + token: "punctuation", + regex: /\{\{\{?/, + next: "js-interpolation-start" + } + ]; + var self = this; + VueRules.tag_stuff.unshift({ + token: "string", + regex: /(?:\b(v-)|(:|@))(\[?[a-zA-Z\-.]+\]?)(?:(\:\[?[a-zA-Z\-]+\]?))?(?:(\.[a-zA-Z\-]+))*(\s*)(=)(\s*)(["'])/, + onMatch: function (value, currentState, stack) { + var quote = value[value.length - 1]; + stack.unshift(quote, currentState); + var values = new RegExp(this.regex).exec(value); + if (!values) + return "text"; + var tokens = []; + var types = [ + "entity.other.attribute-name.xml", "punctuation.separator.key-value.xml", + "entity.other.attribute-name.xml", "entity.other.attribute-name.xml", "entity.other.attribute-name.xml", + "text", "punctuation.separator.key-value.xml", "text", "string" + ]; + for (var i = 0, l = types.length; i < l; i++) { + if (values[i + 1]) + tokens[tokens.length] = { + type: types[i], + value: values[i + 1] + }; + } + return tokens; + }, + next: [ + { + token: "string", + regex: /$/, + next: "tag_stuff" + }, { + token: "string", + regex: /.*/, + onMatch: function (value, currentState, stack, line) { + var quote = stack[0]; + var parts = value.split(quote); + var text = parts[0]; + this.next = ""; + if (parts.length > 1) { + stack.shift(); + var nextState = stack.shift(); + var currentData = new Tokenizer(self.$rules).getLineTokens(parts.slice(1).join(quote), nextState); + currentData.tokens.unshift({ + type: "string", + value: quote + }); + this.next = Array.isArray(currentData.state) ? currentData.state[currentData.state.length - 1] + : currentData.state; + } + var data = new JavaScriptMode().getTokenizer().getLineTokens(text, "start"); + var tokens = data.tokens; + if (currentData) { + tokens.push.apply(tokens, __spreadArray([], __read(currentData.tokens), false)); + } + return tokens; + } + } + ] + }, { + token: "string", + regex: '"', + next: [ + { + token: "string", + regex: '"|$', + next: "tag_stuff" + }, { + include: "vue-interpolations" + }, { + defaultToken: "string" + } + ] + }, { + token: "string", + regex: "'", + next: [ + { + token: "string", + regex: "'|$", + next: "tag_stuff" + }, { + include: "vue-interpolations" + }, { + defaultToken: "string" + } + ] + }); + this.$rules = VueRules; + this.embedRules(JavaScriptHighlightRules, "js-interpolation-", [ + { + token: "punctuation", + regex: /\}\}\}?/, + next: "start" + } + ]); + this.embedLangRules(CssHighlightRules, "style", "css"); + this.embedLangRules(StylusHighlightRules, "style", "stylus", "lang"); + this.embedLangRules(SassHighlightRules, "style", "sass", "lang"); + this.embedLangRules(ScssHighlightRules, "style", "scss", "lang"); + this.embedLangRules(LessHighlightRules, "style", "less", "lang"); + this.embedLangRules(TypeScriptHighlightRules, "script", "ts", "lang"); + this.embedLangRules(CoffeeHighlightRules, "script", "coffee", "lang"); + this.embedLangRules(SlimHighlightRules, "template", "slm", "lang"); + this.embedLangRules(JadeHighlightRules, "template", "jade", "lang"); + this.embedLangRules(StylusHighlightRules, "template", "stylus", "lang"); + this.normalizeRules(); +}; +oop.inherits(VueHighlightRules, HtmlHighlightRules); +exports.VueHighlightRules = VueHighlightRules; + +}); + +define("ace/mode/vue",["require","exports","module","ace/lib/oop","ace/mode/folding/html","ace/lib/lang","ace/mode/behaviour/xml","ace/mode/html_completions","ace/mode/html","ace/mode/vue_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var HtmlFoldMode = require("./folding/html").FoldMode; +var lang = require("../lib/lang"); +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var HTMLMode = require("./html").Mode; +var VueHighlightRules = require("./vue_highlight_rules").VueHighlightRules; +var voidElements = [ + "area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", + "track", "wbr" +]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; +var Mode = function () { + this.HighlightRules = VueHighlightRules; + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); +}; +oop.inherits(Mode, HTMLMode); +(function () { + this.blockComment = { + start: "" + }; + this.voidElements = lang.arrayToMap(voidElements); + this.getCompletions = function (state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + this.$id = "ace/mode/vue"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/vue"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-wollok.js b/ui/base1/ace/mode-wollok.js new file mode 100644 index 0000000..4c15fc3 --- /dev/null +++ b/ui/base1/ace/mode-wollok.js @@ -0,0 +1,1328 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsDocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"], + regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"], + regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/, + next: "pop" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "lparen.doc"], + regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|" + + "implements|external|exception|throws|enum|define|extends))(\\s*)({)", + push: [ + { + token: "lparen.doc", + regex: "{", + push: [ + { + include: "doc-syntax" + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + } + ] + }, { + token: "rparen.doc", + regex: "}|(?=$)", + next: "pop" + }, { + include: "doc-syntax" + }, { + defaultToken: "text.doc" + } + ] + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|" + + "requires|param|implements|function|extends|typedef|mixes|constructor|var|" + + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|" + + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?" + }, { + token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"], + regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)" + }, { + token: "comment.doc.tag", + regex: "@access\\s+(?:private|public|protected)" + }, { + token: "comment.doc.tag", + regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)" + }, { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, + JsDocCommentHighlightRules.getTagRule(), + { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ], + "doc-syntax": [{ + token: "operator.doc", + regex: /[|:]/ + }, { + token: "paren.doc", + regex: /[\[\]]/ + }] + }; + this.normalizeRules(); +}; +oop.inherits(JsDocCommentHighlightRules, TextHighlightRules); +JsDocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +JsDocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +JsDocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; +var JavaScriptHighlightRules = function (options) { + var keywords = { + "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document", // Pseudo + "keyword": "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor", + "storage.type": "const|let|var|function", + "constant.language": "null|Infinity|NaN|undefined", + "support.function": "alert", + "constant.language.boolean": "true|false" + }; + var keywordMapper = this.createKeywordMapper(keywords, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + var anonymousFunctionRe = "(function)(\\s*)(\\*?)"; + var functionCallStartRule = { + token: ["identifier", "text", "paren.lparen"], + regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()" + }; + this.$rules = { + "no_regex": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + functionCallStartRule, + { + token: "string", + regex: "'(?=.)", + next: "qstring" + }, { + token: "string", + regex: '"(?=.)', + next: "qqstring" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: "keyword", + regex: "from(?=\\s*('|\"))" + }, { + token: "keyword", + regex: "(?:" + kwBeforeRe + ")\\b", + next: "start" + }, { + token: "support.constant", + regex: /that\b/ + }, { + token: ["storage.type", "punctuation.operator", "support.function.firebug"], + regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/ + }, { + token: keywordMapper, + regex: identifierRe + }, { + token: "punctuation.operator", + regex: /[.](?![.])/, + next: "property" + }, { + token: "storage.type", + regex: /=>/, + next: "start" + }, { + token: "keyword.operator", + regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next: "start" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/, + next: "start" + }, { + token: "paren.lparen", + regex: /[\[({]/, + next: "start" + }, { + token: "paren.rparen", + regex: /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token: "text", + regex: "\\s+" + }, { + token: "keyword.operator", + regex: /=/ + }, { + token: [ + "storage.type", "text", "storage.type", "text", "paren.lparen" + ], + regex: anonymousFunctionRe + "(\\s*)(\\()", + next: "function_arguments" + }, { + token: [ + "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen" + ], + regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token: "punctuation.operator", + regex: /[.](?![.])/ + }, { + token: "support.function", + regex: "prototype" + }, { + token: "support.function", + regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token: "support.function.dom", + regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token: "support.constant", + regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token: "identifier", + regex: identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token: "text", + regex: "\\s+|^$", + next: "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token: "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token: "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "default_parameter": [ + { + token: "string", + regex: "'(?=.)", + push: [ + { + token: "string", + regex: "'|$", + next: "pop" + }, { + include: "qstring" + } + ] + }, { + token: "string", + regex: '"(?=.)', + push: [ + { + token: "string", + regex: '"|$', + next: "pop" + }, { + include: "qqstring" + } + ] + }, { + token: "constant.language", + regex: "null|Infinity|NaN|undefined" + }, { + token: "constant.numeric", // hexadecimal, octal and binary + regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token: "constant.numeric", // decimal integers and floats + regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token: "punctuation.operator", + regex: ",", + next: "function_arguments" + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "function_arguments": [ + comments("function_arguments"), + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "," + }, { + token: "text", + regex: "\\s+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: '"|$', + next: "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring": [ + { + token: "constant.language.escape", + regex: escapedRe + }, { + token: "string", + regex: "\\\\$", + consumeLineEnd: true + }, { + token: "string", + regex: "'|$", + next: "no_regex" + }, { + defaultToken: "string" + } + ] + }; + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function (val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token: "string.quasi.start", + regex: /`/, + push: [{ + token: "constant.language.escape", + regex: escapedRe + }, { + token: "paren.quasi.start", + regex: /\${/, + push: "start" + }, { + token: "string.quasi.end", + regex: /`/, + next: "pop" + }, { + defaultToken: "string.quasi" + }] + }, { + token: ["variable.parameter", "text"], + regex: "(" + identifierRe + ")(\\s*)(?=\\=>)" + }, { + token: "paren.lparen", + regex: "(\\()(?=[^\\(]+\\s*=>)", + next: "function_arguments" + }, { + token: "variable.language", + regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b" + }); + this.$rules["function_arguments"].unshift({ + token: "keyword.operator", + regex: "=", + next: "default_parameter" + }, { + token: "keyword.operator", + regex: "\\.{3}" + }); + this.$rules["property"].unshift({ + token: "support.function", + regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()" + }, { + token: "constant.language", + regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b" + }); + if (!options || options.jsx != false) + JSX.call(this); + } + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]); + this.normalizeRules(); +}; +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch: function (val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } + else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex: "))", + next: "jsxAttributes", + nextState: "jsx" + }; + this.$rules.start.unshift(jsxTag); + var jsxJsRule = { + regex: "{", + token: "paren.quasi.start", + push: "start" + }; + this.$rules.jsx = [ + jsxJsRule, + jsxTag, + { include: "reference" }, { defaultToken: "string.xml" } + ]; + this.$rules.jsxAttributes = [{ + token: "meta.tag.punctuation.tag-close.xml", + regex: "/?>", + onMatch: function (value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{ type: this.token, value: value }]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + token: "text.tag-whitespace.xml", + regex: "\\s+" + }, { + token: "string.attribute-value.xml", + regex: "'", + stateName: "jsx_attr_q", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + stateName: "jsx_attr_qq", + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} +function comments(next) { + return [ + { + token: "comment", // multi line comment + regex: /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "\\*\\/", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + }, { + token: "comment", + regex: "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + { token: "comment", regex: "$|^", next: next || "pop" }, + { defaultToken: "comment", caseInsensitive: true } + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token) + return; + if (token.value == '<') { + return { + text: ">", + selection: [1, 1] + }; + } + } + }); +}; +oop.inherits(JavaScriptBehaviour, CstyleBehaviour); +exports.JavaScriptBehaviour = JavaScriptBehaviour; + +}); + +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; + this.optionalEndTags = oop.mixin({}, this.voidElements); + if (optionalEndTags) + oop.mixin(this.optionalEndTags, optionalEndTags); +}; +oop.inherits(FoldMode, BaseFoldMode); +var Tag = function () { + this.tagName = ""; + this.closing = false; + this.selfClosing = false; + this.start = { row: 0, column: 0 }; + this.end = { row: 0, column: 0 }; +}; +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var XmlFoldMode = require("./xml").FoldMode; +var CFoldMode = require("./cstyle").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } + this.xmlFoldMode = new XmlFoldMode(); +}; +oop.inherits(FoldMode, CFoldMode); +(function () { + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + return this.xmlFoldMode.getFoldWidget(session, foldStyle, row); + } + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline); + if (range) + return range; + return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row); + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour; +var JavaScriptFoldMode = require("./folding/javascript").FoldMode; +var Mode = function () { + this.HighlightRules = JavaScriptHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new JavaScriptBehaviour(); + this.foldingRules = new JavaScriptFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.blockComment = { start: "/*", end: "*/" }; + this.$quotes = { '"': '"', "'": "'", "`": "`" }; + this.$pairQuotesAfter = { + "`": /\w/ + }; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (tokens.length && tokens[tokens.length - 1].type == "comment") { + return indent; + } + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/javascript"; + this.snippetFileId = "ace/snippets/javascript"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.doc.tag", + regex: "@\\w+(?=\\s|$)" + }, DocCommentHighlightRules.getTagRule(), { + defaultToken: "comment.doc.body", + caseInsensitive: true + } + ] + }; +}; +oop.inherits(DocCommentHighlightRules, TextHighlightRules); +DocCommentHighlightRules.getTagRule = function (start) { + return { + token: "comment.doc.tag.storage.type", + regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; +DocCommentHighlightRules.getStartRule = function (start) { + return { + token: "comment.doc", // doc comment + regex: /\/\*\*(?!\/)/, + next: start + }; +}; +DocCommentHighlightRules.getEndRule = function (start) { + return { + token: "comment.doc", // closing comment + regex: "\\*\\/", + next: start + }; +}; +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/wollok_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var WollokHighlightRules = function () { + var keywords = ("test|describe|package|inherits|false|import|else|or|class|and|not|native|override|program|self|try|const|var|catch|object|super|throw|if|null|return|true|new|constructor|method|mixin"); + var buildinConstants = ("null|assert|console"); + var langClasses = ("Object|Pair|String|Boolean|Number|Integer|Double|Collection|Set|List|Exception|Range" + + "|StackTraceElement"); + var keywordMapper = this.createKeywordMapper({ + "variable.language": "self", + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + this.$rules = { + "start": [ + { + token: "comment", + regex: "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token: "comment", // multi line comment + regex: "\\/\\*", + next: "comment" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // single line + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // hex + regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ + }, { + token: "constant.numeric", // float + regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token: "keyword.operator", + regex: "===|&&|\\*=|\\.\\.|\\*\\*|#|!|%|\\*|\\?:|\\+|\\/|,|\\+=|\\-|\\.\\.<|!==|:|\\/=|\\?\\.|\\+\\+|>|=|<|>=|=>|==|\\]|\\[|\\-=|\\->|\\||\\-\\-|<>|!=|%=|\\|" + }, { + token: "lparen", + regex: "[[({]" + }, { + token: "rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ], + "comment": [ + { + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + } + ] + }; + this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]); +}; +oop.inherits(WollokHighlightRules, TextHighlightRules); +exports.WollokHighlightRules = WollokHighlightRules; + +}); + +define("ace/mode/wollok",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/wollok_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var JavaScriptMode = require("./javascript").Mode; +var WollokHighlightRules = require("./wollok_highlight_rules").WollokHighlightRules; +var Mode = function () { + JavaScriptMode.call(this); + this.HighlightRules = WollokHighlightRules; +}; +oop.inherits(Mode, JavaScriptMode); +(function () { + this.createWorker = function (session) { + return null; + }; + this.$id = "ace/mode/wollok"; + this.snippetFileId = "ace/snippets/wollok"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/wollok"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-xml.js b/ui/base1/ace/mode-xml.js new file mode 100644 index 0000000..db1bf04 --- /dev/null +++ b/ui/base1/ace/mode-xml.js @@ -0,0 +1,477 @@ +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XmlHighlightRules = function (normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + this.$rules = { + start: [ + { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, + { + token: ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction" + }, + { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, + { + token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true + }, + { include: "tag" }, + { token: "text.end-tag-open.xml", regex: "", + next: "start" + }], + doctype: [ + { include: "whitespace" }, + { include: "string" }, + { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, + { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, + { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" } + ], + int_subset: [{ + token: "text.xml", + regex: "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex: "(<\\!)(" + tagRegex + ")", + push: [{ + token: "text", + regex: "\\s+" + }, + { + token: "punctuation.markup-decl.xml", + regex: ">", + next: "pop" + }, + { include: "string" }] + }], + cdata: [ + { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, + { token: "text.xml", regex: "\\s+" }, + { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" } + ], + comment: [ + { token: "comment.end.xml", regex: "-->", next: "start" }, + { defaultToken: "comment.xml" } + ], + reference: [{ + token: "constant.language.escape.reference.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + attr_reference: [{ + token: "constant.language.escape.reference.attribute-value.xml", + regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + tag: [{ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex: "(?:(<)|(", next: "start" } + ] + }], + tag_whitespace: [ + { token: "text.tag-whitespace.xml", regex: "\\s+" } + ], + whitespace: [ + { token: "text.whitespace.xml", regex: "\\s+" } + ], + string: [{ + token: "string.xml", + regex: "'", + push: [ + { token: "string.xml", regex: "'", next: "pop" }, + { defaultToken: "string.xml" } + ] + }, { + token: "string.xml", + regex: '"', + push: [ + { token: "string.xml", regex: '"', next: "pop" }, + { defaultToken: "string.xml" } + ] + }], + attributes: [{ + token: "entity.other.attribute-name.xml", + regex: tagRegex + }, { + token: "keyword.operator.attribute-equals.xml", + regex: "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + attribute_value: [{ + token: "string.attribute-value.xml", + regex: "'", + push: [ + { token: "string.attribute-value.xml", regex: "'", next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }, { + token: "string.attribute-value.xml", + regex: '"', + push: [ + { token: "string.attribute-value.xml", regex: '"', next: "pop" }, + { include: "attr_reference" }, + { defaultToken: "string.attribute-value.xml" } + ] + }] + }; + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; +(function () { + this.embedTagRules = function (HighlightRules, prefix, tag) { + this.$rules.tag.unshift({ + token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(<)(" + tag + "(?=\\s|>|$))", + next: [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" } + ] + }); + this.$rules[tag + "-end"] = [ + { include: "attributes" }, + { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", + onMatch: function (value, currentState, stack) { + stack.splice(0); + return this.token; + } } + ]; + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex: "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex: "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex: "\\]\\]>" + }]); + }; +}).call(TextHighlightRules.prototype); +oop.inherits(XmlHighlightRules, TextHighlightRules); +exports.XmlHighlightRules = XmlHighlightRules; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === " -1; +} +(function () { + this.getFoldWidget = function (session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + if (!tag) + return this.getCommentFoldWidget(session, row); + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle === "markbeginend" ? "end" : ""; + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + return "start"; + }; + this.getCommentFoldWidget = function (session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } + else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + return null; + }; + this._findEndTagInLine = function (session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn - 1) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (is(token, "tag-name") && token.value === "") { + token = tokens[i + 2]; + } + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + if (!firstTag) { + return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length); + } + var tags = session.getMatchingTags({ row: row, column: 0 }); + if (tags) { + return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = require("./folding/xml").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.voidElements = lang.arrayToMap([]); + this.blockComment = { start: "" }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + worker.on("error", function (e) { + session.setAnnotations(e.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/xml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/xml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-xquery.js b/ui/base1/ace/mode-xquery.js new file mode 100644 index 0000000..1f3d451 --- /dev/null +++ b/ui/base1/ace/mode-xquery.js @@ -0,0 +1,2589 @@ +define("ace/mode/xquery/xquery_lexer",["require","exports","module"], function(require, exports, module) { +module.exports = (function outer (modules, cache, entry) { + var previousRequire = typeof require == "function" && require; + function newRequire(name, jumped){ + if(!cache[name]) { + if(!modules[name]) { + var currentRequire = typeof require == "function" && require; + if (!jumped && currentRequire) return currentRequire(name, true); + if (previousRequire) return previousRequire(name, true); + var err = new Error('Cannot find module \'' + name + '\''); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + var m = cache[name] = {exports:{}}; + modules[name][0].call(m.exports, function(x){ + var id = modules[name][1][x]; + return newRequire(id ? id : x); + },m,m.exports,outer,modules,cache,entry); + } + return cache[name].exports; + } + for(var i=0;i= 0 ? XQueryTokenizer.TOKEN[o] : null; + }; + + this.getExpectedTokenSet = function(e) + { + var expected; + if (e.getExpected() < 0) + { + expected = XQueryTokenizer.getTokenSet(- e.getState()); + } + else + { + expected = [XQueryTokenizer.TOKEN[e.getExpected()]]; + } + return expected; + }; + + this.getErrorMessage = function(e) + { + var tokenSet = this.getExpectedTokenSet(e); + var found = this.getOffendingToken(e); + var prefix = input.substring(0, e.getBegin()); + var lines = prefix.split("\n"); + var line = lines.length; + var column = lines[line - 1].length + 1; + var size = e.getEnd() - e.getBegin(); + return e.getMessage() + + (found == null ? "" : ", found " + found) + + "\nwhile expecting " + + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + + "\n" + + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + + "at line " + line + ", column " + column + ":\n..." + + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + + "..."; + }; + + this.parse_start = function() + { + eventHandler.startNonterminal("start", e0); + lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | + switch (l1) + { + case 55: // '' | '=' | '>' + switch (l1) + { + case 58: // '>' + shift(58); // '>' + break; + case 50: // '/>' + shift(50); // '/>' + break; + case 27: // QName + shift(27); // QName + break; + case 57: // '=' + shift(57); // '=' + break; + case 35: // '"' + shift(35); // '"' + break; + case 38: // "'" + shift(38); // "'" + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("StartTag", e0); + }; + + this.parse_TagContent = function() + { + eventHandler.startNonterminal("TagContent", e0); + lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | + switch (l1) + { + case 23: // ElementContentChar + shift(23); // ElementContentChar + break; + case 6: // Tag + shift(6); // Tag + break; + case 7: // EndTag + shift(7); // EndTag + break; + case 55: // '' + switch (l1) + { + case 11: // CDataSectionContents + shift(11); // CDataSectionContents + break; + case 64: // ']]>' + shift(64); // ']]>' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("CData", e0); + }; + + this.parse_XMLComment = function() + { + eventHandler.startNonterminal("XMLComment", e0); + lookahead1(0); // DirCommentContents | EOF | '-->' + switch (l1) + { + case 9: // DirCommentContents + shift(9); // DirCommentContents + break; + case 47: // '-->' + shift(47); // '-->' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("XMLComment", e0); + }; + + this.parse_PI = function() + { + eventHandler.startNonterminal("PI", e0); + lookahead1(3); // DirPIContents | EOF | '?' | '?>' + switch (l1) + { + case 10: // DirPIContents + shift(10); // DirPIContents + break; + case 59: // '?' + shift(59); // '?' + break; + case 60: // '?>' + shift(60); // '?>' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("PI", e0); + }; + + this.parse_Pragma = function() + { + eventHandler.startNonterminal("Pragma", e0); + lookahead1(2); // PragmaContents | EOF | '#' | '#)' + switch (l1) + { + case 8: // PragmaContents + shift(8); // PragmaContents + break; + case 36: // '#' + shift(36); // '#' + break; + case 37: // '#)' + shift(37); // '#)' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("Pragma", e0); + }; + + this.parse_Comment = function() + { + eventHandler.startNonterminal("Comment", e0); + lookahead1(4); // CommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 52: // ':)' + shift(52); // ':)' + break; + case 41: // '(:' + shift(41); // '(:' + break; + case 30: // CommentContents + shift(30); // CommentContents + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("Comment", e0); + }; + + this.parse_CommentDoc = function() + { + eventHandler.startNonterminal("CommentDoc", e0); + lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 31: // DocTag + shift(31); // DocTag + break; + case 32: // DocCommentContents + shift(32); // DocCommentContents + break; + case 52: // ':)' + shift(52); // ':)' + break; + case 41: // '(:' + shift(41); // '(:' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("CommentDoc", e0); + }; + + this.parse_QuotString = function() + { + eventHandler.startNonterminal("QuotString", e0); + lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"' + switch (l1) + { + case 18: // PredefinedEntityRef + shift(18); // PredefinedEntityRef + break; + case 29: // CharRef + shift(29); // CharRef + break; + case 19: // EscapeQuot + shift(19); // EscapeQuot + break; + case 21: // QuotChar + shift(21); // QuotChar + break; + case 35: // '"' + shift(35); // '"' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("QuotString", e0); + }; + + this.parse_AposString = function() + { + eventHandler.startNonterminal("AposString", e0); + lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" + switch (l1) + { + case 18: // PredefinedEntityRef + shift(18); // PredefinedEntityRef + break; + case 29: // CharRef + shift(29); // CharRef + break; + case 20: // EscapeApos + shift(20); // EscapeApos + break; + case 22: // AposChar + shift(22); // AposChar + break; + case 38: // "'" + shift(38); // "'" + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("AposString", e0); + }; + + this.parse_Prefix = function() + { + eventHandler.startNonterminal("Prefix", e0); + lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_NCName(); + eventHandler.endNonterminal("Prefix", e0); + }; + + this.parse__EQName = function() + { + eventHandler.startNonterminal("_EQName", e0); + lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_EQName(); + eventHandler.endNonterminal("_EQName", e0); + }; + + function parse_EQName() + { + eventHandler.startNonterminal("EQName", e0); + switch (l1) + { + case 77: // 'attribute' + shift(77); // 'attribute' + break; + case 91: // 'comment' + shift(91); // 'comment' + break; + case 115: // 'document-node' + shift(115); // 'document-node' + break; + case 116: // 'element' + shift(116); // 'element' + break; + case 119: // 'empty-sequence' + shift(119); // 'empty-sequence' + break; + case 140: // 'function' + shift(140); // 'function' + break; + case 147: // 'if' + shift(147); // 'if' + break; + case 160: // 'item' + shift(160); // 'item' + break; + case 180: // 'namespace-node' + shift(180); // 'namespace-node' + break; + case 186: // 'node' + shift(186); // 'node' + break; + case 211: // 'processing-instruction' + shift(211); // 'processing-instruction' + break; + case 221: // 'schema-attribute' + shift(221); // 'schema-attribute' + break; + case 222: // 'schema-element' + shift(222); // 'schema-element' + break; + case 238: // 'switch' + shift(238); // 'switch' + break; + case 239: // 'text' + shift(239); // 'text' + break; + case 248: // 'typeswitch' + shift(248); // 'typeswitch' + break; + default: + parse_FunctionName(); + } + eventHandler.endNonterminal("EQName", e0); + } + + function parse_FunctionName() + { + eventHandler.startNonterminal("FunctionName", e0); + switch (l1) + { + case 14: // EQName^Token + shift(14); // EQName^Token + break; + case 65: // 'after' + shift(65); // 'after' + break; + case 68: // 'ancestor' + shift(68); // 'ancestor' + break; + case 69: // 'ancestor-or-self' + shift(69); // 'ancestor-or-self' + break; + case 70: // 'and' + shift(70); // 'and' + break; + case 74: // 'as' + shift(74); // 'as' + break; + case 75: // 'ascending' + shift(75); // 'ascending' + break; + case 79: // 'before' + shift(79); // 'before' + break; + case 83: // 'case' + shift(83); // 'case' + break; + case 84: // 'cast' + shift(84); // 'cast' + break; + case 85: // 'castable' + shift(85); // 'castable' + break; + case 88: // 'child' + shift(88); // 'child' + break; + case 89: // 'collation' + shift(89); // 'collation' + break; + case 98: // 'copy' + shift(98); // 'copy' + break; + case 100: // 'count' + shift(100); // 'count' + break; + case 103: // 'declare' + shift(103); // 'declare' + break; + case 104: // 'default' + shift(104); // 'default' + break; + case 105: // 'delete' + shift(105); // 'delete' + break; + case 106: // 'descendant' + shift(106); // 'descendant' + break; + case 107: // 'descendant-or-self' + shift(107); // 'descendant-or-self' + break; + case 108: // 'descending' + shift(108); // 'descending' + break; + case 113: // 'div' + shift(113); // 'div' + break; + case 114: // 'document' + shift(114); // 'document' + break; + case 117: // 'else' + shift(117); // 'else' + break; + case 118: // 'empty' + shift(118); // 'empty' + break; + case 121: // 'end' + shift(121); // 'end' + break; + case 123: // 'eq' + shift(123); // 'eq' + break; + case 124: // 'every' + shift(124); // 'every' + break; + case 126: // 'except' + shift(126); // 'except' + break; + case 129: // 'first' + shift(129); // 'first' + break; + case 130: // 'following' + shift(130); // 'following' + break; + case 131: // 'following-sibling' + shift(131); // 'following-sibling' + break; + case 132: // 'for' + shift(132); // 'for' + break; + case 141: // 'ge' + shift(141); // 'ge' + break; + case 143: // 'group' + shift(143); // 'group' + break; + case 145: // 'gt' + shift(145); // 'gt' + break; + case 146: // 'idiv' + shift(146); // 'idiv' + break; + case 148: // 'import' + shift(148); // 'import' + break; + case 154: // 'insert' + shift(154); // 'insert' + break; + case 155: // 'instance' + shift(155); // 'instance' + break; + case 157: // 'intersect' + shift(157); // 'intersect' + break; + case 158: // 'into' + shift(158); // 'into' + break; + case 159: // 'is' + shift(159); // 'is' + break; + case 165: // 'last' + shift(165); // 'last' + break; + case 167: // 'le' + shift(167); // 'le' + break; + case 169: // 'let' + shift(169); // 'let' + break; + case 173: // 'lt' + shift(173); // 'lt' + break; + case 175: // 'mod' + shift(175); // 'mod' + break; + case 176: // 'modify' + shift(176); // 'modify' + break; + case 177: // 'module' + shift(177); // 'module' + break; + case 179: // 'namespace' + shift(179); // 'namespace' + break; + case 181: // 'ne' + shift(181); // 'ne' + break; + case 193: // 'only' + shift(193); // 'only' + break; + case 195: // 'or' + shift(195); // 'or' + break; + case 196: // 'order' + shift(196); // 'order' + break; + case 197: // 'ordered' + shift(197); // 'ordered' + break; + case 201: // 'parent' + shift(201); // 'parent' + break; + case 207: // 'preceding' + shift(207); // 'preceding' + break; + case 208: // 'preceding-sibling' + shift(208); // 'preceding-sibling' + break; + case 213: // 'rename' + shift(213); // 'rename' + break; + case 214: // 'replace' + shift(214); // 'replace' + break; + case 215: // 'return' + shift(215); // 'return' + break; + case 219: // 'satisfies' + shift(219); // 'satisfies' + break; + case 224: // 'self' + shift(224); // 'self' + break; + case 230: // 'some' + shift(230); // 'some' + break; + case 231: // 'stable' + shift(231); // 'stable' + break; + case 232: // 'start' + shift(232); // 'start' + break; + case 243: // 'to' + shift(243); // 'to' + break; + case 244: // 'treat' + shift(244); // 'treat' + break; + case 245: // 'try' + shift(245); // 'try' + break; + case 249: // 'union' + shift(249); // 'union' + break; + case 251: // 'unordered' + shift(251); // 'unordered' + break; + case 255: // 'validate' + shift(255); // 'validate' + break; + case 261: // 'where' + shift(261); // 'where' + break; + case 265: // 'with' + shift(265); // 'with' + break; + case 269: // 'xquery' + shift(269); // 'xquery' + break; + case 67: // 'allowing' + shift(67); // 'allowing' + break; + case 76: // 'at' + shift(76); // 'at' + break; + case 78: // 'base-uri' + shift(78); // 'base-uri' + break; + case 80: // 'boundary-space' + shift(80); // 'boundary-space' + break; + case 81: // 'break' + shift(81); // 'break' + break; + case 86: // 'catch' + shift(86); // 'catch' + break; + case 93: // 'construction' + shift(93); // 'construction' + break; + case 96: // 'context' + shift(96); // 'context' + break; + case 97: // 'continue' + shift(97); // 'continue' + break; + case 99: // 'copy-namespaces' + shift(99); // 'copy-namespaces' + break; + case 101: // 'decimal-format' + shift(101); // 'decimal-format' + break; + case 120: // 'encoding' + shift(120); // 'encoding' + break; + case 127: // 'exit' + shift(127); // 'exit' + break; + case 128: // 'external' + shift(128); // 'external' + break; + case 136: // 'ft-option' + shift(136); // 'ft-option' + break; + case 149: // 'in' + shift(149); // 'in' + break; + case 150: // 'index' + shift(150); // 'index' + break; + case 156: // 'integrity' + shift(156); // 'integrity' + break; + case 166: // 'lax' + shift(166); // 'lax' + break; + case 187: // 'nodes' + shift(187); // 'nodes' + break; + case 194: // 'option' + shift(194); // 'option' + break; + case 198: // 'ordering' + shift(198); // 'ordering' + break; + case 217: // 'revalidation' + shift(217); // 'revalidation' + break; + case 220: // 'schema' + shift(220); // 'schema' + break; + case 223: // 'score' + shift(223); // 'score' + break; + case 229: // 'sliding' + shift(229); // 'sliding' + break; + case 235: // 'strict' + shift(235); // 'strict' + break; + case 246: // 'tumbling' + shift(246); // 'tumbling' + break; + case 247: // 'type' + shift(247); // 'type' + break; + case 252: // 'updating' + shift(252); // 'updating' + break; + case 256: // 'value' + shift(256); // 'value' + break; + case 257: // 'variable' + shift(257); // 'variable' + break; + case 258: // 'version' + shift(258); // 'version' + break; + case 262: // 'while' + shift(262); // 'while' + break; + case 92: // 'constraint' + shift(92); // 'constraint' + break; + case 171: // 'loop' + shift(171); // 'loop' + break; + default: + shift(216); // 'returning' + } + eventHandler.endNonterminal("FunctionName", e0); + } + + function parse_NCName() + { + eventHandler.startNonterminal("NCName", e0); + switch (l1) + { + case 26: // NCName^Token + shift(26); // NCName^Token + break; + case 65: // 'after' + shift(65); // 'after' + break; + case 70: // 'and' + shift(70); // 'and' + break; + case 74: // 'as' + shift(74); // 'as' + break; + case 75: // 'ascending' + shift(75); // 'ascending' + break; + case 79: // 'before' + shift(79); // 'before' + break; + case 83: // 'case' + shift(83); // 'case' + break; + case 84: // 'cast' + shift(84); // 'cast' + break; + case 85: // 'castable' + shift(85); // 'castable' + break; + case 89: // 'collation' + shift(89); // 'collation' + break; + case 100: // 'count' + shift(100); // 'count' + break; + case 104: // 'default' + shift(104); // 'default' + break; + case 108: // 'descending' + shift(108); // 'descending' + break; + case 113: // 'div' + shift(113); // 'div' + break; + case 117: // 'else' + shift(117); // 'else' + break; + case 118: // 'empty' + shift(118); // 'empty' + break; + case 121: // 'end' + shift(121); // 'end' + break; + case 123: // 'eq' + shift(123); // 'eq' + break; + case 126: // 'except' + shift(126); // 'except' + break; + case 132: // 'for' + shift(132); // 'for' + break; + case 141: // 'ge' + shift(141); // 'ge' + break; + case 143: // 'group' + shift(143); // 'group' + break; + case 145: // 'gt' + shift(145); // 'gt' + break; + case 146: // 'idiv' + shift(146); // 'idiv' + break; + case 155: // 'instance' + shift(155); // 'instance' + break; + case 157: // 'intersect' + shift(157); // 'intersect' + break; + case 158: // 'into' + shift(158); // 'into' + break; + case 159: // 'is' + shift(159); // 'is' + break; + case 167: // 'le' + shift(167); // 'le' + break; + case 169: // 'let' + shift(169); // 'let' + break; + case 173: // 'lt' + shift(173); // 'lt' + break; + case 175: // 'mod' + shift(175); // 'mod' + break; + case 176: // 'modify' + shift(176); // 'modify' + break; + case 181: // 'ne' + shift(181); // 'ne' + break; + case 193: // 'only' + shift(193); // 'only' + break; + case 195: // 'or' + shift(195); // 'or' + break; + case 196: // 'order' + shift(196); // 'order' + break; + case 215: // 'return' + shift(215); // 'return' + break; + case 219: // 'satisfies' + shift(219); // 'satisfies' + break; + case 231: // 'stable' + shift(231); // 'stable' + break; + case 232: // 'start' + shift(232); // 'start' + break; + case 243: // 'to' + shift(243); // 'to' + break; + case 244: // 'treat' + shift(244); // 'treat' + break; + case 249: // 'union' + shift(249); // 'union' + break; + case 261: // 'where' + shift(261); // 'where' + break; + case 265: // 'with' + shift(265); // 'with' + break; + case 68: // 'ancestor' + shift(68); // 'ancestor' + break; + case 69: // 'ancestor-or-self' + shift(69); // 'ancestor-or-self' + break; + case 77: // 'attribute' + shift(77); // 'attribute' + break; + case 88: // 'child' + shift(88); // 'child' + break; + case 91: // 'comment' + shift(91); // 'comment' + break; + case 98: // 'copy' + shift(98); // 'copy' + break; + case 103: // 'declare' + shift(103); // 'declare' + break; + case 105: // 'delete' + shift(105); // 'delete' + break; + case 106: // 'descendant' + shift(106); // 'descendant' + break; + case 107: // 'descendant-or-self' + shift(107); // 'descendant-or-self' + break; + case 114: // 'document' + shift(114); // 'document' + break; + case 115: // 'document-node' + shift(115); // 'document-node' + break; + case 116: // 'element' + shift(116); // 'element' + break; + case 119: // 'empty-sequence' + shift(119); // 'empty-sequence' + break; + case 124: // 'every' + shift(124); // 'every' + break; + case 129: // 'first' + shift(129); // 'first' + break; + case 130: // 'following' + shift(130); // 'following' + break; + case 131: // 'following-sibling' + shift(131); // 'following-sibling' + break; + case 140: // 'function' + shift(140); // 'function' + break; + case 147: // 'if' + shift(147); // 'if' + break; + case 148: // 'import' + shift(148); // 'import' + break; + case 154: // 'insert' + shift(154); // 'insert' + break; + case 160: // 'item' + shift(160); // 'item' + break; + case 165: // 'last' + shift(165); // 'last' + break; + case 177: // 'module' + shift(177); // 'module' + break; + case 179: // 'namespace' + shift(179); // 'namespace' + break; + case 180: // 'namespace-node' + shift(180); // 'namespace-node' + break; + case 186: // 'node' + shift(186); // 'node' + break; + case 197: // 'ordered' + shift(197); // 'ordered' + break; + case 201: // 'parent' + shift(201); // 'parent' + break; + case 207: // 'preceding' + shift(207); // 'preceding' + break; + case 208: // 'preceding-sibling' + shift(208); // 'preceding-sibling' + break; + case 211: // 'processing-instruction' + shift(211); // 'processing-instruction' + break; + case 213: // 'rename' + shift(213); // 'rename' + break; + case 214: // 'replace' + shift(214); // 'replace' + break; + case 221: // 'schema-attribute' + shift(221); // 'schema-attribute' + break; + case 222: // 'schema-element' + shift(222); // 'schema-element' + break; + case 224: // 'self' + shift(224); // 'self' + break; + case 230: // 'some' + shift(230); // 'some' + break; + case 238: // 'switch' + shift(238); // 'switch' + break; + case 239: // 'text' + shift(239); // 'text' + break; + case 245: // 'try' + shift(245); // 'try' + break; + case 248: // 'typeswitch' + shift(248); // 'typeswitch' + break; + case 251: // 'unordered' + shift(251); // 'unordered' + break; + case 255: // 'validate' + shift(255); // 'validate' + break; + case 257: // 'variable' + shift(257); // 'variable' + break; + case 269: // 'xquery' + shift(269); // 'xquery' + break; + case 67: // 'allowing' + shift(67); // 'allowing' + break; + case 76: // 'at' + shift(76); // 'at' + break; + case 78: // 'base-uri' + shift(78); // 'base-uri' + break; + case 80: // 'boundary-space' + shift(80); // 'boundary-space' + break; + case 81: // 'break' + shift(81); // 'break' + break; + case 86: // 'catch' + shift(86); // 'catch' + break; + case 93: // 'construction' + shift(93); // 'construction' + break; + case 96: // 'context' + shift(96); // 'context' + break; + case 97: // 'continue' + shift(97); // 'continue' + break; + case 99: // 'copy-namespaces' + shift(99); // 'copy-namespaces' + break; + case 101: // 'decimal-format' + shift(101); // 'decimal-format' + break; + case 120: // 'encoding' + shift(120); // 'encoding' + break; + case 127: // 'exit' + shift(127); // 'exit' + break; + case 128: // 'external' + shift(128); // 'external' + break; + case 136: // 'ft-option' + shift(136); // 'ft-option' + break; + case 149: // 'in' + shift(149); // 'in' + break; + case 150: // 'index' + shift(150); // 'index' + break; + case 156: // 'integrity' + shift(156); // 'integrity' + break; + case 166: // 'lax' + shift(166); // 'lax' + break; + case 187: // 'nodes' + shift(187); // 'nodes' + break; + case 194: // 'option' + shift(194); // 'option' + break; + case 198: // 'ordering' + shift(198); // 'ordering' + break; + case 217: // 'revalidation' + shift(217); // 'revalidation' + break; + case 220: // 'schema' + shift(220); // 'schema' + break; + case 223: // 'score' + shift(223); // 'score' + break; + case 229: // 'sliding' + shift(229); // 'sliding' + break; + case 235: // 'strict' + shift(235); // 'strict' + break; + case 246: // 'tumbling' + shift(246); // 'tumbling' + break; + case 247: // 'type' + shift(247); // 'type' + break; + case 252: // 'updating' + shift(252); // 'updating' + break; + case 256: // 'value' + shift(256); // 'value' + break; + case 258: // 'version' + shift(258); // 'version' + break; + case 262: // 'while' + shift(262); // 'while' + break; + case 92: // 'constraint' + shift(92); // 'constraint' + break; + case 171: // 'loop' + shift(171); // 'loop' + break; + default: + shift(216); // 'returning' + } + eventHandler.endNonterminal("NCName", e0); + } + + function shift(t) + { + if (l1 == t) + { + whitespace(); + eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); + b0 = b1; e0 = e1; l1 = 0; + } + else + { + error(b1, e1, 0, l1, t); + } + } + + function whitespace() + { + if (e0 != b1) + { + b0 = e0; + e0 = b1; + eventHandler.whitespace(b0, e0); + } + } + + function matchW(set) + { + var code; + for (;;) + { + code = match(set); + if (code != 28) // S^WS + { + break; + } + } + return code; + } + + function lookahead1W(set) + { + if (l1 == 0) + { + l1 = matchW(set); + b1 = begin; + e1 = end; + } + } + + function lookahead1(set) + { + if (l1 == 0) + { + l1 = match(set); + b1 = begin; + e1 = end; + } + } + + function error(b, e, s, l, t) + { + throw new self.ParseException(b, e, s, l, t); + } + + var lk, b0, e0; + var l1, b1, e1; + var eventHandler; + + var input; + var size; + var begin; + var end; + + function match(tokenSetId) + { + var nonbmp = false; + begin = end; + var current = end; + var result = XQueryTokenizer.INITIAL[tokenSetId]; + var state = 0; + + for (var code = result & 4095; code != 0; ) + { + var charclass; + var c0 = current < size ? input.charCodeAt(current) : 0; + ++current; + if (c0 < 0x80) + { + charclass = XQueryTokenizer.MAP0[c0]; + } + else if (c0 < 0xd800) + { + var c1 = c0 >> 4; + charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]]; + } + else + { + if (c0 < 0xdc00) + { + var c1 = current < size ? input.charCodeAt(current) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) + { + ++current; + c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; + nonbmp = true; + } + } + var lo = 0, hi = 5; + for (var m = 3; ; m = (hi + lo) >> 1) + { + if (XQueryTokenizer.MAP2[m] > c0) hi = m - 1; + else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1; + else {charclass = XQueryTokenizer.MAP2[12 + m]; break;} + if (lo > hi) {charclass = 0; break;} + } + } + + state = code; + var i0 = (charclass << 12) + code - 1; + code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]]; + + if (code > 4095) + { + result = code; + code &= 4095; + end = current; + } + } + + result >>= 12; + if (result == 0) + { + end = current - 1; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + return error(begin, end, state, -1, -1); + } + + if (nonbmp) + { + for (var i = result >> 9; i > 0; --i) + { + --end; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + } + } + else + { + end -= result >> 9; + } + + return (result & 511) - 1; + } +} + +XQueryTokenizer.getTokenSet = function(tokenSetId) +{ + var set = []; + var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; + for (var i = 0; i < 276; i += 32) + { + var j = i; + var i0 = (i >> 5) * 2062 + s - 1; + var i1 = i0 >> 2; + var i2 = i1 >> 2; + var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]]; + for ( ; f != 0; f >>>= 1, ++j) + { + if ((f & 1) != 0) + { + set.push(XQueryTokenizer.TOKEN[j]); + } + } + } + return set; +}; + +XQueryTokenizer.MAP0 = +[ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35 +]; + +XQueryTokenizer.MAP1 = +[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65 +]; + +XQueryTokenizer.MAP2 = +[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35 +]; + +XQueryTokenizer.INITIAL = +[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +]; + +XQueryTokenizer.TRANSITION = +[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008, 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233, 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008, 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987, 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370, 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888, 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855, 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888, 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518, 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694, 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701, 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401, 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505, 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654, 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964, 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279, 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711, 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831, 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935, 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222, 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946, 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008, 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233, 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067, 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386, 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401, 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193, 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552, 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851, 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224, 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659, 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401, 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211, 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185, 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401, 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358, 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418, 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540, 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211, 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659, 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419, 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982, 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462, 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164, 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211, 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211, 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607, 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086, 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057, 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613, 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344, 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211, 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799, 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930, 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085, 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729, 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189, 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568, 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121, 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619, 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211, 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086, 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836, 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211, 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986, 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500, 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356, 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989, 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211, 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890, 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211, 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601, 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260, 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261, 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488, 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248, 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490, 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274, 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782, 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888, 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261, 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888, 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888, 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628, 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401, 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895, 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738, 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678, 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888, 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217, 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473, 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783, 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837, 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888, 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523, 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938, 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574, 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016, 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835, 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181, 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888, 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334, 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437, 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497, 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401, 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401, 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851, 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000, 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888, 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401, 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058, 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144, 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856, 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889, 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367, 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572, 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764, 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942, 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211, 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590, 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123, 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963, 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097, 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442, 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775, 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284, 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679, 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211, 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659, 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853, 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113, 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413, 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164, 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211, 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890, 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211, 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123, 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086, 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105, 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782, 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154, 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666, 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211, 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739, 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778, 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447, 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008, 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059, 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121, 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211, 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836, 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211, 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888, 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893, 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064, 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890, 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888, 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211, 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100, 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888, 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888, 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346, 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67 +]; + +XQueryTokenizer.EXPECTED = +[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456 +]; + +XQueryTokenizer.TOKEN = +[ + "(0)", + "ModuleDecl", + "Annotation", + "OptionDecl", + "Operator", + "Variable", + "Tag", + "EndTag", + "PragmaContents", + "DirCommentContents", + "DirPIContents", + "CDataSectionContents", + "AttrTest", + "Wildcard", + "EQName", + "IntegerLiteral", + "DecimalLiteral", + "DoubleLiteral", + "PredefinedEntityRef", + "'\"\"'", + "EscapeApos", + "QuotChar", + "AposChar", + "ElementContentChar", + "QuotAttrContentChar", + "AposAttrContentChar", + "NCName", + "QName", + "S", + "CharRef", + "CommentContents", + "DocTag", + "DocCommentContents", + "EOF", + "'!'", + "'\"'", + "'#'", + "'#)'", + "''''", + "'('", + "'(#'", + "'(:'", + "'(:~'", + "')'", + "'*'", + "'*'", + "','", + "'-->'", + "'.'", + "'/'", + "'/>'", + "':'", + "':)'", + "';'", + "''), token: xmlcomment, next: function(stack){ stack.pop(); } } + ], + CData: [ + { name: 'CDataSectionContents', token: cdata }, + { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } } + ], + PI: [ + { name: 'DirPIContents', token: pi }, + { name: n('?'), token: pi }, + { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } } + ], + AposString: [ + { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } }, + { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, + { name: 'CharRef', token: 'constant.language.escape' }, + { name: 'EscapeApos', token: 'constant.language.escape' }, + { name: 'AposChar', token: 'string' } + ], + QuotString: [ + { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } }, + { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, + { name: 'CharRef', token: 'constant.language.escape' }, + { name: 'EscapeQuot', token: 'constant.language.escape' }, + { name: 'QuotChar', token: 'string' } + ] +}; + +exports.XQueryLexer = function(){ return new Lexer(XQueryTokenizer, Rules); }; +},{"./XQueryTokenizer":"/node_modules/xqlint/lib/lexers/XQueryTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}]},{},["/node_modules/xqlint/lib/lexers/xquery_lexer.js"]); + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} +var XmlBehaviour = function () { + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + if (!token) + token = iterator.stepBackward(); + if (!token) + return; + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (is(token, "") && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + if (!token) { + return; + } + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + if (this.voidElements && !this.voidElements[tag] || !this.voidElements) { + var nextToken = session.getTokenAt(cursor.row, cursor.column + 1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + if (nextToken && nextToken.value === "') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + var atCursor = false; + var state = JSON.parse(state).pop(); + if ((token && token.value === '>') || state !== "StartTag") + return; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))) { + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } + else { + atCursor = true; + } + var previous = iterator.stepBackward(); + if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { + return; + } + var tag = token.value.substring(1); + if (atCursor) { + var tag = tag.substring(0, position.column - token.start); + } + return { + text: '>' + '', + selection: [1, 1] + }; + } + }); +}; +oop.inherits(XQueryBehaviour, Behaviour); +exports.XQueryBehaviour = XQueryBehaviour; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { +"use strict"; + +var WorkerClient = require("../worker/worker_client").WorkerClient; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var XQueryLexer = require("./xquery/xquery_lexer").XQueryLexer; +var Range = require("../range").Range; +var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var Anchor = require("../anchor").Anchor; + +var Mode = function() { + this.$tokenizer = new XQueryLexer(); + this.$behaviour = new XQueryBehaviour(); + this.foldingRules = new CStyleFoldMode(); + this.$highlightRules = new TextHighlightRules(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.completer = { + getCompletions: function(editor, session, pos, prefix, callback) { + if (!session.$worker) + return callback(); + session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } }); + session.$worker.on("complete", function(e){ + callback(null, e.data); + }); + } + }; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); + if (match) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (! /^\s+$/.test(line)) + return false; + + return (/^\s*[\}\)]/).test(input); + }; + + this.autoOutdent = function(state, doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*[\}\)])/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.toggleCommentLines = function(state, doc, startRow, endRow) { + var i, line; + var outdent = true; + var re = /^\s*\(:(.*):\)/; + + for (i=startRow; i<= endRow; i++) { + if (!re.test(doc.getLine(i))) { + outdent = false; + break; + } + } + + var range = new Range(0, 0, 0, 0); + for (i=startRow; i<= endRow; i++) { + line = doc.getLine(i); + range.start.row = i; + range.end.row = i; + range.end.column = line.length; + + doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); + } + }; + + this.createWorker = function(session) { + + var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); + var that = this; + + worker.attachToDocument(session.getDocument()); + + worker.on("ok", function(e) { + session.clearAnnotations(); + }); + + worker.on("markers", function(e) { + session.clearAnnotations(); + that.addMarkers(e.data, session); + }); + + worker.on("highlight", function(tokens) { + that.$tokenizer.tokens = tokens.data.tokens; + that.$tokenizer.lines = session.getDocument().getAllLines(); + + var rows = Object.keys(that.$tokenizer.tokens); + for(var i=0; i < rows.length; i++) { + var row = parseInt(rows[i]); + delete session.bgTokenizer.lines[row]; + delete session.bgTokenizer.states[row]; + session.bgTokenizer.fireUpdateEvent(row, row); + } + }); + + return worker; + }; + + this.removeMarkers = function(session) { + var markers = session.getMarkers(false); + for (var id in markers) { + if (markers[id].clazz.indexOf('language_highlight_') === 0) { + session.removeMarker(id); + } + } + for (var i = 0; i < session.markerAnchors.length; i++) { + session.markerAnchors[i].detach(); + } + session.markerAnchors = []; + }; + + this.addMarkers = function(annos, mySession) { + var _self = this; + + if (!mySession.markerAnchors) mySession.markerAnchors = []; + this.removeMarkers(mySession); + mySession.languageAnnos = []; + annos.forEach(function(anno) { + var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0); + mySession.markerAnchors.push(anchor); + var markerId; + var colDiff = anno.pos.ec - anno.pos.sc; + var rowDiff = anno.pos.el - anno.pos.sl; + var gutterAnno = { + guttertext: anno.message, + type: anno.level || "warning", + text: anno.message + }; + + function updateFloat(single) { + if (markerId) + mySession.removeMarker(markerId); + gutterAnno.row = anchor.row; + if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) { + var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec); + markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default")); + } + if (single) mySession.setAnnotations(mySession.languageAnnos); + } + updateFloat(); + anchor.on("change", function() { + updateFloat(true); + }); + if (anno.message) mySession.languageAnnos.push(gutterAnno); + }); + mySession.setAnnotations(mySession.languageAnnos); + }; + + this.$id = "ace/mode/xquery"; + this.snippetFileId = "ace/snippets/xquery"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/xquery"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-yaml.js b/ui/base1/ace/mode-yaml.js new file mode 100644 index 0000000..7e49484 --- /dev/null +++ b/ui/base1/ace/mode-yaml.js @@ -0,0 +1,395 @@ +define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var YamlHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment", + regex: "#.*$" + }, { + token: "list.markup", + regex: /^(?:-{3}|\.{3})\s*(?=#|$)/ + }, { + token: "list.markup", + regex: /^\s*[\-?](?:$|\s)/ + }, { + token: "constant", + regex: "!![\\w//]+" + }, { + token: "constant.language", + regex: "[&\\*][a-zA-Z0-9-_]+" + }, { + token: ["meta.tag", "keyword"], + regex: /^(\s*\w[^\s:]*?)(:(?=\s|$))/ + }, { + token: ["meta.tag", "keyword"], + regex: /(\w[^\s:]*?)(\s*:(?=\s|$))/ + }, { + token: "keyword.operator", + regex: "<<\\w*:\\w*" + }, { + token: "keyword.operator", + regex: "-\\s*(?=[{])" + }, { + token: "string", // single line + regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token: "string", // multi line string start + regex: /[|>][-+\d]*(?:$|\s+(?:$|#))/, + onMatch: function (val, state, stack, line) { + line = line.replace(/ #.*/, ""); + var indent = /^ *((:\s*)?-(\s*[^|>])?)?/.exec(line)[0] + .replace(/\S\s*$/, "").length; + var indentationIndicator = parseInt(/\d+[\s+-]*$/.exec(line)); + if (indentationIndicator) { + indent += indentationIndicator - 1; + this.next = "mlString"; + } + else { + this.next = "mlStringPre"; + } + if (!stack.length) { + stack.push(this.next); + stack.push(indent); + } + else { + stack[0] = this.next; + stack[1] = indent; + } + return this.token; + }, + next: "mlString" + }, { + token: "string", // single quoted string + regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token: "constant.numeric", // float + regex: /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/ + }, { + token: "constant.numeric", // other number + regex: /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/ + }, { + token: "constant.language.boolean", + regex: "\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b" + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: /[^\s,:\[\]\{\}]+/ + } + ], + "mlStringPre": [ + { + token: "indent", + regex: /^ *$/ + }, { + token: "indent", + regex: /^ */, + onMatch: function (val, state, stack) { + var curIndent = stack[1]; + if (curIndent >= val.length) { + this.next = "start"; + stack.shift(); + stack.shift(); + } + else { + stack[1] = val.length - 1; + this.next = stack[0] = "mlString"; + } + return this.token; + }, + next: "mlString" + }, { + defaultToken: "string" + } + ], + "mlString": [ + { + token: "indent", + regex: /^ *$/ + }, { + token: "indent", + regex: /^ */, + onMatch: function (val, state, stack) { + var curIndent = stack[1]; + if (curIndent >= val.length) { + this.next = "start"; + stack.splice(0); + } + else { + this.next = "mlString"; + } + return this.token; + }, + next: "mlString" + }, { + token: "string", + regex: '.+' + } + ] + }; + this.normalizeRules(); +}; +oop.inherits(YamlHighlightRules, TextHighlightRules); +exports.YamlHighlightRules = YamlHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; +var Range = require("../range").Range; +var MatchingBraceOutdent = function () { }; +(function () { + this.checkOutdent = function (line, input) { + if (!/^\s+$/.test(line)) + return false; + return /^\s*\}/.test(input); + }; + this.autoOutdent = function (doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + if (!match) + return 0; + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({ row: row, column: column }); + if (!openBracePos || openBracePos.row == row) + return 0; + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column - 1), indent); + }; + this.$getIndent = function (line) { + return line.match(/^\s*/)[0]; + }; +}).call(MatchingBraceOutdent.prototype); +exports.MatchingBraceOutdent = MatchingBraceOutdent; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.commentBlock = function (session, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (line[level] != "#") + break; + endRow = row; + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidgetRange = function (session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + range = this.commentBlock(session, row); + if (range) + return range; + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/yaml",["require","exports","module","ace/lib/oop","ace/mode/folding/coffee","ace/range"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var CoffeeFoldMode = require("./coffee").FoldMode; +var Range = require("../../range").Range; +var FoldMode = exports.FoldMode = function () { }; +oop.inherits(FoldMode, CoffeeFoldMode); +(function () { + this.getFoldWidgetRange = function (session, foldStyle, row) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + var isCommentFold = line[startLevel] === "#"; + var isDashFold = line[startLevel] === "-"; + if (startLevel == -1) + return; + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (isCommentFold) { + var range = this.commentBlock(session, row); + if (range) + return range; + } + else if (isDashFold) { + var range = this.indentationBlock(session, row); + if (range) + return range; + } + else { + while (++row < maxRow) { + var line = session.getLine(row); + var level = line.search(re); + if (level == -1) + continue; + if (level <= startLevel && line[startLevel] !== '-') { + var token = session.getTokenAt(row, 0); + if (!token || token.type !== "string") + break; + } + endRow = row; + } + } + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + var lineStartsWithDash = line[indent] === '-'; + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } + else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + if (prevIndent != -1 && prevIndent < indent) { + session.foldWidgets[row - 1] = "start"; + } + else if (prevIndent != -1 && (prevIndent == indent && lineStartsWithDash)) { + session.foldWidgets[row - 1] = "start"; + } + else { + session.foldWidgets[row - 1] = ""; + } + if (indent < nextIndent) + return "start"; + else + return ""; + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/yaml","ace/worker/worker_client"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var FoldMode = require("./folding/yaml").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var Mode = function () { + this.HighlightRules = YamlHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = ["#"]; + this.getNextLineIndent = function (state, line, tab) { + var indent = this.$getIndent(line); + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + return indent; + }; + this.checkOutdent = function (state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + this.autoOutdent = function (state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + this.createWorker = function (session) { + var worker = new WorkerClient(["ace"], "ace/mode/yaml_worker", "YamlWorker"); + worker.attachToDocument(session.getDocument()); + worker.on("annotate", function (results) { + session.setAnnotations(results.data); + }); + worker.on("terminate", function () { + session.clearAnnotations(); + }); + return worker; + }; + this.$id = "ace/mode/yaml"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/yaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-zeek.js b/ui/base1/ace/mode-zeek.js new file mode 100644 index 0000000..f41868f --- /dev/null +++ b/ui/base1/ace/mode-zeek.js @@ -0,0 +1,502 @@ +define("ace/mode/zeek_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ZeekHighlightRules = function () { + this.$rules = { + "start": [ + { + token: "comment.line", + regex: "#.*$" + }, + { + token: "string.double", + regex: /"/, + next: "string-state" + }, + { + token: "string.regexp", + regex: "(/)(?=.*/)", + next: "pattern-state" + }, + { + token: ["keyword.other", "meta.preprocessor"], + regex: /(@(?:load-plugin|load-sigs|load|unload))(.*$)/ + }, + { + token: "keyword.other", + regex: /@(?:DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)/ + }, + { + token: [ + "keyword.other", + "meta.preprocessor", + "keyword.operator", + "meta.preprocessor" + ], + regex: /(@prefixes)(\s*)(\+?=)(.*$)/ + }, + { + token: "storage.modifier.attribute", + regex: /\&\b(?:redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|error_handler|type_column|deprecated)\b/ + }, + { + token: "constant.language", + regex: /\b(?:T|F)\b/ + }, + { + token: "constant.numeric.port", + regex: /\b\d{1,5}\/(?:udp|tcp|icmp|unknown)\b/ + }, + { + token: "constant.numeric.addr", + regex: /\b(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\b/, + comment: "IPv4 address" + }, + { + token: "constant.numeric.addr", + regex: /\[(?:[0-9a-fA-F]{0,4}:){2,7}(?:[0-9a-fA-F]{0,4})?(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2}))?\]/, + comment: "IPv6 address" + }, + { + token: "constant.numeric.float.decimal.interval", + regex: /(?:(?:\d*\.\d*(?:[eE][+-]?\d+)?|\d*[eE][+-]?\d+|\d*\.\d*)|\d+)\s*(?:day|hr|min|msec|usec|sec)s?/ + }, + { + token: "constant.numeric.float.decimal", + regex: /\d*\.\d*(?:[eE][+-]?\d+)?|\d*[eE][+-]?\d+|\d*\.\d*/ + }, + { + token: "constant.numeric.hostname", + regex: /\b[A-Za-z0-9][A-Za-z0-9\-]*(?:\.[A-Za-z0-9][A-Za-z0-9\-]*)+\b/ + }, + { + token: "constant.numeric.integer.hexadecimal", + regex: /\b0x[0-9a-fA-F]+\b/ + }, + { + token: "constant.numeric.integer.decimal", + regex: /\b\d+\b/ + }, + { + token: "keyword.operator", + regex: /==|!=|<=|<|>=|>/ + }, + { + token: "keyword.operator", + regex: /(&&)|(\|\|)|(!)/ + }, + { + token: "keyword.operator", + regex: /=|\+=|-=/ + }, + { + token: "keyword.operator", + regex: /\+\+|\+|--|-|\*|\/|%/ + }, + { + token: "keyword.operator", + regex: /&|\||\^|~/ + }, + { + token: "keyword.operator", + regex: /\b(?:in|as|is)\b/ + }, + { + token: "punctuation.terminator", + regex: /;/ + }, + { + token: "punctuation.accessor", + regex: /\??\$/ + }, + { + token: "punctuation.accessor", + regex: /::/ + }, + { + token: "keyword.operator", + regex: /\?/ + }, + { + token: "punctuation.separator", + regex: /:/ + }, + { + token: "punctuation.separator", + regex: /,/ + }, + { + token: [ + "keyword.other", + "meta.namespace", + "entity.name.namespace" + ], + regex: /(module)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)/ + }, + { + token: "keyword.other", + regex: /\bexport\b/ + }, + { + token: "keyword.control.conditional", + regex: /\b(?:if|else)\b/ + }, + { + token: "keyword.control", + regex: /\b(?:for|while)\b/ + }, + { + token: "keyword.control", + regex: /\b(?:return|break|next|continue|fallthrough)\b/ + }, + { + token: "keyword.control", + regex: /\b(?:switch|default|case)\b/ + }, + { + token: "keyword.other", + regex: /\b(?:add|delete)\b/ + }, + { + token: "keyword.other", + regex: /\bprint\b/ + }, + { + token: "keyword.control", + regex: /\b(?:when|timeout|schedule)\b/ + }, + { + token: [ + "keyword.other", + "meta.struct.record", + "entity.name.struct.record", + "meta.struct.record", + "punctuation.separator", + "meta.struct.record", + "storage.type.struct.record" + ], + regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(record)\b/ + }, + { + token: [ + "keyword.other", + "meta.enum", + "entity.name.enum", + "meta.enum", + "punctuation.separator", + "meta.enum", + "storage.type.enum" + ], + regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(enum)\b/ + }, + { + token: [ + "keyword.other", + "meta.type", + "entity.name.type", + "meta.type", + "punctuation.separator" + ], + regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)/ + }, + { + token: [ + "keyword.other", + "meta.struct.record", + "storage.type.struct.record", + "meta.struct.record", + "entity.name.struct.record" + ], + regex: /\b(redef)(\s+)(record)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/ + }, + { + token: [ + "keyword.other", + "meta.enum", + "storage.type.enum", + "meta.enum", + "entity.name.enum" + ], + regex: /\b(redef)(\s+)(enum)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/ + }, + { + token: [ + "storage.type", + "text", + "entity.name.function.event" + ], + regex: /\b(event)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/ + }, + { + token: [ + "storage.type", + "text", + "entity.name.function.hook" + ], + regex: /\b(hook)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/ + }, + { + token: [ + "storage.type", + "text", + "entity.name.function" + ], + regex: /\b(function)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/ + }, + { + token: "keyword.other", + regex: /\bredef\b/ + }, + { + token: "storage.type", + regex: /\bany\b/ + }, + { + token: "storage.type", + regex: /\b(?:enum|record|set|table|vector)\b/ + }, + { + token: [ + "storage.type", + "text", + "keyword.operator", + "text", + "storage.type" + ], + regex: /\b(opaque)(\s+)(of)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/ + }, + { + token: "keyword.operator", + regex: /\bof\b/ + }, + { + token: "storage.type", + regex: /\b(?:addr|bool|count|double|file|int|interval|pattern|port|string|subnet|time)\b/ + }, + { + token: "storage.type", + regex: /\b(?:function|hook|event)\b/ + }, + { + token: "storage.modifier", + regex: /\b(?:global|local|const|option)\b/ + }, + { + token: "entity.name.function.call", + regex: /\b[A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*(?=s*\()/ + }, + { + token: "punctuation.section.block.begin", + regex: /\{/ + }, + { + token: "punctuation.section.block.end", + regex: /\}/ + }, + { + token: "punctuation.section.brackets.begin", + regex: /\[/ + }, + { + token: "punctuation.section.brackets.end", + regex: /\]/ + }, + { + token: "punctuation.section.parens.begin", + regex: /\(/ + }, + { + token: "punctuation.section.parens.end", + regex: /\)/ + } + ], // state: start + "string-state": [ + { + token: "constant.character.escape", + regex: /\\./ + }, + { + token: "string.double", + regex: /"/, + next: "start" + }, + { + token: "constant.other.placeholder", + regex: /%-?[0-9]*(\.[0-9]+)?[DTdxsefg]/ + }, + { + token: "string.double", + regex: "." + } + ], // state: string-state + "pattern-state": [ + { + token: "constant.character.escape", + regex: /\\./ + }, + { + token: "string.regexp", + regex: "/", + next: "start" + }, + { + token: "string.regexp", + regex: "." + } + ] // state: pattern-state + }; + this.normalizeRules(); +}; +ZeekHighlightRules.metaData = { + fileTypes: ["bro", "zeek"], + name: "Zeek", + scopeName: "source.zeek" +}; +oop.inherits(ZeekHighlightRules, TextHighlightRules); +exports.ZeekHighlightRules = ZeekHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/zeek",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zeek_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* + THIS FILE WAS AUTOGENERATED BY mode.tmpl.js +*/ +"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ZeekHighlightRules = require("./zeek_highlight_rules").ZeekHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ZeekHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "#"; + this.$id = "ace/mode/zeek"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/zeek"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/mode-zig.js b/ui/base1/ace/mode-zig.js new file mode 100644 index 0000000..0aec1b8 --- /dev/null +++ b/ui/base1/ace/mode-zig.js @@ -0,0 +1,585 @@ +define("ace/mode/zig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var ZigHighlightRules = function () { + this.$rules = { + start: [{ + include: "#dummy_main" + }], + "#block": [{ + token: [ + "storage.type.zig", + "text", + "punctuation.section.braces.begin.zig" + ], + regex: /((?:[a-zA-Z_][\w.]*|@\".+\")?)(\s*)(\{)/, + push: [{ + token: "punctuation.section.braces.end.zig", + regex: /\}/, + next: "pop" + }, { + include: "#dummy_main" + }] + }], + "#character_escapes": [{ + token: "constant.character.escape.newline.zig", + regex: /\\n/ + }, { + token: "constant.character.escape.carrigereturn.zig", + regex: /\\r/ + }, { + token: "constant.character.escape.tabulator.zig", + regex: /\\t/ + }, { + token: "constant.character.escape.backslash.zig", + regex: /\\\\/ + }, { + token: "constant.character.escape.single-quote.zig", + regex: /\\'/ + }, { + token: "constant.character.escape.double-quote.zig", + regex: /\\\"/ + }, { + token: "constant.character.escape.hexidecimal.zig", + regex: /\\x[a-fA-F\d]{2}/ + }, { + token: "constant.character.escape.hexidecimal.zig", + regex: /\\u\{[a-fA-F\d]{1,6}\}/ + }], + "#comments": [{ + token: "comment.line.documentation.zig", + regex: /\/\/[!\/](?=[^\/])/, + push: [{ + token: "comment.line.documentation.zig", + regex: /$/, + next: "pop" + }, { + include: "#commentContents" + }, { + defaultToken: "comment.line.documentation.zig" + }] + }, { + token: "comment.line.double-slash.zig", + regex: /\/\//, + push: [{ + token: "comment.line.double-slash.zig", + regex: /$/, + next: "pop" + }, { + include: "#commentContents" + }, { + defaultToken: "comment.line.double-slash.zig" + }] + }], + "#commentContents": [{ + token: "keyword.todo.zig", + regex: /\b(?:TODO|FIXME|XXX|NOTE)\b:?/ + }], + "#constants": [{ + token: "constant.language.zig", + regex: /\b(?:null|undefined|true|false)\b/ + }, { + token: "constant.numeric.integer.zig", + regex: /\b(?!\.)-?[\d_]+(?!\.)\b/ + }, { + token: "constant.numeric.integer.hexadecimal.zig", + regex: /\b(?!\.)0x[a-fA-F\d_]+(?!\.)\b/ + }, { + token: "constant.numeric.integer.octal.zig", + regex: /\b(?!\.)0o[0-7_]+(?!\.)\b/ + }, { + token: "constant.numeric.integer.binary.zig", + regex: /\b(?!\.)0b[01_]+(?!\.)\b/ + }, { + token: "constant.numeric.float.zig", + regex: /(?!\.)-?\b[\d_]+(?:\.[\d_]+)?(?:[eE][+-]?[\d_]+)?(?!\.)\b/ + }, { + token: "constant.numeric.float.hexadecimal.zig", + regex: /(?!\.)-?\b0x[a-fA-F\d_]+(?:\.[a-fA-F\d_]+)?[pP]?(?:[+-]?[\d_]+)?(?!\.)\b/ + }], + "#container_decl": [{ + token: "entity.name.union.zig", + regex: /\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*union\s*[(\{])/ + }, { + token: "entity.name.struct.zig", + regex: /\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*struct\s*[(\{])/ + }, { + token: "entity.name.enum.zig", + regex: /\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*(?:extern|packed)?\b\s*enum\s*[(\{])/ + }, { + token: "entity.name.error.zig", + regex: /\b(?!\d)(?:[a-zA-Z_]\w*|@\".+\")?(?=\s*=\s*error\s*[(\{])/ + }, { + token: [ + "storage.type.error.zig", + "punctuation.accessor.zig", + "entity.name.error.zig" + ], + regex: /\b(error)(\.)([a-zA-Z_]\w*|@\".+\")/ + }], + "#dummy_main": [{ + include: "#label" + }, { + include: "#function_type" + }, { + include: "#function_def" + }, { + include: "#punctuation" + }, { + include: "#storage_modifier" + }, { + include: "#container_decl" + }, { + include: "#constants" + }, { + include: "#comments" + }, { + include: "#strings" + }, { + include: "#storage" + }, { + include: "#keywords" + }, { + include: "#operators" + }, { + include: "#support" + }, { + include: "#field_decl" + }, { + include: "#block" + }, { + include: "#function_call" + }, { + include: "#enum_literal" + }, { + include: "#variables" + }], + "#enum_literal": [{ + token: "constant.language.enum", + regex: /(?!\w|\)|\?|\}|\]|\*|\.)\.(?:[a-zA-Z_]\w*\b|@\"[^\"]*\")(?!\(|\s*=[^=>])/ + }], + "#field_decl": [{ + token: [ + "variable.other.member.zig", + "text", + "punctuation.separator.zig", + "text" + ], + regex: /([a-zA-Z_]\w*|@\".+\")(\s*)(:)(\s*)/, + push: [{ + token: [ + "storage.type.zig", + "text", + "punctuation.separator.zig", + "keyword.operator.assignment.zig" + ], + regex: /((?:[a-zA-Z_][\w.]*|@\".+\")?)(\s*)(?:(,)|(=)|$)/, + next: "pop" + }, { + include: "#dummy_main" + }] + }], + "#function_call": [{ + token: "variable.function.zig", + regex: /\b(?!fn)(?:[a-zA-Z_]\w*|@\".+\")(?=\s*\()/ + }], + "#keywords": [{ + token: "keyword.control.zig", + regex: /\b(?:while|for|break|return|continue|asm|defer|errdefer|unreachable)\b/ + }, { + token: "keyword.control.async.zig", + regex: /\b(?:async|await|suspend|nosuspend|resume)\b/ + }, { + token: "keyword.control.conditional.zig", + regex: /\b(?:if|else|switch|try|catch|orelse)\b/ + }, { + token: "keyword.control.import.zig", + regex: /\b(?!\w)(?:@import|@cImport|@cInclude)\b/ + }, { + token: "keyword.other.usingnamespace.zig", + regex: /\busingnamespace\b/ + }], + "#label": [{ + token: [ + "keyword.control.zig", + "text", + "entity.name.label.zig", + "entity.name.label.zig" + ], + regex: /\b(break|continue)(\s*:\s*)([a-zA-Z_]\w*|@\".+\")\b|\b(?!\d)([a-zA-Z_]\w*|@\".+\")\b(?=\s*:\s*(?:\{|while\b))/ + }], + "#operators": [{ + token: "keyword.operator.zig", + regex: /\b!\b/ + }, { + token: "keyword.operator.logical.zig", + regex: /==|(?:!|>|<)=?/ + }, { + token: "keyword.operator.word.zig", + regex: /\b(?:and|or)\b/ + }, { + token: "keyword.operator.assignment.zig", + regex: /(?:(?:\+|-|\*)\%?|\/|%|<<|>>|&|\|(?=[^\|])|\^)?=/ + }, { + token: "keyword.operator.arithmetic.zig", + regex: /(?:\+|-|\*)\%?|\/(?!\/)|%/ + }, { + token: "keyword.operator.bitwise.zig", + regex: /<<|>>|&(?=[a-zA-Z_]|@\")|\|(?=[^\|])|\^|~/ + }, { + token: "keyword.operator.other.zig", + regex: /\+\+|\*\*|->|\.\?|\.\*|&(?=[a-zA-Z_]|@\")|\?|\|\||\.{2,3}/ + }], + "#param_list": [{ + token: [ + "variable.parameter.zig", + "text", + "punctuation.separator.zig", + "text" + ], + regex: /([a-zA-Z_]\w*|@\".+\")(\s*)(:)(\s*)/, + push: [{ + token: [ + "storage.type.zig", + "text", + "punctuation.separator.zig", + "punctuation.section.parens.end.zig" + ], + regex: /((?:[a-zA-Z_][\w.]*|@\".+\")?)(\s*)(?:(,)|(\)))/, + next: "pop" + }, { + include: "#dummy_main" + }, { + token: "storage.type.zig", + regex: /[a-zA-Z_][\w.]*|@\".+\"/ + }] + }], + "#punctuation": [{ + token: "punctuation.separator.zig", + regex: /,/ + }, { + token: "punctuation.terminator.zig", + regex: /;/ + }, { + token: "punctuation.section.parens.begin.zig", + regex: /\(/ + }, { + token: "punctuation.section.parens.end.zig", + regex: /\)/ + }], + "#storage": [{ + token: "storage.type.zig", + regex: /\b(?:bool|void|noreturn|type|anyerror|anytype)\b/ + }, { + token: "storage.type.integer.zig", + regex: /\b(?!\.)(?:[iu]\d+|[iu]size|comptime_int)\b/ + }, { + token: "storage.type.float.zig", + regex: /\b(?:f16|f32|f64|f128|comptime_float)\b/ + }, { + token: "storage.type.c_compat.zig", + regex: /\b(?:c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\b/ + }, { + token: [ + "storage.type.zig", + "text", + "keyword.operator.zig", + "text", + "storage.type.zig" + ], + regex: /\b(anyframe)\b(\s*)((?:->)?)(\s*)(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())?/ + }, { + token: "storage.type.function.zig", + regex: /\bfn\b/ + }, { + token: "storage.type.test.zig", + regex: /\btest\b/ + }, { + token: "storage.type.struct.zig", + regex: /\bstruct\b/ + }, { + token: "storage.type.enum.zig", + regex: /\benum\b/ + }, { + token: "storage.type.union.zig", + regex: /\bunion\b/ + }, { + token: "storage.type.error.zig", + regex: /\berror\b/ + }], + "#storage_modifier": [{ + token: "storage.modifier.zig", + regex: /\b(?:const|var|extern|packed|export|pub|noalias|inline|noinline|comptime|volatile|align|linksection|threadlocal|allowzero)\b/ + }], + "#strings": [{ + token: "string.quoted.single.zig", + regex: /\'/, + push: [{ + token: "string.quoted.single.zig", + regex: /\'/, + next: "pop" + }, { + include: "#character_escapes" + }, { + token: "invalid.illegal.character.zig", + regex: /\\[^\'][^\']*?/ + }, { + defaultToken: "string.quoted.single.zig" + }] + }, { + token: "string.quoted.double.zig", + regex: /c?\"/, + push: [{ + token: "string.quoted.double.zig", + regex: /\"/, + next: "pop" + }, { + include: "#character_escapes" + }, { + token: "invalid.illegal.character.zig", + regex: /\\[^\'][^\']*?/ + }, { + defaultToken: "string.quoted.double.zig" + }] + }, { + token: "string.quoted.other.zig", + regex: /c?\\\\/, + push: [{ + token: "string.quoted.other.zig", + regex: /$/, + next: "pop" + }, { + defaultToken: "string.quoted.other.zig" + }] + }], + "#function_type": [{ + token: [ + "storage.type.function.zig", + "text", + "punctuation.section.parens.begin.zig" + ], + regex: /\b(fn)(\s*)(\()/, + push: [{ + token: [ + "text", + "storage.type.zig", + "text", + "keyword.operator.zig", + "text", + "storage.type.zig" + ], + regex: /(\s*)(?:([a-zA-Z_]\w*|@\".+\"))?(\s*)((?:!)?)(\s*)([a-zA-Z_]\w*|@\".+\")/, + next: "pop" + }, { + include: "#label" + }, { + include: "#param_list" + }, { + token: "storage.type.zig", + regex: /[a-zA-Z_]\w*|@\".+\"/ + }, { + include: "#dummy_main" + }, { + defaultToken: "meta.function.parameters.zig" + }] + }], + "#function_def": [{ + token: [ + "text", + "entity.name.function", + "punctuation.section.parens.begin.zig" + ], + regex: /(?=fn\s+)(\s+)([a-zA-Z_]\w*|@\".+\")(\()/, + push: [{ + token: [ + "text", + "storage.type.zig", + "keyword.operator.zig", + "text", + "storage.type.zig" + ], + regex: /(\s*)((?:[a-zA-Z_][\w.]*|@\".+\")?)((?:!)?)(\s*)(?:([a-zA-Z_][\w.]*|@\".+\")?)/, + next: "pop" + }, { + include: "#label" + }, { + include: "#param_list" + }, { + token: "storage.type.zig", + regex: /[a-zA-Z_][\w.]*|@\".+\"/ + }, { + include: "#dummy_main" + }] + }], + "#support": [{ + token: "support.function.zig", + regex: /\b@(?!\w|\"|[0-9])[a-zA-Z_]\w*\b/ + }], + "#variables": [{ + token: "variable.constant.zig", + regex: /\b[_A-Z][_A-Z0-9]+\b/ + }, { + token: "entity.name.type.zig", + regex: /\b[_a-zA-Z][_a-zA-Z0-9]*_t\b/ + }, { + token: "entity.name.type.zig", + regex: /\b[A-Z][a-zA-Z0-9]*\b/ + }, { + token: "variable.zig", + regex: /\b[_a-zA-Z][_a-zA-Z0-9]*\b/ + }] + }; + this.normalizeRules(); +}; +ZigHighlightRules.metaData = { + fileTypes: ["zig"], + keyEquivalent: "^~Z", + name: "Zig", + scopeName: "source.zig" +}; +oop.inherits(ZigHighlightRules, TextHighlightRules); +exports.ZigHighlightRules = ZigHighlightRules; + +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; +var FoldMode = exports.FoldMode = function (commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); + this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); + } +}; +oop.inherits(FoldMode, BaseFoldMode); +(function () { + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function (session, foldStyle, row) { + var line = session.getLine(row); + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + var fw = this._getFoldWidgetBase(session, foldStyle, row); + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + return fw; + }; + this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } + else if (foldStyle != "all") + range = null; + } + return range; + } + if (foldStyle === "markbegin") + return; + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + return session.getCommentFoldRange(row, i, -1); + } + }; + this.getSectionRange = function (session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } + else if (subRange.isMultiLine()) { + row = subRange.end.row; + } + else if (startIndent == indent) { + break; + } + } + endRow = row; + } + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function (session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + if (!depth) + break; + } + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; +}).call(FoldMode.prototype); + +}); + +define("ace/mode/zig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zig_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict"; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ZigHighlightRules = require("./zig_highlight_rules").ZigHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; +var Mode = function () { + this.HighlightRules = ZigHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); +(function () { + this.lineCommentStart = "//"; + this.$id = "ace/mode/zig"; +}).call(Mode.prototype); +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/zig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-ambiance.js b/ui/base1/ace/theme-ambiance.js new file mode 100644 index 0000000..7ed8808 --- /dev/null +++ b/ui/base1/ace/theme-ambiance.js @@ -0,0 +1,18 @@ +define("ace/theme/ambiance-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-ambiance .ace_gutter {\n background-color: #3d3d3d;\n background-image: linear-gradient(left, #3D3D3D, #333);\n background-repeat: repeat-x;\n border-right: 1px solid #4d4d4d;\n text-shadow: 0px 1px 1px #4d4d4d;\n color: #222;\n}\n\n.ace-ambiance .ace_gutter-layer {\n background: repeat left top;\n}\n\n.ace-ambiance .ace_gutter-active-line {\n background-color: #3F3F3F;\n}\n\n.ace-ambiance .ace_fold-widget {\n text-align: center;\n}\n\n.ace-ambiance .ace_fold-widget:hover {\n color: #777;\n}\n\n.ace-ambiance .ace_fold-widget.ace_start,\n.ace-ambiance .ace_fold-widget.ace_end,\n.ace-ambiance .ace_fold-widget.ace_closed{\n background: none !important;\n border: none;\n box-shadow: none;\n}\n\n.ace-ambiance .ace_fold-widget.ace_start:after {\n content: '\u25BE'\n}\n\n.ace-ambiance .ace_fold-widget.ace_end:after {\n content: '\u25B4'\n}\n\n.ace-ambiance .ace_fold-widget.ace_closed:after {\n content: '\u2023'\n}\n\n.ace-ambiance .ace_print-margin {\n border-left: 1px dotted #2D2D2D;\n right: 0;\n background: #262626;\n}\n\n.ace-ambiance .ace_scroller {\n -webkit-box-shadow: inset 0 0 10px black;\n -moz-box-shadow: inset 0 0 10px black;\n -o-box-shadow: inset 0 0 10px black;\n box-shadow: inset 0 0 10px black;\n}\n\n.ace-ambiance {\n color: #E6E1DC;\n background-color: #202020;\n}\n\n.ace-ambiance .ace_cursor {\n border-left: 1px solid #7991E8;\n}\n\n.ace-ambiance .ace_overwrite-cursors .ace_cursor {\n border: 1px solid #FFE300;\n background: #766B13;\n}\n\n.ace-ambiance.normal-mode .ace_cursor-layer {\n z-index: 0;\n}\n \n.ace-ambiance .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-ambiance .ace_marker-layer .ace_selected-word {\n border-radius: 4px;\n border: 8px solid #3f475d;\n box-shadow: 0 0 4px black;\n}\n\n.ace-ambiance .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-ambiance .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-ambiance .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n.ace-ambiance .ace_invisible {\n color: #333;\n}\n\n.ace-ambiance .ace_paren {\n color: #24C2C7;\n}\n\n.ace-ambiance .ace_keyword {\n color: #cda869;\n}\n\n.ace-ambiance .ace_keyword.ace_operator {\n color: #fa8d6a;\n}\n\n.ace-ambiance .ace_punctuation.ace_operator {\n color: #fa8d6a;\n}\n\n.ace-ambiance .ace_identifier {\n}\n\n.ace-ambiance .ace-statement {\n color: #cda869;\n}\n\n.ace-ambiance .ace_constant {\n color: #CF7EA9;\n}\n\n.ace-ambiance .ace_constant.ace_language {\n color: #CF7EA9;\n}\n\n.ace-ambiance .ace_constant.ace_library {\n \n}\n\n.ace-ambiance .ace_constant.ace_numeric {\n color: #78CF8A;\n}\n\n.ace-ambiance .ace_invalid {\n text-decoration: underline;\n}\n\n.ace-ambiance .ace_invalid.ace_illegal {\n color:#F8F8F8;\n background-color: rgba(86, 45, 86, 0.75);\n}\n\n.ace-ambiance .ace_invalid,\n.ace-ambiance .ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1;\n}\n\n.ace-ambiance .ace_support {\n color: #9B859D;\n}\n\n.ace-ambiance .ace_support.ace_function {\n color: #DAD085;\n}\n\n.ace-ambiance .ace_function.ace_buildin {\n color: #9b859d;\n}\n\n.ace-ambiance .ace_string {\n color: #8f9d6a;\n}\n\n.ace-ambiance .ace_string.ace_regexp {\n color: #DAD085;\n}\n\n.ace-ambiance .ace_comment {\n font-style: italic;\n color: #555;\n}\n\n.ace-ambiance .ace_comment.ace_doc {\n}\n\n.ace-ambiance .ace_comment.ace_doc.ace_tag {\n color: #666;\n font-style: normal;\n}\n\n.ace-ambiance .ace_definition,\n.ace-ambiance .ace_type {\n color: #aac6e3;\n}\n\n.ace-ambiance .ace_variable {\n color: #9999cc;\n}\n\n.ace-ambiance .ace_variable.ace_language {\n color: #9b859d;\n}\n\n.ace-ambiance .ace_xml-pe {\n color: #494949;\n}\n\n.ace-ambiance .ace_gutter-layer,\n.ace-ambiance .ace_text-layer {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");\n}\n\n.ace-ambiance .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\n}\n\n.ace-ambiance .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/ambiance",["require","exports","module","ace/theme/ambiance-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-ambiance"; +exports.cssText = require("./ambiance-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/ambiance"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-chaos.js b/ui/base1/ace/theme-chaos.js new file mode 100644 index 0000000..7fb2e05 --- /dev/null +++ b/ui/base1/ace/theme-chaos.js @@ -0,0 +1,18 @@ +define("ace/theme/chaos-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-chaos .ace_gutter {\n background: #141414;\n color: #595959;\n border-right: 1px solid #282828;\n}\n.ace-chaos .ace_gutter-cell.ace_warning {\n background-image: none;\n background: #FC0;\n border-left: none;\n padding-left: 0;\n color: #000;\n}\n.ace-chaos .ace_gutter-cell.ace_error {\n background-position: -6px center;\n background-image: none;\n background: #F10;\n border-left: none;\n padding-left: 0;\n color: #000;\n}\n.ace-chaos .ace_print-margin {\n border-left: 1px solid #555;\n right: 0;\n background: #1D1D1D;\n}\n.ace-chaos {\n background-color: #161616;\n color: #E6E1DC;\n}\n\n.ace-chaos .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n.ace-chaos .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n.ace-chaos .ace_marker-layer .ace_selection {\n background: #494836;\n}\n.ace-chaos .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n.ace-chaos .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #FCE94F;\n}\n.ace-chaos .ace_marker-layer .ace_active-line {\n background: #333;\n}\n.ace-chaos .ace_gutter-active-line {\n background-color: #222;\n}\n.ace-chaos .ace_invisible {\n color: #404040;\n}\n.ace-chaos .ace_keyword {\n color:#00698F;\n}\n.ace-chaos .ace_keyword.ace_operator {\n color:#FF308F;\n}\n.ace-chaos .ace_constant {\n color:#1EDAFB;\n}\n.ace-chaos .ace_constant.ace_language {\n color:#FDC251;\n}\n.ace-chaos .ace_constant.ace_library {\n color:#8DFF0A;\n}\n.ace-chaos .ace_constant.ace_numeric {\n color:#58C554;\n}\n.ace-chaos .ace_invalid {\n color:#FFFFFF;\n background-color:#990000;\n}\n.ace-chaos .ace_invalid.ace_deprecated {\n color:#FFFFFF;\n background-color:#990000;\n}\n.ace-chaos .ace_support {\n color: #999;\n}\n.ace-chaos .ace_support.ace_function {\n color:#00AEEF;\n}\n.ace-chaos .ace_function {\n color:#00AEEF;\n}\n.ace-chaos .ace_string {\n color:#58C554;\n}\n.ace-chaos .ace_comment {\n color:#555;\n font-style:italic;\n padding-bottom: 0px;\n}\n.ace-chaos .ace_variable {\n color:#997744;\n}\n.ace-chaos .ace_meta.ace_tag {\n color:#BE53E6;\n}\n.ace-chaos .ace_entity.ace_other.ace_attribute-name {\n color:#FFFF89;\n}\n.ace-chaos .ace_markup.ace_underline {\n text-decoration: underline;\n}\n.ace-chaos .ace_fold-widget {\n text-align: center;\n}\n\n.ace-chaos .ace_fold-widget:hover {\n color: #777;\n}\n\n.ace-chaos .ace_fold-widget.ace_start,\n.ace-chaos .ace_fold-widget.ace_end,\n.ace-chaos .ace_fold-widget.ace_closed{\n background: none !important;\n border: none;\n box-shadow: none;\n}\n\n.ace-chaos .ace_fold-widget.ace_start:after {\n content: '\u25BE'\n}\n\n.ace-chaos .ace_fold-widget.ace_end:after {\n content: '\u25B4'\n}\n\n.ace-chaos .ace_fold-widget.ace_closed:after {\n content: '\u2023'\n}\n\n.ace-chaos .ace_indent-guide {\n border-right:1px dotted #333333;\n margin-right:-1px;\n}\n\n.ace-chaos .ace_indent-guide-active {\n border-right:1px dotted #afafaf;\n margin-right:-1px;\n}\n\n.ace-chaos .ace_fold { \n background: #222; \n border-radius: 3px; \n color: #7AF; \n border: none; \n}\n.ace-chaos .ace_fold:hover {\n background: #CCC; \n color: #000;\n}\n"; + +}); + +define("ace/theme/chaos",["require","exports","module","ace/theme/chaos-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-chaos"; +exports.cssText = require("./chaos-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/chaos"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-chrome.js b/ui/base1/ace/theme-chrome.js new file mode 100644 index 0000000..fdff3ba --- /dev/null +++ b/ui/base1/ace/theme-chrome.js @@ -0,0 +1,18 @@ +define("ace/theme/chrome-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-chrome .ace_gutter {\n background: #ebebeb;\n color: #333;\n overflow : hidden;\n}\n\n.ace-chrome .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-chrome {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-chrome .ace_cursor {\n color: black;\n}\n\n.ace-chrome .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-chrome .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-chrome .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-chrome .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-chrome .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-chrome .ace_fold {\n}\n\n.ace-chrome .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-chrome .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-chrome .ace_support.ace_type,\n.ace-chrome .ace_support.ace_class\n.ace-chrome .ace_support.ace_other {\n color: rgb(109, 121, 222);\n}\n\n.ace-chrome .ace_variable.ace_parameter {\n font-style:italic;\n color:#FD971F;\n}\n.ace-chrome .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-chrome .ace_comment {\n color: #236e24;\n}\n\n.ace-chrome .ace_comment.ace_doc {\n color: #236e24;\n}\n\n.ace-chrome .ace_comment.ace_doc.ace_tag {\n color: #236e24;\n}\n\n.ace-chrome .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-chrome .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-chrome .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-chrome .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-chrome .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-chrome .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-chrome .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-chrome .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-chrome .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-chrome .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-chrome .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-chrome .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-chrome .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-chrome .ace_storage,\n.ace-chrome .ace_keyword,\n.ace-chrome .ace_meta.ace_tag {\n color: rgb(147, 15, 128);\n}\n\n.ace-chrome .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-chrome .ace_string {\n color: #1A1AA6;\n}\n\n.ace-chrome .ace_entity.ace_other.ace_attribute-name {\n color: #994409;\n}\n\n.ace-chrome .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n \n.ace-chrome .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-chrome"; +exports.cssText = require("./chrome-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/chrome"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-cloud9_day.js b/ui/base1/ace/theme-cloud9_day.js new file mode 100644 index 0000000..2c89784 --- /dev/null +++ b/ui/base1/ace/theme-cloud9_day.js @@ -0,0 +1,19 @@ +define("ace/theme/cloud9_day-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-cloud9-day .ace_gutter {\n background: #ECECEC;\n color: #333;\n}\n\n.ace-cloud9-day .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cloud9-day .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-cloud9-day {\n background-color: #FBFBFB;\n color: black;\n}\n\n.ace-cloud9-day .ace_cursor {\n color: black;\n}\n\n.ace-cloud9-day .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-cloud9-day .ace_storage,\n.ace-cloud9-day .ace_keyword {\n color: rgb(24, 122, 234);\n}\n\n.ace-cloud9-day .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-cloud9-day .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-cloud9-day .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-cloud9-day .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-cloud9-day .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-cloud9-day .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-cloud9-day .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-cloud9-day .ace_support.ace_type,\n.ace-cloud9-day .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-cloud9-day .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-cloud9-day .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-cloud9-day .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-cloud9-day .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-cloud9-day .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-cloud9-day .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-cloud9-day .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-cloud9-day .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-cloud9-day .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-cloud9-day .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-cloud9-day .ace_list {\n color: rgb(185, 6, 144);\n}\n\n.ace-cloud9-day .ace_meta.ace_tag {\n color: rgb(0, 22, 142);\n}\n\n.ace-cloud9-day .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-cloud9-day.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_step {\n background: rgb(247, 237, 137);\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_stack {\n background: #BAE0A0;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-cloud9-day .ace_gutter-active-line {\n background-color: #E5E5E5;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-cloud9-day .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-cloud9-day .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/cloud9_day",["require","exports","module","ace/theme/cloud9_day-css","ace/lib/dom"], function(require, exports, module){"use strict"; +exports.isDark = false; +exports.cssClass = "ace-cloud9-day"; +exports.cssText = require("./cloud9_day-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); (function() { + window.require(["ace/theme/cloud9_day"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-cloud9_night.js b/ui/base1/ace/theme-cloud9_night.js new file mode 100644 index 0000000..27581bf --- /dev/null +++ b/ui/base1/ace/theme-cloud9_night.js @@ -0,0 +1,18 @@ +define("ace/theme/cloud9_night-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-cloud9-night .ace_gutter {\n background: #303130;\n color: #eee\n}\n\n.ace-cloud9-night .ace_print-margin {\n width: 1px;\n background: #222\n}\n\n.ace-cloud9-night {\n background-color: #181818;\n color: #EBEBEB\n}\n\n.ace-cloud9-night .ace_cursor {\n color: #9F9F9F\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_selection {\n background: #424242\n}\n\n.ace-cloud9-night.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #000000;\n border-radius: 2px\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #888888\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_highlight {\n border: 1px solid rgb(110, 119, 0);\n border-bottom: 0;\n box-shadow: inset 0 -1px rgb(110, 119, 0);\n margin: -1px 0 0 -1px;\n background: rgba(255, 235, 0, 0.1);\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_active-line {\n background: #292929\n}\n\n.ace-cloud9-night .ace_gutter-active-line {\n background-color: #3D3D3D\n}\n\n.ace-cloud9-night .ace_stack {\n background-color: rgb(66, 90, 44)\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_selected-word {\n border: 1px solid #888888\n}\n\n.ace-cloud9-night .ace_invisible {\n color: #343434\n}\n\n.ace-cloud9-night .ace_keyword,\n.ace-cloud9-night .ace_meta,\n.ace-cloud9-night .ace_storage,\n.ace-cloud9-night .ace_storage.ace_type,\n.ace-cloud9-night .ace_support.ace_type {\n color: #C397D8\n}\n\n.ace-cloud9-night .ace_keyword.ace_operator {\n color: #70C0B1\n}\n\n.ace-cloud9-night .ace_constant.ace_character,\n.ace-cloud9-night .ace_constant.ace_language,\n.ace-cloud9-night .ace_constant.ace_numeric,\n.ace-cloud9-night .ace_keyword.ace_other.ace_unit,\n.ace-cloud9-night .ace_support.ace_constant,\n.ace-cloud9-night .ace_variable.ace_parameter {\n color: #E78C45\n}\n\n.ace-cloud9-night .ace_constant.ace_other {\n color: #EEEEEE\n}\n\n.ace-cloud9-night .ace_invalid {\n color: #CED2CF;\n background-color: #DF5F5F\n}\n\n.ace-cloud9-night .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-cloud9-night .ace_fold {\n background-color: #7AA6DA;\n border-color: #DEDEDE\n}\n\n.ace-cloud9-night .ace_entity.ace_name.ace_function,\n.ace-cloud9-night .ace_support.ace_function,\n.ace-cloud9-night .ace_variable:not(.ace_parameter),\n.ace-cloud9-night .ace_constant:not(.ace_numeric) {\n color: #7AA6DA\n}\n\n.ace-cloud9-night .ace_support.ace_class,\n.ace-cloud9-night .ace_support.ace_type {\n color: #E7C547\n}\n\n.ace-cloud9-night .ace_heading,\n.ace-cloud9-night .ace_markup.ace_heading,\n.ace-cloud9-night .ace_string {\n color: #B9CA4A\n}\n\n.ace-cloud9-night .ace_entity.ace_name.ace_tag,\n.ace-cloud9-night .ace_entity.ace_other.ace_attribute-name,\n.ace-cloud9-night .ace_meta.ace_tag,\n.ace-cloud9-night .ace_string.ace_regexp,\n.ace-cloud9-night .ace_variable {\n color: #D54E53\n}\n\n.ace-cloud9-night .ace_comment {\n color: #969896\n}\n\n.ace-cloud9-night .ace_c9searchresults.ace_keyword {\n color: #C2C280;\n}\n\n.ace-cloud9-night .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-cloud9-night .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/cloud9_night",["require","exports","module","ace/theme/cloud9_night-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-cloud9-night"; +exports.cssText = require("./cloud9_night-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); (function() { + window.require(["ace/theme/cloud9_night"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-cloud9_night_low_color.js b/ui/base1/ace/theme-cloud9_night_low_color.js new file mode 100644 index 0000000..3082173 --- /dev/null +++ b/ui/base1/ace/theme-cloud9_night_low_color.js @@ -0,0 +1,18 @@ +define("ace/theme/cloud9_night_low_color-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-cloud9-night-low-color .ace_gutter {\n background: #303130;\n color: #eee\n}\n\n.ace-cloud9-night-low-color .ace_print-margin {\n width: 1px;\n background: #222\n}\n\n.ace-cloud9-night-low-color {\n background-color: #181818;\n color: #EBEBEB\n}\n\n.ace-cloud9-night-low-color .ace_cursor {\n color: #9F9F9F\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_selection {\n background: #424242\n}\n\n.ace-cloud9-night-low-color.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #000000;\n border-radius: 2px\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #888888\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_highlight {\n border: 1px solid rgb(110, 119, 0);\n border-bottom: 0;\n box-shadow: inset 0 -1px rgb(110, 119, 0);\n margin: -1px 0 0 -1px;\n background: rgba(255, 235, 0, 0.1);\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_active-line {\n background: #292929\n}\n\n.ace-cloud9-night-low-color .ace_gutter-active-line {\n background-color: #3D3D3D\n}\n\n.ace-cloud9-night-low-color .ace_stack {\n background-color: rgb(66, 90, 44)\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_selected-word {\n border: 1px solid #888888\n}\n\n.ace-cloud9-night-low-color .ace_invisible {\n color: #343434\n}\n\n.ace-cloud9-night-low-color .ace_keyword,\n.ace-cloud9-night-low-color .ace_meta,\n.ace-cloud9-night-low-color .ace_storage {\n color: #C397D8\n}\n\n.ace-cloud9-night-low-color .ace_keyword.ace_operator {\n color: #70C0B1\n}\n\n.ace-cloud9-night-low-color .ace_constant.ace_character,\n.ace-cloud9-night-low-color .ace_constant.ace_language,\n.ace-cloud9-night-low-color .ace_constant.ace_numeric,\n.ace-cloud9-night-low-color .ace_keyword.ace_other.ace_unit {\n color: #DAA637\n}\n\n.ace-cloud9-night-low-color .ace_constant.ace_other {\n color: #EEEEEE\n}\n\n.ace-cloud9-night-low-color .ace_invalid {\n color: #CED2CF;\n background-color: #DF5F5F\n}\n\n.ace-cloud9-night-low-color .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-cloud9-night-low-color .ace_fold {\n background-color: #7AA6DA;\n border-color: #DEDEDE\n}\n\n.ace-cloud9-night-low-color .ace_entity.ace_name.ace_function,\n.ace-cloud9-night-low-color .ace_support.ace_function,\n.ace-cloud9-night-low-color .ace_variable:not(.ace_parameter),\n.ace-cloud9-night-low-color .ace_constant:not(.ace_numeric) {\n color: #7AA6DA\n}\n\n.ace-cloud9-night-low-color .ace_support.ace_class,\n.ace-cloud9-night-low-color .ace_support.ace_type {\n color: #E7C547\n}\n\n.ace-cloud9-night-low-color .ace_heading,\n.ace-cloud9-night-low-color .ace_markup.ace_heading,\n.ace-cloud9-night-low-color .ace_string {\n color: #B9CA4A\n}\n\n.ace-cloud9-night-low-color .ace_comment {\n color: #969896\n}\n\n.ace-cloud9-night-low-color .ace_c9searchresults.ace_keyword {\n color: #C2C280;\n}\n\n.ace-cloud9-night-low-color .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-cloud9-night-low-color .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/cloud9_night_low_color",["require","exports","module","ace/theme/cloud9_night_low_color-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-cloud9-night-low-color"; +exports.cssText = require("./cloud9_night_low_color-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); (function() { + window.require(["ace/theme/cloud9_night_low_color"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-cloud_editor.js b/ui/base1/ace/theme-cloud_editor.js new file mode 100644 index 0000000..bd62bf9 --- /dev/null +++ b/ui/base1/ace/theme-cloud_editor.js @@ -0,0 +1,18 @@ +define("ace/theme/cloud_editor-css",["require","exports","module"], function(require, exports, module){module.exports = "\n.ace-cloud_editor .ace_gutter {\n background: #ffffff;\n color: #3a3a42;\n}\n\n.ace-cloud_editor .ace_tooltip-marker-error.ace_tooltip-marker {\n background-color: #d13212;\n}\n.ace-cloud_editor .ace_tooltip-marker-security.ace_tooltip-marker {\n background-color: #d13212;\n}\n.ace-cloud_editor .ace_tooltip-marker-warning.ace_tooltip-marker {\n background-color: #906806;\n}\n\n.ace-cloud_editor .ace_print-margin {\n width: 1px;\n background: #697077;\n}\n\n.ace-cloud_editor {\n background-color: #ffffff;\n color: #3a3a42;\n}\n\n.ace-cloud_editor .ace_cursor {\n color: #3a3a42;\n}\n\n.ace-cloud_editor .ace_marker-layer .ace_selection {\n background: #bfceff;\n}\n\n.ace-cloud_editor.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #ffffff;\n border-radius: 2px;\n}\n\n.ace-cloud_editor .ace_marker-layer .ace_step {\n background: #697077;\n}\n\n.ace-cloud_editor .ace_marker-layer .ace_bracket {\n margin: 0 0 0 -1px;\n border: 1px solid #697077;\n}\n\n.ace-cloud_editor .ace_marker-layer .ace_active-line {\n box-sizing: border-box;\n border-top: 1px solid #9191ac;\n border-bottom: 1px solid #9191ac;\n}\n\n.ace-cloud_editor .ace_gutter-cell_svg-icons {\n box-sizing: border-box;\n border-top: 1px solid #ffffff;\n border-bottom: 1px solid #ffffff;\n}\n\n.ace-cloud_editor .ace_gutter-active-line {\n background-repeat: no-repeat;\n box-sizing: border-box;\n border-top: 1px solid #9191ac;\n border-bottom: 1px solid #9191ac;\n}\n\n.ace-cloud_editor .ace_marker-layer .ace_selected-word {\n border: 1px solid #bfceff;\n}\n\n.ace-cloud_editor .ace_fold {\n background-color: #0E45B4;\n border-color: #3a3a42;\n}\n\n.ace-cloud_editor .ace_keyword {\n color: #9749d1;\n}\n\n.ace-cloud_editor .ace_meta.ace_tag {\n color: #0E45B4;\n}\n\n.ace-cloud_editor .ace_constant {\n color: #A16101;\n}\n\n.ace-cloud_editor .ace_constant.ace_numeric {\n color: #A16101;\n}\n\n.ace-cloud_editor .ace_constant.ace_character.ace_escape {\n color: #BD1880;\n}\n\n.ace-cloud_editor .ace_support.ace_function {\n color: #A81700;\n}\n\n.ace-cloud_editor .ace_support.ace_class {\n color: #A16101;\n}\n\n.ace-cloud_editor .ace_storage {\n color: #9749d1;\n}\n\n.ace-cloud_editor .ace_invalid.ace_illegal {\n color: #ffffff;\n background-color: #0E45B4;\n}\n\n.ace-cloud_editor .ace_invalid.ace_deprecated {\n color: #ffffff;\n background-color: #A16101;\n}\n\n.ace-cloud_editor .ace_string {\n color: #207A7F;\n}\n\n.ace-cloud_editor .ace_string.ace_regexp {\n color: #207A7F;\n}\n\n.ace-cloud_editor .ace_comment,\n.ace-cloud_editor .ace_ghost_text {\n color: #697077;\n opacity: 1;\n}\n\n.ace-cloud_editor .ace_variable {\n color: #0E45B4;\n}\n\n.ace-cloud_editor .ace_meta.ace_selector {\n color: #9749d1;\n}\n\n.ace-cloud_editor .ace_entity.ace_other.ace_attribute-name {\n color: #A16101;\n}\n\n.ace-cloud_editor .ace_entity.ace_name.ace_function {\n color: #A81700;\n}\n\n.ace-cloud_editor .ace_entity.ace_name.ace_tag {\n color: #0E45B4;\n}\n\n.ace-cloud_editor .ace_heading {\n color: #A81700;\n}\n\n.ace-cloud_editor .ace_xml-pe {\n color: #A16101;\n}\n.ace-cloud_editor .ace_doctype {\n color: #0E45B4;\n}\n\n.ace-cloud_editor .ace_tooltip {\n background-color: #ffffff;\n color: #3a3a42;\n}\n\n.ace-cloud_editor .ace_icon_svg.ace_error,\n.ace-cloud_editor .ace_icon_svg.ace_error_fold {\n background-color: #d13212;\n}\n.ace-cloud_editor .ace_icon_svg.ace_security,\n.ace-cloud_editor .ace_icon_svg.ace_security_fold {\n background-color: #d13212;\n}\n.ace-cloud_editor .ace_icon_svg.ace_warning,\n.ace-cloud_editor .ace_icon_svg.ace_warning_fold {\n background-color: #906806;\n}\n.ace-cloud_editor .ace_icon_svg.ace_info {\n background-color: #0073bb;\n}\n.ace-cloud_editor .ace_icon_svg.ace_hint {\n background-color: #0073bb;\n}\n.ace-cloud_editor .ace_highlight-marker {\n background: none;\n border: #0E45B4 1px solid;\n}\n.ace-cloud_editor .ace_tooltip.ace_hover-tooltip:focus > div {\n outline: 1px solid #0073bb;\n}\n.ace-cloud_editor .ace_snippet-marker {\n background-color: #CED6E0;\n border: 0;\n}\n\n.ace-cloud_editor.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #f2f3f3;\n border: #0F68AE 1.5px solid;\n}\n.ace-cloud_editor.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #16191f;\n background: #f2f3f3;\n}\n.ace-cloud_editor.ace_editor.ace_autocomplete .ace_completion-meta {\n color: #545b64;\n opacity: 1;\n}\n.ace-cloud_editor.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #0F68AE;\n}\n.ace-cloud_editor.ace_editor.ace_autocomplete {\n box-shadow: 0 1px 1px 0 #001c244d, 1px 1px 1px 0 #001c2426, -1px 1px 1px 0 #001c2426;\n line-height: 1.5;\n border: 1px solid #eaeded;\n background: #ffffff;\n color: #16191f;\n}\n\n"; + +}); + +define("ace/theme/cloud_editor",["require","exports","module","ace/theme/cloud_editor-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-cloud_editor"; +exports.cssText = require("./cloud_editor-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/cloud_editor"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-cloud_editor_dark.js b/ui/base1/ace/theme-cloud_editor_dark.js new file mode 100644 index 0000000..72b0238 --- /dev/null +++ b/ui/base1/ace/theme-cloud_editor_dark.js @@ -0,0 +1,18 @@ +define("ace/theme/cloud_editor_dark-css",["require","exports","module"], function(require, exports, module){module.exports = "\n.ace-cloud_editor_dark .ace_gutter {\n background: #282c34;\n color: #8e96a9;\n}\n\n.ace-cloud_editor_dark.ace_dark .ace_tooltip-marker-error.ace_tooltip-marker {\n background-color: #ff5d64;\n}\n.ace-cloud_editor_dark.ace_dark .ace_tooltip-marker-security.ace_tooltip-marker {\n background-color: #ff5d64;\n}\n.ace-cloud_editor_dark.ace_dark .ace_tooltip-marker-warning.ace_tooltip-marker {\n background-color: #e0ca57;\n}\n\n.ace-cloud_editor_dark .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cloud_editor_dark {\n background-color: #282c34;\n color: #dcdfe4;\n}\n\n.ace-cloud_editor_dark .ace_cursor {\n color: #66b2f0;\n}\n\n.ace-cloud_editor_dark .ace_marker-layer .ace_selection {\n background: #4376bd;\n}\n\n.ace-cloud_editor_dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #8e96a9;\n border-radius: 2px;\n}\n\n.ace-cloud_editor_dark .ace_marker-layer .ace_step {\n background: #6fb342;\n}\n\n.ace-cloud_editor_dark .ace_marker-layer .ace_bracket {\n margin: 0 0 0 -1px;\n border: 1px solid #e8e8e8;\n}\n\n.ace-cloud_editor_dark .ace_marker-layer .ace_active-line {\n box-sizing: border-box;\n border-top: 1px solid #75777a;\n border-bottom: 1px solid #75777a;\n}\n\n.ace-cloud_editor_dark .ace_gutter-cell_svg-icons {\n box-sizing: border-box;\n border-top: 1px solid #282c34;\n border-bottom: 1px solid #282c34;\n}\n\n.ace-cloud_editor_dark .ace_gutter-active-line {\n background-repeat: no-repeat;\n box-sizing: border-box;\n border-top: 1px solid #75777a;\n border-bottom: 1px solid #75777a;\n}\n\n.ace-cloud_editor_dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #9bd0f7;\n}\n\n.ace-cloud_editor_dark .ace_fold {\n background-color: #66b2f0;\n border-color: #dcdfe4;\n}\n\n.ace-cloud_editor_dark .ace_keyword {\n color: #c674dc;\n}\n\n.ace-cloud_editor_dark .ace_constant {\n color: #e5c383;\n}\n\n.ace-cloud_editor_dark .ace_constant.ace_numeric {\n color: #e5c383;\n}\n\n.ace-cloud_editor_dark .ace_constant.ace_character.ace_escape {\n color: #71ccc7;\n}\n\n.ace-cloud_editor_dark .ace_support.ace_function {\n color: #e96a71;\n}\n\n.ace-cloud_editor_dark .ace_support.ace_class {\n color: #e5c383;\n}\n\n.ace-cloud_editor_dark .ace_storage {\n color: #c674dc;\n}\n\n.ace-cloud_editor_dark .ace_invalid.ace_illegal {\n color: #dcdfe4;\n background-color:#66b2f0;\n}\n\n.ace-cloud_editor_dark .ace_invalid.ace_deprecated {\n color: #dcdfe4;\n background-color: #e5c383;\n}\n\n.ace-cloud_editor_dark .ace_string {\n color: #6fb342;\n}\n\n.ace-cloud_editor_dark .ace_string.ace_regexp {\n color: #6fb342;\n}\n\n.ace-cloud_editor_dark .ace_comment,\n.ace-cloud_editor_dark .ace_ghost_text {\n color: #b5bac0;\n opacity: 1;\n}\n\n.ace-cloud_editor_dark .ace_variable {\n color:#66b2f0;\n}\n\n.ace-cloud_editor_dark .ace_meta.ace_selector {\n color: #c674dc;\n}\n\n.ace-cloud_editor_dark .ace_entity.ace_other.ace_attribute-name {\n color: #e5c383;\n}\n\n.ace-cloud_editor_dark .ace_entity.ace_name.ace_function {\n color: #e96a71;\n}\n\n.ace-cloud_editor_dark .ace_entity.ace_name.ace_tag {\n color:#66b2f0;\n}\n.ace-cloud_editor_dark .ace_heading {\n color: #e96a71;\n}\n\n.ace-cloud_editor_dark .ace_xml-pe {\n color: #e5c383;\n}\n.ace-cloud_editor_dark .ace_doctype {\n color:#66b2f0;\n}\n\n.ace-cloud_editor_dark .ace_entity.ace_name.ace_tag,\n.ace-cloud_editor_dark .ace_entity.ace_other.ace_attribute-name,\n.ace-cloud_editor_dark .ace_meta.ace_tag,\n.ace-cloud_editor_dark .ace_string.ace_regexp,\n.ace-cloud_editor_dark .ace_variable {\n color:#66b2f0;\n}\n\n.ace-cloud_editor_dark .ace_tooltip {\n background-color: #282c34;\n color: #dcdfe4;\n}\n\n.ace-cloud_editor_dark .ace_icon_svg.ace_error,\n.ace-cloud_editor_dark .ace_icon_svg.ace_error_fold {\n background-color: #ff5d64;\n}\n.ace-cloud_editor_dark .ace_icon_svg.ace_security,\n.ace-cloud_editor_dark .ace_icon_svg.ace_security_fold {\n background-color: #ff5d64;\n}\n.ace-cloud_editor_dark .ace_icon_svg.ace_warning,\n.ace-cloud_editor_dark .ace_icon_svg.ace_warning_fold {\n background-color: #e0ca57;\n}\n.ace-cloud_editor_dark .ace_icon_svg.ace_info {\n background-color: #44b9d6;\n}\n.ace-cloud_editor_dark .ace_icon_svg.ace_hint {\n background-color: #44b9d6;\n}\n.ace-cloud_editor_dark .ace_highlight-marker {\n background: none;\n border: #66b2f0 1px solid;\n}\n.ace-cloud_editor_dark .ace_tooltip.ace_hover-tooltip:focus > div {\n outline: 1px solid #44b9d6;\n}\n.ace-cloud_editor_dark .ace_snippet-marker {\n background-color: #434650;\n border: 0;\n}\n\n.ace-cloud_editor_dark.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #272A30;\n border: #299FBC 1.5px solid;\n}\n.ace-cloud_editor_dark.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #d5dbdb;\n background: #272A30;\n}\n.ace-cloud_editor_dark.ace_dark.ace_editor.ace_autocomplete .ace_completion-meta {\n color: #95a5a6;\n opacity: 1;\n}\n.ace-cloud_editor_dark.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2AA0BC;\n}\n.ace-cloud_editor_dark.ace_dark.ace_editor.ace_autocomplete {\n box-shadow: 0 1px 1px 0 #001c244d, 1px 1px 1px 0 #001c2426, -1px 1px 1px 0 #001c2426;\n line-height: 1.5;\n border: 1px solid #2a2e33;\n background: #050506;\n color: #ffffff;\n}\n\n"; + +}); + +define("ace/theme/cloud_editor_dark",["require","exports","module","ace/theme/cloud_editor_dark-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-cloud_editor_dark"; +exports.cssText = require("./cloud_editor_dark-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/cloud_editor_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-clouds.js b/ui/base1/ace/theme-clouds.js new file mode 100644 index 0000000..0adc9cf --- /dev/null +++ b/ui/base1/ace/theme-clouds.js @@ -0,0 +1,18 @@ +define("ace/theme/clouds-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-clouds .ace_gutter {\n background: #ebebeb;\n color: #333\n}\n\n.ace-clouds .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-clouds {\n background-color: #FFFFFF;\n color: #000000\n}\n\n.ace-clouds .ace_cursor {\n color: #000000\n}\n\n.ace-clouds .ace_marker-layer .ace_selection {\n background: #BDD5FC\n}\n\n.ace-clouds.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #FFFFFF;\n}\n\n.ace-clouds .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-clouds .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF\n}\n\n.ace-clouds .ace_marker-layer .ace_active-line {\n background: #FFFBD1\n}\n\n.ace-clouds .ace_gutter-active-line {\n background-color : #dcdcdc\n}\n\n.ace-clouds .ace_marker-layer .ace_selected-word {\n border: 1px solid #BDD5FC\n}\n\n.ace-clouds .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-clouds .ace_keyword,\n.ace-clouds .ace_meta,\n.ace-clouds .ace_support.ace_constant.ace_property-value {\n color: #AF956F\n}\n\n.ace-clouds .ace_keyword.ace_operator {\n color: #484848\n}\n\n.ace-clouds .ace_keyword.ace_other.ace_unit {\n color: #96DC5F\n}\n\n.ace-clouds .ace_constant.ace_language {\n color: #39946A\n}\n\n.ace-clouds .ace_constant.ace_numeric {\n color: #46A609\n}\n\n.ace-clouds .ace_constant.ace_character.ace_entity {\n color: #BF78CC\n}\n\n.ace-clouds .ace_invalid {\n background-color: #FF002A\n}\n\n.ace-clouds .ace_fold {\n background-color: #AF956F;\n border-color: #000000\n}\n\n.ace-clouds .ace_storage,\n.ace-clouds .ace_support.ace_class,\n.ace-clouds .ace_support.ace_function,\n.ace-clouds .ace_support.ace_other,\n.ace-clouds .ace_support.ace_type {\n color: #C52727\n}\n\n.ace-clouds .ace_string {\n color: #5D90CD\n}\n\n.ace-clouds .ace_comment {\n color: #BCC8BA\n}\n\n.ace-clouds .ace_entity.ace_name.ace_tag,\n.ace-clouds .ace_entity.ace_other.ace_attribute-name {\n color: #606060\n}\n\n.ace-clouds .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\n}\n\n.ace-clouds .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/clouds",["require","exports","module","ace/theme/clouds-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-clouds"; +exports.cssText = require("./clouds-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/clouds"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-clouds_midnight.js b/ui/base1/ace/theme-clouds_midnight.js new file mode 100644 index 0000000..08739da --- /dev/null +++ b/ui/base1/ace/theme-clouds_midnight.js @@ -0,0 +1,18 @@ +define("ace/theme/clouds_midnight-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-clouds-midnight .ace_gutter {\n background: #232323;\n color: #929292\n}\n\n.ace-clouds-midnight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-clouds-midnight {\n background-color: #191919;\n color: #929292\n}\n\n.ace-clouds-midnight .ace_cursor {\n color: #7DA5DC\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_selection {\n background: #000000\n}\n\n.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #191919;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_active-line {\n background: rgba(215, 215, 215, 0.031)\n}\n\n.ace-clouds-midnight .ace_gutter-active-line {\n background-color: rgba(215, 215, 215, 0.031)\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_selected-word {\n border: 1px solid #000000\n}\n\n.ace-clouds-midnight .ace_invisible {\n color: #666\n}\n\n.ace-clouds-midnight .ace_keyword,\n.ace-clouds-midnight .ace_meta,\n.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\n color: #927C5D\n}\n\n.ace-clouds-midnight .ace_keyword.ace_operator {\n color: #4B4B4B\n}\n\n.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\n color: #366F1A\n}\n\n.ace-clouds-midnight .ace_constant.ace_language {\n color: #39946A\n}\n\n.ace-clouds-midnight .ace_constant.ace_numeric {\n color: #46A609\n}\n\n.ace-clouds-midnight .ace_constant.ace_character.ace_entity {\n color: #A165AC\n}\n\n.ace-clouds-midnight .ace_invalid {\n color: #FFFFFF;\n background-color: #E92E2E\n}\n\n.ace-clouds-midnight .ace_fold {\n background-color: #927C5D;\n border-color: #929292\n}\n\n.ace-clouds-midnight .ace_storage,\n.ace-clouds-midnight .ace_support.ace_class,\n.ace-clouds-midnight .ace_support.ace_function,\n.ace-clouds-midnight .ace_support.ace_other,\n.ace-clouds-midnight .ace_support.ace_type {\n color: #E92E2E\n}\n\n.ace-clouds-midnight .ace_string {\n color: #5D90CD\n}\n\n.ace-clouds-midnight .ace_comment {\n color: #3C403B\n}\n\n.ace-clouds-midnight .ace_entity.ace_name.ace_tag,\n.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\n color: #606060\n}\n\n.ace-clouds-midnight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-clouds-midnight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/clouds_midnight",["require","exports","module","ace/theme/clouds_midnight-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-clouds-midnight"; +exports.cssText = require("./clouds_midnight-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/clouds_midnight"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-cobalt.js b/ui/base1/ace/theme-cobalt.js new file mode 100644 index 0000000..53697f6 --- /dev/null +++ b/ui/base1/ace/theme-cobalt.js @@ -0,0 +1,18 @@ +define("ace/theme/cobalt-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-cobalt .ace_gutter {\n background: #011e3a;\n color: rgb(128,145,160)\n}\n\n.ace-cobalt .ace_print-margin {\n width: 1px;\n background: #555555\n}\n\n.ace-cobalt {\n background-color: #002240;\n color: #FFFFFF\n}\n\n.ace-cobalt .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-cobalt .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75)\n}\n\n.ace-cobalt.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #002240;\n}\n\n.ace-cobalt .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-cobalt .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.15)\n}\n\n.ace-cobalt .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.35)\n}\n\n.ace-cobalt .ace_gutter-active-line {\n background-color: rgba(0, 0, 0, 0.35)\n}\n\n.ace-cobalt .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(179, 101, 57, 0.75)\n}\n\n.ace-cobalt .ace_invisible {\n color: rgba(255, 255, 255, 0.15)\n}\n\n.ace-cobalt .ace_keyword,\n.ace-cobalt .ace_meta {\n color: #FF9D00\n}\n\n.ace-cobalt .ace_constant,\n.ace-cobalt .ace_constant.ace_character,\n.ace-cobalt .ace_constant.ace_character.ace_escape,\n.ace-cobalt .ace_constant.ace_other {\n color: #FF628C\n}\n\n.ace-cobalt .ace_invalid {\n color: #F8F8F8;\n background-color: #800F00\n}\n\n.ace-cobalt .ace_support {\n color: #80FFBB\n}\n\n.ace-cobalt .ace_support.ace_constant {\n color: #EB939A\n}\n\n.ace-cobalt .ace_fold {\n background-color: #FF9D00;\n border-color: #FFFFFF\n}\n\n.ace-cobalt .ace_support.ace_function {\n color: #FFB054\n}\n\n.ace-cobalt .ace_storage {\n color: #FFEE80\n}\n\n.ace-cobalt .ace_entity {\n color: #FFDD00\n}\n\n.ace-cobalt .ace_string {\n color: #3AD900\n}\n\n.ace-cobalt .ace_string.ace_regexp {\n color: #80FFC2\n}\n\n.ace-cobalt .ace_comment {\n font-style: italic;\n color: #0088FF\n}\n\n.ace-cobalt .ace_heading,\n.ace-cobalt .ace_markup.ace_heading {\n color: #C8E4FD;\n background-color: #001221\n}\n\n.ace-cobalt .ace_list,\n.ace-cobalt .ace_markup.ace_list {\n background-color: #130D26\n}\n\n.ace-cobalt .ace_variable {\n color: #CCCCCC\n}\n\n.ace-cobalt .ace_variable.ace_language {\n color: #FF80E1\n}\n\n.ace-cobalt .ace_meta.ace_tag {\n color: #9EFFFF\n}\n\n.ace-cobalt .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-cobalt .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/cobalt",["require","exports","module","ace/theme/cobalt-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-cobalt"; +exports.cssText = require("./cobalt-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/cobalt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-crimson_editor.js b/ui/base1/ace/theme-crimson_editor.js new file mode 100644 index 0000000..93d240f --- /dev/null +++ b/ui/base1/ace/theme-crimson_editor.js @@ -0,0 +1,18 @@ +define("ace/theme/crimson_editor-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-crimson-editor .ace_gutter {\n background: #ebebeb;\n color: #333;\n overflow : hidden;\n}\n\n.ace-crimson-editor .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-crimson-editor .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-crimson-editor {\n background-color: #FFFFFF;\n color: rgb(64, 64, 64);\n}\n\n.ace-crimson-editor .ace_cursor {\n color: black;\n}\n\n.ace-crimson-editor .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-crimson-editor .ace_identifier {\n color: black;\n}\n\n.ace-crimson-editor .ace_keyword {\n color: blue;\n}\n\n.ace-crimson-editor .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-crimson-editor .ace_constant.ace_language {\n color: rgb(255, 156, 0);\n}\n\n.ace-crimson-editor .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-crimson-editor .ace_invalid {\n text-decoration: line-through;\n color: rgb(224, 0, 0);\n}\n\n.ace-crimson-editor .ace_fold {\n}\n\n.ace-crimson-editor .ace_support.ace_function {\n color: rgb(192, 0, 0);\n}\n\n.ace-crimson-editor .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-crimson-editor .ace_support.ace_type,\n.ace-crimson-editor .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-crimson-editor .ace_keyword.ace_operator {\n color: rgb(49, 132, 149);\n}\n\n.ace-crimson-editor .ace_string {\n color: rgb(128, 0, 128);\n}\n\n.ace-crimson-editor .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-crimson-editor .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-crimson-editor .ace_constant.ace_numeric {\n color: rgb(0, 0, 64);\n}\n\n.ace-crimson-editor .ace_variable {\n color: rgb(0, 64, 128);\n}\n\n.ace-crimson-editor .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_active-line {\n background: rgb(232, 242, 254);\n}\n\n.ace-crimson-editor .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-crimson-editor .ace_meta.ace_tag {\n color:rgb(28, 2, 255);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-crimson-editor .ace_string.ace_regex {\n color: rgb(192, 0, 192);\n}\n\n.ace-crimson-editor .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-crimson-editor .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/crimson_editor",["require","exports","module","ace/theme/crimson_editor-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssText = require("./crimson_editor-css"); +exports.cssClass = "ace-crimson-editor"; +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/crimson_editor"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-dawn.js b/ui/base1/ace/theme-dawn.js new file mode 100644 index 0000000..46817fe --- /dev/null +++ b/ui/base1/ace/theme-dawn.js @@ -0,0 +1,18 @@ +define("ace/theme/dawn-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-dawn .ace_gutter {\n background: #ebebeb;\n color: #333\n}\n\n.ace-dawn .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-dawn {\n background-color: #F9F9F9;\n color: #080808\n}\n\n.ace-dawn .ace_cursor {\n color: #000000\n}\n\n.ace-dawn .ace_marker-layer .ace_selection {\n background: rgba(39, 95, 255, 0.30)\n}\n\n.ace-dawn.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #F9F9F9;\n}\n\n.ace-dawn .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-dawn .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(75, 75, 126, 0.50)\n}\n\n.ace-dawn .ace_marker-layer .ace_active-line {\n background: rgba(36, 99, 180, 0.12)\n}\n\n.ace-dawn .ace_gutter-active-line {\n background-color : #dcdcdc\n}\n\n.ace-dawn .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(39, 95, 255, 0.30)\n}\n\n.ace-dawn .ace_invisible {\n color: rgba(75, 75, 126, 0.50)\n}\n\n.ace-dawn .ace_keyword,\n.ace-dawn .ace_meta {\n color: #794938\n}\n\n.ace-dawn .ace_constant,\n.ace-dawn .ace_constant.ace_character,\n.ace-dawn .ace_constant.ace_character.ace_escape,\n.ace-dawn .ace_constant.ace_other {\n color: #811F24\n}\n\n.ace-dawn .ace_invalid.ace_illegal {\n text-decoration: underline;\n font-style: italic;\n color: #F8F8F8;\n background-color: #B52A1D\n}\n\n.ace-dawn .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #B52A1D\n}\n\n.ace-dawn .ace_support {\n color: #691C97\n}\n\n.ace-dawn .ace_support.ace_constant {\n color: #B4371F\n}\n\n.ace-dawn .ace_fold {\n background-color: #794938;\n border-color: #080808\n}\n\n.ace-dawn .ace_list,\n.ace-dawn .ace_markup.ace_list,\n.ace-dawn .ace_support.ace_function {\n color: #693A17\n}\n\n.ace-dawn .ace_storage {\n font-style: italic;\n color: #A71D5D\n}\n\n.ace-dawn .ace_string {\n color: #0B6125\n}\n\n.ace-dawn .ace_string.ace_regexp {\n color: #CF5628\n}\n\n.ace-dawn .ace_comment {\n font-style: italic;\n color: #5A525F\n}\n\n.ace-dawn .ace_heading,\n.ace-dawn .ace_markup.ace_heading {\n color: #19356D\n}\n\n.ace-dawn .ace_variable {\n color: #234A97\n}\n\n.ace-dawn .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dawn .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/dawn",["require","exports","module","ace/theme/dawn-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-dawn"; +exports.cssText = require("./dawn-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/dawn"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-dracula.js b/ui/base1/ace/theme-dracula.js new file mode 100644 index 0000000..e1e2f14 --- /dev/null +++ b/ui/base1/ace/theme-dracula.js @@ -0,0 +1,19 @@ +define("ace/theme/dracula-css",["require","exports","module"], function(require, exports, module){module.exports = "/*\n * Copyright \u00A9 2017 Zeno Rocha \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201CSoftware\u201D), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \u201CAS IS\u201D, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n.ace-dracula .ace_gutter {\n background: #282a36;\n color: rgb(144,145,148)\n}\n\n.ace-dracula .ace_print-margin {\n width: 1px;\n background: #44475a\n}\n\n.ace-dracula {\n background-color: #282a36;\n color: #f8f8f2\n}\n\n.ace-dracula .ace_cursor {\n color: #f8f8f0\n}\n\n.ace-dracula .ace_marker-layer .ace_selection {\n background: #44475a\n}\n\n.ace-dracula.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #282a36;\n border-radius: 2px\n}\n\n.ace-dracula .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-dracula .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #a29709\n}\n\n.ace-dracula .ace_marker-layer .ace_active-line {\n background: #44475a\n}\n\n.ace-dracula .ace_gutter-active-line {\n background-color: #44475a\n}\n\n.ace-dracula .ace_marker-layer .ace_selected-word {\n box-shadow: 0px 0px 0px 1px #a29709;\n border-radius: 3px;\n}\n\n.ace-dracula .ace_fold {\n background-color: #50fa7b;\n border-color: #f8f8f2\n}\n\n.ace-dracula .ace_keyword {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_language {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_numeric {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character.ace_escape {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_other {\n color: #bd93f9\n}\n\n.ace-dracula .ace_support.ace_function {\n color: #8be9fd\n}\n\n.ace-dracula .ace_support.ace_constant {\n color: #6be5fd\n}\n\n.ace-dracula .ace_support.ace_class {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_support.ace_type {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_storage {\n color: #ff79c6\n}\n\n.ace-dracula .ace_storage.ace_type {\n font-style: italic;\n color: #8be9fd\n}\n\n.ace-dracula .ace_invalid {\n color: #F8F8F0;\n background-color: #ff79c6\n}\n\n.ace-dracula .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #bd93f9\n}\n\n.ace-dracula .ace_string {\n color: #f1fa8c\n}\n\n.ace-dracula .ace_comment {\n color: #6272a4\n}\n\n.ace-dracula .ace_variable {\n color: #50fa7b\n}\n\n.ace-dracula .ace_variable.ace_parameter {\n font-style: italic;\n color: #ffb86c\n}\n\n.ace-dracula .ace_entity.ace_other.ace_attribute-name {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_function {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_tag {\n color: #ff79c6\n}\n.ace-dracula .ace_invisible {\n color: #626680;\n}\n\n.ace-dracula .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dracula .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-dracula"; +exports.cssText = require("./dracula-css"); +exports.$selectionColorConflict = true; +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/dracula"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-dreamweaver.js b/ui/base1/ace/theme-dreamweaver.js new file mode 100644 index 0000000..1e4c5c8 --- /dev/null +++ b/ui/base1/ace/theme-dreamweaver.js @@ -0,0 +1,18 @@ +define("ace/theme/dreamweaver-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-dreamweaver .ace_gutter {\n background: #e8e8e8;\n color: #333;\n}\n\n.ace-dreamweaver .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-dreamweaver {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-dreamweaver .ace_fold {\n background-color: #757AD8;\n}\n\n.ace-dreamweaver .ace_cursor {\n color: black;\n}\n \n.ace-dreamweaver .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-dreamweaver .ace_storage,\n.ace-dreamweaver .ace_keyword {\n color: blue;\n}\n\n.ace-dreamweaver .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-dreamweaver .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-dreamweaver .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-dreamweaver .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-dreamweaver .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-dreamweaver .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-dreamweaver .ace_support.ace_type,\n.ace-dreamweaver .ace_support.ace_class {\n color: #009;\n}\n\n.ace-dreamweaver .ace_support.ace_php_tag {\n color: #f00;\n}\n\n.ace-dreamweaver .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-dreamweaver .ace_string {\n color: #00F;\n}\n\n.ace-dreamweaver .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-dreamweaver .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-dreamweaver .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-dreamweaver .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-dreamweaver .ace_variable {\n color: #06F\n}\n\n.ace-dreamweaver .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-dreamweaver .ace_entity.ace_name.ace_function {\n color: #00F;\n}\n\n\n.ace-dreamweaver .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-dreamweaver .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-dreamweaver .ace_gutter-active-line {\n background-color : #DCDCDC;\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-dreamweaver .ace_meta.ace_tag {\n color:#009;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {\n color:#060;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_form {\n color:#F90;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_image {\n color:#909;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_script {\n color:#900;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_style {\n color:#909;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_table {\n color:#099;\n}\n\n.ace-dreamweaver .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-dreamweaver .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-dreamweaver .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/dreamweaver",["require","exports","module","ace/theme/dreamweaver-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-dreamweaver"; +exports.cssText = require("./dreamweaver-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/dreamweaver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-eclipse.js b/ui/base1/ace/theme-eclipse.js new file mode 100644 index 0000000..1163cb3 --- /dev/null +++ b/ui/base1/ace/theme-eclipse.js @@ -0,0 +1,19 @@ +define("ace/theme/eclipse-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-eclipse .ace_gutter {\n background: #ebebeb;\n border-right: 1px solid rgb(159, 159, 159);\n color: rgb(136, 136, 136);\n}\n\n.ace-eclipse .ace_print-margin {\n width: 1px;\n background: #ebebeb;\n}\n\n.ace-eclipse {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-eclipse .ace_fold {\n background-color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_cursor {\n color: black;\n}\n\n.ace-eclipse .ace_storage,\n.ace-eclipse .ace_keyword,\n.ace-eclipse .ace_variable {\n color: rgb(127, 0, 85);\n}\n\n.ace-eclipse .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-eclipse .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-eclipse .ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_string {\n color: rgb(42, 0, 255);\n}\n\n.ace-eclipse .ace_comment {\n color: rgb(113, 150, 130);\n}\n\n.ace-eclipse .ace_comment.ace_doc {\n color: rgb(63, 95, 191);\n}\n\n.ace-eclipse .ace_comment.ace_doc.ace_tag {\n color: rgb(127, 159, 191);\n}\n\n.ace-eclipse .ace_constant.ace_numeric {\n color: darkblue;\n}\n\n.ace-eclipse .ace_tag {\n color: rgb(25, 118, 116);\n}\n\n.ace-eclipse .ace_type {\n color: rgb(127, 0, 127);\n}\n\n.ace-eclipse .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-eclipse .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-eclipse .ace_meta.ace_tag {\n color:rgb(25, 118, 116);\n}\n\n.ace-eclipse .ace_invisible {\n color: #ddd;\n}\n\n.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\n color:rgb(127, 0, 127);\n}\n.ace-eclipse .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0);\n}\n\n.ace-eclipse .ace_active-line {\n background: rgb(232, 242, 254);\n}\n\n.ace-eclipse .ace_gutter-active-line {\n background-color : #DADADA;\n}\n\n.ace-eclipse .ace_marker-layer .ace_selected-word {\n border: 1px solid rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-eclipse .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/eclipse",["require","exports","module","ace/theme/eclipse-css","ace/lib/dom"], function(require, exports, module){"use strict"; +exports.isDark = false; +exports.cssText = require("./eclipse-css"); +exports.cssClass = "ace-eclipse"; +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/eclipse"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-github.js b/ui/base1/ace/theme-github.js new file mode 100644 index 0000000..80bffa3 --- /dev/null +++ b/ui/base1/ace/theme-github.js @@ -0,0 +1,18 @@ +define("ace/theme/github-css",["require","exports","module"], function(require, exports, module){module.exports = "/* CSS style content from github's default pygments highlighter template.\n Cursor and selection styles from textmate.css. */\n.ace-github .ace_gutter {\n background: #e8e8e8;\n color: #AAA;\n}\n\n.ace-github {\n background: #fff;\n color: #000;\n}\n\n.ace-github .ace_keyword {\n font-weight: bold;\n}\n\n.ace-github .ace_string {\n color: #D14;\n}\n\n.ace-github .ace_variable.ace_class {\n color: teal;\n}\n\n.ace-github .ace_constant.ace_numeric {\n color: #099;\n}\n\n.ace-github .ace_constant.ace_buildin {\n color: #0086B3;\n}\n\n.ace-github .ace_support.ace_function {\n color: #0086B3;\n}\n\n.ace-github .ace_comment {\n color: #998;\n font-style: italic;\n}\n\n.ace-github .ace_variable.ace_language {\n color: #0086B3;\n}\n\n.ace-github .ace_paren {\n font-weight: bold;\n}\n\n.ace-github .ace_boolean {\n font-weight: bold;\n}\n\n.ace-github .ace_string.ace_regexp {\n color: #009926;\n font-weight: normal;\n}\n\n.ace-github .ace_variable.ace_instance {\n color: teal;\n}\n\n.ace-github .ace_constant.ace_language {\n font-weight: bold;\n}\n\n.ace-github .ace_cursor {\n color: black;\n}\n\n.ace-github.ace_focus .ace_marker-layer .ace_active-line {\n background: rgb(255, 255, 204);\n}\n.ace-github .ace_marker-layer .ace_active-line {\n background: rgb(245, 245, 245);\n}\n\n.ace-github .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-github.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n/* bold keywords cause cursor issues for some fonts */\n/* this disables bold style for editor and keeps for static highlighter */\n.ace-github.ace_nobold .ace_line > span {\n font-weight: normal !important;\n}\n\n.ace-github .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-github .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-github .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-github .ace_gutter-active-line {\n background-color : rgba(0, 0, 0, 0.07);\n}\n\n.ace-github .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-github .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-github .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-github .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-github .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-github"; +exports.cssText = require("./github-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/github"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-github_dark.js b/ui/base1/ace/theme-github_dark.js new file mode 100644 index 0000000..10f739d --- /dev/null +++ b/ui/base1/ace/theme-github_dark.js @@ -0,0 +1,18 @@ +define("ace/theme/github_dark-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-github-dark .ace_gutter {\n background: #24292e;\n color: #7388b5\n}\n\n.ace-github-dark .ace_print-margin {\n width: 1px;\n background: #00204b\n}\n\n.ace-github-dark {\n background-color: #24292e;\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_constant.ace_other,\n.ace-github-dark .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_marker-layer .ace_selection {\n background: #003F8E\n}\n\n.ace-github-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #24292e;\n}\n\n.ace-github-dark .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-github-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404F7D\n}\n\n.ace-github-dark .ace_marker-layer .ace_active-line {\n background: #00346E\n}\n\n.ace-github-dark .ace_gutter-active-line {\n background-color: #24292e\n}\n\n.ace-github-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #003F8E\n}\n\n.ace-github-dark .ace_invisible {\n color: #404F7D\n}\n\n.ace-github-dark .ace_keyword,\n.ace-github-dark .ace_meta,\n.ace-github-dark .ace_storage,\n.ace-github-dark .ace_storage.ace_type,\n.ace-github-dark .ace_support.ace_type {\n color: #ff7b72\n}\n\n.ace-github-dark .ace_keyword.ace_operator {\n color: #79c0ff\n}\n\n.ace-github-dark .ace_constant.ace_character,\n.ace-github-dark .ace_constant.ace_language,\n.ace-github-dark .ace_constant.ace_numeric,\n.ace-github-dark .ace_keyword.ace_other.ace_unit,\n.ace-github-dark .ace_support.ace_constant,\n.ace-github-dark .ace_variable.ace_parameter {\n color: #FFC58F\n}\n\n.ace-github-dark .ace_invalid {\n color: #FFFFFF;\n background-color: #F99DA5\n}\n\n.ace-github-dark .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #ff7b72\n}\n\n.ace-github-dark .ace_fold {\n background-color: #BBDAFF;\n border-color: #FFFFFF\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_function,\n.ace-github-dark .ace_support.ace_function,\n.ace-github-dark .ace_variable {\n color: #BBDAFF\n}\n\n.ace-github-dark .ace_support.ace_class,\n.ace-github-dark .ace_support.ace_type {\n color: #FFEEAD\n}\n\n.ace-github-dark .ace_heading,\n.ace-github-dark .ace_markup.ace_heading,\n.ace-github-dark .ace_string {\n color: #9fcef6\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_tag,\n.ace-github-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-github-dark .ace_meta.ace_tag,\n.ace-github-dark .ace_string.ace_regexp,\n.ace-github-dark .ace_variable {\n color: #FF9DA4\n}\n\n.ace-github-dark .ace_comment {\n color: #7285B7\n}\n\n.ace-github-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-github-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n\n.ace-github-dark .ace_constant.ace_buildin {\n color: #0086B3;\n}\n\n.ace-github-dark .ace_variable.ace_language {\n color: #ffffff;\n}\n "; + +}); + +define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-github-dark"; +exports.cssText = require("./github_dark-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/github_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-github_light_default.js b/ui/base1/ace/theme-github_light_default.js new file mode 100644 index 0000000..04bc5a1 --- /dev/null +++ b/ui/base1/ace/theme-github_light_default.js @@ -0,0 +1,18 @@ +define("ace/theme/github_light_default-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-github-light-default .ace_gutter {\n background: #ffffff;\n color: rgba(27, 31, 35, 0.3);\n}\n\n.ace-github-light-default .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-github-light-default {\n background-color: #FFFFFF;\n color: #24292E;\n}\n\n.ace-github-light-default .ace_cursor {\n color: #044289;\n background: none;\n}\n\n.ace-github-light-default .ace_marker-layer .ace_selection {\n background: rgba(3, 102, 214, 0.14);\n}\n\n.ace-github-light-default.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #FFFFFF;\n border-radius: 2px;\n}\n\n.ace-github-light-default .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-github-light-default .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(52, 208, 88, 0);\n background: rgba(52, 208, 88, 0.25);\n}\n\n.ace-github-light-default .ace_marker-layer .ace_active-line {\n background: #f6f8fa;\n border: 2px solid #eeeeee;\n}\n\n.ace-github-light-default .ace_gutter-active-line {\n background-color: #f6f8fa;\n color: #24292e\n}\n\n.ace-github-light-default .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(3, 102, 214, 0.14);\n}\n\n.ace-github-light-default .ace_fold {\n background-color: #D73A49;\n border-color: #24292E;\n}\n\n.ace_tooltip.ace-github-light-default {\n background-color: #f6f8fa !important;\n color: #444d56 !important;\n border: 1px solid #444d56\n}\n\n.ace-github-light-default .language_highlight_error {\n border-bottom: dotted 1px #cb2431;\n background: none;\n}\n\n.ace-github-light-default .language_highlight_warning {\n border-bottom: solid 1px #f9c513;\n background: none;\n}\n\n.ace-github-light-default .language_highlight_info {\n border-bottom: dotted 1px #1a85ff;\n background: none;\n}\n\n.ace-github-light-default .ace_keyword {\n color: #D73A49;\n}\n\n.ace-github-light-default .ace_constant {\n color: #005CC5;\n}\n\n.ace-github-light-default .ace_support {\n color: #005CC5;\n}\n\n.ace-github-light-default .ace_support.ace_constant {\n color: #005CC5;\n}\n\n.ace-github-light-default .ace_support.ace_type {\n color: #D73A49;\n}\n\n.ace-github-light-default .ace_storage {\n color: #D73A49;\n}\n\n.ace-github-light-default .ace_storage.ace_type {\n color: #D73A49;\n}\n\n.ace-github-light-default .ace_invalid.ace_illegal {\n font-style: italic;\n color: #B31D28;\n}\n\n.ace-github-light-default .ace_invalid.ace_deprecated {\n font-style: italic;\n color: #B31D28;\n}\n\n.ace-github-light-default .ace_string {\n color: #032F62;\n}\n\n.ace-github-light-default .ace_string.ace_regexp {\n color: #032F62;\n}\n\n.ace-github-light-default .ace_comment {\n color: #6A737D;\n}\n\n.ace-github-light-default .ace_variable {\n color: #E36209;\n}\n\n.ace-github-light-default .ace_variable.ace_language {\n color: #005CC5;\n}\n\n.ace-github-light-default .ace_entity.ace_name {\n color: #6F42C1;\n}\n\n.ace-github-light-default .ace_entity {\n color: #6F42C1;\n}\n\n.ace-github-light-default .ace_entity.ace_name.ace_tag {\n color: #22863A;\n}\n\n.ace-github-light-default .ace_meta.ace_tag {\n color: #22863A;\n}\n\n.ace-github-light-default .ace_markup.ace_heading {\n color: #005CC5;\n}\n\n.ace-github-light-default .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-github-light-default .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/github_light_default",["require","exports","module","ace/theme/github_light_default-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-github-light-default"; +exports.cssText = require("./github_light_default-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/github_light_default"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-gob.js b/ui/base1/ace/theme-gob.js new file mode 100644 index 0000000..ae5e4c0 --- /dev/null +++ b/ui/base1/ace/theme-gob.js @@ -0,0 +1,18 @@ +define("ace/theme/gob-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-gob .ace_gutter {\n background: #0B1818;\n color: #03EE03\n}\n\n.ace-gob .ace_print-margin {\n width: 1px;\n background: #131313\n}\n\n.ace-gob {\n background-color: #0B0B0B;\n color: #00FF00\n}\n\n.ace-gob .ace_cursor {\n border-color: rgba(16, 248, 255, 0.90);\n background-color: rgba(16, 240, 248, 0.70);\n opacity: 0.4;\n}\n\n.ace-gob .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-gob.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-gob .ace_marker-layer .ace_step {\n background: rgb(16, 128, 0)\n}\n\n.ace-gob .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(64, 255, 255, 0.25)\n}\n\n.ace-gob .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.04)\n}\n\n.ace-gob .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.04)\n}\n\n.ace-gob .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(192, 240, 255, 0.20)\n}\n\n.ace-gob .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-gob .ace_keyword,\n.ace-gob .ace_meta {\n color: #10D8E8\n}\n\n.ace-gob .ace_constant,\n.ace-gob .ace_constant.ace_character,\n.ace-gob .ace_constant.ace_character.ace_escape,\n.ace-gob .ace_constant.ace_other,\n.ace-gob .ace_heading,\n.ace-gob .ace_markup.ace_heading,\n.ace-gob .ace_support.ace_constant {\n color: #10F0A0\n}\n\n.ace-gob .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-gob .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #20F8C0\n}\n\n.ace-gob .ace_support {\n color: #20E8B0\n}\n\n.ace-gob .ace_fold {\n background-color: #50B8B8;\n border-color: #70F8F8\n}\n\n.ace-gob .ace_support.ace_function {\n color: #00F800\n}\n\n.ace-gob .ace_list,\n.ace-gob .ace_markup.ace_list,\n.ace-gob .ace_storage {\n color: #10FF98\n}\n\n.ace-gob .ace_entity.ace_name.ace_function,\n.ace-gob .ace_meta.ace_tag,\n.ace-gob .ace_variable {\n color: #00F868\n}\n\n.ace-gob .ace_string {\n color: #10F060\n}\n\n.ace-gob .ace_string.ace_regexp {\n color: #20F090;\n}\n\n.ace-gob .ace_comment {\n font-style: italic;\n color: #00E060;\n}\n\n.ace-gob .ace_variable {\n color: #00F888;\n}\n\n.ace-gob .ace_xml-pe {\n color: #488858;\n}\n\n.ace-gob .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-gob .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/gob",["require","exports","module","ace/theme/gob-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-gob"; +exports.cssText = require("./gob-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/gob"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-gruvbox.js b/ui/base1/ace/theme-gruvbox.js new file mode 100644 index 0000000..edd4ede --- /dev/null +++ b/ui/base1/ace/theme-gruvbox.js @@ -0,0 +1,18 @@ +define("ace/theme/gruvbox-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-gruvbox .ace_gutter-active-line {\n background-color: #3C3836;\n}\n\n.ace-gruvbox {\n color: #EBDAB4;\n background-color: #1D2021;\n}\n\n.ace-gruvbox .ace_invisible {\n color: #504945;\n}\n\n.ace-gruvbox .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75)\n}\n\n.ace-gruvbox.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #002240;\n}\n\n.ace-gruvbox .ace_keyword {\n color: #8ec07c;\n}\n\n.ace-gruvbox .ace_comment {\n font-style: italic;\n color: #928375;\n}\n\n.ace-gruvbox .ace-statement {\n color: red;\n}\n\n.ace-gruvbox .ace_variable {\n color: #84A598;\n}\n\n.ace-gruvbox .ace_variable.ace_language {\n color: #D2879B;\n}\n\n.ace-gruvbox .ace_constant {\n color: #C2859A;\n}\n\n.ace-gruvbox .ace_constant.ace_language {\n color: #C2859A;\n}\n\n.ace-gruvbox .ace_constant.ace_numeric {\n color: #C2859A;\n}\n\n.ace-gruvbox .ace_string {\n color: #B8BA37;\n}\n\n.ace-gruvbox .ace_support {\n color: #F9BC41;\n}\n\n.ace-gruvbox .ace_support.ace_function {\n color: #F84B3C;\n}\n\n.ace-gruvbox .ace_storage {\n color: #8FBF7F;\n}\n\n.ace-gruvbox .ace_keyword.ace_operator {\n color: #EBDAB4;\n}\n\n.ace-gruvbox .ace_punctuation.ace_operator {\n color: yellow;\n}\n\n.ace-gruvbox .ace_marker-layer .ace_active-line {\n background: #3C3836;\n}\n\n.ace-gruvbox .ace_marker-layer .ace_selected-word {\n border-radius: 4px;\n border: 8px solid #3f475d;\n}\n\n.ace-gruvbox .ace_print-margin {\n width: 5px;\n background: #3C3836;\n}\n\n.ace-gruvbox .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\n}\n\n.ace-gruvbox .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/gruvbox",["require","exports","module","ace/theme/gruvbox-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-gruvbox"; +exports.cssText = require("./gruvbox-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/gruvbox"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-gruvbox_dark_hard.js b/ui/base1/ace/theme-gruvbox_dark_hard.js new file mode 100644 index 0000000..b23695f --- /dev/null +++ b/ui/base1/ace/theme-gruvbox_dark_hard.js @@ -0,0 +1,18 @@ +define("ace/theme/gruvbox_dark_hard-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-gruvbox-dark-hard .ace_gutter {\n background: #1d2021;\n color: rgb(132,126,106)\n}\n\n.ace-gruvbox-dark-hard .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-gruvbox-dark-hard {\n background-color: #1d2021;\n color: rgba(235, 219, 178, 0.50)\n}\n\n.ace-gruvbox-dark-hard .ace_cursor {\n color: #a89984\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_selection {\n background: #3c3836\n}\n\n.ace-gruvbox-dark-hard.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #1d2021;\n border-radius: 2px\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(235, 219, 178, 0.15)\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_active-line {\n background: #3c3836\n}\n\n.ace-gruvbox-dark-hard .ace_gutter-active-line {\n background-color: #3c3836\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_selected-word {\n border: 1px solid #3c3836\n}\n\n.ace-gruvbox-dark-hard .ace_fold {\n background-color: #b8bb26;\n border-color: rgba(235, 219, 178, 0.50)\n}\n\n.ace-gruvbox-dark-hard .ace_keyword {\n color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_keyword.ace_operator {\n color: #8ec07c\n}\n\n.ace-gruvbox-dark-hard .ace_keyword.ace_other.ace_unit {\n color: #b16286\n}\n\n.ace-gruvbox-dark-hard .ace_constant {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_constant.ace_numeric {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_constant.ace_character.ace_escape {\n color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_constant.ace_other {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_function {\n color: #8ec07c\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_constant {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_constant.ace_property-value {\n color: #f9f5d7\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_class {\n color: #fabd2f\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_type {\n color: #fabd2f\n}\n\n.ace-gruvbox-dark-hard .ace_storage {\n color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_invalid {\n color: #f9f5d7;\n background-color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_string {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_string.ace_regexp {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_comment {\n font-style: italic;\n color: #928374\n}\n\n.ace-gruvbox-dark-hard .ace_variable {\n color: #83a598\n}\n\n.ace-gruvbox-dark-hard .ace_variable.ace_language {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_variable.ace_parameter {\n color: #f9f5d7\n}\n\n.ace-gruvbox-dark-hard .ace_meta.ace_tag {\n color: #f9f5d7\n}\n\n.ace-gruvbox-dark-hard .ace_entity.ace_other.ace_attribute-name {\n color: #fabd2f\n}\n\n.ace-gruvbox-dark-hard .ace_entity.ace_name.ace_function {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_entity.ace_name.ace_tag {\n color: #83a598\n}\n\n.ace-gruvbox-dark-hard .ace_markup.ace_heading {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_markup.ace_list {\n color: #83a598\n}\n\n.ace-gruvbox-dark-hard .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/gruvbox_dark_hard",["require","exports","module","ace/theme/gruvbox_dark_hard-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-gruvbox-dark-hard"; +exports.cssText = require("./gruvbox_dark_hard-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); (function() { + window.require(["ace/theme/gruvbox_dark_hard"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-gruvbox_light_hard.js b/ui/base1/ace/theme-gruvbox_light_hard.js new file mode 100644 index 0000000..cb1dc92 --- /dev/null +++ b/ui/base1/ace/theme-gruvbox_light_hard.js @@ -0,0 +1,18 @@ +define("ace/theme/gruvbox_light_hard-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-gruvbox-light-hard .ace_gutter {\n background: #f9f5d7;\n color: rgb(155,151,135)\n}\n\n.ace-gruvbox-light-hard .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-gruvbox-light-hard {\n background-color: #f9f5d7;\n color: rgba(60, 56, 54, 0.50)\n}\n\n.ace-gruvbox-light-hard .ace_cursor {\n color: #7c6f64\n}\n\n.ace-gruvbox-light-hard .ace_marker-layer .ace_selection {\n background: #ebdbb2\n}\n\n.ace-gruvbox-light-hard.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #f9f5d7;\n border-radius: 2px\n}\n\n.ace-gruvbox-light-hard .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-gruvbox-light-hard .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(60, 56, 54, 0.15)\n}\n\n.ace-gruvbox-light-hard .ace_marker-layer .ace_active-line {\n background: #ebdbb2\n}\n\n.ace-gruvbox-light-hard .ace_gutter-active-line {\n background-color: #ebdbb2\n}\n\n.ace-gruvbox-light-hard .ace_marker-layer .ace_selected-word {\n border: 1px solid #ebdbb2\n}\n\n.ace-gruvbox-light-hard .ace_fold {\n background-color: #79740e;\n border-color: rgba(60, 56, 54, 0.50)\n}\n\n.ace-gruvbox-light-hard .ace_keyword {\n color: #9d0006\n}\n\n.ace-gruvbox-light-hard .ace_keyword.ace_operator {\n color: #427b58\n}\n\n.ace-gruvbox-light-hard .ace_keyword.ace_other.ace_unit {\n color: #b16286\n}\n\n.ace-gruvbox-light-hard .ace_constant {\n color: #8f3f71\n}\n\n.ace-gruvbox-light-hard .ace_constant.ace_numeric {\n color: #8f3f71\n}\n\n.ace-gruvbox-light-hard .ace_constant.ace_character.ace_escape {\n color: #9d0006\n}\n\n.ace-gruvbox-light-hard .ace_constant.ace_other {\n color: #8f3f71\n}\n\n.ace-gruvbox-light-hard .ace_support.ace_function {\n color: #427b58\n}\n\n.ace-gruvbox-light-hard .ace_support.ace_constant {\n color: #8f3f71\n}\n\n.ace-gruvbox-light-hard .ace_support.ace_constant.ace_property-value {\n color: #1d2021\n}\n\n.ace-gruvbox-light-hard .ace_support.ace_class {\n color: #b57614\n}\n\n.ace-gruvbox-light-hard .ace_support.ace_type {\n color: #b57614\n}\n\n.ace-gruvbox-light-hard .ace_storage {\n color: #9d0006\n}\n\n.ace-gruvbox-light-hard .ace_invalid {\n color: #1d2021;\n background-color: #9d0006\n}\n\n.ace-gruvbox-light-hard .ace_string {\n color: #79740e\n}\n\n.ace-gruvbox-light-hard .ace_string.ace_regexp {\n color: #79740e\n}\n\n.ace-gruvbox-light-hard .ace_comment {\n font-style: italic;\n color: #928374\n}\n\n.ace-gruvbox-light-hard .ace_variable {\n color: #076678\n}\n\n.ace-gruvbox-light-hard .ace_variable.ace_language {\n color: #8f3f71\n}\n\n.ace-gruvbox-light-hard .ace_variable.ace_parameter {\n color: #1d2021\n}\n\n.ace-gruvbox-light-hard .ace_meta.ace_tag {\n color: #1d2021\n}\n\n.ace-gruvbox-light-hard .ace_entity.ace_other.ace_attribute-name {\n color: #b57614\n}\n\n.ace-gruvbox-light-hard .ace_entity.ace_name.ace_function {\n color: #79740e\n}\n\n.ace-gruvbox-light-hard .ace_entity.ace_name.ace_tag {\n color: #076678\n}\n\n.ace-gruvbox-light-hard .ace_markup.ace_heading {\n color: #79740e\n}\n\n.ace-gruvbox-light-hard .ace_markup.ace_list {\n color: #076678\n}\n\n.ace-gruvbox-light-hard .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-gruvbox-light-hard .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/gruvbox_light_hard",["require","exports","module","ace/theme/gruvbox_light_hard-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-gruvbox-light-hard"; +exports.cssText = require("./gruvbox_light_hard-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); + +}); (function() { + window.require(["ace/theme/gruvbox_light_hard"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-idle_fingers.js b/ui/base1/ace/theme-idle_fingers.js new file mode 100644 index 0000000..ab8a311 --- /dev/null +++ b/ui/base1/ace/theme-idle_fingers.js @@ -0,0 +1,18 @@ +define("ace/theme/idle_fingers-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-idle-fingers .ace_gutter {\n background: #3b3b3b;\n color: rgb(153,153,153)\n}\n\n.ace-idle-fingers .ace_print-margin {\n width: 1px;\n background: #3b3b3b\n}\n\n.ace-idle-fingers {\n background-color: #323232;\n color: #FFFFFF\n}\n\n.ace-idle-fingers .ace_cursor {\n color: #91FF00\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_selection {\n background: rgba(90, 100, 126, 0.88)\n}\n\n.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #323232;\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_active-line {\n background: #353637\n}\n\n.ace-idle-fingers .ace_gutter-active-line {\n background-color: #353637\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(90, 100, 126, 0.88)\n}\n\n.ace-idle-fingers .ace_invisible {\n color: #404040\n}\n\n.ace-idle-fingers .ace_keyword,\n.ace-idle-fingers .ace_meta {\n color: #CC7833\n}\n\n.ace-idle-fingers .ace_constant,\n.ace-idle-fingers .ace_constant.ace_character,\n.ace-idle-fingers .ace_constant.ace_character.ace_escape,\n.ace-idle-fingers .ace_constant.ace_other,\n.ace-idle-fingers .ace_support.ace_constant {\n color: #6C99BB\n}\n\n.ace-idle-fingers .ace_invalid {\n color: #FFFFFF;\n background-color: #FF0000\n}\n\n.ace-idle-fingers .ace_fold {\n background-color: #CC7833;\n border-color: #FFFFFF\n}\n\n.ace-idle-fingers .ace_support.ace_function {\n color: #B83426\n}\n\n.ace-idle-fingers .ace_variable.ace_parameter {\n font-style: italic\n}\n\n.ace-idle-fingers .ace_string {\n color: #A5C261\n}\n\n.ace-idle-fingers .ace_string.ace_regexp {\n color: #CCCC33\n}\n\n.ace-idle-fingers .ace_comment {\n font-style: italic;\n color: #BC9458\n}\n\n.ace-idle-fingers .ace_meta.ace_tag {\n color: #FFE5BB\n}\n\n.ace-idle-fingers .ace_entity.ace_name {\n color: #FFC66D\n}\n\n.ace-idle-fingers .ace_collab.ace_user1 {\n color: #323232;\n background-color: #FFF980\n}\n\n.ace-idle-fingers .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-idle-fingers .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/idle_fingers",["require","exports","module","ace/theme/idle_fingers-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-idle-fingers"; +exports.cssText = require("./idle_fingers-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/idle_fingers"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-iplastic.js b/ui/base1/ace/theme-iplastic.js new file mode 100644 index 0000000..799f643 --- /dev/null +++ b/ui/base1/ace/theme-iplastic.js @@ -0,0 +1,18 @@ +define("ace/theme/iplastic-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-iplastic .ace_gutter {\n background: #dddddd;\n color: #666666\n}\n\n.ace-iplastic .ace_print-margin {\n width: 1px;\n background: #bbbbbb\n}\n\n.ace-iplastic {\n background-color: #eeeeee;\n color: #333333\n}\n\n.ace-iplastic .ace_cursor {\n color: #333\n}\n\n.ace-iplastic .ace_marker-layer .ace_selection {\n background: #BAD6FD;\n}\n\n.ace-iplastic.ace_multiselect .ace_selection.ace_start {\n border-radius: 4px\n}\n\n.ace-iplastic .ace_marker-layer .ace_step {\n background: #444444\n}\n\n.ace-iplastic .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E;\n background: #FFF799\n}\n\n.ace-iplastic .ace_marker-layer .ace_active-line {\n background: #e5e5e5\n}\n\n.ace-iplastic .ace_gutter-active-line {\n background-color: #eeeeee\n}\n\n.ace-iplastic .ace_marker-layer .ace_selected-word {\n border: 1px solid #555555;\n border-radius:4px\n}\n\n.ace-iplastic .ace_invisible {\n color: #999999\n}\n\n.ace-iplastic .ace_entity.ace_name.ace_tag,\n.ace-iplastic .ace_keyword,\n.ace-iplastic .ace_meta.ace_tag,\n.ace-iplastic .ace_storage {\n color: #0000FF\n}\n\n.ace-iplastic .ace_punctuation,\n.ace-iplastic .ace_punctuation.ace_tag {\n color: #000\n}\n\n.ace-iplastic .ace_constant {\n color: #333333;\n font-weight: 700\n}\n\n.ace-iplastic .ace_constant.ace_character,\n.ace-iplastic .ace_constant.ace_language,\n.ace-iplastic .ace_constant.ace_numeric,\n.ace-iplastic .ace_constant.ace_other {\n color: #0066FF;\n font-weight: 700\n}\n\n.ace-iplastic .ace_constant.ace_numeric{\n font-weight: 100\n}\n\n.ace-iplastic .ace_invalid {\n color: #F8F8F0;\n background-color: #F92672\n}\n\n.ace-iplastic .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #AE81FF\n}\n\n.ace-iplastic .ace_support.ace_constant,\n.ace-iplastic .ace_support.ace_function {\n color: #333333;\n font-weight: 700\n}\n\n.ace-iplastic .ace_fold {\n background-color: #464646;\n border-color: #F8F8F2\n}\n\n.ace-iplastic .ace_storage.ace_type,\n.ace-iplastic .ace_support.ace_class,\n.ace-iplastic .ace_support.ace_type {\n color: #3333fc;\n font-weight: 700\n}\n\n.ace-iplastic .ace_entity.ace_name.ace_function,\n.ace-iplastic .ace_entity.ace_other,\n.ace-iplastic .ace_entity.ace_other.ace_attribute-name,\n.ace-iplastic .ace_variable {\n color: #3366cc;\n font-style: italic\n}\n\n.ace-iplastic .ace_variable.ace_parameter {\n font-style: italic;\n color: #2469E0\n}\n\n.ace-iplastic .ace_string {\n color: #a55f03\n}\n\n.ace-iplastic .ace_comment {\n color: #777777;\n font-style: italic\n}\n\n.ace-iplastic .ace_fold-widget {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==);\n}\n\n.ace-iplastic .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABlJREFUeNpi+P//PwMzMzPzfwAAAAD//wMAGRsECSML/RIAAAAASUVORK5CYII=) right repeat-y\n}\n\n.ace-iplastic .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/iplastic",["require","exports","module","ace/theme/iplastic-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-iplastic"; +exports.cssText = require("./iplastic-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/iplastic"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-katzenmilch.js b/ui/base1/ace/theme-katzenmilch.js new file mode 100644 index 0000000..2e79430 --- /dev/null +++ b/ui/base1/ace/theme-katzenmilch.js @@ -0,0 +1,18 @@ +define("ace/theme/katzenmilch-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-katzenmilch .ace_gutter,\n/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: ) */\n\n.ace-katzenmilch .ace_gutter {\n background: #e8e8e8;\n color: #333\n}\n\n.ace-katzenmilch .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-katzenmilch {\n background-color: #f3f2f3;\n color: rgba(15, 0, 9, 1.0)\n}\n\n.ace-katzenmilch .ace_cursor {\n border-left: 2px solid #100011\n}\n\n.ace-katzenmilch .ace_overwrite-cursors .ace_cursor {\n border-left: 0px;\n border-bottom: 1px solid #100011\n}\n\n.ace-katzenmilch .ace_marker-layer .ace_selection {\n background: rgba(100, 5, 208, 0.27)\n}\n\n.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #f3f2f3;\n}\n\n.ace-katzenmilch .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-katzenmilch .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(0, 0, 0, 0.33);\n}\n\n.ace-katzenmilch .ace_marker-layer .ace_active-line {\n background: rgb(232, 242, 254)\n}\n\n.ace-katzenmilch .ace_gutter-active-line {\n background-color: rgb(232, 242, 254)\n}\n\n.ace-katzenmilch .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(100, 5, 208, 0.27)\n}\n\n.ace-katzenmilch .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-katzenmilch .ace_fold {\n background-color: rgba(2, 95, 73, 0.97);\n border-color: rgba(15, 0, 9, 1.0)\n}\n\n.ace-katzenmilch .ace_keyword {\n color: #674Aa8;\n rbackground-color: rgba(163, 170, 216, 0.055)\n}\n\n.ace-katzenmilch .ace_constant.ace_language {\n color: #7D7e52;\n rbackground-color: rgba(189, 190, 130, 0.059)\n}\n\n.ace-katzenmilch .ace_constant.ace_numeric {\n color: rgba(79, 130, 123, 0.93);\n rbackground-color: rgba(119, 194, 187, 0.059)\n}\n\n.ace-katzenmilch .ace_constant.ace_character,\n.ace-katzenmilch .ace_constant.ace_other {\n color: rgba(2, 95, 105, 1.0);\n rbackground-color: rgba(127, 34, 153, 0.063)\n}\n\n.ace-katzenmilch .ace_support.ace_function {\n color: #9D7e62;\n rbackground-color: rgba(189, 190, 130, 0.039)\n}\n\n.ace-katzenmilch .ace_support.ace_class {\n color: rgba(239, 106, 167, 1.0);\n rbackground-color: rgba(239, 106, 167, 0.063)\n}\n\n.ace-katzenmilch .ace_storage {\n color: rgba(123, 92, 191, 1.0);\n rbackground-color: rgba(139, 93, 223, 0.051)\n}\n\n.ace-katzenmilch .ace_invalid {\n color: #DFDFD5;\n rbackground-color: #CC1B27\n}\n\n.ace-katzenmilch .ace_string {\n color: #5a5f9b;\n rbackground-color: rgba(170, 175, 219, 0.035)\n}\n\n.ace-katzenmilch .ace_comment {\n font-style: italic;\n color: rgba(64, 79, 80, 0.67);\n rbackground-color: rgba(95, 15, 255, 0.0078)\n}\n\n.ace-katzenmilch .ace_entity.ace_name.ace_function,\n.ace-katzenmilch .ace_variable {\n color: rgba(2, 95, 73, 0.97);\n rbackground-color: rgba(34, 255, 73, 0.12)\n}\n\n.ace-katzenmilch .ace_variable.ace_language {\n color: #316fcf;\n rbackground-color: rgba(58, 175, 255, 0.039)\n}\n\n.ace-katzenmilch .ace_variable.ace_parameter {\n font-style: italic;\n color: rgba(51, 150, 159, 0.87);\n rbackground-color: rgba(5, 214, 249, 0.043)\n}\n\n.ace-katzenmilch .ace_entity.ace_other.ace_attribute-name {\n color: rgba(73, 70, 194, 0.93);\n rbackground-color: rgba(73, 134, 194, 0.035)\n}\n\n.ace-katzenmilch .ace_entity.ace_name.ace_tag {\n color: #3976a2;\n rbackground-color: rgba(73, 166, 210, 0.039)\n}\n\n.ace-katzenmilch .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-katzenmilch .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n}\n"; + +}); + +define("ace/theme/katzenmilch",["require","exports","module","ace/theme/katzenmilch-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-katzenmilch"; +exports.cssText = require("./katzenmilch-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/katzenmilch"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-kr_theme.js b/ui/base1/ace/theme-kr_theme.js new file mode 100644 index 0000000..0b70427 --- /dev/null +++ b/ui/base1/ace/theme-kr_theme.js @@ -0,0 +1,18 @@ +define("ace/theme/kr_theme-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-kr-theme .ace_gutter {\n background: #1c1917;\n color: #FCFFE0\n}\n\n.ace-kr-theme .ace_print-margin {\n width: 1px;\n background: #1c1917\n}\n\n.ace-kr-theme {\n background-color: #0B0A09;\n color: #FCFFE0\n}\n\n.ace-kr-theme .ace_cursor {\n color: #FF9900\n}\n\n.ace-kr-theme .ace_marker-layer .ace_selection {\n background: rgba(170, 0, 255, 0.45)\n}\n\n.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #0B0A09;\n}\n\n.ace-kr-theme .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-kr-theme .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 177, 111, 0.32)\n}\n\n.ace-kr-theme .ace_marker-layer .ace_active-line {\n background: #38403D\n}\n\n.ace-kr-theme .ace_gutter-active-line {\n background-color : #38403D\n}\n\n.ace-kr-theme .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(170, 0, 255, 0.45)\n}\n\n.ace-kr-theme .ace_invisible {\n color: rgba(255, 177, 111, 0.32)\n}\n\n.ace-kr-theme .ace_keyword,\n.ace-kr-theme .ace_meta {\n color: #949C8B\n}\n\n.ace-kr-theme .ace_constant,\n.ace-kr-theme .ace_constant.ace_character,\n.ace-kr-theme .ace_constant.ace_character.ace_escape,\n.ace-kr-theme .ace_constant.ace_other {\n color: rgba(210, 117, 24, 0.76)\n}\n\n.ace-kr-theme .ace_invalid {\n color: #F8F8F8;\n background-color: #A41300\n}\n\n.ace-kr-theme .ace_support {\n color: #9FC28A\n}\n\n.ace-kr-theme .ace_support.ace_constant {\n color: #C27E66\n}\n\n.ace-kr-theme .ace_fold {\n background-color: #949C8B;\n border-color: #FCFFE0\n}\n\n.ace-kr-theme .ace_support.ace_function {\n color: #85873A\n}\n\n.ace-kr-theme .ace_storage {\n color: #FFEE80\n}\n\n.ace-kr-theme .ace_string {\n color: rgba(164, 161, 181, 0.8)\n}\n\n.ace-kr-theme .ace_string.ace_regexp {\n color: rgba(125, 255, 192, 0.65)\n}\n\n.ace-kr-theme .ace_comment {\n font-style: italic;\n color: #706D5B\n}\n\n.ace-kr-theme .ace_variable {\n color: #D1A796\n}\n\n.ace-kr-theme .ace_list,\n.ace-kr-theme .ace_markup.ace_list {\n background-color: #0F0040\n}\n\n.ace-kr-theme .ace_variable.ace_language {\n color: #FF80E1\n}\n\n.ace-kr-theme .ace_meta.ace_tag {\n color: #BABD9C\n}\n\n.ace-kr-theme .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-kr-theme .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/kr_theme",["require","exports","module","ace/theme/kr_theme-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-kr-theme"; +exports.cssText = require("./kr_theme-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/kr_theme"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-kuroir.js b/ui/base1/ace/theme-kuroir.js new file mode 100644 index 0000000..58f911b --- /dev/null +++ b/ui/base1/ace/theme-kuroir.js @@ -0,0 +1,18 @@ +define("ace/theme/kuroir-css",["require","exports","module"], function(require, exports, module){module.exports = "/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: 467560D0-6ACE-4409-82FD-4791420837AC) */\n\n.ace-kuroir .ace_gutter {\n background: #e8e8e8;\n color: #333;\n}\n\n.ace-kuroir .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-kuroir {\n background-color: #E8E9E8;\n color: #363636;\n}\n\n.ace-kuroir .ace_cursor {\n color: #202020;\n}\n\n.ace-kuroir .ace_marker-layer .ace_selection {\n background: rgba(245, 170, 0, 0.57);\n}\n\n.ace-kuroir.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #E8E9E8;\n}\n\n.ace-kuroir .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-kuroir .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(0, 0, 0, 0.29);\n}\n\n.ace-kuroir .ace_marker-layer .ace_active-line {\n background: rgba(203, 220, 47, 0.22);\n}\n\n.ace-kuroir .ace_gutter-active-line {\n background-color: rgba(203, 220, 47, 0.22);\n}\n\n.ace-kuroir .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(245, 170, 0, 0.57);\n}\n\n.ace-kuroir .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-kuroir .ace_fold {\n border-color: #363636;\n}\n\n\n\n\n\n.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\nbackground-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\nfont-style:italic;\ncolor:#FD1732;\nbackground-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\nbackground-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\nbackground-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\nbackground-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\n\n.ace-kuroir .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-kuroir .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/kuroir",["require","exports","module","ace/theme/kuroir-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-kuroir"; +exports.cssText = require("./kuroir-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/kuroir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-merbivore.js b/ui/base1/ace/theme-merbivore.js new file mode 100644 index 0000000..bb95938 --- /dev/null +++ b/ui/base1/ace/theme-merbivore.js @@ -0,0 +1,18 @@ +define("ace/theme/merbivore-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-merbivore .ace_gutter {\n background: #202020;\n color: #E6E1DC\n}\n\n.ace-merbivore .ace_print-margin {\n width: 1px;\n background: #555651\n}\n\n.ace-merbivore {\n background-color: #161616;\n color: #E6E1DC\n}\n\n.ace-merbivore .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-merbivore .ace_marker-layer .ace_selection {\n background: #454545\n}\n\n.ace-merbivore.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #161616;\n}\n\n.ace-merbivore .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-merbivore .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040\n}\n\n.ace-merbivore .ace_marker-layer .ace_active-line {\n background: #333435\n}\n\n.ace-merbivore .ace_gutter-active-line {\n background-color: #333435\n}\n\n.ace-merbivore .ace_marker-layer .ace_selected-word {\n border: 1px solid #454545\n}\n\n.ace-merbivore .ace_invisible {\n color: #404040\n}\n\n.ace-merbivore .ace_entity.ace_name.ace_tag,\n.ace-merbivore .ace_keyword,\n.ace-merbivore .ace_meta,\n.ace-merbivore .ace_meta.ace_tag,\n.ace-merbivore .ace_storage,\n.ace-merbivore .ace_support.ace_function {\n color: #FC6F09\n}\n\n.ace-merbivore .ace_constant,\n.ace-merbivore .ace_constant.ace_character,\n.ace-merbivore .ace_constant.ace_character.ace_escape,\n.ace-merbivore .ace_constant.ace_other,\n.ace-merbivore .ace_support.ace_type {\n color: #1EDAFB\n}\n\n.ace-merbivore .ace_constant.ace_character.ace_escape {\n color: #519F50\n}\n\n.ace-merbivore .ace_constant.ace_language {\n color: #FDC251\n}\n\n.ace-merbivore .ace_constant.ace_library,\n.ace-merbivore .ace_string,\n.ace-merbivore .ace_support.ace_constant {\n color: #8DFF0A\n}\n\n.ace-merbivore .ace_constant.ace_numeric {\n color: #58C554\n}\n\n.ace-merbivore .ace_invalid {\n color: #FFFFFF;\n background-color: #990000\n}\n\n.ace-merbivore .ace_fold {\n background-color: #FC6F09;\n border-color: #E6E1DC\n}\n\n.ace-merbivore .ace_comment {\n font-style: italic;\n color: #AD2EA4\n}\n\n.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\n color: #FFFF89\n}\n\n.ace-merbivore .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-merbivore .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/merbivore",["require","exports","module","ace/theme/merbivore-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-merbivore"; +exports.cssText = require("./merbivore-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/merbivore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-merbivore_soft.js b/ui/base1/ace/theme-merbivore_soft.js new file mode 100644 index 0000000..c629451 --- /dev/null +++ b/ui/base1/ace/theme-merbivore_soft.js @@ -0,0 +1,18 @@ +define("ace/theme/merbivore_soft-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-merbivore-soft .ace_gutter {\n background: #262424;\n color: #E6E1DC\n}\n\n.ace-merbivore-soft .ace_print-margin {\n width: 1px;\n background: #262424\n}\n\n.ace-merbivore-soft {\n background-color: #1C1C1C;\n color: #E6E1DC\n}\n\n.ace-merbivore-soft .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_selection {\n background: #494949\n}\n\n.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #1C1C1C;\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_active-line {\n background: #333435\n}\n\n.ace-merbivore-soft .ace_gutter-active-line {\n background-color: #333435\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_selected-word {\n border: 1px solid #494949\n}\n\n.ace-merbivore-soft .ace_invisible {\n color: #404040\n}\n\n.ace-merbivore-soft .ace_entity.ace_name.ace_tag,\n.ace-merbivore-soft .ace_keyword,\n.ace-merbivore-soft .ace_meta,\n.ace-merbivore-soft .ace_meta.ace_tag,\n.ace-merbivore-soft .ace_storage {\n color: #FC803A\n}\n\n.ace-merbivore-soft .ace_constant,\n.ace-merbivore-soft .ace_constant.ace_character,\n.ace-merbivore-soft .ace_constant.ace_character.ace_escape,\n.ace-merbivore-soft .ace_constant.ace_other,\n.ace-merbivore-soft .ace_support.ace_type {\n color: #68C1D8\n}\n\n.ace-merbivore-soft .ace_constant.ace_character.ace_escape {\n color: #B3E5B4\n}\n\n.ace-merbivore-soft .ace_constant.ace_language {\n color: #E1C582\n}\n\n.ace-merbivore-soft .ace_constant.ace_library,\n.ace-merbivore-soft .ace_string,\n.ace-merbivore-soft .ace_support.ace_constant {\n color: #8EC65F\n}\n\n.ace-merbivore-soft .ace_constant.ace_numeric {\n color: #7FC578\n}\n\n.ace-merbivore-soft .ace_invalid,\n.ace-merbivore-soft .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #FE3838\n}\n\n.ace-merbivore-soft .ace_fold {\n background-color: #FC803A;\n border-color: #E6E1DC\n}\n\n.ace-merbivore-soft .ace_comment,\n.ace-merbivore-soft .ace_meta {\n font-style: italic;\n color: #AC4BB8\n}\n\n.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\n color: #EAF1A3\n}\n\n.ace-merbivore-soft .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-merbivore-soft .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/merbivore_soft",["require","exports","module","ace/theme/merbivore_soft-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-merbivore-soft"; +exports.cssText = require("./merbivore_soft-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/merbivore_soft"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-mono_industrial.js b/ui/base1/ace/theme-mono_industrial.js new file mode 100644 index 0000000..d5d5fc3 --- /dev/null +++ b/ui/base1/ace/theme-mono_industrial.js @@ -0,0 +1,18 @@ +define("ace/theme/mono_industrial-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-mono-industrial .ace_gutter {\n background: #1d2521;\n color: #C5C9C9\n}\n\n.ace-mono-industrial .ace_print-margin {\n width: 1px;\n background: #555651\n}\n\n.ace-mono-industrial {\n background-color: #222C28;\n color: #FFFFFF\n}\n\n.ace-mono-industrial .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_selection {\n background: rgba(145, 153, 148, 0.40)\n}\n\n.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #222C28;\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(102, 108, 104, 0.50)\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_active-line {\n background: rgba(12, 13, 12, 0.25)\n}\n\n.ace-mono-industrial .ace_gutter-active-line {\n background-color: rgba(12, 13, 12, 0.25)\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(145, 153, 148, 0.40)\n}\n\n.ace-mono-industrial .ace_invisible {\n color: rgba(102, 108, 104, 0.50)\n}\n\n.ace-mono-industrial .ace_string {\n background-color: #151C19;\n color: #FFFFFF\n}\n\n.ace-mono-industrial .ace_keyword,\n.ace-mono-industrial .ace_meta {\n color: #A39E64\n}\n\n.ace-mono-industrial .ace_constant,\n.ace-mono-industrial .ace_constant.ace_character,\n.ace-mono-industrial .ace_constant.ace_character.ace_escape,\n.ace-mono-industrial .ace_constant.ace_numeric,\n.ace-mono-industrial .ace_constant.ace_other {\n color: #E98800\n}\n\n.ace-mono-industrial .ace_entity.ace_name.ace_function,\n.ace-mono-industrial .ace_keyword.ace_operator,\n.ace-mono-industrial .ace_variable {\n color: #A8B3AB\n}\n\n.ace-mono-industrial .ace_invalid {\n color: #FFFFFF;\n background-color: rgba(153, 0, 0, 0.68)\n}\n\n.ace-mono-industrial .ace_support.ace_constant {\n color: #C87500\n}\n\n.ace-mono-industrial .ace_fold {\n background-color: #A8B3AB;\n border-color: #FFFFFF\n}\n\n.ace-mono-industrial .ace_support.ace_function {\n color: #588E60\n}\n\n.ace-mono-industrial .ace_entity.ace_name,\n.ace-mono-industrial .ace_support.ace_class,\n.ace-mono-industrial .ace_support.ace_type {\n color: #5778B6\n}\n\n.ace-mono-industrial .ace_storage {\n color: #C23B00\n}\n\n.ace-mono-industrial .ace_variable.ace_language,\n.ace-mono-industrial .ace_variable.ace_parameter {\n color: #648BD2\n}\n\n.ace-mono-industrial .ace_comment {\n color: #666C68;\n background-color: #151C19\n}\n\n.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\n color: #909993\n}\n\n.ace-mono-industrial .ace_entity.ace_name.ace_tag {\n color: #A65EFF\n}\n\n.ace-mono-industrial .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-mono-industrial .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/mono_industrial",["require","exports","module","ace/theme/mono_industrial-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-mono-industrial"; +exports.cssText = require("./mono_industrial-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/mono_industrial"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-monokai.js b/ui/base1/ace/theme-monokai.js new file mode 100644 index 0000000..e918f80 --- /dev/null +++ b/ui/base1/ace/theme-monokai.js @@ -0,0 +1,18 @@ +define("ace/theme/monokai-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-monokai .ace_gutter {\n background: #2F3129;\n color: #8F908A\n}\n\n.ace-monokai .ace_print-margin {\n width: 1px;\n background: #555651\n}\n\n.ace-monokai {\n background-color: #272822;\n color: #F8F8F2\n}\n\n.ace-monokai .ace_cursor {\n color: #F8F8F0\n}\n\n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E\n}\n\n.ace-monokai.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #272822;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_marker-layer .ace_active-line {\n background: #202020\n}\n\n.ace-monokai .ace_gutter-active-line {\n background-color: #272727\n}\n\n.ace-monokai .ace_marker-layer .ace_selected-word {\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_invisible {\n color: #52524d\n}\n\n.ace-monokai .ace_entity.ace_name.ace_tag,\n.ace-monokai .ace_keyword,\n.ace-monokai .ace_meta.ace_tag,\n.ace-monokai .ace_storage {\n color: #F92672\n}\n\n.ace-monokai .ace_punctuation,\n.ace-monokai .ace_punctuation.ace_tag {\n color: #fff\n}\n\n.ace-monokai .ace_constant.ace_character,\n.ace-monokai .ace_constant.ace_language,\n.ace-monokai .ace_constant.ace_numeric,\n.ace-monokai .ace_constant.ace_other {\n color: #AE81FF\n}\n\n.ace-monokai .ace_invalid {\n color: #F8F8F0;\n background-color: #F92672\n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #AE81FF\n}\n\n.ace-monokai .ace_support.ace_constant,\n.ace-monokai .ace_support.ace_function {\n color: #66D9EF\n}\n\n.ace-monokai .ace_fold {\n background-color: #A6E22E;\n border-color: #F8F8F2\n}\n\n.ace-monokai .ace_storage.ace_type,\n.ace-monokai .ace_support.ace_class,\n.ace-monokai .ace_support.ace_type {\n font-style: italic;\n color: #66D9EF\n}\n\n.ace-monokai .ace_entity.ace_name.ace_function,\n.ace-monokai .ace_entity.ace_other,\n.ace-monokai .ace_entity.ace_other.ace_attribute-name,\n.ace-monokai .ace_variable {\n color: #A6E22E\n}\n\n.ace-monokai .ace_variable.ace_parameter {\n font-style: italic;\n color: #FD971F\n}\n\n.ace-monokai .ace_string {\n color: #E6DB74\n}\n\n.ace-monokai .ace_comment {\n color: #75715E\n}\n\n.ace-monokai .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-monokai .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-monokai"; +exports.cssText = require("./monokai-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/monokai"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-nord_dark.js b/ui/base1/ace/theme-nord_dark.js new file mode 100644 index 0000000..bc86271 --- /dev/null +++ b/ui/base1/ace/theme-nord_dark.js @@ -0,0 +1,19 @@ +define("ace/theme/nord_dark-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-nord-dark .ace_gutter {\n color: #616e88;\n}\n\n.ace-nord-dark .ace_print-margin {\n width: 1px;\n background: #4c566a;\n}\n\n.ace-nord-dark {\n background-color: #2e3440;\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-nord-dark .ace_storage {\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_cursor {\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_string.ace_regexp {\n color: #bf616a;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_active-line {\n background: #434c5ecc;\n}\n.ace-nord-dark .ace_marker-layer .ace_selection {\n background: #434c5ecc;\n}\n\n.ace-nord-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #2e3440;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_step {\n background: #ebcb8b;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #88c0d066;\n}\n\n.ace-nord-dark .ace_gutter-active-line {\n background-color: #434c5ecc;\n}\n\n.ace-nord-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #88c0d066;\n}\n\n.ace-nord-dark .ace_invisible {\n color: #4c566a;\n}\n\n.ace-nord-dark .ace_keyword,\n.ace-nord-dark .ace_meta,\n.ace-nord-dark .ace_support.ace_class,\n.ace-nord-dark .ace_support.ace_type {\n color: #81a1c1;\n}\n\n.ace-nord-dark .ace_constant.ace_character,\n.ace-nord-dark .ace_constant.ace_other {\n color: #d8dee9;\n}\n\n.ace-nord-dark .ace_constant.ace_language {\n color: #5e81ac;\n}\n\n.ace-nord-dark .ace_constant.ace_escape {\n color: #ebcB8b;\n}\n\n.ace-nord-dark .ace_constant.ace_numeric {\n color: #b48ead;\n}\n\n.ace-nord-dark .ace_fold {\n background-color: #4c566a;\n border-color: #d8dee9;\n}\n\n.ace-nord-dark .ace_entity.ace_name.ace_function,\n.ace-nord-dark .ace_entity.ace_name.ace_tag,\n.ace-nord-dark .ace_support.ace_function,\n.ace-nord-dark .ace_variable,\n.ace-nord-dark .ace_variable.ace_language {\n color: #8fbcbb;\n}\n\n.ace-nord-dark .ace_string {\n color: #a3be8c;\n}\n\n.ace-nord-dark .ace_comment {\n color: #616e88;\n}\n\n.ace-nord-dark .ace_indent-guide {\n box-shadow: inset -1px 0 0 0 #434c5eb3;\n}\n\n.ace-nord-dark .ace_indent-guide-active {\n box-shadow: inset -1px 0 0 0 #8395b8b3;\n}\n"; + +}); + +define("ace/theme/nord_dark",["require","exports","module","ace/theme/nord_dark-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-nord-dark"; +exports.cssText = require("./nord_dark-css"); +exports.$selectionColorConflict = true; +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/nord_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-one_dark.js b/ui/base1/ace/theme-one_dark.js new file mode 100644 index 0000000..760ce48 --- /dev/null +++ b/ui/base1/ace/theme-one_dark.js @@ -0,0 +1,18 @@ +define("ace/theme/one_dark-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-one-dark .ace_gutter {\n background: #282c34;\n color: #6a6f7a\n}\n\n.ace-one-dark .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-one-dark {\n background-color: #282c34;\n color: #abb2bf\n}\n\n.ace-one-dark .ace_cursor {\n color: #528bff\n}\n\n.ace-one-dark .ace_marker-layer .ace_selection {\n background: #3d4350\n}\n\n.ace-one-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0 #282c34;\n border-radius: 2px\n}\n\n.ace-one-dark .ace_marker-layer .ace_step {\n background: #c6dbae\n}\n\n.ace-one-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #747369\n}\n\n.ace-one-dark .ace_marker-layer .ace_active-line {\n background: rgba(76, 87, 103, .19)\n}\n\n.ace-one-dark .ace_gutter-active-line {\n background-color: rgba(76, 87, 103, .19)\n}\n\n.ace-one-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #3d4350\n}\n\n.ace-one-dark .ace_fold {\n background-color: #61afef;\n border-color: #abb2bf\n}\n\n.ace-one-dark .ace_keyword {\n color: #c678dd\n}\n\n.ace-one-dark .ace_keyword.ace_operator {\n color: #c678dd\n}\n\n.ace-one-dark .ace_keyword.ace_other.ace_unit {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_language {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_numeric {\n color: #d19a66\n}\n\n.ace-one-dark .ace_constant.ace_character {\n color: #56b6c2\n}\n\n.ace-one-dark .ace_constant.ace_other {\n color: #56b6c2\n}\n\n.ace-one-dark .ace_support.ace_function {\n color: #61afef\n}\n\n.ace-one-dark .ace_support.ace_constant {\n color: #d19a66\n}\n\n.ace-one-dark .ace_support.ace_class {\n color: #e5c07b\n}\n\n.ace-one-dark .ace_support.ace_type {\n color: #e5c07b\n}\n\n.ace-one-dark .ace_storage {\n color: #c678dd\n}\n\n.ace-one-dark .ace_storage.ace_type {\n color: #c678dd\n}\n\n.ace-one-dark .ace_invalid {\n color: #fff;\n background-color: #f2777a\n}\n\n.ace-one-dark .ace_invalid.ace_deprecated {\n color: #272b33;\n background-color: #d27b53\n}\n\n.ace-one-dark .ace_string {\n color: #98c379\n}\n\n.ace-one-dark .ace_string.ace_regexp {\n color: #e06c75\n}\n\n.ace-one-dark .ace_comment {\n font-style: italic;\n color: #5c6370\n}\n\n.ace-one-dark .ace_variable {\n color: #e06c75\n}\n\n.ace-one-dark .ace_variable.ace_parameter {\n color: #d19a66\n}\n\n.ace-one-dark .ace_meta.ace_tag {\n color: #e06c75\n}\n\n.ace-one-dark .ace_entity.ace_other.ace_attribute-name {\n color: #e06c75\n}\n\n.ace-one-dark .ace_entity.ace_name.ace_function {\n color: #61afef\n}\n\n.ace-one-dark .ace_entity.ace_name.ace_tag {\n color: #e06c75\n}\n\n.ace-one-dark .ace_markup.ace_heading {\n color: #98c379\n}\n\n.ace-one-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-one-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/one_dark",["require","exports","module","ace/theme/one_dark-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-one-dark"; +exports.cssText = require("./one_dark-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/one_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-pastel_on_dark.js b/ui/base1/ace/theme-pastel_on_dark.js new file mode 100644 index 0000000..277e427 --- /dev/null +++ b/ui/base1/ace/theme-pastel_on_dark.js @@ -0,0 +1,18 @@ +define("ace/theme/pastel_on_dark-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-pastel-on-dark .ace_gutter {\n background: #353030;\n color: #8F938F\n}\n\n.ace-pastel-on-dark .ace_print-margin {\n width: 1px;\n background: #353030\n}\n\n.ace-pastel-on-dark {\n background-color: #2C2828;\n color: #8F938F\n}\n\n.ace-pastel-on-dark .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #2C2828;\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-pastel-on-dark .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-pastel-on-dark .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-pastel-on-dark .ace_keyword,\n.ace-pastel-on-dark .ace_meta {\n color: #757aD8\n}\n\n.ace-pastel-on-dark .ace_constant,\n.ace-pastel-on-dark .ace_constant.ace_character,\n.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\n.ace-pastel-on-dark .ace_constant.ace_other {\n color: #4FB7C5\n}\n\n.ace-pastel-on-dark .ace_keyword.ace_operator {\n color: #797878\n}\n\n.ace-pastel-on-dark .ace_constant.ace_character {\n color: #AFA472\n}\n\n.ace-pastel-on-dark .ace_constant.ace_language {\n color: #DE8E30\n}\n\n.ace-pastel-on-dark .ace_constant.ace_numeric {\n color: #CCCCCC\n}\n\n.ace-pastel-on-dark .ace_invalid,\n.ace-pastel-on-dark .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-pastel-on-dark .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-pastel-on-dark .ace_fold {\n background-color: #757aD8;\n border-color: #8F938F\n}\n\n.ace-pastel-on-dark .ace_support.ace_function {\n color: #AEB2F8\n}\n\n.ace-pastel-on-dark .ace_string {\n color: #66A968\n}\n\n.ace-pastel-on-dark .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-pastel-on-dark .ace_comment {\n color: #A6C6FF\n}\n\n.ace-pastel-on-dark .ace_variable {\n color: #BEBF55\n}\n\n.ace-pastel-on-dark .ace_variable.ace_language {\n color: #C1C144\n}\n\n.ace-pastel-on-dark .ace_xml-pe {\n color: #494949\n}\n\n.ace-pastel-on-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-pastel-on-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/pastel_on_dark",["require","exports","module","ace/theme/pastel_on_dark-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-pastel-on-dark"; +exports.cssText = require("./pastel_on_dark-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/pastel_on_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-solarized_dark.js b/ui/base1/ace/theme-solarized_dark.js new file mode 100644 index 0000000..5109518 --- /dev/null +++ b/ui/base1/ace/theme-solarized_dark.js @@ -0,0 +1,18 @@ +define("ace/theme/solarized_dark-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-solarized-dark .ace_gutter {\n background: #01313f;\n color: #d0edf7\n}\n\n.ace-solarized-dark .ace_print-margin {\n width: 1px;\n background: #33555E\n}\n\n.ace-solarized-dark {\n background-color: #002B36;\n color: #839496\n}\n\n.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-solarized-dark .ace_storage {\n color: #839496\n}\n\n.ace-solarized-dark .ace_cursor,\n.ace-solarized-dark .ace_string.ace_regexp {\n color: #D30102\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_active-line,\n.ace-solarized-dark .ace_marker-layer .ace_selection {\n background: rgba(255, 255, 255, 0.1)\n}\n\n.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #002B36;\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-dark .ace_gutter-active-line {\n background-color: #0d3440\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #073642\n}\n\n.ace-solarized-dark .ace_invisible {\n color: rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-dark .ace_keyword,\n.ace-solarized-dark .ace_meta,\n.ace-solarized-dark .ace_support.ace_class,\n.ace-solarized-dark .ace_support.ace_type {\n color: #859900\n}\n\n.ace-solarized-dark .ace_constant.ace_character,\n.ace-solarized-dark .ace_constant.ace_other {\n color: #CB4B16\n}\n\n.ace-solarized-dark .ace_constant.ace_language {\n color: #B58900\n}\n\n.ace-solarized-dark .ace_constant.ace_numeric {\n color: #D33682\n}\n\n.ace-solarized-dark .ace_fold {\n background-color: #268BD2;\n border-color: #93A1A1\n}\n\n.ace-solarized-dark .ace_entity.ace_name.ace_function,\n.ace-solarized-dark .ace_entity.ace_name.ace_tag,\n.ace-solarized-dark .ace_support.ace_function,\n.ace-solarized-dark .ace_variable,\n.ace-solarized-dark .ace_variable.ace_language {\n color: #268BD2\n}\n\n.ace-solarized-dark .ace_string {\n color: #2AA198\n}\n\n.ace-solarized-dark .ace_comment {\n font-style: italic;\n color: #657B83\n}\n\n.ace-solarized-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-solarized-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/solarized_dark",["require","exports","module","ace/theme/solarized_dark-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-solarized-dark"; +exports.cssText = require("./solarized_dark-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/solarized_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-solarized_light.js b/ui/base1/ace/theme-solarized_light.js new file mode 100644 index 0000000..be6c287 --- /dev/null +++ b/ui/base1/ace/theme-solarized_light.js @@ -0,0 +1,18 @@ +define("ace/theme/solarized_light-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-solarized-light .ace_gutter {\n background: #fbf1d3;\n color: #333\n}\n\n.ace-solarized-light .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-solarized-light {\n background-color: #FDF6E3;\n color: #586E75\n}\n\n.ace-solarized-light .ace_cursor {\n color: #000000\n}\n\n.ace-solarized-light .ace_marker-layer .ace_selection {\n background: rgba(7, 54, 67, 0.09)\n}\n\n.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #FDF6E3;\n}\n\n.ace-solarized-light .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-solarized-light .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-light .ace_marker-layer .ace_active-line {\n background: #EEE8D5\n}\n\n.ace-solarized-light .ace_gutter-active-line {\n background-color : #EDE5C1\n}\n\n.ace-solarized-light .ace_marker-layer .ace_selected-word {\n border: 1px solid #7f9390\n}\n\n.ace-solarized-light .ace_invisible {\n color: rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-light .ace_keyword,\n.ace-solarized-light .ace_meta,\n.ace-solarized-light .ace_support.ace_class,\n.ace-solarized-light .ace_support.ace_type {\n color: #859900\n}\n\n.ace-solarized-light .ace_constant.ace_character,\n.ace-solarized-light .ace_constant.ace_other {\n color: #CB4B16\n}\n\n.ace-solarized-light .ace_constant.ace_language {\n color: #B58900\n}\n\n.ace-solarized-light .ace_constant.ace_numeric {\n color: #D33682\n}\n\n.ace-solarized-light .ace_fold {\n background-color: #268BD2;\n border-color: #586E75\n}\n\n.ace-solarized-light .ace_entity.ace_name.ace_function,\n.ace-solarized-light .ace_entity.ace_name.ace_tag,\n.ace-solarized-light .ace_support.ace_function,\n.ace-solarized-light .ace_variable,\n.ace-solarized-light .ace_variable.ace_language {\n color: #268BD2\n}\n\n.ace-solarized-light .ace_storage {\n color: #073642\n}\n\n.ace-solarized-light .ace_string {\n color: #2AA198\n}\n\n.ace-solarized-light .ace_string.ace_regexp {\n color: #D30102\n}\n\n.ace-solarized-light .ace_comment,\n.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\n color: #93A1A1\n}\n\n.ace-solarized-light .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-solarized-light .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/solarized_light",["require","exports","module","ace/theme/solarized_light-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-solarized-light"; +exports.cssText = require("./solarized_light-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/solarized_light"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-sqlserver.js b/ui/base1/ace/theme-sqlserver.js new file mode 100644 index 0000000..d5f1e4f --- /dev/null +++ b/ui/base1/ace/theme-sqlserver.js @@ -0,0 +1,18 @@ +define("ace/theme/sqlserver-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-sqlserver .ace_gutter {\n background: #ebebeb;\n color: #333;\n overflow: hidden;\n}\n\n.ace-sqlserver .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-sqlserver {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-sqlserver .ace_identifier {\n color: black;\n}\n\n.ace-sqlserver .ace_keyword {\n color: #0000FF;\n}\n\n.ace-sqlserver .ace_numeric {\n color: black;\n}\n\n.ace-sqlserver .ace_storage {\n color: #11B7BE;\n}\n\n.ace-sqlserver .ace_keyword.ace_operator,\n.ace-sqlserver .ace_lparen,\n.ace-sqlserver .ace_rparen,\n.ace-sqlserver .ace_punctuation {\n color: #808080;\n}\n\n.ace-sqlserver .ace_set.ace_statement {\n color: #0000FF;\n text-decoration: underline;\n}\n\n.ace-sqlserver .ace_cursor {\n color: black;\n}\n\n.ace-sqlserver .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-sqlserver .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-sqlserver .ace_constant.ace_language {\n color: #979797;\n}\n\n.ace-sqlserver .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-sqlserver .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-sqlserver .ace_support.ace_function {\n color: #FF00FF;\n}\n\n.ace-sqlserver .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-sqlserver .ace_class {\n color: #008080;\n}\n\n.ace-sqlserver .ace_support.ace_other {\n color: #6D79DE;\n}\n\n.ace-sqlserver .ace_variable.ace_parameter {\n font-style: italic;\n color: #FD971F;\n}\n\n.ace-sqlserver .ace_comment {\n color: #008000;\n}\n\n.ace-sqlserver .ace_constant.ace_numeric {\n color: black;\n}\n\n.ace-sqlserver .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-sqlserver .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-sqlserver .ace_support.ace_storedprocedure {\n color: #800000;\n}\n\n.ace-sqlserver .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-sqlserver .ace_list {\n color: rgb(185, 6, 144);\n}\n\n.ace-sqlserver .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-sqlserver .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-sqlserver .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-sqlserver .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-sqlserver .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-sqlserver .ace_gutter-active-line {\n background-color: #dcdcdc;\n}\n\n.ace-sqlserver .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-sqlserver .ace_meta.ace_tag {\n color: #0000FF;\n}\n\n.ace-sqlserver .ace_string.ace_regex {\n color: #FF0000;\n}\n\n.ace-sqlserver .ace_string {\n color: #FF0000;\n}\n\n.ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\n color: #994409;\n}\n\n.ace-sqlserver .ace_indent-guide {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\n}\n\n.ace-sqlserver .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/sqlserver",["require","exports","module","ace/theme/sqlserver-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-sqlserver"; +exports.cssText = require("./sqlserver-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/sqlserver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-terminal.js b/ui/base1/ace/theme-terminal.js new file mode 100644 index 0000000..1aa6c89 --- /dev/null +++ b/ui/base1/ace/theme-terminal.js @@ -0,0 +1,18 @@ +define("ace/theme/terminal-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-terminal-theme .ace_gutter {\n background: #1a0005;\n color: steelblue\n}\n\n.ace-terminal-theme .ace_print-margin {\n width: 1px;\n background: #1a1a1a\n}\n\n.ace-terminal-theme {\n background-color: black;\n color: #DEDEDE\n}\n\n.ace-terminal-theme .ace_cursor {\n color: #9F9F9F\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_selection {\n background: #424242\n}\n\n.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px black;\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_step {\n background: rgb(0, 0, 0)\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_bracket {\n background: #090;\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_bracket-start {\n background: #090;\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {\n margin: -1px 0 0 -1px;\n border: 1px solid #900\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_active-line {\n background: #2A2A2A\n}\n\n.ace-terminal-theme .ace_gutter-active-line {\n background-color: #2A112A\n}\n\n.ace-terminal-theme .ace_marker-layer .ace_selected-word {\n border: 1px solid #424242\n}\n\n.ace-terminal-theme .ace_invisible {\n color: #343434\n}\n\n.ace-terminal-theme .ace_keyword,\n.ace-terminal-theme .ace_meta,\n.ace-terminal-theme .ace_storage,\n.ace-terminal-theme .ace_storage.ace_type,\n.ace-terminal-theme .ace_support.ace_type {\n color: tomato\n}\n\n.ace-terminal-theme .ace_keyword.ace_operator {\n color: deeppink\n}\n\n.ace-terminal-theme .ace_constant.ace_character,\n.ace-terminal-theme .ace_constant.ace_language,\n.ace-terminal-theme .ace_constant.ace_numeric,\n.ace-terminal-theme .ace_keyword.ace_other.ace_unit,\n.ace-terminal-theme .ace_support.ace_constant,\n.ace-terminal-theme .ace_variable.ace_parameter {\n color: #E78C45\n}\n\n.ace-terminal-theme .ace_constant.ace_other {\n color: gold\n}\n\n.ace-terminal-theme .ace_invalid {\n color: yellow;\n background-color: red\n}\n\n.ace-terminal-theme .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-terminal-theme .ace_fold {\n background-color: #7AA6DA;\n border-color: #DEDEDE\n}\n\n.ace-terminal-theme .ace_entity.ace_name.ace_function,\n.ace-terminal-theme .ace_support.ace_function,\n.ace-terminal-theme .ace_variable {\n color: #7AA6DA\n}\n\n.ace-terminal-theme .ace_support.ace_class,\n.ace-terminal-theme .ace_support.ace_type {\n color: #E7C547\n}\n\n.ace-terminal-theme .ace_heading,\n.ace-terminal-theme .ace_string {\n color: #B9CA4A\n}\n\n.ace-terminal-theme .ace_entity.ace_name.ace_tag,\n.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,\n.ace-terminal-theme .ace_meta.ace_tag,\n.ace-terminal-theme .ace_string.ace_regexp,\n.ace-terminal-theme .ace_variable {\n color: #D54E53\n}\n\n.ace-terminal-theme .ace_comment {\n color: orangered\n}\n\n.ace-terminal-theme .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;\n}\n\n.ace-terminal-theme .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/terminal",["require","exports","module","ace/theme/terminal-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-terminal-theme"; +exports.cssText = require("./terminal-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/terminal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-textmate.js b/ui/base1/ace/theme-textmate.js new file mode 100644 index 0000000..524b432 --- /dev/null +++ b/ui/base1/ace/theme-textmate.js @@ -0,0 +1,16 @@ +define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"], function(require, exports, module){"use strict"; +exports.isDark = false; +exports.cssClass = "ace-tm"; +exports.cssText = require("./textmate-css"); +exports.$id = "ace/theme/textmate"; +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/textmate"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-tomorrow.js b/ui/base1/ace/theme-tomorrow.js new file mode 100644 index 0000000..d0d1b80 --- /dev/null +++ b/ui/base1/ace/theme-tomorrow.js @@ -0,0 +1,18 @@ +define("ace/theme/tomorrow-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-tomorrow .ace_gutter {\n background: #f6f6f6;\n color: #4D4D4C\n}\n\n.ace-tomorrow .ace_print-margin {\n width: 1px;\n background: #f6f6f6\n}\n\n.ace-tomorrow {\n background-color: #FFFFFF;\n color: #4D4D4C\n}\n\n.ace-tomorrow .ace_cursor {\n color: #AEAFAD\n}\n\n.ace-tomorrow .ace_marker-layer .ace_selection {\n background: #D6D6D6\n}\n\n.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #FFFFFF;\n}\n\n.ace-tomorrow .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-tomorrow .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #D1D1D1\n}\n\n.ace-tomorrow .ace_marker-layer .ace_active-line {\n background: #EFEFEF\n}\n\n.ace-tomorrow .ace_gutter-active-line {\n background-color : #dcdcdc\n}\n\n.ace-tomorrow .ace_marker-layer .ace_selected-word {\n border: 1px solid #D6D6D6\n}\n\n.ace-tomorrow .ace_invisible {\n color: #D1D1D1\n}\n\n.ace-tomorrow .ace_keyword,\n.ace-tomorrow .ace_meta,\n.ace-tomorrow .ace_storage,\n.ace-tomorrow .ace_storage.ace_type,\n.ace-tomorrow .ace_support.ace_type {\n color: #8959A8\n}\n\n.ace-tomorrow .ace_keyword.ace_operator {\n color: #3E999F\n}\n\n.ace-tomorrow .ace_constant.ace_character,\n.ace-tomorrow .ace_constant.ace_language,\n.ace-tomorrow .ace_constant.ace_numeric,\n.ace-tomorrow .ace_keyword.ace_other.ace_unit,\n.ace-tomorrow .ace_support.ace_constant,\n.ace-tomorrow .ace_variable.ace_parameter {\n color: #F5871F\n}\n\n.ace-tomorrow .ace_constant.ace_other {\n color: #666969\n}\n\n.ace-tomorrow .ace_invalid {\n color: #FFFFFF;\n background-color: #C82829\n}\n\n.ace-tomorrow .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #8959A8\n}\n\n.ace-tomorrow .ace_fold {\n background-color: #4271AE;\n border-color: #4D4D4C\n}\n\n.ace-tomorrow .ace_entity.ace_name.ace_function,\n.ace-tomorrow .ace_support.ace_function,\n.ace-tomorrow .ace_variable {\n color: #4271AE\n}\n\n.ace-tomorrow .ace_support.ace_class,\n.ace-tomorrow .ace_support.ace_type {\n color: #C99E00\n}\n\n.ace-tomorrow .ace_heading,\n.ace-tomorrow .ace_markup.ace_heading,\n.ace-tomorrow .ace_string {\n color: #718C00\n}\n\n.ace-tomorrow .ace_entity.ace_name.ace_tag,\n.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\n.ace-tomorrow .ace_meta.ace_tag,\n.ace-tomorrow .ace_string.ace_regexp,\n.ace-tomorrow .ace_variable {\n color: #C82829\n}\n\n.ace-tomorrow .ace_comment {\n color: #8E908C\n}\n\n.ace-tomorrow .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\n}\n\n.ace-tomorrow .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/tomorrow",["require","exports","module","ace/theme/tomorrow-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-tomorrow"; +exports.cssText = require("./tomorrow-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/tomorrow"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-tomorrow_night.js b/ui/base1/ace/theme-tomorrow_night.js new file mode 100644 index 0000000..7984404 --- /dev/null +++ b/ui/base1/ace/theme-tomorrow_night.js @@ -0,0 +1,18 @@ +define("ace/theme/tomorrow_night-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-tomorrow-night .ace_gutter {\n background: #25282c;\n color: #C5C8C6\n}\n\n.ace-tomorrow-night .ace_print-margin {\n width: 1px;\n background: #25282c\n}\n\n.ace-tomorrow-night {\n background-color: #1D1F21;\n color: #C5C8C6\n}\n\n.ace-tomorrow-night .ace_cursor {\n color: #AEAFAD\n}\n\n.ace-tomorrow-night .ace_marker-layer .ace_selection {\n background: #373B41\n}\n\n.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #1D1F21;\n}\n\n.ace-tomorrow-night .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-tomorrow-night .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #4B4E55\n}\n\n.ace-tomorrow-night .ace_marker-layer .ace_active-line {\n background: #282A2E\n}\n\n.ace-tomorrow-night .ace_gutter-active-line {\n background-color: #282A2E\n}\n\n.ace-tomorrow-night .ace_marker-layer .ace_selected-word {\n border: 1px solid #373B41\n}\n\n.ace-tomorrow-night .ace_invisible {\n color: #4B4E55\n}\n\n.ace-tomorrow-night .ace_keyword,\n.ace-tomorrow-night .ace_meta,\n.ace-tomorrow-night .ace_storage,\n.ace-tomorrow-night .ace_storage.ace_type,\n.ace-tomorrow-night .ace_support.ace_type {\n color: #B294BB\n}\n\n.ace-tomorrow-night .ace_keyword.ace_operator {\n color: #8ABEB7\n}\n\n.ace-tomorrow-night .ace_constant.ace_character,\n.ace-tomorrow-night .ace_constant.ace_language,\n.ace-tomorrow-night .ace_constant.ace_numeric,\n.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\n.ace-tomorrow-night .ace_support.ace_constant,\n.ace-tomorrow-night .ace_variable.ace_parameter {\n color: #DE935F\n}\n\n.ace-tomorrow-night .ace_constant.ace_other {\n color: #CED1CF\n}\n\n.ace-tomorrow-night .ace_invalid {\n color: #CED2CF;\n background-color: #DF5F5F\n}\n\n.ace-tomorrow-night .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-tomorrow-night .ace_fold {\n background-color: #81A2BE;\n border-color: #C5C8C6\n}\n\n.ace-tomorrow-night .ace_entity.ace_name.ace_function,\n.ace-tomorrow-night .ace_support.ace_function,\n.ace-tomorrow-night .ace_variable {\n color: #81A2BE\n}\n\n.ace-tomorrow-night .ace_support.ace_class,\n.ace-tomorrow-night .ace_support.ace_type {\n color: #F0C674\n}\n\n.ace-tomorrow-night .ace_heading,\n.ace-tomorrow-night .ace_markup.ace_heading,\n.ace-tomorrow-night .ace_string {\n color: #B5BD68\n}\n\n.ace-tomorrow-night .ace_entity.ace_name.ace_tag,\n.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\n.ace-tomorrow-night .ace_meta.ace_tag,\n.ace-tomorrow-night .ace_string.ace_regexp,\n.ace-tomorrow-night .ace_variable {\n color: #CC6666\n}\n\n.ace-tomorrow-night .ace_comment {\n color: #969896\n}\n\n.ace-tomorrow-night .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-tomorrow-night .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/tomorrow_night",["require","exports","module","ace/theme/tomorrow_night-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-tomorrow-night"; +exports.cssText = require("./tomorrow_night-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/tomorrow_night"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-tomorrow_night_blue.js b/ui/base1/ace/theme-tomorrow_night_blue.js new file mode 100644 index 0000000..dd46696 --- /dev/null +++ b/ui/base1/ace/theme-tomorrow_night_blue.js @@ -0,0 +1,18 @@ +define("ace/theme/tomorrow_night_blue-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-tomorrow-night-blue .ace_gutter {\n background: #00204b;\n color: #7388b5\n}\n\n.ace-tomorrow-night-blue .ace_print-margin {\n width: 1px;\n background: #00204b\n}\n\n.ace-tomorrow-night-blue {\n background-color: #002451;\n color: #FFFFFF\n}\n\n.ace-tomorrow-night-blue .ace_constant.ace_other,\n.ace-tomorrow-night-blue .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\n background: #003F8E\n}\n\n.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #002451;\n}\n\n.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404F7D\n}\n\n.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\n background: #00346E\n}\n\n.ace-tomorrow-night-blue .ace_gutter-active-line {\n background-color: #022040\n}\n\n.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\n border: 1px solid #003F8E\n}\n\n.ace-tomorrow-night-blue .ace_invisible {\n color: #404F7D\n}\n\n.ace-tomorrow-night-blue .ace_keyword,\n.ace-tomorrow-night-blue .ace_meta,\n.ace-tomorrow-night-blue .ace_storage,\n.ace-tomorrow-night-blue .ace_storage.ace_type,\n.ace-tomorrow-night-blue .ace_support.ace_type {\n color: #EBBBFF\n}\n\n.ace-tomorrow-night-blue .ace_keyword.ace_operator {\n color: #99FFFF\n}\n\n.ace-tomorrow-night-blue .ace_constant.ace_character,\n.ace-tomorrow-night-blue .ace_constant.ace_language,\n.ace-tomorrow-night-blue .ace_constant.ace_numeric,\n.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\n.ace-tomorrow-night-blue .ace_support.ace_constant,\n.ace-tomorrow-night-blue .ace_variable.ace_parameter {\n color: #FFC58F\n}\n\n.ace-tomorrow-night-blue .ace_invalid {\n color: #FFFFFF;\n background-color: #F99DA5\n}\n\n.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #EBBBFF\n}\n\n.ace-tomorrow-night-blue .ace_fold {\n background-color: #BBDAFF;\n border-color: #FFFFFF\n}\n\n.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\n.ace-tomorrow-night-blue .ace_support.ace_function,\n.ace-tomorrow-night-blue .ace_variable {\n color: #BBDAFF\n}\n\n.ace-tomorrow-night-blue .ace_support.ace_class,\n.ace-tomorrow-night-blue .ace_support.ace_type {\n color: #FFEEAD\n}\n\n.ace-tomorrow-night-blue .ace_heading,\n.ace-tomorrow-night-blue .ace_markup.ace_heading,\n.ace-tomorrow-night-blue .ace_string {\n color: #D1F1A9\n}\n\n.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\n.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\n.ace-tomorrow-night-blue .ace_meta.ace_tag,\n.ace-tomorrow-night-blue .ace_string.ace_regexp,\n.ace-tomorrow-night-blue .ace_variable {\n color: #FF9DA4\n}\n\n.ace-tomorrow-night-blue .ace_comment {\n color: #7285B7\n}\n\n.ace-tomorrow-night-blue .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-tomorrow-night-blue .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/theme/tomorrow_night_blue-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-blue"; +exports.cssText = require("./tomorrow_night_blue-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/tomorrow_night_blue"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-tomorrow_night_bright.js b/ui/base1/ace/theme-tomorrow_night_bright.js new file mode 100644 index 0000000..1ce857a --- /dev/null +++ b/ui/base1/ace/theme-tomorrow_night_bright.js @@ -0,0 +1,18 @@ +define("ace/theme/tomorrow_night_bright-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-tomorrow-night-bright .ace_gutter {\n background: #1a1a1a;\n color: #DEDEDE\n}\n\n.ace-tomorrow-night-bright .ace_print-margin {\n width: 1px;\n background: #1a1a1a\n}\n\n.ace-tomorrow-night-bright {\n background-color: #000000;\n color: #DEDEDE\n}\n\n.ace-tomorrow-night-bright .ace_cursor {\n color: #9F9F9F\n}\n\n.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\n background: #424242\n}\n\n.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #000000;\n}\n\n.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #888888\n}\n\n.ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\n border: 1px solid rgb(110, 119, 0);\n border-bottom: 0;\n box-shadow: inset 0 -1px rgb(110, 119, 0);\n margin: -1px 0 0 -1px;\n background: rgba(255, 235, 0, 0.1)\n}\n\n.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\n background: #2A2A2A\n}\n\n.ace-tomorrow-night-bright .ace_gutter-active-line {\n background-color: #2A2A2A\n}\n\n.ace-tomorrow-night-bright .ace_stack {\n background-color: rgb(66, 90, 44)\n}\n\n.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\n border: 1px solid #888888\n}\n\n.ace-tomorrow-night-bright .ace_invisible {\n color: #343434\n}\n\n.ace-tomorrow-night-bright .ace_keyword,\n.ace-tomorrow-night-bright .ace_meta,\n.ace-tomorrow-night-bright .ace_storage,\n.ace-tomorrow-night-bright .ace_storage.ace_type,\n.ace-tomorrow-night-bright .ace_support.ace_type {\n color: #C397D8\n}\n\n.ace-tomorrow-night-bright .ace_keyword.ace_operator {\n color: #70C0B1\n}\n\n.ace-tomorrow-night-bright .ace_constant.ace_character,\n.ace-tomorrow-night-bright .ace_constant.ace_language,\n.ace-tomorrow-night-bright .ace_constant.ace_numeric,\n.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,\n.ace-tomorrow-night-bright .ace_support.ace_constant,\n.ace-tomorrow-night-bright .ace_variable.ace_parameter {\n color: #E78C45\n}\n\n.ace-tomorrow-night-bright .ace_constant.ace_other {\n color: #EEEEEE\n}\n\n.ace-tomorrow-night-bright .ace_invalid {\n color: #CED2CF;\n background-color: #DF5F5F\n}\n\n.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-tomorrow-night-bright .ace_fold {\n background-color: #7AA6DA;\n border-color: #DEDEDE\n}\n\n.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,\n.ace-tomorrow-night-bright .ace_support.ace_function,\n.ace-tomorrow-night-bright .ace_variable {\n color: #7AA6DA\n}\n\n.ace-tomorrow-night-bright .ace_support.ace_class,\n.ace-tomorrow-night-bright .ace_support.ace_type {\n color: #E7C547\n}\n\n.ace-tomorrow-night-bright .ace_heading,\n.ace-tomorrow-night-bright .ace_markup.ace_heading,\n.ace-tomorrow-night-bright .ace_string {\n color: #B9CA4A\n}\n\n.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,\n.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,\n.ace-tomorrow-night-bright .ace_meta.ace_tag,\n.ace-tomorrow-night-bright .ace_string.ace_regexp,\n.ace-tomorrow-night-bright .ace_variable {\n color: #D54E53\n}\n\n.ace-tomorrow-night-bright .ace_comment {\n color: #969896\n}\n\n.ace-tomorrow-night-bright .ace_c9searchresults.ace_keyword {\n color: #C2C280\n}\n\n.ace-tomorrow-night-bright .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-tomorrow-night-bright .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/tomorrow_night_bright",["require","exports","module","ace/theme/tomorrow_night_bright-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-bright"; +exports.cssText = require("./tomorrow_night_bright-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/tomorrow_night_bright"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-tomorrow_night_eighties.js b/ui/base1/ace/theme-tomorrow_night_eighties.js new file mode 100644 index 0000000..8fb1192 --- /dev/null +++ b/ui/base1/ace/theme-tomorrow_night_eighties.js @@ -0,0 +1,18 @@ +define("ace/theme/tomorrow_night_eighties-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-tomorrow-night-eighties .ace_gutter {\n background: #272727;\n color: #CCC\n}\n\n.ace-tomorrow-night-eighties .ace_print-margin {\n width: 1px;\n background: #272727\n}\n\n.ace-tomorrow-night-eighties {\n background-color: #2D2D2D;\n color: #CCCCCC\n}\n\n.ace-tomorrow-night-eighties .ace_constant.ace_other,\n.ace-tomorrow-night-eighties .ace_cursor {\n color: #CCCCCC\n}\n\n.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\n background: #515151\n}\n\n.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #2D2D2D;\n}\n\n.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #6A6A6A\n}\n\n.ace-tomorrow-night-bright .ace_stack {\n background: rgb(66, 90, 44)\n}\n\n.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\n background: #393939\n}\n\n.ace-tomorrow-night-eighties .ace_gutter-active-line {\n background-color: #393939\n}\n\n.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {\n border: 1px solid #515151\n}\n\n.ace-tomorrow-night-eighties .ace_invisible {\n color: #6A6A6A\n}\n\n.ace-tomorrow-night-eighties .ace_keyword,\n.ace-tomorrow-night-eighties .ace_meta,\n.ace-tomorrow-night-eighties .ace_storage,\n.ace-tomorrow-night-eighties .ace_storage.ace_type,\n.ace-tomorrow-night-eighties .ace_support.ace_type {\n color: #CC99CC\n}\n\n.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\n color: #66CCCC\n}\n\n.ace-tomorrow-night-eighties .ace_constant.ace_character,\n.ace-tomorrow-night-eighties .ace_constant.ace_language,\n.ace-tomorrow-night-eighties .ace_constant.ace_numeric,\n.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,\n.ace-tomorrow-night-eighties .ace_support.ace_constant,\n.ace-tomorrow-night-eighties .ace_variable.ace_parameter {\n color: #F99157\n}\n\n.ace-tomorrow-night-eighties .ace_invalid {\n color: #CDCDCD;\n background-color: #F2777A\n}\n\n.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\n color: #CDCDCD;\n background-color: #CC99CC\n}\n\n.ace-tomorrow-night-eighties .ace_fold {\n background-color: #6699CC;\n border-color: #CCCCCC\n}\n\n.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,\n.ace-tomorrow-night-eighties .ace_support.ace_function,\n.ace-tomorrow-night-eighties .ace_variable {\n color: #6699CC\n}\n\n.ace-tomorrow-night-eighties .ace_support.ace_class,\n.ace-tomorrow-night-eighties .ace_support.ace_type {\n color: #FFCC66\n}\n\n.ace-tomorrow-night-eighties .ace_heading,\n.ace-tomorrow-night-eighties .ace_markup.ace_heading,\n.ace-tomorrow-night-eighties .ace_string {\n color: #99CC99\n}\n\n.ace-tomorrow-night-eighties .ace_comment {\n color: #999999\n}\n\n.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,\n.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,\n.ace-tomorrow-night-eighties .ace_meta.ace_tag,\n.ace-tomorrow-night-eighties .ace_variable {\n color: #F2777A\n}\n\n.ace-tomorrow-night-eighties .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-tomorrow-night-eighties .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/theme/tomorrow_night_eighties-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-eighties"; +exports.cssText = require("./tomorrow_night_eighties-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/tomorrow_night_eighties"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-twilight.js b/ui/base1/ace/theme-twilight.js new file mode 100644 index 0000000..86f1836 --- /dev/null +++ b/ui/base1/ace/theme-twilight.js @@ -0,0 +1,18 @@ +define("ace/theme/twilight-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-twilight"; +exports.cssText = require("./twilight-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/twilight"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-vibrant_ink.js b/ui/base1/ace/theme-vibrant_ink.js new file mode 100644 index 0000000..8d6d712 --- /dev/null +++ b/ui/base1/ace/theme-vibrant_ink.js @@ -0,0 +1,18 @@ +define("ace/theme/vibrant_ink-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace-vibrant-ink .ace_gutter {\n background: #1a1a1a;\n color: #BEBEBE\n}\n\n.ace-vibrant-ink .ace_print-margin {\n width: 1px;\n background: #1a1a1a\n}\n\n.ace-vibrant-ink {\n background-color: #0F0F0F;\n color: #FFFFFF\n}\n\n.ace-vibrant-ink .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_selection {\n background: #6699CC\n}\n\n.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #0F0F0F;\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_active-line {\n background: #333333\n}\n\n.ace-vibrant-ink .ace_gutter-active-line {\n background-color: #333333\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_selected-word {\n border: 1px solid #6699CC\n}\n\n.ace-vibrant-ink .ace_invisible {\n color: #404040\n}\n\n.ace-vibrant-ink .ace_keyword,\n.ace-vibrant-ink .ace_meta {\n color: #FF6600\n}\n\n.ace-vibrant-ink .ace_constant,\n.ace-vibrant-ink .ace_constant.ace_character,\n.ace-vibrant-ink .ace_constant.ace_character.ace_escape,\n.ace-vibrant-ink .ace_constant.ace_other {\n color: #339999\n}\n\n.ace-vibrant-ink .ace_constant.ace_numeric {\n color: #99CC99\n}\n\n.ace-vibrant-ink .ace_invalid,\n.ace-vibrant-ink .ace_invalid.ace_deprecated {\n color: #CCFF33;\n background-color: #000000\n}\n\n.ace-vibrant-ink .ace_fold {\n background-color: #FFCC00;\n border-color: #FFFFFF\n}\n\n.ace-vibrant-ink .ace_entity.ace_name.ace_function,\n.ace-vibrant-ink .ace_support.ace_function,\n.ace-vibrant-ink .ace_variable {\n color: #FFCC00\n}\n\n.ace-vibrant-ink .ace_variable.ace_parameter {\n font-style: italic\n}\n\n.ace-vibrant-ink .ace_string {\n color: #66FF00\n}\n\n.ace-vibrant-ink .ace_string.ace_regexp {\n color: #44B4CC\n}\n\n.ace-vibrant-ink .ace_comment {\n color: #9933CC\n}\n\n.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\n font-style: italic;\n color: #99CC99\n}\n\n.ace-vibrant-ink .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-vibrant-ink .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"; + +}); + +define("ace/theme/vibrant_ink",["require","exports","module","ace/theme/vibrant_ink-css","ace/lib/dom"], function(require, exports, module){exports.isDark = true; +exports.cssClass = "ace-vibrant-ink"; +exports.cssText = require("./vibrant_ink-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/vibrant_ink"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/theme-xcode.js b/ui/base1/ace/theme-xcode.js new file mode 100644 index 0000000..56c2b42 --- /dev/null +++ b/ui/base1/ace/theme-xcode.js @@ -0,0 +1,18 @@ +define("ace/theme/xcode-css",["require","exports","module"], function(require, exports, module){module.exports = "/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: EE3AD170-2B7F-4DE1-B724-C75F13FE0085) */\n\n.ace-xcode .ace_gutter {\n background: #e8e8e8;\n color: #333\n}\n\n.ace-xcode .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-xcode {\n background-color: #FFFFFF;\n color: #000000\n}\n\n.ace-xcode .ace_cursor {\n color: #000000\n}\n\n.ace-xcode .ace_marker-layer .ace_selection {\n background: #B5D5FF\n}\n\n.ace-xcode.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #FFFFFF;\n}\n\n.ace-xcode .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-xcode .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF\n}\n\n.ace-xcode .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.071)\n}\n\n.ace-xcode .ace_gutter-active-line {\n background-color: rgba(0, 0, 0, 0.071)\n}\n\n.ace-xcode .ace_marker-layer .ace_selected-word {\n border: 1px solid #B5D5FF\n}\n\n.ace-xcode .ace_constant.ace_language,\n.ace-xcode .ace_keyword,\n.ace-xcode .ace_meta,\n.ace-xcode .ace_variable.ace_language {\n color: #C800A4\n}\n\n.ace-xcode .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-xcode .ace_constant.ace_character,\n.ace-xcode .ace_constant.ace_other {\n color: #275A5E\n}\n\n.ace-xcode .ace_constant.ace_numeric {\n color: #3A00DC\n}\n\n.ace-xcode .ace_entity.ace_other.ace_attribute-name,\n.ace-xcode .ace_support.ace_constant,\n.ace-xcode .ace_support.ace_function {\n color: #450084\n}\n\n.ace-xcode .ace_fold {\n background-color: #C800A4;\n border-color: #000000\n}\n\n.ace-xcode .ace_entity.ace_name.ace_tag,\n.ace-xcode .ace_support.ace_class,\n.ace-xcode .ace_support.ace_type {\n color: #790EAD\n}\n\n.ace-xcode .ace_storage {\n color: #C900A4\n}\n\n.ace-xcode .ace_string {\n color: #DF0002\n}\n\n.ace-xcode .ace_comment {\n color: #008E00\n}\n\n.ace-xcode .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y\n}\n\n.ace-xcode .ace_indent-guide-active {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\") right repeat-y;\n} \n"; + +}); + +define("ace/theme/xcode",["require","exports","module","ace/theme/xcode-css","ace/lib/dom"], function(require, exports, module){exports.isDark = false; +exports.cssClass = "ace-xcode"; +exports.cssText = require("./xcode-css"); +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass, false); + +}); (function() { + window.require(["ace/theme/xcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/ui/base1/ace/worker-base.js b/ui/base1/ace/worker-base.js new file mode 100644 index 0000000..b48a660 --- /dev/null +++ b/ui/base1/ace/worker-base.js @@ -0,0 +1,1332 @@ +"no use strict"; +!(function(window) { +if (typeof window.window != "undefined" && window.document) + return; +if (window.require && window.define) + return; + +if (!window.console) { + window.console = function() { + var msgs = Array.prototype.slice.call(arguments, 0); + postMessage({type: "log", data: msgs}); + }; + window.console.error = + window.console.warn = + window.console.log = + window.console.trace = window.console; +} +window.window = window; +window.ace = window; + +window.onerror = function(message, file, line, col, err) { + postMessage({type: "error", data: { + message: message, + data: err && err.data, + file: file, + line: line, + col: col, + stack: err && err.stack + }}); +}; + +window.normalizeModule = function(parentId, moduleName) { + // normalize plugin requires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); + } + // normalize relative requires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = (base ? base + "/" : "") + moduleName; + + while (moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + + return moduleName; +}; + +window.require = function require(parentId, id) { + if (!id) { + id = parentId; + parentId = null; + } + if (!id.charAt) + throw new Error("worker.js require() accepts only (parentId, id) as arguments"); + + id = window.normalizeModule(parentId, id); + + var module = window.require.modules[id]; + if (module) { + if (!module.initialized) { + module.initialized = true; + module.exports = module.factory().exports; + } + return module.exports; + } + + if (!window.require.tlns) + return console.log("unable to load " + id); + + var path = resolveModuleId(id, window.require.tlns); + if (path.slice(-3) != ".js") path += ".js"; + + window.require.id = id; + window.require.modules[id] = {}; // prevent infinite loop on broken modules + importScripts(path); + return window.require(parentId, id); +}; +function resolveModuleId(id, paths) { + var testPath = id, tail = ""; + while (testPath) { + var alias = paths[testPath]; + if (typeof alias == "string") { + return alias + tail; + } else if (alias) { + return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name); + } else if (alias === false) { + return ""; + } + var i = testPath.lastIndexOf("/"); + if (i === -1) break; + tail = testPath.substr(i) + tail; + testPath = testPath.slice(0, i); + } + return id; +} +window.require.modules = {}; +window.require.tlns = {}; + +window.define = function(id, deps, factory) { + if (arguments.length == 2) { + factory = deps; + if (typeof id != "string") { + deps = id; + id = window.require.id; + } + } else if (arguments.length == 1) { + factory = id; + deps = []; + id = window.require.id; + } + + if (typeof factory != "function") { + window.require.modules[id] = { + exports: factory, + initialized: true + }; + return; + } + + if (!deps.length) + // If there is no dependencies, we inject "require", "exports" and + // "module" as dependencies, to provide CommonJS compatibility. + deps = ["require", "exports", "module"]; + + var req = function(childId) { + return window.require(id, childId); + }; + + window.require.modules[id] = { + exports: {}, + factory: function() { + var module = this; + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { + switch (dep) { + // Because "require", "exports" and "module" aren't actual + // dependencies, we must handle them seperately. + case "require": return req; + case "exports": return module.exports; + case "module": return module; + // But for all other dependencies, we can just go ahead and + // require them. + default: return req(dep); + } + })); + if (returnExports) + module.exports = returnExports; + return module; + } + }; +}; +window.define.amd = {}; +window.require.tlns = {}; +window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { + for (var i in topLevelNamespaces) + this.require.tlns[i] = topLevelNamespaces[i]; +}; + +window.initSender = function initSender() { + + var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; + var oop = window.require("ace/lib/oop"); + + var Sender = function() {}; + + (function() { + + oop.implement(this, EventEmitter); + + this.callback = function(data, callbackId) { + postMessage({ + type: "call", + id: callbackId, + data: data + }); + }; + + this.emit = function(name, data) { + postMessage({ + type: "event", + name: name, + data: data + }); + }; + + }).call(Sender.prototype); + + return new Sender(); +}; + +var main = window.main = null; +var sender = window.sender = null; + +window.onmessage = function(e) { + var msg = e.data; + if (msg.event && sender) { + sender._signal(msg.event, msg.data); + } + else if (msg.command) { + if (main[msg.command]) + main[msg.command].apply(main, msg.args); + else if (window[msg.command]) + window[msg.command].apply(window, msg.args); + else + throw new Error("Unknown command:" + msg.command); + } + else if (msg.init) { + window.initBaseUrls(msg.tlns); + sender = window.sender = window.initSender(); + var clazz = this.require(msg.module)[msg.classname]; + main = window.main = new clazz(sender); + } +}; +})(this); + +define("ace/lib/oop",[], function(require, exports, module){"use strict"; +exports.inherits = function (ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; +exports.mixin = function (obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; +exports.implement = function (proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +define("ace/apply_delta",[], function(require, exports, module){"use strict"; +function throwDeltaError(delta, errorText) { + console.log("Invalid Delta:", delta); + throw "Invalid Delta: " + errorText; +} +function positionInDocument(docLines, position) { + return position.row >= 0 && position.row < docLines.length && + position.column >= 0 && position.column <= docLines[position.row].length; +} +function validateDelta(docLines, delta) { + if (delta.action != "insert" && delta.action != "remove") + throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); + if (!(delta.lines instanceof Array)) + throwDeltaError(delta, "delta.lines must be an Array"); + if (!delta.start || !delta.end) + throwDeltaError(delta, "delta.start/end must be an present"); + var start = delta.start; + if (!positionInDocument(docLines, delta.start)) + throwDeltaError(delta, "delta.start must be contained in document"); + var end = delta.end; + if (delta.action == "remove" && !positionInDocument(docLines, end)) + throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); + var numRangeRows = end.row - start.row; + var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); + if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) + throwDeltaError(delta, "delta.range must match delta lines"); +} +exports.applyDelta = function (docLines, delta, doNotValidate) { + var row = delta.start.row; + var startColumn = delta.start.column; + var line = docLines[row] || ""; + switch (delta.action) { + case "insert": + var lines = delta.lines; + if (lines.length === 1) { + docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); + } + else { + var args = [row, 1].concat(delta.lines); + docLines.splice.apply(docLines, args); + docLines[row] = line.substring(0, startColumn) + docLines[row]; + docLines[row + delta.lines.length - 1] += line.substring(startColumn); + } + break; + case "remove": + var endColumn = delta.end.column; + var endRow = delta.end.row; + if (row === endRow) { + docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); + } + else { + docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn)); + } + break; + } +}; + +}); + +define("ace/lib/event_emitter",[], function(require, exports, module){"use strict"; +var EventEmitter = {}; +var stopPropagation = function () { this.propagationStopped = true; }; +var preventDefault = function () { this.defaultPrevented = true; }; +EventEmitter._emit = + EventEmitter._dispatchEvent = function (eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + if (typeof e != "object" || !e) + e = {}; + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) { + listeners[i](e, this); + if (e.propagationStopped) + break; + } + if (defaultHandler && !e.defaultPrevented) + return defaultHandler(e, this); + }; +EventEmitter._signal = function (eventName, e) { + var listeners = (this._eventRegistry || {})[eventName]; + if (!listeners) + return; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) + listeners[i](e, this); +}; +EventEmitter.once = function (eventName, callback) { + var _self = this; + this.on(eventName, function newCallback() { + _self.off(eventName, newCallback); + callback.apply(null, arguments); + }); + if (!callback) { + return new Promise(function (resolve) { + callback = resolve; + }); + } +}; +EventEmitter.setDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + handlers = this._defaultHandlers = { _disabled_: {} }; + if (handlers[eventName]) { + var old = handlers[eventName]; + var disabled = handlers._disabled_[eventName]; + if (!disabled) + handlers._disabled_[eventName] = disabled = []; + disabled.push(old); + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } + handlers[eventName] = callback; +}; +EventEmitter.removeDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + return; + var disabled = handlers._disabled_[eventName]; + if (handlers[eventName] == callback) { + if (disabled) + this.setDefaultHandler(eventName, disabled.pop()); + } + else if (disabled) { + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } +}; +EventEmitter.on = + EventEmitter.addEventListener = function (eventName, callback, capturing) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + listeners = this._eventRegistry[eventName] = []; + if (listeners.indexOf(callback) == -1) + listeners[capturing ? "unshift" : "push"](callback); + return callback; + }; +EventEmitter.off = + EventEmitter.removeListener = + EventEmitter.removeEventListener = function (eventName, callback) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + return; + var index = listeners.indexOf(callback); + if (index !== -1) + listeners.splice(index, 1); + }; +EventEmitter.removeAllListeners = function (eventName) { + if (!eventName) + this._eventRegistry = this._defaultHandlers = undefined; + if (this._eventRegistry) + this._eventRegistry[eventName] = undefined; + if (this._defaultHandlers) + this._defaultHandlers[eventName] = undefined; +}; +exports.EventEmitter = EventEmitter; + +}); + +define("ace/range",[], function(require, exports, module){"use strict"; +var Range = /** @class */ (function () { + function Range(startRow, startColumn, endRow, endColumn) { + this.start = { + row: startRow, + column: startColumn + }; + this.end = { + row: endRow, + column: endColumn + }; + } + Range.prototype.isEqual = function (range) { + return this.start.row === range.start.row && + this.end.row === range.end.row && + this.start.column === range.start.column && + this.end.column === range.end.column; + }; + Range.prototype.toString = function () { + return ("Range: [" + this.start.row + "/" + this.start.column + + "] -> [" + this.end.row + "/" + this.end.column + "]"); + }; + Range.prototype.contains = function (row, column) { + return this.compare(row, column) == 0; + }; + Range.prototype.compareRange = function (range) { + var cmp, end = range.end, start = range.start; + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } + else if (cmp == 0) { + return 1; + } + else { + return 0; + } + } + else if (cmp == -1) { + return -2; + } + else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } + else if (cmp == 1) { + return 42; + } + else { + return 0; + } + } + }; + Range.prototype.comparePoint = function (p) { + return this.compare(p.row, p.column); + }; + Range.prototype.containsRange = function (range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + Range.prototype.intersects = function (range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + Range.prototype.isEnd = function (row, column) { + return this.end.row == row && this.end.column == column; + }; + Range.prototype.isStart = function (row, column) { + return this.start.row == row && this.start.column == column; + }; + Range.prototype.setStart = function (row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } + else { + this.start.row = row; + this.start.column = column; + } + }; + Range.prototype.setEnd = function (row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } + else { + this.end.row = row; + this.end.column = column; + } + }; + Range.prototype.inside = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideStart = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideEnd = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.compare = function (row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + } + } + if (row < this.start.row) + return -1; + if (row > this.end.row) + return 1; + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + return 0; + }; + Range.prototype.compareStart = function (row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareEnd = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareInside = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.clipRows = function (firstRow, lastRow) { + if (this.end.row > lastRow) + var end = { row: lastRow + 1, column: 0 }; + else if (this.end.row < firstRow) + var end = { row: firstRow, column: 0 }; + if (this.start.row > lastRow) + var start = { row: lastRow + 1, column: 0 }; + else if (this.start.row < firstRow) + var start = { row: firstRow, column: 0 }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.extend = function (row, column) { + var cmp = this.compare(row, column); + if (cmp == 0) + return this; + else if (cmp == -1) + var start = { row: row, column: column }; + else + var end = { row: row, column: column }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.isEmpty = function () { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + Range.prototype.isMultiLine = function () { + return (this.start.row !== this.end.row); + }; + Range.prototype.clone = function () { + return Range.fromPoints(this.start, this.end); + }; + Range.prototype.collapseRows = function () { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0); + else + return new Range(this.start.row, 0, this.end.row, 0); + }; + Range.prototype.toScreenRange = function (session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column); + }; + Range.prototype.moveBy = function (row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + return Range; +}()); +Range.fromPoints = function (start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = function (p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; +exports.Range = Range; + +}); + +define("ace/anchor",[], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Anchor = /** @class */ (function () { + function Anchor(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + if (typeof row != "number") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); + } + Anchor.prototype.getPosition = function () { + return this.$clipPositionToDocument(this.row, this.column); + }; + Anchor.prototype.getDocument = function () { + return this.document; + }; + Anchor.prototype.onChange = function (delta) { + if (delta.start.row == delta.end.row && delta.start.row != this.row) + return; + if (delta.start.row > this.row) + return; + var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight); + this.setPosition(point.row, point.column, true); + }; + Anchor.prototype.setPosition = function (row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } + else { + pos = this.$clipPositionToDocument(row, column); + } + if (this.row == pos.row && this.column == pos.column) + return; + var old = { + row: this.row, + column: this.column + }; + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + Anchor.prototype.detach = function () { + this.document.off("change", this.$onChange); + }; + Anchor.prototype.attach = function (doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + Anchor.prototype.$clipPositionToDocument = function (row, column) { + var pos = {}; + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + if (column < 0) + pos.column = 0; + return pos; + }; + return Anchor; +}()); +Anchor.prototype.$insertRight = false; +oop.implement(Anchor.prototype, EventEmitter); +function $pointsInOrder(point1, point2, equalPointsInOrder) { + var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; + return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); +} +function $getTransformedPoint(delta, point, moveIfEqual) { + var deltaIsInsert = delta.action == "insert"; + var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); + var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); + var deltaStart = delta.start; + var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. + if ($pointsInOrder(point, deltaStart, moveIfEqual)) { + return { + row: point.row, + column: point.column + }; + } + if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { + return { + row: point.row + deltaRowShift, + column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) + }; + } + return { + row: deltaStart.row, + column: deltaStart.column + }; +} +exports.Anchor = Anchor; + +}); + +define("ace/document",[], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var applyDelta = require("./apply_delta").applyDelta; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; +var Document = /** @class */ (function () { + function Document(textOrLines) { + this.$lines = [""]; + if (textOrLines.length === 0) { + this.$lines = [""]; + } + else if (Array.isArray(textOrLines)) { + this.insertMergedLines({ row: 0, column: 0 }, textOrLines); + } + else { + this.insert({ row: 0, column: 0 }, textOrLines); + } + } + Document.prototype.setValue = function (text) { + var len = this.getLength() - 1; + this.remove(new Range(0, 0, len, this.getLine(len).length)); + this.insert({ row: 0, column: 0 }, text || ""); + }; + Document.prototype.getValue = function () { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + Document.prototype.createAnchor = function (row, column) { + return new Anchor(this, row, column); + }; + Document.prototype.$detectNewLine = function (text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineCharacter = function () { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + Document.prototype.setNewLineMode = function (newLineMode) { + if (this.$newLineMode === newLineMode) + return; + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineMode = function () { + return this.$newLineMode; + }; + Document.prototype.isNewLine = function (text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + Document.prototype.getLine = function (row) { + return this.$lines[row] || ""; + }; + Document.prototype.getLines = function (firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + Document.prototype.getAllLines = function () { + return this.getLines(0, this.getLength()); + }; + Document.prototype.getLength = function () { + return this.$lines.length; + }; + Document.prototype.getTextRange = function (range) { + return this.getLinesForRange(range).join(this.getNewLineCharacter()); + }; + Document.prototype.getLinesForRange = function (range) { + var lines; + if (range.start.row === range.end.row) { + lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; + } + else { + lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + } + return lines; + }; + Document.prototype.insertLines = function (row, lines) { + console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); + return this.insertFullLines(row, lines); + }; + Document.prototype.removeLines = function (firstRow, lastRow) { + console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); + return this.removeFullLines(firstRow, lastRow); + }; + Document.prototype.insertNewLine = function (position) { + console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); + return this.insertMergedLines(position, ["", ""]); + }; + Document.prototype.insert = function (position, text) { + if (this.getLength() <= 1) + this.$detectNewLine(text); + return this.insertMergedLines(position, this.$split(text)); + }; + Document.prototype.insertInLine = function (position, text) { + var start = this.clippedPos(position.row, position.column); + var end = this.pos(position.row, position.column + text.length); + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: [text] + }, true); + return this.clonePos(end); + }; + Document.prototype.clippedPos = function (row, column) { + var length = this.getLength(); + if (row === undefined) { + row = length; + } + else if (row < 0) { + row = 0; + } + else if (row >= length) { + row = length - 1; + column = undefined; + } + var line = this.getLine(row); + if (column == undefined) + column = line.length; + column = Math.min(Math.max(column, 0), line.length); + return { row: row, column: column }; + }; + Document.prototype.clonePos = function (pos) { + return { row: pos.row, column: pos.column }; + }; + Document.prototype.pos = function (row, column) { + return { row: row, column: column }; + }; + Document.prototype.$clipPosition = function (position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length - 1).length; + } + else { + position.row = Math.max(0, position.row); + position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); + } + return position; + }; + Document.prototype.insertFullLines = function (row, lines) { + row = Math.min(Math.max(row, 0), this.getLength()); + var column = 0; + if (row < this.getLength()) { + lines = lines.concat([""]); + column = 0; + } + else { + lines = [""].concat(lines); + row--; + column = this.$lines[row].length; + } + this.insertMergedLines({ row: row, column: column }, lines); + }; + Document.prototype.insertMergedLines = function (position, lines) { + var start = this.clippedPos(position.row, position.column); + var end = { + row: start.row + lines.length - 1, + column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length + }; + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: lines + }); + return this.clonePos(end); + }; + Document.prototype.remove = function (range) { + var start = this.clippedPos(range.start.row, range.start.column); + var end = this.clippedPos(range.end.row, range.end.column); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }); + return this.clonePos(start); + }; + Document.prototype.removeInLine = function (row, startColumn, endColumn) { + var start = this.clippedPos(row, startColumn); + var end = this.clippedPos(row, endColumn); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }, true); + return this.clonePos(start); + }; + Document.prototype.removeFullLines = function (firstRow, lastRow) { + firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); + lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1); + var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; + var deleteLastNewLine = lastRow < this.getLength() - 1; + var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow); + var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0); + var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow); + var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length); + var range = new Range(startRow, startCol, endRow, endCol); + var deletedLines = this.$lines.slice(firstRow, lastRow + 1); + this.applyDelta({ + start: range.start, + end: range.end, + action: "remove", + lines: this.getLinesForRange(range) + }); + return deletedLines; + }; + Document.prototype.removeNewLine = function (row) { + if (row < this.getLength() - 1 && row >= 0) { + this.applyDelta({ + start: this.pos(row, this.getLine(row).length), + end: this.pos(row + 1, 0), + action: "remove", + lines: ["", ""] + }); + } + }; + Document.prototype.replace = function (range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length === 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + this.remove(range); + var end; + if (text) { + end = this.insert(range.start, text); + } + else { + end = range.start; + } + return end; + }; + Document.prototype.applyDeltas = function (deltas) { + for (var i = 0; i < deltas.length; i++) { + this.applyDelta(deltas[i]); + } + }; + Document.prototype.revertDeltas = function (deltas) { + for (var i = deltas.length - 1; i >= 0; i--) { + this.revertDelta(deltas[i]); + } + }; + Document.prototype.applyDelta = function (delta, doNotValidate) { + var isInsert = delta.action == "insert"; + if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] + : !Range.comparePoints(delta.start, delta.end)) { + return; + } + if (isInsert && delta.lines.length > 20000) { + this.$splitAndapplyLargeDelta(delta, 20000); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } + }; + Document.prototype.$safeApplyDelta = function (delta) { + var docLength = this.$lines.length; + if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength + || delta.action == "insert" && delta.start.row <= docLength) { + this.applyDelta(delta); + } + }; + Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) { + var lines = delta.lines; + var l = lines.length - MAX + 1; + var row = delta.start.row; + var column = delta.start.column; + for (var from = 0, to = 0; from < l; from = to) { + to += MAX - 1; + var chunk = lines.slice(from, to); + chunk.push(""); + this.applyDelta({ + start: this.pos(row + from, column), + end: this.pos(row + to, column = 0), + action: delta.action, + lines: chunk + }, true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); + }; + Document.prototype.revertDelta = function (delta) { + this.$safeApplyDelta({ + start: this.clonePos(delta.start), + end: this.clonePos(delta.end), + action: (delta.action == "insert" ? "remove" : "insert"), + lines: delta.lines.slice() + }); + }; + Document.prototype.indexToPosition = function (index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return { row: i, column: index + lines[i].length + newlineLength }; + } + return { row: l - 1, column: index + lines[l - 1].length + newlineLength }; + }; + Document.prototype.positionToIndex = function (pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + return index + pos.column; + }; + Document.prototype.$split = function (text) { + return text.split(/\r\n|\r|\n/); + }; + return Document; +}()); +Document.prototype.$autoNewLine = ""; +Document.prototype.$newLineMode = "auto"; +oop.implement(Document.prototype, EventEmitter); +exports.Document = Document; + +}); + +define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) { + if (typeof obj !== "object" || !obj) + return obj; + var copy; + if (Array.isArray(obj)) { + copy = []; + for (var key = 0; key < obj.length; key++) { + copy[key] = deepCopy(obj[key]); + } + return copy; + } + if (Object.prototype.toString.call(obj) !== "[object Object]") + return obj; + copy = {}; + for (var key in obj) + copy[key] = deepCopy(obj[key]); + return copy; +}; + +}); + +define("ace/lib/lang",[], function(require, exports, module){"use strict"; +exports.last = function (a) { + return a[a.length - 1]; +}; +exports.stringReverse = function (string) { + return string.split("").reverse().join(""); +}; +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + if (count >>= 1) + string += string; + } + return result; +}; +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; +exports.copyObject = function (obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; +exports.copyArray = function (array) { + var copy = []; + for (var i = 0, l = array.length; i < l; i++) { + if (array[i] && typeof array[i] == "object") + copy[i] = this.copyObject(array[i]); + else + copy[i] = array[i]; + } + return copy; +}; +exports.deepCopy = require("./deep_copy").deepCopy; +exports.arrayToMap = function (arr) { + var map = {}; + for (var i = 0; i < arr.length; i++) { + map[arr[i]] = 1; + } + return map; +}; +exports.createMap = function (props) { + var map = Object.create(null); + for (var i in props) { + map[i] = props[i]; + } + return map; +}; +exports.arrayRemove = function (array, value) { + for (var i = 0; i <= array.length; i++) { + if (value === array[i]) { + array.splice(i, 1); + } + } +}; +exports.escapeRegExp = function (str) { + return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); +}; +exports.escapeHTML = function (str) { + return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 0xffff ? 2 : 1; +}; + +}); + +define("ace/worker/mirror",[], function(require, exports, module) { +"use strict"; + +var Document = require("../document").Document; +var lang = require("../lib/lang"); + +var Mirror = exports.Mirror = function(sender) { + this.sender = sender; + var doc = this.doc = new Document(""); + + var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); + + var _self = this; + sender.on("change", function(e) { + var data = e.data; + if (data[0].start) { + doc.applyDeltas(data); + } else { + for (var i = 0; i < data.length; i += 2) { + var d, err; + if (Array.isArray(data[i+1])) { + d = {action: "insert", start: data[i], lines: data[i+1]}; + } else { + d = {action: "remove", start: data[i], end: data[i+1]}; + } + + if ((d.action == "insert" ? d.start : d.end).row >= doc.$lines.length) { + err = new Error("Invalid delta"); + err.data = { + path: _self.$path, + linesLength: doc.$lines.length, + start: d.start, + end: d.end + }; + throw err; + } + + doc.applyDelta(d, true); + } + } + if (_self.$timeout) + return deferredUpdate.schedule(_self.$timeout); + _self.onUpdate(); + }); +}; + +(function() { + + this.$timeout = 500; + + this.setTimeout = function(timeout) { + this.$timeout = timeout; + }; + + this.setValue = function(value) { + this.doc.setValue(value); + this.deferredUpdate.schedule(this.$timeout); + }; + + this.getValue = function(callbackId) { + this.sender.callback(this.doc.getValue(), callbackId); + }; + + this.onUpdate = function() { + }; + + this.isPending = function() { + return this.deferredUpdate.isPending(); + }; + +}).call(Mirror.prototype); + +}); diff --git a/ui/base1/ace/worker-coffee.js b/ui/base1/ace/worker-coffee.js new file mode 100644 index 0000000..c0aab15 --- /dev/null +++ b/ui/base1/ace/worker-coffee.js @@ -0,0 +1,1381 @@ +"no use strict"; +!(function(window) { +if (typeof window.window != "undefined" && window.document) + return; +if (window.require && window.define) + return; + +if (!window.console) { + window.console = function() { + var msgs = Array.prototype.slice.call(arguments, 0); + postMessage({type: "log", data: msgs}); + }; + window.console.error = + window.console.warn = + window.console.log = + window.console.trace = window.console; +} +window.window = window; +window.ace = window; + +window.onerror = function(message, file, line, col, err) { + postMessage({type: "error", data: { + message: message, + data: err && err.data, + file: file, + line: line, + col: col, + stack: err && err.stack + }}); +}; + +window.normalizeModule = function(parentId, moduleName) { + // normalize plugin requires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); + } + // normalize relative requires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = (base ? base + "/" : "") + moduleName; + + while (moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + + return moduleName; +}; + +window.require = function require(parentId, id) { + if (!id) { + id = parentId; + parentId = null; + } + if (!id.charAt) + throw new Error("worker.js require() accepts only (parentId, id) as arguments"); + + id = window.normalizeModule(parentId, id); + + var module = window.require.modules[id]; + if (module) { + if (!module.initialized) { + module.initialized = true; + module.exports = module.factory().exports; + } + return module.exports; + } + + if (!window.require.tlns) + return console.log("unable to load " + id); + + var path = resolveModuleId(id, window.require.tlns); + if (path.slice(-3) != ".js") path += ".js"; + + window.require.id = id; + window.require.modules[id] = {}; // prevent infinite loop on broken modules + importScripts(path); + return window.require(parentId, id); +}; +function resolveModuleId(id, paths) { + var testPath = id, tail = ""; + while (testPath) { + var alias = paths[testPath]; + if (typeof alias == "string") { + return alias + tail; + } else if (alias) { + return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name); + } else if (alias === false) { + return ""; + } + var i = testPath.lastIndexOf("/"); + if (i === -1) break; + tail = testPath.substr(i) + tail; + testPath = testPath.slice(0, i); + } + return id; +} +window.require.modules = {}; +window.require.tlns = {}; + +window.define = function(id, deps, factory) { + if (arguments.length == 2) { + factory = deps; + if (typeof id != "string") { + deps = id; + id = window.require.id; + } + } else if (arguments.length == 1) { + factory = id; + deps = []; + id = window.require.id; + } + + if (typeof factory != "function") { + window.require.modules[id] = { + exports: factory, + initialized: true + }; + return; + } + + if (!deps.length) + // If there is no dependencies, we inject "require", "exports" and + // "module" as dependencies, to provide CommonJS compatibility. + deps = ["require", "exports", "module"]; + + var req = function(childId) { + return window.require(id, childId); + }; + + window.require.modules[id] = { + exports: {}, + factory: function() { + var module = this; + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { + switch (dep) { + // Because "require", "exports" and "module" aren't actual + // dependencies, we must handle them seperately. + case "require": return req; + case "exports": return module.exports; + case "module": return module; + // But for all other dependencies, we can just go ahead and + // require them. + default: return req(dep); + } + })); + if (returnExports) + module.exports = returnExports; + return module; + } + }; +}; +window.define.amd = {}; +window.require.tlns = {}; +window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { + for (var i in topLevelNamespaces) + this.require.tlns[i] = topLevelNamespaces[i]; +}; + +window.initSender = function initSender() { + + var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; + var oop = window.require("ace/lib/oop"); + + var Sender = function() {}; + + (function() { + + oop.implement(this, EventEmitter); + + this.callback = function(data, callbackId) { + postMessage({ + type: "call", + id: callbackId, + data: data + }); + }; + + this.emit = function(name, data) { + postMessage({ + type: "event", + name: name, + data: data + }); + }; + + }).call(Sender.prototype); + + return new Sender(); +}; + +var main = window.main = null; +var sender = window.sender = null; + +window.onmessage = function(e) { + var msg = e.data; + if (msg.event && sender) { + sender._signal(msg.event, msg.data); + } + else if (msg.command) { + if (main[msg.command]) + main[msg.command].apply(main, msg.args); + else if (window[msg.command]) + window[msg.command].apply(window, msg.args); + else + throw new Error("Unknown command:" + msg.command); + } + else if (msg.init) { + window.initBaseUrls(msg.tlns); + sender = window.sender = window.initSender(); + var clazz = this.require(msg.module)[msg.classname]; + main = window.main = new clazz(sender); + } +}; +})(this); + +define("ace/lib/oop",[], function(require, exports, module){"use strict"; +exports.inherits = function (ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; +exports.mixin = function (obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; +exports.implement = function (proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +define("ace/apply_delta",[], function(require, exports, module){"use strict"; +function throwDeltaError(delta, errorText) { + console.log("Invalid Delta:", delta); + throw "Invalid Delta: " + errorText; +} +function positionInDocument(docLines, position) { + return position.row >= 0 && position.row < docLines.length && + position.column >= 0 && position.column <= docLines[position.row].length; +} +function validateDelta(docLines, delta) { + if (delta.action != "insert" && delta.action != "remove") + throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); + if (!(delta.lines instanceof Array)) + throwDeltaError(delta, "delta.lines must be an Array"); + if (!delta.start || !delta.end) + throwDeltaError(delta, "delta.start/end must be an present"); + var start = delta.start; + if (!positionInDocument(docLines, delta.start)) + throwDeltaError(delta, "delta.start must be contained in document"); + var end = delta.end; + if (delta.action == "remove" && !positionInDocument(docLines, end)) + throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); + var numRangeRows = end.row - start.row; + var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); + if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) + throwDeltaError(delta, "delta.range must match delta lines"); +} +exports.applyDelta = function (docLines, delta, doNotValidate) { + var row = delta.start.row; + var startColumn = delta.start.column; + var line = docLines[row] || ""; + switch (delta.action) { + case "insert": + var lines = delta.lines; + if (lines.length === 1) { + docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); + } + else { + var args = [row, 1].concat(delta.lines); + docLines.splice.apply(docLines, args); + docLines[row] = line.substring(0, startColumn) + docLines[row]; + docLines[row + delta.lines.length - 1] += line.substring(startColumn); + } + break; + case "remove": + var endColumn = delta.end.column; + var endRow = delta.end.row; + if (row === endRow) { + docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); + } + else { + docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn)); + } + break; + } +}; + +}); + +define("ace/lib/event_emitter",[], function(require, exports, module){"use strict"; +var EventEmitter = {}; +var stopPropagation = function () { this.propagationStopped = true; }; +var preventDefault = function () { this.defaultPrevented = true; }; +EventEmitter._emit = + EventEmitter._dispatchEvent = function (eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + if (typeof e != "object" || !e) + e = {}; + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) { + listeners[i](e, this); + if (e.propagationStopped) + break; + } + if (defaultHandler && !e.defaultPrevented) + return defaultHandler(e, this); + }; +EventEmitter._signal = function (eventName, e) { + var listeners = (this._eventRegistry || {})[eventName]; + if (!listeners) + return; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) + listeners[i](e, this); +}; +EventEmitter.once = function (eventName, callback) { + var _self = this; + this.on(eventName, function newCallback() { + _self.off(eventName, newCallback); + callback.apply(null, arguments); + }); + if (!callback) { + return new Promise(function (resolve) { + callback = resolve; + }); + } +}; +EventEmitter.setDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + handlers = this._defaultHandlers = { _disabled_: {} }; + if (handlers[eventName]) { + var old = handlers[eventName]; + var disabled = handlers._disabled_[eventName]; + if (!disabled) + handlers._disabled_[eventName] = disabled = []; + disabled.push(old); + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } + handlers[eventName] = callback; +}; +EventEmitter.removeDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + return; + var disabled = handlers._disabled_[eventName]; + if (handlers[eventName] == callback) { + if (disabled) + this.setDefaultHandler(eventName, disabled.pop()); + } + else if (disabled) { + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } +}; +EventEmitter.on = + EventEmitter.addEventListener = function (eventName, callback, capturing) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + listeners = this._eventRegistry[eventName] = []; + if (listeners.indexOf(callback) == -1) + listeners[capturing ? "unshift" : "push"](callback); + return callback; + }; +EventEmitter.off = + EventEmitter.removeListener = + EventEmitter.removeEventListener = function (eventName, callback) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + return; + var index = listeners.indexOf(callback); + if (index !== -1) + listeners.splice(index, 1); + }; +EventEmitter.removeAllListeners = function (eventName) { + if (!eventName) + this._eventRegistry = this._defaultHandlers = undefined; + if (this._eventRegistry) + this._eventRegistry[eventName] = undefined; + if (this._defaultHandlers) + this._defaultHandlers[eventName] = undefined; +}; +exports.EventEmitter = EventEmitter; + +}); + +define("ace/range",[], function(require, exports, module){"use strict"; +var Range = /** @class */ (function () { + function Range(startRow, startColumn, endRow, endColumn) { + this.start = { + row: startRow, + column: startColumn + }; + this.end = { + row: endRow, + column: endColumn + }; + } + Range.prototype.isEqual = function (range) { + return this.start.row === range.start.row && + this.end.row === range.end.row && + this.start.column === range.start.column && + this.end.column === range.end.column; + }; + Range.prototype.toString = function () { + return ("Range: [" + this.start.row + "/" + this.start.column + + "] -> [" + this.end.row + "/" + this.end.column + "]"); + }; + Range.prototype.contains = function (row, column) { + return this.compare(row, column) == 0; + }; + Range.prototype.compareRange = function (range) { + var cmp, end = range.end, start = range.start; + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } + else if (cmp == 0) { + return 1; + } + else { + return 0; + } + } + else if (cmp == -1) { + return -2; + } + else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } + else if (cmp == 1) { + return 42; + } + else { + return 0; + } + } + }; + Range.prototype.comparePoint = function (p) { + return this.compare(p.row, p.column); + }; + Range.prototype.containsRange = function (range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + Range.prototype.intersects = function (range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + Range.prototype.isEnd = function (row, column) { + return this.end.row == row && this.end.column == column; + }; + Range.prototype.isStart = function (row, column) { + return this.start.row == row && this.start.column == column; + }; + Range.prototype.setStart = function (row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } + else { + this.start.row = row; + this.start.column = column; + } + }; + Range.prototype.setEnd = function (row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } + else { + this.end.row = row; + this.end.column = column; + } + }; + Range.prototype.inside = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideStart = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideEnd = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.compare = function (row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + } + } + if (row < this.start.row) + return -1; + if (row > this.end.row) + return 1; + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + return 0; + }; + Range.prototype.compareStart = function (row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareEnd = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareInside = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.clipRows = function (firstRow, lastRow) { + if (this.end.row > lastRow) + var end = { row: lastRow + 1, column: 0 }; + else if (this.end.row < firstRow) + var end = { row: firstRow, column: 0 }; + if (this.start.row > lastRow) + var start = { row: lastRow + 1, column: 0 }; + else if (this.start.row < firstRow) + var start = { row: firstRow, column: 0 }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.extend = function (row, column) { + var cmp = this.compare(row, column); + if (cmp == 0) + return this; + else if (cmp == -1) + var start = { row: row, column: column }; + else + var end = { row: row, column: column }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.isEmpty = function () { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + Range.prototype.isMultiLine = function () { + return (this.start.row !== this.end.row); + }; + Range.prototype.clone = function () { + return Range.fromPoints(this.start, this.end); + }; + Range.prototype.collapseRows = function () { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0); + else + return new Range(this.start.row, 0, this.end.row, 0); + }; + Range.prototype.toScreenRange = function (session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column); + }; + Range.prototype.moveBy = function (row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + return Range; +}()); +Range.fromPoints = function (start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = function (p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; +exports.Range = Range; + +}); + +define("ace/anchor",[], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Anchor = /** @class */ (function () { + function Anchor(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + if (typeof row != "number") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); + } + Anchor.prototype.getPosition = function () { + return this.$clipPositionToDocument(this.row, this.column); + }; + Anchor.prototype.getDocument = function () { + return this.document; + }; + Anchor.prototype.onChange = function (delta) { + if (delta.start.row == delta.end.row && delta.start.row != this.row) + return; + if (delta.start.row > this.row) + return; + var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight); + this.setPosition(point.row, point.column, true); + }; + Anchor.prototype.setPosition = function (row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } + else { + pos = this.$clipPositionToDocument(row, column); + } + if (this.row == pos.row && this.column == pos.column) + return; + var old = { + row: this.row, + column: this.column + }; + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + Anchor.prototype.detach = function () { + this.document.off("change", this.$onChange); + }; + Anchor.prototype.attach = function (doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + Anchor.prototype.$clipPositionToDocument = function (row, column) { + var pos = {}; + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + if (column < 0) + pos.column = 0; + return pos; + }; + return Anchor; +}()); +Anchor.prototype.$insertRight = false; +oop.implement(Anchor.prototype, EventEmitter); +function $pointsInOrder(point1, point2, equalPointsInOrder) { + var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; + return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); +} +function $getTransformedPoint(delta, point, moveIfEqual) { + var deltaIsInsert = delta.action == "insert"; + var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); + var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); + var deltaStart = delta.start; + var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. + if ($pointsInOrder(point, deltaStart, moveIfEqual)) { + return { + row: point.row, + column: point.column + }; + } + if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { + return { + row: point.row + deltaRowShift, + column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) + }; + } + return { + row: deltaStart.row, + column: deltaStart.column + }; +} +exports.Anchor = Anchor; + +}); + +define("ace/document",[], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var applyDelta = require("./apply_delta").applyDelta; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; +var Document = /** @class */ (function () { + function Document(textOrLines) { + this.$lines = [""]; + if (textOrLines.length === 0) { + this.$lines = [""]; + } + else if (Array.isArray(textOrLines)) { + this.insertMergedLines({ row: 0, column: 0 }, textOrLines); + } + else { + this.insert({ row: 0, column: 0 }, textOrLines); + } + } + Document.prototype.setValue = function (text) { + var len = this.getLength() - 1; + this.remove(new Range(0, 0, len, this.getLine(len).length)); + this.insert({ row: 0, column: 0 }, text || ""); + }; + Document.prototype.getValue = function () { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + Document.prototype.createAnchor = function (row, column) { + return new Anchor(this, row, column); + }; + Document.prototype.$detectNewLine = function (text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineCharacter = function () { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + Document.prototype.setNewLineMode = function (newLineMode) { + if (this.$newLineMode === newLineMode) + return; + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineMode = function () { + return this.$newLineMode; + }; + Document.prototype.isNewLine = function (text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + Document.prototype.getLine = function (row) { + return this.$lines[row] || ""; + }; + Document.prototype.getLines = function (firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + Document.prototype.getAllLines = function () { + return this.getLines(0, this.getLength()); + }; + Document.prototype.getLength = function () { + return this.$lines.length; + }; + Document.prototype.getTextRange = function (range) { + return this.getLinesForRange(range).join(this.getNewLineCharacter()); + }; + Document.prototype.getLinesForRange = function (range) { + var lines; + if (range.start.row === range.end.row) { + lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; + } + else { + lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + } + return lines; + }; + Document.prototype.insertLines = function (row, lines) { + console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); + return this.insertFullLines(row, lines); + }; + Document.prototype.removeLines = function (firstRow, lastRow) { + console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); + return this.removeFullLines(firstRow, lastRow); + }; + Document.prototype.insertNewLine = function (position) { + console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); + return this.insertMergedLines(position, ["", ""]); + }; + Document.prototype.insert = function (position, text) { + if (this.getLength() <= 1) + this.$detectNewLine(text); + return this.insertMergedLines(position, this.$split(text)); + }; + Document.prototype.insertInLine = function (position, text) { + var start = this.clippedPos(position.row, position.column); + var end = this.pos(position.row, position.column + text.length); + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: [text] + }, true); + return this.clonePos(end); + }; + Document.prototype.clippedPos = function (row, column) { + var length = this.getLength(); + if (row === undefined) { + row = length; + } + else if (row < 0) { + row = 0; + } + else if (row >= length) { + row = length - 1; + column = undefined; + } + var line = this.getLine(row); + if (column == undefined) + column = line.length; + column = Math.min(Math.max(column, 0), line.length); + return { row: row, column: column }; + }; + Document.prototype.clonePos = function (pos) { + return { row: pos.row, column: pos.column }; + }; + Document.prototype.pos = function (row, column) { + return { row: row, column: column }; + }; + Document.prototype.$clipPosition = function (position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length - 1).length; + } + else { + position.row = Math.max(0, position.row); + position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); + } + return position; + }; + Document.prototype.insertFullLines = function (row, lines) { + row = Math.min(Math.max(row, 0), this.getLength()); + var column = 0; + if (row < this.getLength()) { + lines = lines.concat([""]); + column = 0; + } + else { + lines = [""].concat(lines); + row--; + column = this.$lines[row].length; + } + this.insertMergedLines({ row: row, column: column }, lines); + }; + Document.prototype.insertMergedLines = function (position, lines) { + var start = this.clippedPos(position.row, position.column); + var end = { + row: start.row + lines.length - 1, + column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length + }; + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: lines + }); + return this.clonePos(end); + }; + Document.prototype.remove = function (range) { + var start = this.clippedPos(range.start.row, range.start.column); + var end = this.clippedPos(range.end.row, range.end.column); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }); + return this.clonePos(start); + }; + Document.prototype.removeInLine = function (row, startColumn, endColumn) { + var start = this.clippedPos(row, startColumn); + var end = this.clippedPos(row, endColumn); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }, true); + return this.clonePos(start); + }; + Document.prototype.removeFullLines = function (firstRow, lastRow) { + firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); + lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1); + var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; + var deleteLastNewLine = lastRow < this.getLength() - 1; + var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow); + var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0); + var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow); + var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length); + var range = new Range(startRow, startCol, endRow, endCol); + var deletedLines = this.$lines.slice(firstRow, lastRow + 1); + this.applyDelta({ + start: range.start, + end: range.end, + action: "remove", + lines: this.getLinesForRange(range) + }); + return deletedLines; + }; + Document.prototype.removeNewLine = function (row) { + if (row < this.getLength() - 1 && row >= 0) { + this.applyDelta({ + start: this.pos(row, this.getLine(row).length), + end: this.pos(row + 1, 0), + action: "remove", + lines: ["", ""] + }); + } + }; + Document.prototype.replace = function (range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length === 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + this.remove(range); + var end; + if (text) { + end = this.insert(range.start, text); + } + else { + end = range.start; + } + return end; + }; + Document.prototype.applyDeltas = function (deltas) { + for (var i = 0; i < deltas.length; i++) { + this.applyDelta(deltas[i]); + } + }; + Document.prototype.revertDeltas = function (deltas) { + for (var i = deltas.length - 1; i >= 0; i--) { + this.revertDelta(deltas[i]); + } + }; + Document.prototype.applyDelta = function (delta, doNotValidate) { + var isInsert = delta.action == "insert"; + if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] + : !Range.comparePoints(delta.start, delta.end)) { + return; + } + if (isInsert && delta.lines.length > 20000) { + this.$splitAndapplyLargeDelta(delta, 20000); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } + }; + Document.prototype.$safeApplyDelta = function (delta) { + var docLength = this.$lines.length; + if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength + || delta.action == "insert" && delta.start.row <= docLength) { + this.applyDelta(delta); + } + }; + Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) { + var lines = delta.lines; + var l = lines.length - MAX + 1; + var row = delta.start.row; + var column = delta.start.column; + for (var from = 0, to = 0; from < l; from = to) { + to += MAX - 1; + var chunk = lines.slice(from, to); + chunk.push(""); + this.applyDelta({ + start: this.pos(row + from, column), + end: this.pos(row + to, column = 0), + action: delta.action, + lines: chunk + }, true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); + }; + Document.prototype.revertDelta = function (delta) { + this.$safeApplyDelta({ + start: this.clonePos(delta.start), + end: this.clonePos(delta.end), + action: (delta.action == "insert" ? "remove" : "insert"), + lines: delta.lines.slice() + }); + }; + Document.prototype.indexToPosition = function (index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return { row: i, column: index + lines[i].length + newlineLength }; + } + return { row: l - 1, column: index + lines[l - 1].length + newlineLength }; + }; + Document.prototype.positionToIndex = function (pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + return index + pos.column; + }; + Document.prototype.$split = function (text) { + return text.split(/\r\n|\r|\n/); + }; + return Document; +}()); +Document.prototype.$autoNewLine = ""; +Document.prototype.$newLineMode = "auto"; +oop.implement(Document.prototype, EventEmitter); +exports.Document = Document; + +}); + +define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) { + if (typeof obj !== "object" || !obj) + return obj; + var copy; + if (Array.isArray(obj)) { + copy = []; + for (var key = 0; key < obj.length; key++) { + copy[key] = deepCopy(obj[key]); + } + return copy; + } + if (Object.prototype.toString.call(obj) !== "[object Object]") + return obj; + copy = {}; + for (var key in obj) + copy[key] = deepCopy(obj[key]); + return copy; +}; + +}); + +define("ace/lib/lang",[], function(require, exports, module){"use strict"; +exports.last = function (a) { + return a[a.length - 1]; +}; +exports.stringReverse = function (string) { + return string.split("").reverse().join(""); +}; +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + if (count >>= 1) + string += string; + } + return result; +}; +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; +exports.copyObject = function (obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; +exports.copyArray = function (array) { + var copy = []; + for (var i = 0, l = array.length; i < l; i++) { + if (array[i] && typeof array[i] == "object") + copy[i] = this.copyObject(array[i]); + else + copy[i] = array[i]; + } + return copy; +}; +exports.deepCopy = require("./deep_copy").deepCopy; +exports.arrayToMap = function (arr) { + var map = {}; + for (var i = 0; i < arr.length; i++) { + map[arr[i]] = 1; + } + return map; +}; +exports.createMap = function (props) { + var map = Object.create(null); + for (var i in props) { + map[i] = props[i]; + } + return map; +}; +exports.arrayRemove = function (array, value) { + for (var i = 0; i <= array.length; i++) { + if (value === array[i]) { + array.splice(i, 1); + } + } +}; +exports.escapeRegExp = function (str) { + return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); +}; +exports.escapeHTML = function (str) { + return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 0xffff ? 2 : 1; +}; + +}); + +define("ace/worker/mirror",[], function(require, exports, module) { +"use strict"; + +var Document = require("../document").Document; +var lang = require("../lib/lang"); + +var Mirror = exports.Mirror = function(sender) { + this.sender = sender; + var doc = this.doc = new Document(""); + + var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); + + var _self = this; + sender.on("change", function(e) { + var data = e.data; + if (data[0].start) { + doc.applyDeltas(data); + } else { + for (var i = 0; i < data.length; i += 2) { + var d, err; + if (Array.isArray(data[i+1])) { + d = {action: "insert", start: data[i], lines: data[i+1]}; + } else { + d = {action: "remove", start: data[i], end: data[i+1]}; + } + + if ((d.action == "insert" ? d.start : d.end).row >= doc.$lines.length) { + err = new Error("Invalid delta"); + err.data = { + path: _self.$path, + linesLength: doc.$lines.length, + start: d.start, + end: d.end + }; + throw err; + } + + doc.applyDelta(d, true); + } + } + if (_self.$timeout) + return deferredUpdate.schedule(_self.$timeout); + _self.onUpdate(); + }); +}; + +(function() { + + this.$timeout = 500; + + this.setTimeout = function(timeout) { + this.$timeout = timeout; + }; + + this.setValue = function(value) { + this.doc.setValue(value); + this.deferredUpdate.schedule(this.$timeout); + }; + + this.getValue = function(callbackId) { + this.sender.callback(this.doc.getValue(), callbackId); + }; + + this.onUpdate = function() { + }; + + this.isPending = function() { + return this.deferredUpdate.isPending(); + }; + +}).call(Mirror.prototype); + +}); + +define("ace/mode/coffee/coffee",[], function(require, exports, module) { +function define(f) { module.exports = f() }; define.amd = {}; +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_get=function e(a,t,o){null===a&&(a=Function.prototype);var n=Object.getOwnPropertyDescriptor(a,t);if(n===void 0){var r=Object.getPrototypeOf(a);return null===r?void 0:e(r,t,o)}if("value"in n)return n.value;var l=n.get;return void 0===l?void 0:l.call(o)},_slicedToArray=function(){function e(e,a){var t=[],o=!0,n=!1,r=void 0;try{for(var l=e[Symbol.iterator](),s;!(o=(s=l.next()).done)&&(t.push(s.value),!(a&&t.length===a));o=!0);}catch(e){n=!0,r=e}finally{try{!o&&l["return"]&&l["return"]()}finally{if(n)throw r}}return t}return function(a,t){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return e(a,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function e(e,a){for(var t=0,o;t=6"},directories:{lib:"./lib/coffeescript"},main:"./lib/coffeescript/index",browser:"./lib/coffeescript/browser",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],scripts:{test:"node ./bin/cake test","test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{"babel-core":"~6.26.0","babel-preset-babili":"~0.1.4","babel-preset-env":"~1.6.1","babel-preset-minify":"^0.3.0",codemirror:"^5.32.0",docco:"~0.8.0","highlight.js":"~9.12.0",jison:">=0.4.18","markdown-it":"~8.4.0",underscore:"~1.8.3",webpack:"~3.10.0"},dependencies:{}}}(),require["./helpers"]=function(){var e={};return function(){var a,t,o,n,r,l,s,i;e.starts=function(e,a,t){return a===e.substr(t,a.length)},e.ends=function(e,a,t){var o;return o=a.length,a===e.substr(e.length-o-(t||0),o)},e.repeat=s=function(e,a){var t;for(t="";0>>=1,e+=e;return t},e.compact=function(e){var a,t,o,n;for(n=[],a=0,o=e.length;ar)return n.returnOnNegativeLevel?void 0:o.call(this,i,e);e+=1}return e-1}},{key:"removeLeadingNewlines",value:function removeLeadingNewlines(){var e,a,t,o,n,r,l,s,i;for(l=this.tokens,e=a=0,n=l.length;a=n&&n>r;o=0<=r?++n:--n)if(null!=i[o]&&("string"==typeof i[o]&&(i[o]=[i[o]]),l=this.tag(e+o+t),0>a.call(i[o],l)))return-1;return e+o+t-1}},{key:"looksObjectish",value:function looksObjectish(e){var t,o;return-1!==this.indexOfTag(e,"@",null,":")||-1!==this.indexOfTag(e,null,":")||(o=this.indexOfTag(e,c),!!(-1!==o&&(t=null,this.detectEnd(o+1,function(e){var t;return t=e[0],0<=a.call(d,t)},function(e,a){return t=a}),":"===this.tag(t+1))))}},{key:"findTagsBackwards",value:function findTagsBackwards(e,t){var o,n,r,l,s,i,p;for(o=[];0<=e&&(o.length||(l=this.tag(e),0>a.call(t,l))&&((s=this.tag(e),0>a.call(c,s))||this.tokens[e].generated)&&(i=this.tag(e),0>a.call(g,i)));)(n=this.tag(e),0<=a.call(d,n))&&o.push(this.tag(e)),(r=this.tag(e),0<=a.call(c,r))&&o.length&&o.pop(),e-=1;return p=this.tag(e),0<=a.call(t,p)}},{key:"addImplicitBracesAndParens",value:function addImplicitBracesAndParens(){var e,t;return e=[],t=null,this.scanTokens(function(o,l,f){var i=this,y=_slicedToArray(o,1),T,v,b,$,_,C,D,E,x,I,S,A,R,k,O,L,F,w,P,j,M,U,V,s,B,G,H,W,X,Y,q,z,J;J=y[0];var K=P=0"!==w&&"->"!==w&&"["!==w&&"("!==w&&","!==w&&"{"!==w&&"ELSE"!==w&&"="!==w)for(;D()||x()&&":"!==w;)D()?T():v();return E()&&e.pop(),e.push([J,l]),b(1)}if(0<=a.call(c,J))return e.push([J,l]),b(1);if(0<=a.call(d,J)){for(;C();)D()?T():x()?v():e.pop();t=e.pop()}if(_=function(){var e,t,n,r;return(n=i.findTagsBackwards(l,["FOR"])&&i.findTagsBackwards(l,["FORIN","FOROF","FORFROM"]),e=n||i.findTagsBackwards(l,["WHILE","UNTIL","LOOP","LEADING_WHEN"]),!!e)&&(t=!1,r=o[2].first_line,i.detectEnd(l,function(e){var t;return t=e[0],0<=a.call(g,t)},function(e,a){var o=f[a-1]||[],n=_slicedToArray(o,3),l;return w=n[0],l=n[2].first_line,t=r===l&&("->"===w||"=>"===w)},{returnOnNegativeLevel:!0}),t)},(0<=a.call(m,J)&&o.spaced||"?"===J&&0a.call(d,e):return t[1];case"@"!==this.tag(l-2):return l-2;default:return l-1}}.call(this),z=0>=V||(M=this.tag(V-1),0<=a.call(g,M))||f[V-1].newLine,W()){var ae=W(),te=_slicedToArray(ae,2);if(H=te[0],B=te[1],("{"===H||"INDENT"===H&&"{"===this.tag(B-1))&&(z||","===this.tag(V-1)||"{"===this.tag(V-1)))return b(1)}return q(V,!!z),b(2)}if(0<=a.call(g,J))for(R=e.length-1;0<=R&&(G=e[R],!!I(G));R+=-1)A(G)&&(G[2].sameLine=!1);if(k="OUTDENT"===w||P.newLine,0<=a.call(u,J)||0<=a.call(n,J)&&k||(".."===J||"..."===J)&&this.findTagsBackwards(l,["INDEX_START"]))for(;C();){var oe=W(),ne=_slicedToArray(oe,3);H=ne[0],B=ne[1];var re=ne[2];if(s=re.sameLine,z=re.startsLine,D()&&","!==w||","===w&&"TERMINATOR"===J&&null==O)T();else if(x()&&s&&"TERMINATOR"!==J&&":"!==w&&!(("POST_IF"===J||"FOR"===J||"WHILE"===J||"UNTIL"===J)&&z&&$(l+1)))v();else if(x()&&"TERMINATOR"===J&&","!==w&&!(z&&this.looksObjectish(l+1)))v();else break}if(","===J&&!this.looksObjectish(l+1)&&x()&&"FOROF"!==(U=this.tag(l+2))&&"FORIN"!==U&&("TERMINATOR"!==O||!this.looksObjectish(l+2)))for(F="OUTDENT"===O?1:0;x();)v(l+F);return b(1)})}},{key:"enforceValidCSXAttributes",value:function enforceValidCSXAttributes(){return this.scanTokens(function(e,a,t){var o,n;return e.csxColon&&(o=t[a+1],"STRING_START"!==(n=o[0])&&"STRING"!==n&&"("!==n&&C("expected wrapped or quoted JSX attribute",o[2])),1})}},{key:"rescueStowawayComments",value:function rescueStowawayComments(){var e,t,o;return e=function(e,a,t,o){return"TERMINATOR"!==t[a][0]&&t[o](N("TERMINATOR","\n",t[a])),t[o](N("JS","",t[a],e))},o=function(t,o,n){var r,s,i,d,c,p,u;for(s=o;s!==n.length&&(c=n[s][0],0<=a.call(l,c));)s++;if(!(s===n.length||(p=n[s][0],0<=a.call(l,p)))){for(u=t.comments,i=0,d=u.length;ia.call(n,r)))return this.tokens.splice(o,0,N("(","(",this.tokens[o])),this.tokens.splice(t+1,0,N(")",")",this.tokens[t]))},o=null,this.scanTokens(function(a,n){var r,l;return"do"===a[1]?(o=n,r=n+1,"PARAM_START"===this.tag(n+1)&&(r=null,this.detectEnd(n+1,function(e,a){return"PARAM_END"===this.tag(a-1)},function(e,a){return r=a})),null==r||"->"!==(l=this.tag(r))&&"=>"!==l||"INDENT"!==this.tag(r+1))?1:(this.detectEnd(r+1,t,e),2):1})}},{key:"normalizeLines",value:function normalizeLines(){var e=this,t,o,r,l,d,c,p,u,m;return m=d=u=null,p=null,c=null,l=[],r=function(e,t){var o,r,l,i;return";"!==e[1]&&(o=e[0],0<=a.call(y,o))&&!("TERMINATOR"===e[0]&&(r=this.tag(t+1),0<=a.call(s,r)))&&!("ELSE"===e[0]&&("THEN"!==m||c||p))&&("CATCH"!==(l=e[0])&&"FINALLY"!==l||"->"!==m&&"=>"!==m)||(i=e[0],0<=a.call(n,i))&&(this.tokens[t-1].newLine||"OUTDENT"===this.tokens[t-1][0])},t=function(e,a){return"ELSE"===e[0]&&"THEN"===m&&l.pop(),this.tokens.splice(","===this.tag(a-1)?a-1:a,0,u)},o=function(a,t){var o,n,r;if(r=l.length,!(0"===v||"=>"===v)&&this.findTagsBackwards(n,["IF","WHILE","FOR","UNTIL","SWITCH","WHEN","LEADING_WHEN","[","INDEX_START"])&&!this.findTagsBackwards(n,["THEN","..","..."]),"TERMINATOR"===v){if("ELSE"===this.tag(n+1)&&"OUTDENT"!==this.tag(n-1))return i.splice.apply(i,[n,1].concat(_toConsumableArray(this.indentation()))),1;if(k=this.tag(n+1),0<=a.call(s,k))return i.splice(n,1),0}if("CATCH"===v)for(f=y=1;2>=y;f=++y)if("OUTDENT"===(N=this.tag(n+f))||"TERMINATOR"===N||"FINALLY"===N)return i.splice.apply(i,[n+f,0].concat(_toConsumableArray(this.indentation()))),2+f;if(("->"===v||"=>"===v)&&(","===this.tag(n+1)||"."===this.tag(n+1)&&e.newLine)){var b=this.indentation(i[n]),$=_slicedToArray(b,2);return d=$[0],u=$[1],i.splice(n+1,0,d,u),1}if(0<=a.call(T,v)&&"INDENT"!==this.tag(n+1)&&("ELSE"!==v||"IF"!==this.tag(n+1))&&!g){m=v;var _=this.indentation(i[n]),C=_slicedToArray(_,2);return d=C[0],u=C[1],"THEN"===m&&(d.fromThen=!0),"THEN"===v&&(p=this.findTagsBackwards(n,["LEADING_WHEN"])&&"IF"===this.tag(n+1),c=this.findTagsBackwards(n,["IF"])&&"IF"===this.tag(n+1)),"THEN"===v&&this.findTagsBackwards(n,["IF"])&&l.push(n),"ELSE"===v&&"OUTDENT"!==this.tag(n-1)&&(n=o(i,n)),i.splice(n+1,0,d),this.detectEnd(n+2,r,t),"THEN"===v&&i.splice(n,1),1}return 1})}},{key:"tagPostfixConditionals",value:function tagPostfixConditionals(){var e,t,o;return o=null,t=function(e,t){var o=_slicedToArray(e,1),n,r;r=o[0];var l=_slicedToArray(this.tokens[t-1],1);return n=l[0],"TERMINATOR"===r||"INDENT"===r&&0>a.call(T,n)},e=function(e){if("INDENT"!==e[0]||e.generated&&!e.fromThen)return o[0]="POST_"+o[0]},this.scanTokens(function(a,n){return"IF"===a[0]?(o=a,this.detectEnd(n+1,t,e),1):1})}},{key:"indentation",value:function indentation(e){var a,t;return a=["INDENT",2],t=["OUTDENT",2],e?(a.generated=t.generated=!0,a.origin=t.origin=e):a.explicit=t.explicit=!0,[a,t]}},{key:"tag",value:function tag(e){var a;return null==(a=this.tokens[e])?void 0:a[0]}}]),e}();return e.prototype.generate=N,e}.call(this),o=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]],e.INVERSES=i={},c=[],d=[],v=0,b=o.length;v","=>","[","(","{","--","++"],h=["+","-"],u=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],T=["ELSE","->","=>","TRY","FINALLY","THEN"],y=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],g=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"],r=["IF","TRY","FINALLY","CATCH","CLASS","SWITCH"],l=["(",")","[","]","{","}",".","..","...",",","=","++","--","?","AS","AWAIT","CALL_START","CALL_END","DEFAULT","ELSE","EXTENDS","EXPORT","FORIN","FOROF","FORFROM","IMPORT","INDENT","INDEX_SOAK","LEADING_WHEN","OUTDENT","PARAM_END","REGEX_START","REGEX_END","RETURN","STRING_END","THROW","UNARY","YIELD"].concat(h.concat(u.concat(n.concat(r))))}.call(this),{exports:e}.exports}(),require["./lexer"]=function(){var e={};return function(){var a=[].indexOf,t=[].slice,o=require("./rewriter"),n,r,l,s,i,d,c,p,u,m,h,g,f,y,k,T,N,v,b,$,_,C,D,E,x,I,S,A,R,O,L,F,w,P,j,M,U,V,B,G,H,W,X,Y,q,z,J,K,Z,Q,ee,ae,te,oe,ne,re,le,se,ie,de,ce,pe,ue,me,he,ge,fe,ye,ke,Te,Ne,ve,be,$e;z=o.Rewriter,S=o.INVERSES;var _e=require("./helpers");he=_e.count,be=_e.starts,me=_e.compact,ve=_e.repeat,ge=_e.invertLiterate,Ne=_e.merge,ue=_e.attachCommentsToNode,Te=_e.locationDataToString,$e=_e.throwSyntaxError,e.Lexer=w=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"tokenize",value:function tokenize(e){var a=1this.indent){if(s)return this.indebt=d-this.indent,this.suppressNewlines(),o.length;if(!this.tokens.length)return this.baseIndent=this.indent=d,this.indentLiteral=l,o.length;t=d-this.indent+this.outdebt,this.token("INDENT",t,o.length-d,d),this.indents.push(t),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=d,this.indentLiteral=l}else da.call(u,h)))))return 0;var N=d,v=_slicedToArray(N,3);return i=v[0],s=v[1],o=v[2],c=this.token("CSX_TAG",s,1,s.length),this.token("CALL_START","("),this.token("[","["),this.ends.push({tag:"/>",origin:c,name:s}),this.csxDepth++,s.length+1}if(n=this.atCSXTag()){if("/>"===this.chunk.slice(0,2))return this.pair("/>"),this.token("]","]",0,2),this.token("CALL_END",")",0,2),this.csxDepth--,2;if("{"===l)return":"===m?(g=this.token("(","("),this.csxObjAttribute[this.csxDepth]=!1):(g=this.token("{","{"),this.csxObjAttribute[this.csxDepth]=!0),this.ends.push({tag:"}",origin:g}),1;if(">"===l){this.pair("/>"),c=this.token("]","]"),this.token(",",",");var b=this.matchWithInterpolations(I,">",""})}),d=y.exec(this.chunk.slice(r))||f.exec(this.chunk.slice(r)),d&&d[1]===n.name||this.error("expected corresponding CSX closing tag for "+n.name,n.origin[2]),t=r+n.name.length,">"!==this.chunk[t]&&this.error("missing closing > after tag name",{offset:t,length:1}),this.token("CALL_END",")",r,n.name.length+1),this.csxDepth--,t+1}return 0}return this.atCSXTag(1)?"}"===l?(this.pair(l),this.csxObjAttribute[this.csxDepth]?(this.token("}","}"),this.csxObjAttribute[this.csxDepth]=!1):this.token(")",")"),this.token(",",","),1):0:0}},{key:"atCSXTag",value:function atCSXTag(){var e=0"===(null==t?void 0:t.tag)&&t}},{key:"literalToken",value:function literalToken(){var e,t,o,n,r,i,d,c,p,u,g,f,y;if(e=V.exec(this.chunk)){var k=e,T=_slicedToArray(k,1);y=T[0],s.test(y)&&this.tagParameters()}else y=this.chunk.charAt(0);if(g=y,n=this.prev(),n&&0<=a.call(["="].concat(_toConsumableArray(h)),y)&&(u=!1,"="!==y||"||"!==(r=n[1])&&"&&"!==r||n.spaced||(n[0]="COMPOUND_ASSIGN",n[1]+="=",n=this.tokens[this.tokens.length-2],u=!0),n&&"PROPERTY"!==n[0]&&(o=null==(i=n.origin)?n:i,t=ye(n[1],o[1]),t&&this.error(t,o[2])),u))return y.length;if("{"===y&&this.seenImport?this.importSpecifierList=!0:this.importSpecifierList&&"}"===y?this.importSpecifierList=!1:"{"===y&&"EXPORT"===(null==n?void 0:n[0])?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===y&&(this.exportSpecifierList=!1),";"===y)(d=null==n?void 0:n[0],0<=a.call(["="].concat(_toConsumableArray(ie)),d))&&this.error("unexpected ;"),this.seenFor=this.seenImport=this.seenExport=!1,g="TERMINATOR";else if("*"===y&&"EXPORT"===(null==n?void 0:n[0]))g="EXPORT_ALL";else if(0<=a.call(P,y))g="MATH";else if(0<=a.call(m,y))g="COMPARE";else if(0<=a.call(h,y))g="COMPOUND_ASSIGN";else if(0<=a.call(le,y))g="UNARY";else if(0<=a.call(se,y))g="UNARY_MATH";else if(0<=a.call(J,y))g="SHIFT";else if("?"===y&&(null==n?void 0:n.spaced))g="BIN?";else if(n)if("("===y&&!n.spaced&&(c=n[0],0<=a.call(l,c)))"?"===n[0]&&(n[0]="FUNC_EXIST"),g="CALL_START";else if("["===y&&((p=n[0],0<=a.call(x,p))&&!n.spaced||"::"===n[0]))switch(g="INDEX_START",n[0]){case"?":n[0]="INDEX_SOAK"}return f=this.makeToken(g,y),"("===y||"{"===y||"["===y?this.ends.push({tag:S[y],origin:f}):")"===y||"}"===y||"]"===y?this.pair(y):void 0,this.tokens.push(this.makeToken(g,y)),y.length}},{key:"tagParameters",value:function tagParameters(){var e,a,t,o,n;if(")"!==this.tag())return this;for(t=[],n=this.tokens,e=n.length,a=n[--e],a[0]="PARAM_END";o=n[--e];)switch(o[0]){case")":t.push(o);break;case"(":case"CALL_START":if(t.length)t.pop();else return"("===o[0]?(o[0]="PARAM_START",this):(a[0]="CALL_END",this)}return this}},{key:"closeIndentation",value:function closeIndentation(){return this.outdentToken(this.indent)}},{key:"matchWithInterpolations",value:function matchWithInterpolations(a,o,n,r){var l,s,i,d,c,p,u,m,h,g,f,y,k,T,N,v,b,$,_,C,D,E;if(null==n&&(n=o),null==r&&(r=/^#\{/),E=[],v=o.length,this.chunk.slice(0,v)!==o)return null;for(C=this.chunk.slice(v);;){var x=a.exec(C),I=_slicedToArray(x,1);if(D=I[0],this.validateEscapes(D,{isRegex:"/"===o.charAt(0),offsetInChunk:v}),E.push(this.makeToken("NEOSTRING",D,v)),C=C.slice(D.length),v+=D.length,!(T=r.exec(C)))break;var S=T,A=_slicedToArray(S,1);f=A[0],g=f.length-1;var R=this.getLineAndColumnFromChunk(v+g),O=_slicedToArray(R,2);k=O[0],u=O[1],_=C.slice(g);var L=(new e).tokenize(_,{line:k,column:u,untilBalanced:!0});if(N=L.tokens,h=L.index,h+=g,c="}"===C[h-1],c){var F,w,P,j;F=N,w=_slicedToArray(F,1),b=w[0],F,P=t.call(N,-1),j=_slicedToArray(P,1),p=j[0],P,b[0]=b[1]="(",p[0]=p[1]=")",p.origin=["","end of interpolation",p[2]]}"TERMINATOR"===(null==($=N[1])?void 0:$[0])&&N.splice(1,1),c||(b=this.makeToken("(","(",v,0),p=this.makeToken(")",")",v+h,0),N=[b].concat(_toConsumableArray(N),[p])),E.push(["TOKENS",N]),C=C.slice(h),v+=h}return C.slice(0,n.length)!==n&&this.error("missing "+n,{length:o.length}),l=E,s=_slicedToArray(l,1),m=s[0],l,i=t.call(E,-1),d=_slicedToArray(i,1),y=d[0],i,m[2].first_column-=o.length,"\n"===y[1].substr(-1)?(y[2].last_line+=1,y[2].last_column=n.length-1):y[2].last_column+=n.length,0===y[1].length&&(y[2].last_column-=1),{tokens:E,index:v+n.length}}},{key:"mergeInterpolationTokens",value:function mergeInterpolationTokens(e,a,o){var n,r,l,s,i,d,c,p,u,m,h,g,f,y,k,T,N,v,b;for(1l&&(f=this.token("+","+"),f[2]={first_line:m[2].first_line,first_column:m[2].first_column,last_line:m[2].first_line,last_column:m[2].first_column}),($=this.tokens).push.apply($,_toConsumableArray(N))}if(h){var E=t.call(e,-1),x=_slicedToArray(E,1);return c=x[0],h.origin=["STRING",null,{first_line:h[2].first_line,first_column:h[2].first_column,last_line:c[2].last_line,last_column:c[2].last_column}],h[2]=h.origin[2],y=this.token("STRING_END",")"),y[2]={first_line:c[2].last_line,first_column:c[2].last_column,last_line:c[2].last_line,last_column:c[2].last_column}}}},{key:"pair",value:function pair(e){var a,o,n,r,l,s,i;if(l=this.ends,a=t.call(l,-1),o=_slicedToArray(a,1),r=o[0],a,e!==(i=null==r?void 0:r.tag)){var d,c;return"OUTDENT"!==i&&this.error("unmatched "+e),s=this.indents,d=t.call(s,-1),c=_slicedToArray(d,1),n=c[0],d,this.outdentToken(n,!0),this.pair(e)}return this.ends.pop()}},{key:"getLineAndColumnFromChunk",value:function getLineAndColumnFromChunk(e){var a,o,n,r,l;if(0===e)return[this.chunkLine,this.chunkColumn];if(l=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),n=he(l,"\n"),a=this.chunkColumn,0e)?o(e):(a=_Mathfloor((e-65536)/1024)+55296,t=(e-65536)%1024+56320,""+o(a)+o(t))}},{key:"replaceUnicodeCodePointEscapes",value:function replaceUnicodeCodePointEscapes(e,t){var o=this,n;return n=null!=t.flags&&0>a.call(t.flags,"u"),e.replace(de,function(e,a,r,l){var s;return a?a:(s=parseInt(r,16),1114111a.call([].concat(_toConsumableArray(R),_toConsumableArray(c)),e):return"keyword '"+t+"' can't be assigned";case 0>a.call(Z,e):return"'"+t+"' can't be assigned";case 0>a.call(q,e):return"reserved word '"+t+"' can't be assigned";default:return!1}},e.isUnassignable=ye,fe=function(e){var a;return"IDENTIFIER"===e[0]?("from"===e[1]&&(e[1][0]="IDENTIFIER",!0),!0):"FOR"!==e[0]&&"{"!==(a=e[1])&&"["!==a&&","!==a&&":"!==a},R=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","await","if","else","switch","for","while","do","try","catch","finally","class","extends","super","import","export","default"],c=["undefined","Infinity","NaN","then","unless","until","loop","of","by","when"],d={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},i=function(){var e;for(ke in e=[],d)e.push(ke);return e}(),c=c.concat(i),q=["case","function","var","void","with","const","let","enum","native","implements","interface","package","private","protected","public","static"],Z=["arguments","eval"],e.JS_FORBIDDEN=R.concat(q).concat(Z),n=65279,D=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,y=/^(?![\d<])((?:(?!\s)[\.\-$\w\x7f-\uffff])+)/,f=/^()>/,g=/^(?!\d)((?:(?!\s)[\-$\w\x7f-\uffff])+)([^\S]*=(?!=))?/,U=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,V=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,pe=/^[^\n\S]+/,p=/^\s*###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,s=/^[-=]>/,j=/^(?:\n[^\n\S]*)+/,A=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/,C=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/,oe=/^(?:'''|"""|'|")/,te=/^(?:[^\\']|\\[\s\S])*/,Q=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,b=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,N=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,I=/^(?:[^\{<])*/,k=/^(?:\{|<(?!\/))/,ae=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g,K=/\s*\n\s*/g,v=/\n+([^\n\S]*)(?=\S)/g,G=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/,H=/^\w*/,ce=/^(?!.*(.).*\1)[imguy]*$/,$=/^(?:[^\\\/#\s]|\\[\s\S]|\/(?!\/\/)|\#(?!\{)|\s+(?:#(?!\{).*)?)*/,_=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g,W=/^(\/|\/{3}\s*)(\*)/,B=/^\/=?\s/,T=/\*\//,F=/^\s*(?:,|\??\.(?![.\d])|::)/,ee=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/,X=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/,de=/(\\\\)|\\u\{([\da-fA-F]+)\}/g,O=/^[^\n\S]*\n/,ne=/\n[^\n\S]*$/,re=/\s+$/,h=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],le=["NEW","TYPEOF","DELETE","DO"],se=["!","~"],J=["<<",">>",">>>"],m=["==","!=","<",">","<=",">="],P=["*","/","%","//","%%"],Y=["IN","OF","INSTANCEOF"],r=["TRUE","FALSE"],l=["IDENTIFIER","PROPERTY",")","]","?","@","THIS","SUPER"],x=l.concat(["NUMBER","INFINITY","NAN","STRING","STRING_END","REGEX","REGEX_END","BOOL","NULL","UNDEFINED","}","::"]),u=["IDENTIFIER",")","]","NUMBER"],M=x.concat(["++","--"]),L=["INDENT","OUTDENT","TERMINATOR"],E=[")","}","]"],ie=["\\",".","?.","?::","UNARY","MATH","UNARY_MATH","+","-","**","SHIFT","RELATION","COMPARE","&","^","|","&&","||","BIN?","EXTENDS"]}.call(this),{exports:e}.exports}(),require["./parser"]=function(){var e={},a={exports:e},t=function(){function e(){this.yy={}}var a=function(e,a,t,o){for(t=t||{},o=e.length;o--;t[e[o]]=a);return t},t=[1,24],o=[1,56],n=[1,91],r=[1,92],l=[1,87],s=[1,93],i=[1,94],d=[1,89],c=[1,90],p=[1,64],u=[1,66],m=[1,67],h=[1,68],g=[1,69],f=[1,70],y=[1,72],k=[1,73],T=[1,58],N=[1,42],v=[1,36],b=[1,76],$=[1,77],_=[1,86],C=[1,54],D=[1,59],E=[1,60],x=[1,74],I=[1,75],S=[1,47],A=[1,55],R=[1,71],O=[1,81],L=[1,82],F=[1,83],w=[1,84],P=[1,53],j=[1,80],M=[1,38],U=[1,39],V=[1,40],B=[1,41],G=[1,43],H=[1,44],W=[1,95],X=[1,6,36,47,146],Y=[1,6,35,36,47,69,70,93,127,135,146,149,157],q=[1,113],z=[1,114],J=[1,115],K=[1,110],Z=[1,98],Q=[1,97],ee=[1,96],ae=[1,99],te=[1,100],oe=[1,101],ne=[1,102],re=[1,103],le=[1,104],se=[1,105],ie=[1,106],de=[1,107],ce=[1,108],pe=[1,109],ue=[1,117],me=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],he=[2,196],ge=[1,123],fe=[1,128],ye=[1,124],ke=[1,125],Te=[1,126],Ne=[1,129],ve=[1,122],be=[1,6,35,36,47,69,70,93,127,135,146,148,149,150,156,157,174],$e=[1,6,35,36,45,46,47,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],_e=[2,122],Ce=[2,126],De=[6,35,88,93],Ee=[2,99],xe=[1,141],Ie=[1,135],Se=[1,140],Ae=[1,144],Re=[1,149],Oe=[1,147],Le=[1,151],Fe=[1,155],we=[1,153],Pe=[1,6,35,36,45,46,47,61,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],je=[2,119],Me=[1,6,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Ue=[2,31],Ve=[1,183],Be=[2,86],Ge=[1,187],He=[1,193],We=[1,208],Xe=[1,203],Ye=[1,212],qe=[1,209],ze=[1,214],Je=[1,215],Ke=[1,217],Ze=[14,32,35,38,39,43,45,46,49,50,54,55,56,57,58,59,68,77,84,85,86,90,91,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],Qe=[1,6,35,36,45,46,47,61,69,70,80,81,83,88,93,101,102,103,105,109,111,125,126,127,135,146,148,149,150,156,157,174,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],ea=[1,228],aa=[2,142],ta=[1,250],oa=[1,245],na=[1,256],ra=[1,6,35,36,45,46,47,65,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],la=[1,6,33,35,36,45,46,47,61,65,69,70,80,81,83,88,93,101,102,103,105,109,111,117,125,126,127,135,146,148,149,150,156,157,164,165,166,174,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],sa=[1,6,35,36,45,46,47,52,65,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],ia=[1,286],da=[45,46,126],ca=[1,297],pa=[1,296],ua=[6,35],ma=[2,97],ha=[1,303],ga=[6,35,36,88,93],fa=[6,35,36,61,70,88,93],ya=[1,6,35,36,47,69,70,80,81,83,88,93,101,102,103,105,109,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],ka=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,183,184,185,186,187,188,189,190,191,192,193],Ta=[2,347],Na=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,183,185,186,187,188,189,190,191,192,193],va=[45,46,80,81,101,102,103,105,125,126],ba=[1,330],$a=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174],_a=[2,84],Ca=[1,346],Da=[1,348],Ea=[1,353],xa=[1,355],Ia=[6,35,69,93],Sa=[2,221],Aa=[2,222],Ra=[1,6,35,36,45,46,47,61,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,164,165,166,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Oa=[1,369],La=[6,14,32,35,36,38,39,43,45,46,49,50,54,55,56,57,58,59,68,69,70,77,84,85,86,90,91,93,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],Fa=[6,35,36,69,93],wa=[6,35,36,69,93,127],Pa=[1,6,35,36,45,46,47,61,65,69,70,80,81,83,88,93,101,102,103,105,109,111,125,126,127,135,146,148,149,150,156,157,164,165,166,174,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],ja=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,157,174],Ma=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,149,157,174],Ua=[2,273],Va=[164,165,166],Ba=[93,164,165,166],Ga=[6,35,109],Ha=[1,393],Wa=[6,35,36,93,109],Xa=[6,35,36,65,93,109],Ya=[1,399],qa=[1,400],za=[6,35,36,61,65,70,80,81,93,109,126],Ja=[6,35,36,70,80,81,93,109,126],Ka=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,185,186,187,188,189,190,191,192,193],Za=[2,339],Qa=[2,338],et=[1,6,35,36,45,46,47,52,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],at=[1,422],tt=[14,32,38,39,43,45,46,49,50,54,55,56,57,58,59,68,77,83,84,85,86,90,91,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],ot=[2,207],nt=[6,35,36],rt=[2,98],lt=[1,431],st=[1,432],it=[1,6,35,36,47,69,70,80,81,83,88,93,101,102,103,105,109,127,135,142,143,146,148,149,150,156,157,169,171,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],dt=[1,312],ct=[36,169,171],pt=[1,6,36,47,69,70,83,88,93,109,127,135,146,149,157,174],ut=[1,467],mt=[1,473],ht=[1,6,35,36,47,69,70,93,127,135,146,149,157,174],gt=[2,113],ft=[1,486],yt=[1,487],kt=[6,35,36,69],Tt=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,169,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Nt=[1,6,35,36,47,69,70,93,127,135,146,149,157,169],vt=[2,286],bt=[2,287],$t=[2,302],_t=[1,510],Ct=[1,511],Dt=[6,35,36,109],Et=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,150,156,157,174],xt=[1,532],It=[6,35,36,93,127],St=[6,35,36,93],At=[1,6,35,36,47,69,70,83,88,93,109,127,135,142,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Rt=[35,93],Ot=[1,560],Lt=[1,561],Ft=[1,567],wt=[1,568],Pt=[2,258],jt=[2,261],Mt=[2,274],Ut=[1,617],Vt=[1,618],Bt=[2,288],Gt=[2,292],Ht=[2,289],Wt=[2,293],Xt=[2,290],Yt=[2,291],qt=[2,303],zt=[2,304],Jt=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,174],Kt=[2,294],Zt=[2,296],Qt=[2,298],eo=[2,300],ao=[2,295],to=[2,297],oo=[2,299],no=[2,301],ro={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,ExpressionLine:8,Statement:9,FuncDirective:10,YieldReturn:11,AwaitReturn:12,Return:13,STATEMENT:14,Import:15,Export:16,Value:17,Code:18,Operation:19,Assign:20,If:21,Try:22,While:23,For:24,Switch:25,Class:26,Throw:27,Yield:28,CodeLine:29,IfLine:30,OperationLine:31,YIELD:32,FROM:33,Block:34,INDENT:35,OUTDENT:36,Identifier:37,IDENTIFIER:38,CSX_TAG:39,Property:40,PROPERTY:41,AlphaNumeric:42,NUMBER:43,String:44,STRING:45,STRING_START:46,STRING_END:47,Regex:48,REGEX:49,REGEX_START:50,Invocation:51,REGEX_END:52,Literal:53,JS:54,UNDEFINED:55,NULL:56,BOOL:57,INFINITY:58,NAN:59,Assignable:60,"=":61,AssignObj:62,ObjAssignable:63,ObjRestValue:64,":":65,SimpleObjAssignable:66,ThisProperty:67,"[":68,"]":69,"...":70,ObjSpreadExpr:71,ObjSpreadIdentifier:72,Object:73,Parenthetical:74,Super:75,This:76,SUPER:77,Arguments:78,ObjSpreadAccessor:79,".":80,INDEX_START:81,IndexValue:82,INDEX_END:83,RETURN:84,AWAIT:85,PARAM_START:86,ParamList:87,PARAM_END:88,FuncGlyph:89,"->":90,"=>":91,OptComma:92,",":93,Param:94,ParamVar:95,Array:96,Splat:97,SimpleAssignable:98,Accessor:99,Range:100,"?.":101,"::":102,"?::":103,Index:104,INDEX_SOAK:105,Slice:106,"{":107,AssignList:108,"}":109,CLASS:110,EXTENDS:111,IMPORT:112,ImportDefaultSpecifier:113,ImportNamespaceSpecifier:114,ImportSpecifierList:115,ImportSpecifier:116,AS:117,DEFAULT:118,IMPORT_ALL:119,EXPORT:120,ExportSpecifierList:121,EXPORT_ALL:122,ExportSpecifier:123,OptFuncExist:124,FUNC_EXIST:125,CALL_START:126,CALL_END:127,ArgList:128,THIS:129,"@":130,Elisions:131,ArgElisionList:132,OptElisions:133,RangeDots:134,"..":135,Arg:136,ArgElision:137,Elision:138,SimpleArgs:139,TRY:140,Catch:141,FINALLY:142,CATCH:143,THROW:144,"(":145,")":146,WhileLineSource:147,WHILE:148,WHEN:149,UNTIL:150,WhileSource:151,Loop:152,LOOP:153,ForBody:154,ForLineBody:155,FOR:156,BY:157,ForStart:158,ForSource:159,ForLineSource:160,ForVariables:161,OWN:162,ForValue:163,FORIN:164,FOROF:165,FORFROM:166,SWITCH:167,Whens:168,ELSE:169,When:170,LEADING_WHEN:171,IfBlock:172,IF:173,POST_IF:174,IfBlockLine:175,UNARY:176,UNARY_MATH:177,"-":178,"+":179,"--":180,"++":181,"?":182,MATH:183,"**":184,SHIFT:185,COMPARE:186,"&":187,"^":188,"|":189,"&&":190,"||":191,"BIN?":192,RELATION:193,COMPOUND_ASSIGN:194,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",14:"STATEMENT",32:"YIELD",33:"FROM",35:"INDENT",36:"OUTDENT",38:"IDENTIFIER",39:"CSX_TAG",41:"PROPERTY",43:"NUMBER",45:"STRING",46:"STRING_START",47:"STRING_END",49:"REGEX",50:"REGEX_START",52:"REGEX_END",54:"JS",55:"UNDEFINED",56:"NULL",57:"BOOL",58:"INFINITY",59:"NAN",61:"=",65:":",68:"[",69:"]",70:"...",77:"SUPER",80:".",81:"INDEX_START",83:"INDEX_END",84:"RETURN",85:"AWAIT",86:"PARAM_START",88:"PARAM_END",90:"->",91:"=>",93:",",101:"?.",102:"::",103:"?::",105:"INDEX_SOAK",107:"{",109:"}",110:"CLASS",111:"EXTENDS",112:"IMPORT",117:"AS",118:"DEFAULT",119:"IMPORT_ALL",120:"EXPORT",122:"EXPORT_ALL",125:"FUNC_EXIST",126:"CALL_START",127:"CALL_END",129:"THIS",130:"@",135:"..",140:"TRY",142:"FINALLY",143:"CATCH",144:"THROW",145:"(",146:")",148:"WHILE",149:"WHEN",150:"UNTIL",153:"LOOP",156:"FOR",157:"BY",162:"OWN",164:"FORIN",165:"FOROF",166:"FORFROM",167:"SWITCH",169:"ELSE",171:"LEADING_WHEN",173:"IF",174:"POST_IF",176:"UNARY",177:"UNARY_MATH",178:"-",179:"+",180:"--",181:"++",182:"?",183:"MATH",184:"**",185:"SHIFT",186:"COMPARE",187:"&",188:"^",189:"|",190:"&&",191:"||",192:"BIN?",193:"RELATION",194:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[5,1],[10,1],[10,1],[9,1],[9,1],[9,1],[9,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[8,1],[8,1],[8,1],[28,1],[28,2],[28,3],[34,2],[34,3],[37,1],[37,1],[40,1],[42,1],[42,1],[44,1],[44,3],[48,1],[48,3],[53,1],[53,1],[53,1],[53,1],[53,1],[53,1],[53,1],[53,1],[20,3],[20,4],[20,5],[62,1],[62,1],[62,3],[62,5],[62,3],[62,5],[66,1],[66,1],[66,1],[66,3],[63,1],[63,1],[64,2],[64,2],[64,2],[64,2],[71,1],[71,1],[71,1],[71,1],[71,1],[71,2],[71,2],[71,2],[72,2],[72,2],[79,2],[79,3],[13,2],[13,4],[13,1],[11,3],[11,2],[12,3],[12,2],[18,5],[18,2],[29,5],[29,2],[89,1],[89,1],[92,0],[92,1],[87,0],[87,1],[87,3],[87,4],[87,6],[94,1],[94,2],[94,2],[94,3],[94,1],[95,1],[95,1],[95,1],[95,1],[97,2],[97,2],[98,1],[98,2],[98,2],[98,1],[60,1],[60,1],[60,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[75,3],[75,4],[99,2],[99,2],[99,2],[99,2],[99,1],[99,1],[104,3],[104,2],[82,1],[82,1],[73,4],[108,0],[108,1],[108,3],[108,4],[108,6],[26,1],[26,2],[26,3],[26,4],[26,2],[26,3],[26,4],[26,5],[15,2],[15,4],[15,4],[15,5],[15,7],[15,6],[15,9],[115,1],[115,3],[115,4],[115,4],[115,6],[116,1],[116,3],[116,1],[116,3],[113,1],[114,3],[16,3],[16,5],[16,2],[16,4],[16,5],[16,6],[16,3],[16,5],[16,4],[16,7],[121,1],[121,3],[121,4],[121,4],[121,6],[123,1],[123,3],[123,3],[123,1],[123,3],[51,3],[51,3],[51,3],[124,0],[124,1],[78,2],[78,4],[76,1],[76,1],[67,2],[96,2],[96,3],[96,4],[134,1],[134,1],[100,5],[100,5],[106,3],[106,2],[106,3],[106,2],[106,2],[106,1],[128,1],[128,3],[128,4],[128,4],[128,6],[136,1],[136,1],[136,1],[136,1],[132,1],[132,3],[132,4],[132,4],[132,6],[137,1],[137,2],[133,1],[133,2],[131,1],[131,2],[138,1],[139,1],[139,1],[139,3],[139,3],[22,2],[22,3],[22,4],[22,5],[141,3],[141,3],[141,2],[27,2],[27,4],[74,3],[74,5],[147,2],[147,4],[147,2],[147,4],[151,2],[151,4],[151,4],[151,2],[151,4],[151,4],[23,2],[23,2],[23,2],[23,2],[23,1],[152,2],[152,2],[24,2],[24,2],[24,2],[24,2],[154,2],[154,4],[154,2],[155,4],[155,2],[158,2],[158,3],[163,1],[163,1],[163,1],[163,1],[161,1],[161,3],[159,2],[159,2],[159,4],[159,4],[159,4],[159,4],[159,4],[159,4],[159,6],[159,6],[159,6],[159,6],[159,6],[159,6],[159,6],[159,6],[159,2],[159,4],[159,4],[160,2],[160,2],[160,4],[160,4],[160,4],[160,4],[160,4],[160,4],[160,6],[160,6],[160,6],[160,6],[160,6],[160,6],[160,6],[160,6],[160,2],[160,4],[160,4],[25,5],[25,5],[25,7],[25,7],[25,4],[25,6],[168,1],[168,2],[170,3],[170,4],[172,3],[172,5],[21,1],[21,3],[21,3],[21,3],[175,3],[175,5],[30,1],[30,3],[30,3],[30,3],[31,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,5],[19,4]],performAction:function(e,a,t,o,n,r,l){var s=r.length-1;switch(n){case 1:return this.$=o.addDataToNode(o,l[s],l[s])(new o.Block);break;case 2:return this.$=r[s];break;case 3:this.$=o.addDataToNode(o,l[s],l[s])(o.Block.wrap([r[s]]));break;case 4:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-2].push(r[s]));break;case 5:this.$=r[s-1];break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 40:case 45:case 47:case 57:case 62:case 63:case 64:case 66:case 67:case 72:case 73:case 74:case 75:case 76:case 97:case 98:case 109:case 110:case 111:case 112:case 118:case 119:case 122:case 127:case 136:case 221:case 222:case 223:case 225:case 237:case 238:case 280:case 281:case 330:case 336:case 342:this.$=r[s];break;case 13:this.$=o.addDataToNode(o,l[s],l[s])(new o.StatementLiteral(r[s]));break;case 31:this.$=o.addDataToNode(o,l[s],l[s])(new o.Op(r[s],new o.Value(new o.Literal(""))));break;case 32:case 346:case 347:case 348:case 351:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op(r[s-1],r[s]));break;case 33:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op(r[s-2].concat(r[s-1]),r[s]));break;case 34:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Block);break;case 35:case 83:case 137:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-1]);break;case 36:this.$=o.addDataToNode(o,l[s],l[s])(new o.IdentifierLiteral(r[s]));break;case 37:this.$=o.addDataToNode(o,l[s],l[s])(new o.CSXTag(r[s]));break;case 38:this.$=o.addDataToNode(o,l[s],l[s])(new o.PropertyName(r[s]));break;case 39:this.$=o.addDataToNode(o,l[s],l[s])(new o.NumberLiteral(r[s]));break;case 41:this.$=o.addDataToNode(o,l[s],l[s])(new o.StringLiteral(r[s]));break;case 42:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.StringWithInterpolations(r[s-1]));break;case 43:this.$=o.addDataToNode(o,l[s],l[s])(new o.RegexLiteral(r[s]));break;case 44:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.RegexWithInterpolations(r[s-1].args));break;case 46:this.$=o.addDataToNode(o,l[s],l[s])(new o.PassthroughLiteral(r[s]));break;case 48:this.$=o.addDataToNode(o,l[s],l[s])(new o.UndefinedLiteral(r[s]));break;case 49:this.$=o.addDataToNode(o,l[s],l[s])(new o.NullLiteral(r[s]));break;case 50:this.$=o.addDataToNode(o,l[s],l[s])(new o.BooleanLiteral(r[s]));break;case 51:this.$=o.addDataToNode(o,l[s],l[s])(new o.InfinityLiteral(r[s]));break;case 52:this.$=o.addDataToNode(o,l[s],l[s])(new o.NaNLiteral(r[s]));break;case 53:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(r[s-2],r[s]));break;case 54:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Assign(r[s-3],r[s]));break;case 55:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(r[s-4],r[s-1]));break;case 56:case 115:case 120:case 121:case 123:case 124:case 125:case 126:case 128:case 282:case 283:this.$=o.addDataToNode(o,l[s],l[s])(new o.Value(r[s]));break;case 58:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(o.addDataToNode(o,l[s-2])(new o.Value(r[s-2])),r[s],"object",{operatorToken:o.addDataToNode(o,l[s-1])(new o.Literal(r[s-1]))}));break;case 59:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(o.addDataToNode(o,l[s-4])(new o.Value(r[s-4])),r[s-1],"object",{operatorToken:o.addDataToNode(o,l[s-3])(new o.Literal(r[s-3]))}));break;case 60:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(o.addDataToNode(o,l[s-2])(new o.Value(r[s-2])),r[s],null,{operatorToken:o.addDataToNode(o,l[s-1])(new o.Literal(r[s-1]))}));break;case 61:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(o.addDataToNode(o,l[s-4])(new o.Value(r[s-4])),r[s-1],null,{operatorToken:o.addDataToNode(o,l[s-3])(new o.Literal(r[s-3]))}));break;case 65:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Value(new o.ComputedPropertyName(r[s-1])));break;case 68:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(new o.Value(r[s-1])));break;case 69:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(new o.Value(r[s])));break;case 70:case 113:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(r[s-1]));break;case 71:case 114:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(r[s]));break;case 77:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.SuperCall(o.addDataToNode(o,l[s-1])(new o.Super),r[s],!1,r[s-1]));break;case 78:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Call(new o.Value(r[s-1]),r[s]));break;case 79:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Call(r[s-1],r[s]));break;case 80:case 81:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Value(r[s-1]).add(r[s]));break;case 82:case 131:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Access(r[s]));break;case 84:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Return(r[s]));break;case 85:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Return(new o.Value(r[s-1])));break;case 86:this.$=o.addDataToNode(o,l[s],l[s])(new o.Return);break;case 87:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.YieldReturn(r[s]));break;case 88:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.YieldReturn);break;case 89:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.AwaitReturn(r[s]));break;case 90:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.AwaitReturn);break;case 91:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Code(r[s-3],r[s],r[s-1],o.addDataToNode(o,l[s-4])(new o.Literal(r[s-4]))));break;case 92:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Code([],r[s],r[s-1]));break;case 93:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Code(r[s-3],o.addDataToNode(o,l[s])(o.Block.wrap([r[s]])),r[s-1],o.addDataToNode(o,l[s-4])(new o.Literal(r[s-4]))));break;case 94:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Code([],o.addDataToNode(o,l[s])(o.Block.wrap([r[s]])),r[s-1]));break;case 95:case 96:this.$=o.addDataToNode(o,l[s],l[s])(new o.FuncGlyph(r[s]));break;case 99:case 142:case 232:this.$=o.addDataToNode(o,l[s],l[s])([]);break;case 100:case 143:case 162:case 183:case 216:case 230:case 234:case 284:this.$=o.addDataToNode(o,l[s],l[s])([r[s]]);break;case 101:case 144:case 163:case 184:case 217:case 226:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-2].concat(r[s]));break;case 102:case 145:case 164:case 185:case 218:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-3].concat(r[s]));break;case 103:case 146:case 166:case 187:case 220:this.$=o.addDataToNode(o,l[s-5],l[s])(r[s-5].concat(r[s-2]));break;case 104:this.$=o.addDataToNode(o,l[s],l[s])(new o.Param(r[s]));break;case 105:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Param(r[s-1],null,!0));break;case 106:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Param(r[s],null,!0));break;case 107:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Param(r[s-2],r[s]));break;case 108:case 224:this.$=o.addDataToNode(o,l[s],l[s])(new o.Expansion);break;case 116:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s-1].add(r[s]));break;case 117:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Value(r[s-1]).add(r[s]));break;case 129:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Super(o.addDataToNode(o,l[s])(new o.Access(r[s])),[],!1,r[s-2]));break;case 130:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Super(o.addDataToNode(o,l[s-1])(new o.Index(r[s-1])),[],!1,r[s-3]));break;case 132:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Access(r[s],"soak"));break;case 133:this.$=o.addDataToNode(o,l[s-1],l[s])([o.addDataToNode(o,l[s-1])(new o.Access(new o.PropertyName("prototype"))),o.addDataToNode(o,l[s])(new o.Access(r[s]))]);break;case 134:this.$=o.addDataToNode(o,l[s-1],l[s])([o.addDataToNode(o,l[s-1])(new o.Access(new o.PropertyName("prototype"),"soak")),o.addDataToNode(o,l[s])(new o.Access(r[s]))]);break;case 135:this.$=o.addDataToNode(o,l[s],l[s])(new o.Access(new o.PropertyName("prototype")));break;case 138:this.$=o.addDataToNode(o,l[s-1],l[s])(o.extend(r[s],{soak:!0}));break;case 139:this.$=o.addDataToNode(o,l[s],l[s])(new o.Index(r[s]));break;case 140:this.$=o.addDataToNode(o,l[s],l[s])(new o.Slice(r[s]));break;case 141:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Obj(r[s-2],r[s-3].generated));break;case 147:this.$=o.addDataToNode(o,l[s],l[s])(new o.Class);break;case 148:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Class(null,null,r[s]));break;case 149:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Class(null,r[s]));break;case 150:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Class(null,r[s-1],r[s]));break;case 151:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Class(r[s]));break;case 152:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Class(r[s-1],null,r[s]));break;case 153:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Class(r[s-2],r[s]));break;case 154:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Class(r[s-3],r[s-1],r[s]));break;case 155:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.ImportDeclaration(null,r[s]));break;case 156:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ImportDeclaration(new o.ImportClause(r[s-2],null),r[s]));break;case 157:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ImportDeclaration(new o.ImportClause(null,r[s-2]),r[s]));break;case 158:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ImportDeclaration(new o.ImportClause(null,new o.ImportSpecifierList([])),r[s]));break;case 159:this.$=o.addDataToNode(o,l[s-6],l[s])(new o.ImportDeclaration(new o.ImportClause(null,new o.ImportSpecifierList(r[s-4])),r[s]));break;case 160:this.$=o.addDataToNode(o,l[s-5],l[s])(new o.ImportDeclaration(new o.ImportClause(r[s-4],r[s-2]),r[s]));break;case 161:this.$=o.addDataToNode(o,l[s-8],l[s])(new o.ImportDeclaration(new o.ImportClause(r[s-7],new o.ImportSpecifierList(r[s-4])),r[s]));break;case 165:case 186:case 199:case 219:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-2]);break;case 167:this.$=o.addDataToNode(o,l[s],l[s])(new o.ImportSpecifier(r[s]));break;case 168:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ImportSpecifier(r[s-2],r[s]));break;case 169:this.$=o.addDataToNode(o,l[s],l[s])(new o.ImportSpecifier(new o.Literal(r[s])));break;case 170:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ImportSpecifier(new o.Literal(r[s-2]),r[s]));break;case 171:this.$=o.addDataToNode(o,l[s],l[s])(new o.ImportDefaultSpecifier(r[s]));break;case 172:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ImportNamespaceSpecifier(new o.Literal(r[s-2]),r[s]));break;case 173:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportNamedDeclaration(new o.ExportSpecifierList([])));break;case 174:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ExportNamedDeclaration(new o.ExportSpecifierList(r[s-2])));break;case 175:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.ExportNamedDeclaration(r[s]));break;case 176:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ExportNamedDeclaration(new o.Assign(r[s-2],r[s],null,{moduleDeclaration:"export"})));break;case 177:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ExportNamedDeclaration(new o.Assign(r[s-3],r[s],null,{moduleDeclaration:"export"})));break;case 178:this.$=o.addDataToNode(o,l[s-5],l[s])(new o.ExportNamedDeclaration(new o.Assign(r[s-4],r[s-1],null,{moduleDeclaration:"export"})));break;case 179:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportDefaultDeclaration(r[s]));break;case 180:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ExportDefaultDeclaration(new o.Value(r[s-1])));break;case 181:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ExportAllDeclaration(new o.Literal(r[s-2]),r[s]));break;case 182:this.$=o.addDataToNode(o,l[s-6],l[s])(new o.ExportNamedDeclaration(new o.ExportSpecifierList(r[s-4]),r[s]));break;case 188:this.$=o.addDataToNode(o,l[s],l[s])(new o.ExportSpecifier(r[s]));break;case 189:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportSpecifier(r[s-2],r[s]));break;case 190:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportSpecifier(r[s-2],new o.Literal(r[s])));break;case 191:this.$=o.addDataToNode(o,l[s],l[s])(new o.ExportSpecifier(new o.Literal(r[s])));break;case 192:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportSpecifier(new o.Literal(r[s-2]),r[s]));break;case 193:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.TaggedTemplateCall(r[s-2],r[s],r[s-1]));break;case 194:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Call(r[s-2],r[s],r[s-1]));break;case 195:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.SuperCall(o.addDataToNode(o,l[s-2])(new o.Super),r[s],r[s-1],r[s-2]));break;case 196:this.$=o.addDataToNode(o,l[s],l[s])(!1);break;case 197:this.$=o.addDataToNode(o,l[s],l[s])(!0);break;case 198:this.$=o.addDataToNode(o,l[s-1],l[s])([]);break;case 200:case 201:this.$=o.addDataToNode(o,l[s],l[s])(new o.Value(new o.ThisLiteral(r[s])));break;case 202:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Value(o.addDataToNode(o,l[s-1])(new o.ThisLiteral(r[s-1])),[o.addDataToNode(o,l[s])(new o.Access(r[s]))],"this"));break;case 203:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Arr([]));break;case 204:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Arr(r[s-1]));break;case 205:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Arr([].concat(r[s-2],r[s-1])));break;case 206:this.$=o.addDataToNode(o,l[s],l[s])("inclusive");break;case 207:this.$=o.addDataToNode(o,l[s],l[s])("exclusive");break;case 208:case 209:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Range(r[s-3],r[s-1],r[s-2]));break;case 210:case 212:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Range(r[s-2],r[s],r[s-1]));break;case 211:case 213:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Range(r[s-1],null,r[s]));break;case 214:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Range(null,r[s],r[s-1]));break;case 215:this.$=o.addDataToNode(o,l[s],l[s])(new o.Range(null,null,r[s]));break;case 227:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-3].concat(r[s-2],r[s]));break;case 228:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-2].concat(r[s-1]));break;case 229:this.$=o.addDataToNode(o,l[s-5],l[s])(r[s-5].concat(r[s-4],r[s-2],r[s-1]));break;case 231:case 235:case 331:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s-1].concat(r[s]));break;case 233:this.$=o.addDataToNode(o,l[s-1],l[s])([].concat(r[s]));break;case 236:this.$=o.addDataToNode(o,l[s],l[s])(new o.Elision);break;case 239:case 240:this.$=o.addDataToNode(o,l[s-2],l[s])([].concat(r[s-2],r[s]));break;case 241:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Try(r[s]));break;case 242:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Try(r[s-1],r[s][0],r[s][1]));break;case 243:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Try(r[s-2],null,null,r[s]));break;case 244:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Try(r[s-3],r[s-2][0],r[s-2][1],r[s]));break;case 245:this.$=o.addDataToNode(o,l[s-2],l[s])([r[s-1],r[s]]);break;case 246:this.$=o.addDataToNode(o,l[s-2],l[s])([o.addDataToNode(o,l[s-1])(new o.Value(r[s-1])),r[s]]);break;case 247:this.$=o.addDataToNode(o,l[s-1],l[s])([null,r[s]]);break;case 248:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Throw(r[s]));break;case 249:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Throw(new o.Value(r[s-1])));break;case 250:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Parens(r[s-1]));break;case 251:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Parens(r[s-2]));break;case 252:case 256:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(r[s]));break;case 253:case 257:case 258:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.While(r[s-2],{guard:r[s]}));break;case 254:case 259:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(r[s],{invert:!0}));break;case 255:case 260:case 261:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.While(r[s-2],{invert:!0,guard:r[s]}));break;case 262:case 263:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s-1].addBody(r[s]));break;case 264:case 265:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s].addBody(o.addDataToNode(o,l[s-1])(o.Block.wrap([r[s-1]]))));break;case 266:this.$=o.addDataToNode(o,l[s],l[s])(r[s]);break;case 267:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(o.addDataToNode(o,l[s-1])(new o.BooleanLiteral("true"))).addBody(r[s]));break;case 268:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(o.addDataToNode(o,l[s-1])(new o.BooleanLiteral("true"))).addBody(o.addDataToNode(o,l[s])(o.Block.wrap([r[s]]))));break;case 269:case 270:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.For(r[s-1],r[s]));break;case 271:case 272:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.For(r[s],r[s-1]));break;case 273:this.$=o.addDataToNode(o,l[s-1],l[s])({source:o.addDataToNode(o,l[s])(new o.Value(r[s]))});break;case 274:case 276:this.$=o.addDataToNode(o,l[s-3],l[s])({source:o.addDataToNode(o,l[s-2])(new o.Value(r[s-2])),step:r[s]});break;case 275:case 277:this.$=o.addDataToNode(o,l[s-1],l[s])(function(){return r[s].own=r[s-1].own,r[s].ownTag=r[s-1].ownTag,r[s].name=r[s-1][0],r[s].index=r[s-1][1],r[s]}());break;case 278:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s]);break;case 279:this.$=o.addDataToNode(o,l[s-2],l[s])(function(){return r[s].own=!0,r[s].ownTag=o.addDataToNode(o,l[s-1])(new o.Literal(r[s-1])),r[s]}());break;case 285:this.$=o.addDataToNode(o,l[s-2],l[s])([r[s-2],r[s]]);break;case 286:case 305:this.$=o.addDataToNode(o,l[s-1],l[s])({source:r[s]});break;case 287:case 306:this.$=o.addDataToNode(o,l[s-1],l[s])({source:r[s],object:!0});break;case 288:case 289:case 307:case 308:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],guard:r[s]});break;case 290:case 291:case 309:case 310:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],guard:r[s],object:!0});break;case 292:case 293:case 311:case 312:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],step:r[s]});break;case 294:case 295:case 296:case 297:case 313:case 314:case 315:case 316:this.$=o.addDataToNode(o,l[s-5],l[s])({source:r[s-4],guard:r[s-2],step:r[s]});break;case 298:case 299:case 300:case 301:case 317:case 318:case 319:case 320:this.$=o.addDataToNode(o,l[s-5],l[s])({source:r[s-4],step:r[s-2],guard:r[s]});break;case 302:case 321:this.$=o.addDataToNode(o,l[s-1],l[s])({source:r[s],from:!0});break;case 303:case 304:case 322:case 323:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],guard:r[s],from:!0});break;case 324:case 325:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Switch(r[s-3],r[s-1]));break;case 326:case 327:this.$=o.addDataToNode(o,l[s-6],l[s])(new o.Switch(r[s-5],r[s-3],r[s-1]));break;case 328:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Switch(null,r[s-1]));break;case 329:this.$=o.addDataToNode(o,l[s-5],l[s])(new o.Switch(null,r[s-3],r[s-1]));break;case 332:this.$=o.addDataToNode(o,l[s-2],l[s])([[r[s-1],r[s]]]);break;case 333:this.$=o.addDataToNode(o,l[s-3],l[s])([[r[s-2],r[s-1]]]);break;case 334:case 340:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.If(r[s-1],r[s],{type:r[s-2]}));break;case 335:case 341:this.$=o.addDataToNode(o,l[s-4],l[s])(r[s-4].addElse(o.addDataToNode(o,l[s-2],l[s])(new o.If(r[s-1],r[s],{type:r[s-2]}))));break;case 337:case 343:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-2].addElse(r[s]));break;case 338:case 339:case 344:case 345:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.If(r[s],o.addDataToNode(o,l[s-2])(o.Block.wrap([r[s-2]])),{type:r[s-1],statement:!0}));break;case 349:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("-",r[s]));break;case 350:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("+",r[s]));break;case 352:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("--",r[s]));break;case 353:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("++",r[s]));break;case 354:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("--",r[s-1],null,!0));break;case 355:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("++",r[s-1],null,!0));break;case 356:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Existence(r[s-1]));break;case 357:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op("+",r[s-2],r[s]));break;case 358:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op("-",r[s-2],r[s]));break;case 359:case 360:case 361:case 362:case 363:case 364:case 365:case 366:case 367:case 368:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op(r[s-1],r[s-2],r[s]));break;case 369:this.$=o.addDataToNode(o,l[s-2],l[s])(function(){return"!"===r[s-1].charAt(0)?new o.Op(r[s-1].slice(1),r[s-2],r[s]).invert():new o.Op(r[s-1],r[s-2],r[s])}());break;case 370:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(r[s-2],r[s],r[s-1]));break;case 371:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(r[s-4],r[s-1],r[s-3]));break;case 372:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Assign(r[s-3],r[s],r[s-2]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{1:[3]},{1:[2,2],6:W},a(X,[2,3]),a(Y,[2,6],{151:111,154:112,158:116,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,7]),a(Y,[2,8],{158:116,151:118,154:119,148:q,150:z,156:J,174:ue}),a(Y,[2,9]),a(me,[2,16],{124:120,99:121,104:127,45:he,46:he,126:he,80:ge,81:fe,101:ye,102:ke,103:Te,105:Ne,125:ve}),a(me,[2,17],{104:127,99:130,80:ge,81:fe,101:ye,102:ke,103:Te,105:Ne}),a(me,[2,18]),a(me,[2,19]),a(me,[2,20]),a(me,[2,21]),a(me,[2,22]),a(me,[2,23]),a(me,[2,24]),a(me,[2,25]),a(me,[2,26]),a(me,[2,27]),a(Y,[2,28]),a(Y,[2,29]),a(Y,[2,30]),a(be,[2,12]),a(be,[2,13]),a(be,[2,14]),a(be,[2,15]),a(Y,[2,10]),a(Y,[2,11]),a($e,_e,{61:[1,131]}),a($e,[2,123]),a($e,[2,124]),a($e,[2,125]),a($e,Ce),a($e,[2,127]),a($e,[2,128]),a(De,Ee,{87:132,94:133,95:134,37:136,67:137,96:138,73:139,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),{5:143,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,34:142,35:Ae,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:145,8:146,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:150,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:156,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:157,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:158,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:[1,159],85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{17:161,18:162,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:163,67:79,68:y,73:62,74:31,75:35,76:34,77:k,86:Le,89:152,90:b,91:$,96:61,98:160,100:32,107:_,129:x,130:I,145:R},{17:161,18:162,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:163,67:79,68:y,73:62,74:31,75:35,76:34,77:k,86:Le,89:152,90:b,91:$,96:61,98:164,100:32,107:_,129:x,130:I,145:R},a(Pe,je,{180:[1,165],181:[1,166],194:[1,167]}),a(me,[2,336],{169:[1,168]}),{34:169,35:Ae},{34:170,35:Ae},{34:171,35:Ae},a(me,[2,266]),{34:172,35:Ae},{34:173,35:Ae},{7:174,8:175,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:[1,176],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Me,[2,147],{53:30,74:31,100:32,51:33,76:34,75:35,96:61,73:62,42:63,48:65,37:78,67:79,44:88,89:152,17:161,18:162,60:163,34:177,98:179,35:Ae,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,86:Le,90:b,91:$,107:_,111:[1,178],129:x,130:I,145:R}),{7:180,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,181],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([1,6,35,36,47,69,70,93,127,135,146,148,149,150,156,157,174,182,183,184,185,186,187,188,189,190,191,192,193],Ue,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:182,14:t,32:Re,33:Ve,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:[1,184],85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),a(Y,[2,342],{169:[1,185]}),a([1,6,36,47,69,70,93,127,135,146,148,149,150,156,157,174],Be,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:186,14:t,32:Re,35:Ge,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),{37:192,38:n,39:r,44:188,45:s,46:i,107:[1,191],113:189,114:190,119:He},{26:195,37:196,38:n,39:r,107:[1,194],110:C,118:[1,197],122:[1,198]},a(Pe,[2,120]),a(Pe,[2,121]),a($e,[2,45]),a($e,[2,46]),a($e,[2,47]),a($e,[2,48]),a($e,[2,49]),a($e,[2,50]),a($e,[2,51]),a($e,[2,52]),{4:199,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,35:[1,200],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:201,8:202,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,69:Xe,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:204,132:205,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{80:ze,81:Je,124:213,125:ve,126:he},a($e,[2,200]),a($e,[2,201],{40:216,41:Ke}),a(Ze,[2,95]),a(Ze,[2,96]),a(Qe,[2,115]),a(Qe,[2,118]),{7:218,8:219,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:220,8:221,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:222,8:223,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:225,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,34:224,35:Ae,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{37:230,38:n,39:r,67:231,68:y,73:233,96:232,100:226,107:_,130:Se,161:227,162:ea,163:229},{159:234,160:235,164:[1,236],165:[1,237],166:[1,238]},a([6,35,93,109],aa,{44:88,108:239,62:240,63:241,64:242,66:243,42:244,71:246,37:247,40:248,67:249,72:251,73:252,74:253,75:254,76:255,38:n,39:r,41:Ke,43:l,45:s,46:i,68:ta,70:oa,77:na,107:_,129:x,130:I,145:R}),a(ra,[2,39]),a(ra,[2,40]),a($e,[2,43]),{17:161,18:162,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:257,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:163,67:79,68:y,73:62,74:31,75:35,76:34,77:k,86:Le,89:152,90:b,91:$,96:61,98:258,100:32,107:_,129:x,130:I,145:R},a(la,[2,36]),a(la,[2,37]),a(sa,[2,41]),{4:259,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(X,[2,5],{7:4,8:5,9:6,10:7,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,11:27,12:28,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,5:260,14:t,32:o,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:N,86:v,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),a(me,[2,356]),{7:261,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:262,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:263,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:264,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:265,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:266,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:267,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:268,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:269,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:270,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:271,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:272,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:273,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:274,8:275,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(me,[2,265]),a(me,[2,270]),{7:220,8:276,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:222,8:277,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{37:230,38:n,39:r,67:231,68:y,73:233,96:232,100:278,107:_,130:Se,161:227,162:ea,163:229},{159:234,164:[1,279],165:[1,280],166:[1,281]},{7:282,8:283,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(me,[2,264]),a(me,[2,269]),{44:284,45:s,46:i,78:285,126:ia},a(Qe,[2,116]),a(da,[2,197]),{40:287,41:Ke},{40:288,41:Ke},a(Qe,[2,135],{40:289,41:Ke}),{40:290,41:Ke},a(Qe,[2,136]),{7:292,8:294,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:ca,73:62,74:31,75:35,76:34,77:k,82:291,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,106:293,107:_,110:C,112:D,120:E,129:x,130:I,134:295,135:pa,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{81:fe,104:298,105:Ne},a(Qe,[2,117]),{6:[1,300],7:299,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,301],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ua,ma,{92:304,88:[1,302],93:ha}),a(ga,[2,100]),a(ga,[2,104],{61:[1,306],70:[1,305]}),a(ga,[2,108],{37:136,67:137,96:138,73:139,95:307,38:n,39:r,68:xe,107:_,130:Se}),a(fa,[2,109]),a(fa,[2,110]),a(fa,[2,111]),a(fa,[2,112]),{40:216,41:Ke},{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,69:Xe,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:204,132:205,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(ya,[2,92]),a(Y,[2,94]),{4:311,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,36:[1,310],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(ka,Ta,{151:111,154:112,158:116,182:ee}),a(Y,[2,346]),{7:158,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{148:q,150:z,151:118,154:119,156:J,158:116,174:ue},a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,182,183,184,185,186,187,188,189,190,191,192,193],Ue,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:182,14:t,32:Re,33:Ve,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),a(Na,[2,348],{151:111,154:112,158:116,182:ee,184:te}),a(De,Ee,{94:133,95:134,37:136,67:137,96:138,73:139,87:313,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),{34:142,35:Ae},{7:314,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{148:q,150:z,151:118,154:119,156:J,158:116,174:[1,315]},{7:316,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Na,[2,349],{151:111,154:112,158:116,182:ee,184:te}),a(Na,[2,350],{151:111,154:112,158:116,182:ee,184:te}),a(ka,[2,351],{151:111,154:112,158:116,182:ee}),a(Y,[2,90],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:317,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:Be,150:Be,156:Be,174:Be,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),a(me,[2,352],{45:je,46:je,80:je,81:je,101:je,102:je,103:je,105:je,125:je,126:je}),a(da,he,{124:120,99:121,104:127,80:ge,81:fe,101:ye,102:ke,103:Te,105:Ne,125:ve}),{80:ge,81:fe,99:130,101:ye,102:ke,103:Te,104:127,105:Ne},a(va,_e),a(me,[2,353],{45:je,46:je,80:je,81:je,101:je,102:je,103:je,105:je,125:je,126:je}),a(me,[2,354]),a(me,[2,355]),{6:[1,320],7:318,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,319],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{34:321,35:Ae,173:[1,322]},a(me,[2,241],{141:323,142:[1,324],143:[1,325]}),a(me,[2,262]),a(me,[2,263]),a(me,[2,271]),a(me,[2,272]),{35:[1,326],148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[1,327]},{168:328,170:329,171:ba},a(me,[2,148]),{7:331,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Me,[2,151],{34:332,35:Ae,45:je,46:je,80:je,81:je,101:je,102:je,103:je,105:je,125:je,126:je,111:[1,333]}),a($a,[2,248],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{73:334,107:_},a($a,[2,32],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:335,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([1,6,36,47,69,70,93,127,135,146,149,157],[2,88],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:336,14:t,32:Re,35:Ge,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:Be,150:Be,156:Be,174:Be,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),{34:337,35:Ae,173:[1,338]},a(be,_a,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{73:339,107:_},a(be,[2,155]),{33:[1,340],93:[1,341]},{33:[1,342]},{35:Ca,37:347,38:n,39:r,109:[1,343],115:344,116:345,118:Da},a([33,93],[2,171]),{117:[1,349]},{35:Ea,37:354,38:n,39:r,109:[1,350],118:xa,121:351,123:352},a(be,[2,175]),{61:[1,356]},{7:357,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,358],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{33:[1,359]},{6:W,146:[1,360]},{4:361,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ia,Sa,{151:111,154:112,158:116,134:362,70:[1,363],135:pa,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Ia,Aa,{134:364,70:ca,135:pa}),a(Ra,[2,203]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,69:[1,365],70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,136:367,138:366,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a([6,35,69],ma,{133:368,92:370,93:Oa}),a(La,[2,234]),a(Fa,[2,225]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:372,132:371,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(La,[2,236]),a(Fa,[2,230]),a(wa,[2,223]),a(wa,[2,224],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:373,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),{78:374,126:ia},{40:375,41:Ke},{7:376,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Pa,[2,202]),a(Pa,[2,38]),{34:377,35:Ae,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{34:378,35:Ae},a(ja,[2,256],{151:111,154:112,158:116,148:q,149:[1,379],150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:[2,252],149:[1,380]},a(ja,[2,259],{151:111,154:112,158:116,148:q,149:[1,381],150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:[2,254],149:[1,382]},a(me,[2,267]),a(Ma,[2,268],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:Ua,157:[1,383]},a(Va,[2,278]),{37:230,38:n,39:r,67:231,68:xe,73:233,96:232,107:_,130:Se,161:384,163:229},a(Va,[2,284],{93:[1,385]}),a(Ba,[2,280]),a(Ba,[2,281]),a(Ba,[2,282]),a(Ba,[2,283]),a(me,[2,275]),{35:[2,277]},{7:386,8:387,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:388,8:389,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:390,8:391,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ga,ma,{92:392,93:Ha}),a(Wa,[2,143]),a(Wa,[2,56],{65:[1,394]}),a(Wa,[2,57]),a(Xa,[2,66],{78:397,79:398,61:[1,395],70:[1,396],80:Ya,81:qa,126:ia}),a(Xa,[2,67]),{37:247,38:n,39:r,40:248,41:Ke,66:401,67:249,68:ta,71:402,72:251,73:252,74:253,75:254,76:255,77:na,107:_,129:x,130:I,145:R},{70:[1,403],78:404,79:405,80:Ya,81:qa,126:ia},a(za,[2,62]),a(za,[2,63]),a(za,[2,64]),{7:406,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Ja,[2,72]),a(Ja,[2,73]),a(Ja,[2,74]),a(Ja,[2,75]),a(Ja,[2,76]),{78:407,80:ze,81:Je,126:ia},a(va,Ce,{52:[1,408]}),a(va,je),{6:W,47:[1,409]},a(X,[2,4]),a(Ka,[2,357],{151:111,154:112,158:116,182:ee,183:ae,184:te}),a(Ka,[2,358],{151:111,154:112,158:116,182:ee,183:ae,184:te}),a(Na,[2,359],{151:111,154:112,158:116,182:ee,184:te}),a(Na,[2,360],{151:111,154:112,158:116,182:ee,184:te}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,185,186,187,188,189,190,191,192,193],[2,361],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,186,187,188,189,190,191,192],[2,362],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,187,188,189,190,191,192],[2,363],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,188,189,190,191,192],[2,364],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,189,190,191,192],[2,365],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,190,191,192],[2,366],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,191,192],[2,367],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,192],[2,368],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,186,187,188,189,190,191,192,193],[2,369],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe}),a(Ma,Za,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,345]),{149:[1,410]},{149:[1,411]},a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Ua,{157:[1,412]}),{7:413,8:414,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:415,8:416,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:417,8:418,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ma,Qa,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,344]),a(et,[2,193]),a(et,[2,194]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:at,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,127:[1,419],128:420,129:x,130:I,136:421,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Qe,[2,131]),a(Qe,[2,132]),a(Qe,[2,133]),a(Qe,[2,134]),{83:[1,423]},{70:ca,83:[2,139],134:424,135:pa,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{83:[2,140]},{70:ca,134:425,135:pa},{7:426,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,83:[2,215],84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(tt,[2,206]),a(tt,ot),a(Qe,[2,138]),a($a,[2,53],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:427,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:428,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{89:429,90:b,91:$},a(nt,rt,{95:134,37:136,67:137,96:138,73:139,94:430,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),{6:lt,35:st},a(ga,[2,105]),{7:433,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ga,[2,106]),a(wa,Sa,{151:111,154:112,158:116,70:[1,434],148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(wa,Aa),a(it,[2,34]),{6:W,36:[1,435]},{7:436,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ua,ma,{92:304,88:[1,437],93:ha}),a(ka,Ta,{151:111,154:112,158:116,182:ee}),{7:438,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{34:377,35:Ae,148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Y,[2,89],{151:111,154:112,158:116,148:_a,150:_a,156:_a,174:_a,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,[2,370],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:439,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:440,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(me,[2,337]),{7:441,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(me,[2,242],{142:[1,442]}),{34:443,35:Ae},{34:446,35:Ae,37:444,38:n,39:r,73:445,107:_},{168:447,170:329,171:ba},{168:448,170:329,171:ba},{36:[1,449],169:[1,450],170:451,171:ba},a(ct,[2,330]),{7:453,8:454,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,139:452,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(pt,[2,149],{151:111,154:112,158:116,34:455,35:Ae,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(me,[2,152]),{7:456,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{36:[1,457]},a($a,[2,33],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,87],{151:111,154:112,158:116,148:_a,150:_a,156:_a,174:_a,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,343]),{7:459,8:458,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{36:[1,460]},{44:461,45:s,46:i},{107:[1,463],114:462,119:He},{44:464,45:s,46:i},{33:[1,465]},a(Ga,ma,{92:466,93:ut}),a(Wa,[2,162]),{35:Ca,37:347,38:n,39:r,115:468,116:345,118:Da},a(Wa,[2,167],{117:[1,469]}),a(Wa,[2,169],{117:[1,470]}),{37:471,38:n,39:r},a(be,[2,173]),a(Ga,ma,{92:472,93:mt}),a(Wa,[2,183]),{35:Ea,37:354,38:n,39:r,118:xa,121:474,123:352},a(Wa,[2,188],{117:[1,475]}),a(Wa,[2,191],{117:[1,476]}),{6:[1,478],7:477,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,479],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ht,[2,179],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{73:480,107:_},{44:481,45:s,46:i},a($e,[2,250]),{6:W,36:[1,482]},{7:483,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([14,32,38,39,43,45,46,49,50,54,55,56,57,58,59,68,77,84,85,86,90,91,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],ot,{6:gt,35:gt,69:gt,93:gt}),{7:484,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Ra,[2,204]),a(La,[2,235]),a(Fa,[2,231]),{6:ft,35:yt,69:[1,485]},a(kt,rt,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,9:148,138:206,136:210,97:211,7:308,8:309,137:488,131:489,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,70:Ye,77:k,84:T,85:Oe,86:v,90:b,91:$,93:qe,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),a(kt,[2,232]),a(nt,ma,{92:370,133:490,93:Oa}),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,136:367,138:366,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(wa,[2,114],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(et,[2,195]),a($e,[2,129]),{83:[1,491],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Tt,[2,334]),a(Nt,[2,340]),{7:492,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:493,8:494,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:495,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:496,8:497,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:498,8:499,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Va,[2,279]),{37:230,38:n,39:r,67:231,68:xe,73:233,96:232,107:_,130:Se,163:500},{35:vt,148:q,149:[1,501],150:z,151:111,154:112,156:J,157:[1,502],158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,305],149:[1,503],157:[1,504]},{35:bt,148:q,149:[1,505],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,306],149:[1,506]},{35:$t,148:q,149:[1,507],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,321],149:[1,508]},{6:_t,35:Ct,109:[1,509]},a(Dt,rt,{44:88,63:241,64:242,66:243,42:244,71:246,37:247,40:248,67:249,72:251,73:252,74:253,75:254,76:255,62:512,38:n,39:r,41:Ke,43:l,45:s,46:i,68:ta,70:oa,77:na,107:_,129:x,130:I,145:R}),{7:513,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,514],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:515,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,516],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Wa,[2,68]),a(Ja,[2,78]),a(Ja,[2,80]),{40:517,41:Ke},{7:292,8:294,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:ca,73:62,74:31,75:35,76:34,77:k,82:518,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,106:293,107:_,110:C,112:D,120:E,129:x,130:I,134:295,135:pa,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Wa,[2,69],{78:397,79:398,80:Ya,81:qa,126:ia}),a(Wa,[2,71],{78:404,79:405,80:Ya,81:qa,126:ia}),a(Wa,[2,70]),a(Ja,[2,79]),a(Ja,[2,81]),{69:[1,519],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Ja,[2,77]),a($e,[2,44]),a(sa,[2,42]),{7:520,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:521,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:522,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,150,156,174],vt,{151:111,154:112,158:116,149:[1,523],157:[1,524],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,525],157:[1,526]},a(Et,bt,{151:111,154:112,158:116,149:[1,527],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,528]},a(Et,$t,{151:111,154:112,158:116,149:[1,529],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,530]},a(et,[2,198]),a([6,35,127],ma,{92:531,93:xt}),a(It,[2,216]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:at,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,128:533,129:x,130:I,136:421,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Qe,[2,137]),{7:534,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,83:[2,211],84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:535,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,83:[2,213],84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{83:[2,214],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a($a,[2,54],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{36:[1,536],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{5:538,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,34:537,35:Ae,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(ga,[2,101]),{37:136,38:n,39:r,67:137,68:xe,70:Ie,73:139,94:539,95:134,96:138,107:_,130:Se},a(St,Ee,{94:133,95:134,37:136,67:137,96:138,73:139,87:540,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),a(ga,[2,107],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(wa,gt),a(it,[2,35]),a(Ma,Za,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{89:541,90:b,91:$},a(Ma,Qa,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{36:[1,542],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a($a,[2,372],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{34:543,35:Ae,148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{34:544,35:Ae},a(me,[2,243]),{34:545,35:Ae},{34:546,35:Ae},a(At,[2,247]),{36:[1,547],169:[1,548],170:451,171:ba},{36:[1,549],169:[1,550],170:451,171:ba},a(me,[2,328]),{34:551,35:Ae},a(ct,[2,331]),{34:552,35:Ae,93:[1,553]},a(Rt,[2,237],{151:111,154:112,158:116,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Rt,[2,238]),a(me,[2,150]),a(pt,[2,153],{151:111,154:112,158:116,34:554,35:Ae,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(me,[2,249]),{34:555,35:Ae},{148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(be,[2,85]),a(be,[2,156]),{33:[1,556]},{35:Ca,37:347,38:n,39:r,115:557,116:345,118:Da},a(be,[2,157]),{44:558,45:s,46:i},{6:Ot,35:Lt,109:[1,559]},a(Dt,rt,{37:347,116:562,38:n,39:r,118:Da}),a(nt,ma,{92:563,93:ut}),{37:564,38:n,39:r},{37:565,38:n,39:r},{33:[2,172]},{6:Ft,35:wt,109:[1,566]},a(Dt,rt,{37:354,123:569,38:n,39:r,118:xa}),a(nt,ma,{92:570,93:mt}),{37:571,38:n,39:r,118:[1,572]},{37:573,38:n,39:r},a(ht,[2,176],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:574,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:575,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{36:[1,576]},a(be,[2,181]),{146:[1,577]},{69:[1,578],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{69:[1,579],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Ra,[2,205]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:372,136:210,137:580,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:372,132:581,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Fa,[2,226]),a(kt,[2,233],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,9:148,97:211,7:308,8:309,138:366,136:367,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,70:Ye,77:k,84:T,85:Oe,86:v,90:b,91:$,93:qe,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),{6:ft,35:yt,36:[1,582]},a($e,[2,130]),a(Ma,[2,257],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:Pt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,253]},a(Ma,[2,260],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:jt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,255]},{35:Mt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,276]},a(Va,[2,285]),{7:583,8:584,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:585,8:586,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:587,8:588,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:589,8:590,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:591,8:592,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:593,8:594,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:595,8:596,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:597,8:598,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ra,[2,141]),{37:247,38:n,39:r,40:248,41:Ke,42:244,43:l,44:88,45:s,46:i,62:599,63:241,64:242,66:243,67:249,68:ta,70:oa,71:246,72:251,73:252,74:253,75:254,76:255,77:na,107:_,129:x,130:I,145:R},a(St,aa,{44:88,62:240,63:241,64:242,66:243,42:244,71:246,37:247,40:248,67:249,72:251,73:252,74:253,75:254,76:255,108:600,38:n,39:r,41:Ke,43:l,45:s,46:i,68:ta,70:oa,77:na,107:_,129:x,130:I,145:R}),a(Wa,[2,144]),a(Wa,[2,58],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:601,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Wa,[2,60],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:602,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Ja,[2,82]),{83:[1,603]},a(za,[2,65]),a(Ma,Pt,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Ma,jt,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Ma,Mt,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:604,8:605,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:606,8:607,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:608,8:609,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:610,8:611,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:612,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:613,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:614,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:615,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{6:Ut,35:Vt,127:[1,616]},a([6,35,36,127],rt,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,9:148,97:211,7:308,8:309,136:619,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,70:Ye,77:k,84:T,85:Oe,86:v,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),a(nt,ma,{92:620,93:xt}),{83:[2,210],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{83:[2,212],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(me,[2,55]),a(ya,[2,91]),a(Y,[2,93]),a(ga,[2,102]),a(nt,ma,{92:621,93:ha}),{34:537,35:Ae},a(me,[2,371]),a(Tt,[2,335]),a(me,[2,244]),a(At,[2,245]),a(At,[2,246]),a(me,[2,324]),{34:622,35:Ae},a(me,[2,325]),{34:623,35:Ae},{36:[1,624]},a(ct,[2,332],{6:[1,625]}),{7:626,8:627,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(me,[2,154]),a(Nt,[2,341]),{44:628,45:s,46:i},a(Ga,ma,{92:629,93:ut}),a(be,[2,158]),{33:[1,630]},{37:347,38:n,39:r,116:631,118:Da},{35:Ca,37:347,38:n,39:r,115:632,116:345,118:Da},a(Wa,[2,163]),{6:Ot,35:Lt,36:[1,633]},a(Wa,[2,168]),a(Wa,[2,170]),a(be,[2,174],{33:[1,634]}),{37:354,38:n,39:r,118:xa,123:635},{35:Ea,37:354,38:n,39:r,118:xa,121:636,123:352},a(Wa,[2,184]),{6:Ft,35:wt,36:[1,637]},a(Wa,[2,189]),a(Wa,[2,190]),a(Wa,[2,192]),a(ht,[2,177],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{36:[1,638],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(be,[2,180]),a($e,[2,251]),a($e,[2,208]),a($e,[2,209]),a(Fa,[2,227]),a(nt,ma,{92:370,133:639,93:Oa}),a(Fa,[2,228]),{35:Bt,148:q,150:z,151:111,154:112,156:J,157:[1,640],158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,307],157:[1,641]},{35:Gt,148:q,149:[1,642],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,311],149:[1,643]},{35:Ht,148:q,150:z,151:111,154:112,156:J,157:[1,644],158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,308],157:[1,645]},{35:Wt,148:q,149:[1,646],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,312],149:[1,647]},{35:Xt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,309]},{35:Yt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,310]},{35:qt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,322]},{35:zt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,323]},a(Wa,[2,145]),a(nt,ma,{92:648,93:Ha}),{36:[1,649],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{36:[1,650],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Ja,[2,83]),a(Jt,Bt,{151:111,154:112,158:116,157:[1,651],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{157:[1,652]},a(Et,Gt,{151:111,154:112,158:116,149:[1,653],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,654]},a(Jt,Ht,{151:111,154:112,158:116,157:[1,655],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{157:[1,656]},a(Et,Wt,{151:111,154:112,158:116,149:[1,657],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,658]},a($a,Xt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,Yt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,qt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,zt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(et,[2,199]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,136:659,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:at,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,128:660,129:x,130:I,136:421,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(It,[2,217]),{6:Ut,35:Vt,36:[1,661]},{6:lt,35:st,36:[1,662]},{36:[1,663]},{36:[1,664]},a(me,[2,329]),a(ct,[2,333]),a(Rt,[2,239],{151:111,154:112,158:116,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Rt,[2,240]),a(be,[2,160]),{6:Ot,35:Lt,109:[1,665]},{44:666,45:s,46:i},a(Wa,[2,164]),a(nt,ma,{92:667,93:ut}),a(Wa,[2,165]),{44:668,45:s,46:i},a(Wa,[2,185]),a(nt,ma,{92:669,93:mt}),a(Wa,[2,186]),a(be,[2,178]),{6:ft,35:yt,36:[1,670]},{7:671,8:672,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:673,8:674,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:675,8:676,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:677,8:678,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:679,8:680,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:681,8:682,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:683,8:684,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:685,8:686,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{6:_t,35:Ct,36:[1,687]},a(Wa,[2,59]),a(Wa,[2,61]),{7:688,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:689,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:690,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:691,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:692,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:693,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:694,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:695,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(It,[2,218]),a(nt,ma,{92:696,93:xt}),a(It,[2,219]),a(ga,[2,103]),a(me,[2,326]),a(me,[2,327]),{33:[1,697]},a(be,[2,159]),{6:Ot,35:Lt,36:[1,698]},a(be,[2,182]),{6:Ft,35:wt,36:[1,699]},a(Fa,[2,229]),{35:Kt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,313]},{35:Zt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,315]},{35:Qt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,317]},{35:eo,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,319]},{35:ao,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,314]},{35:to,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,316]},{35:oo,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,318]},{35:no,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,320]},a(Wa,[2,146]),a($a,Kt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,Zt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,Qt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,eo,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,ao,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,to,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,oo,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,no,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{6:Ut,35:Vt,36:[1,700]},{44:701,45:s,46:i},a(Wa,[2,166]),a(Wa,[2,187]),a(It,[2,220]),a(be,[2,161])],defaultActions:{235:[2,277],293:[2,140],471:[2,172],494:[2,253],497:[2,255],499:[2,276],592:[2,309],594:[2,310],596:[2,322],598:[2,323],672:[2,313],674:[2,315],676:[2,317],678:[2,319],680:[2,314],682:[2,316],684:[2,318],686:[2,320]},parseError:function(e,a){if(a.recoverable)this.trace(e);else{var t=new Error(e);throw t.hash=a,t}},parse:function(e){var a=this,t=[0],o=[null],n=[],l=this.table,s="",i=0,d=0,c=0,u=1,m=n.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,"undefined"==typeof h.yylloc&&(h.yylloc={});var y=h.yylloc;n.push(y);var k=h.options&&h.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;_token_stack:var T=function(){var e;return e=h.lex()||u,"number"!=typeof e&&(e=a.symbols_[e]||e),e};for(var N={},v,b,$,_,C,D,p,E,x;;){if($=t[t.length-1],this.defaultActions[$]?_=this.defaultActions[$]:((null===v||"undefined"==typeof v)&&(v=T()),_=l[$]&&l[$][v]),"undefined"==typeof _||!_.length||!_[0]){var I="";for(D in x=[],l[$])this.terminals_[D]&&D>2&&x.push("'"+this.terminals_[D]+"'");I=h.showPosition?"Parse error on line "+(i+1)+":\n"+h.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(i+1)+": Unexpected "+(v==u?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(I,{text:h.match,token:this.terminals_[v]||v,line:h.yylineno,loc:y,expected:x})}if(_[0]instanceof Array&&1<_.length)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+v);switch(_[0]){case 1:t.push(v),o.push(h.yytext),n.push(h.yylloc),t.push(_[1]),v=null,b?(v=b,b=null):(d=h.yyleng,s=h.yytext,i=h.yylineno,y=h.yylloc,0a.call(this.compiledComments,l)))&&(this.compiledComments.push(l),s=l.here?new S(l).compileNode(e):new J(l).compileNode(e),s.isHereComment&&!s.newLine||t.includeCommentFragments()?p(s):(0===o.length&&o.push(this.makeCode("")),s.unshift?(null==(n=o[0]).precedingComments&&(n.precedingComments=[]),o[0].precedingComments.push(s)):(null==(r=o[o.length-1]).followingComments&&(r.followingComments=[]),o[o.length-1].followingComments.push(s))));return o}},{key:"cache",value:function cache(e,a,t){var o,n,r;return o=null==t?this.shouldCache():t(this),o?(n=new R(e.scope.freeVariable("ref")),r=new d(n,this),a?[r.compileToFragments(e,a),[this.makeCode(n.value)]]:[r,n]):(n=a?this.compileToFragments(e,a):this,[n,n])}},{key:"hoist",value:function hoist(){var e,a,t;return this.hoisted=!0,t=new A(this),e=this.compileNode,a=this.compileToFragments,this.compileNode=function(a){return t.update(e,a)},this.compileToFragments=function(e){return t.update(a,e)},t}},{key:"cacheToCodeFragments",value:function cacheToCodeFragments(e){return[We(e[0]),We(e[1])]}},{key:"makeReturn",value:function makeReturn(e){var a;return a=this.unwrapAll(),e?new u(new K(e+".push"),[a]):new ge(a)}},{key:"contains",value:function contains(e){var a;return a=void 0,this.traverseChildren(!1,function(t){if(e(t))return a=t,!1}),a}},{key:"lastNode",value:function lastNode(e){return 0===e.length?null:e[e.length-1]}},{key:"toString",value:function toString(){var e=0=X?this.wrapInParentheses(a):a)}},{key:"compileRoot",value:function compileRoot(e){var a,t,o,n,r,l;for(e.indent=e.bare?"":De,e.level=z,this.spaced=!0,e.scope=new ye(null,this,null,null==(r=e.referencedVars)?[]:r),l=e.locals||[],t=0,o=l.length;t=Y?this.wrapInParentheses(a):a}}]),a}(re),e.StringLiteral=ve=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(){var e;return e=this.csx?[this.makeCode(this.unquote(!0,!0))]:_get(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"compileNode",this).call(this)}},{key:"unquote",value:function unquote(){var e=!!(0=H?"(void 0)":"void 0")]}}]),a}(K),e.NullLiteral=ne=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,"null"))}return _inherits(a,e),a}(K),e.BooleanLiteral=i=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return _inherits(a,e),a}(K),e.Return=ge=function(){var e=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.expression=e,a}return _inherits(t,e),_createClass(t,[{key:"compileToFragments",value:function compileToFragments(e,a){var o,n;return o=null==(n=this.expression)?void 0:n.makeReturn(),o&&!(o instanceof t)?o.compileToFragments(e,a):_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"compileToFragments",this).call(this,e,a)}},{key:"compileNode",value:function compileNode(e){var t,o,n,r;if(t=[],this.expression){for(t=this.expression.compileToFragments(e,q),la(t,this.makeCode(this.tab+"return ")),n=0,r=t.length;nthis.properties.length&&!this.base.shouldCache()&&(null==s||!s.shouldCache()))?[this,this]:(r=new a(this.base,this.properties.slice(0,-1)),r.shouldCache()&&(l=new R(e.scope.freeVariable("base")),r=new a(new de(new d(l,r)))),!s)?[r,l]:(s.shouldCache()&&(i=new R(e.scope.freeVariable("name")),s=new V(new d(i,s.index)),i=new V(i)),[r.add(s),new a(l||r.base,[i||s])])}},{key:"compileNode",value:function compileNode(e){var a,t,o,n,r;for(this.base.front=this.front,r=this.properties,a=r.length&&null!=this.base.cached?this.base.cached:this.base.compileToFragments(e,r.length?H:null),r.length&&fe.test(We(a))&&a.push(this.makeCode(".")),t=0,o=r.length;tn.length&&(n=r);this.content=this.content.replace(RegExp("^("+r+")","gm"),"")}return this.content="/*"+this.content+(t?" ":"")+"*/",e=this.makeCode(this.content),e.newLine=this.newLine,e.unshift=this.unshift,e.multiline=i,e.isComment=e.isHereComment=!0,e}}]),t}(l),e.LineComment=J=function(e){function a(e){var t=e.content,o=e.newLine,n=e.unshift;_classCallCheck(this,a);var r=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return r.content=t,r.newLine=o,r.unshift=n,r}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(){var e;return e=this.makeCode(/^\s*$/.test(this.content)?"":"//"+this.content),e.newLine=this.newLine,e.unshift=this.unshift,e.trail=!this.newLine&&!this.unshift,e.isComment=e.isLineComment=!0,e}}]),a}(l),e.Call=u=function(){var e=function(e){function a(e){var t=1")),(g=i).push.apply(g,_toConsumableArray(l.compileNode(e,X))),(f=i).push.apply(f,[this.makeCode("")]))}else i.push(this.makeCode(" />"));return i}}]),a}(l);return e.prototype.children=["variable","args"],e}.call(this),e.SuperCall=_e=function(){var e=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return _inherits(a,e),_createClass(a,[{key:"isStatement",value:function isStatement(e){var a;return(null==(a=this.expressions)?void 0:a.length)&&e.level===z}},{key:"compileNode",value:function compileNode(e){var t,o,n,r;if(null==(o=this.expressions)||!o.length)return _get(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"compileNode",this).call(this,e);if(r=new K(We(_get(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"compileNode",this).call(this,e))),n=new c(this.expressions.slice()),e.level>z){var l=r.cache(e,null,we),s=_slicedToArray(l,2);r=s[0],t=s[1],n.push(t)}return n.unshift(r),n.compileToFragments(e,e.level===z?e.level:X)}}]),a}(u);return e.prototype.children=u.prototype.children.concat(["expressions"]),e}.call(this),e.Super=$e=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.accessor=e,t}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(e){var a,t,o,n,r,l,s,i;if(t=e.scope.namedMethod(),(null==t?void 0:t.isMethod)||this.error("cannot use super outside of an instance method"),null==t.ctor&&null==this.accessor){var c=t;o=c.name,i=c.variable,(o.shouldCache()||o instanceof V&&o.index.isAssignable())&&(n=new R(e.scope.parent.freeVariable("name")),o.index=new d(n,o.index)),this.accessor=null==n?o:new V(n)}return(null==(r=this.accessor)||null==(l=r.name)?void 0:l.comments)&&(s=this.accessor.name.comments,delete this.accessor.name.comments),a=new Le(new K("super"),this.accessor?[this.accessor]:[]).compileToFragments(e),s&&Me(s,this.accessor.name),a}}]),a}(l);return e.prototype.children=["accessor"],e}.call(this),e.RegexWithInterpolations=he=function(e){function a(){var e=0"+this.equals;var f=[this.fromNum,this.toNum];return o=f[0],m=f[1],p=this.stepNum?this.stepNum+" !== 0":this.stepVar+" !== 0",t=s?null==this.step?o<=m?d+" "+m:n+" "+m:(i=o+" <= "+r+" && "+d+" "+m,h=o+" >= "+r+" && "+n+" "+m,o<=m?p+" && "+i:p+" && "+h):(i=this.fromVar+" <= "+r+" && "+d+" "+this.toVar,h=this.fromVar+" >= "+r+" && "+n+" "+this.toVar,p+" && ("+this.fromVar+" <= "+this.toVar+" ? "+i+" : "+h+")"),a=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,u=this.stepVar?r+" += "+this.stepVar:s?c?o<=m?"++"+r:"--"+r:o<=m?r+"++":r+"--":c?a+" ? ++"+r+" : --"+r:a+" ? "+r+"++ : "+r+"--",c&&(g=l+" = "+g),c&&(u=l+" = "+u),[this.makeCode(g+"; "+t+"; "+u)]}},{key:"compileArray",value:function compileArray(e){var a,t,o,n,r,l,s,i,d,c,p,u,m;return(s=null!=this.fromNum&&null!=this.toNum,s&&20>=_Mathabs(this.fromNum-this.toNum))?(c=function(){for(var e=[],a=p=this.fromNum,t=this.toNum;p<=t?a<=t:a>=t;p<=t?a++:a--)e.push(a);return e}.apply(this),this.exclusive&&c.pop(),[this.makeCode("["+c.join(", ")+"]")]):(l=this.tab+De,r=e.scope.freeVariable("i",{single:!0,reserve:!1}),u=e.scope.freeVariable("results",{reserve:!1}),d="\n"+l+"var "+u+" = [];",s?(e.index=r,t=We(this.compileNode(e))):(m=r+" = "+this.fromC+(this.toC===this.toVar?"":", "+this.toC),o=this.fromVar+" <= "+this.toVar,t="var "+m+"; "+o+" ? "+r+" <"+this.equals+" "+this.toVar+" : "+r+" >"+this.equals+" "+this.toVar+"; "+o+" ? "+r+"++ : "+r+"--"),i="{ "+u+".push("+r+"); }\n"+l+"return "+u+";\n"+e.indent,n=function(e){return null==e?void 0:e.contains(qe)},(n(this.from)||n(this.to))&&(a=", arguments"),[this.makeCode("(function() {"+d+"\n"+l+"for ("+t+")"+i+"}).apply(this"+(null==a?"":a)+")")])}}]),a}(l);return e.prototype.children=["from","to"],e}.call(this),e.Slice=ke=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.range=e,t}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(e){var a=this.range,t,o,n,r,l,s;return l=a.to,n=a.from,(null==n?void 0:n.shouldCache())&&(n=new Le(new de(n))),(null==l?void 0:l.shouldCache())&&(l=new Le(new de(l))),r=(null==n?void 0:n.compileToFragments(e,q))||[this.makeCode("0")],l&&(t=l.compileToFragments(e,q),o=We(t),(this.range.exclusive||-1!=+o)&&(s=", "+(this.range.exclusive?o:l.isNumber()?""+(+o+1):(t=l.compileToFragments(e,H),"+"+We(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+We(r)+(s||"")+")")]}}]),a}(l);return e.prototype.children=["range"],e}.call(this),e.Obj=le=function(){var e=function(e){function a(e){var t=!!(1N)return l.push(new Le(new le(y.slice(N,a),!0)))};e=y[a];)(d=this.addInitializerExpression(e))&&(k(),l.push(d),i.push(d),N=a+1),a++;k(),t.apply(r,[s,s-s+1].concat(l)),l,s+=l.length}else(d=this.addInitializerExpression(n))&&(i.push(d),r[s]=d),s+=1;for(u=0,g=i.length;uX||l&&this.variable.base instanceof le&&!this.nestedLhs&&!0!==this.param?this.wrapInParentheses(o):o)}},{key:"compileObjectDestruct",value:function compileObjectDestruct(e){var a,t,o,l,i,d,p,m,h,g,f,y;if(t=function(a){var t;if(a instanceof n){var o=a.variable.cache(e),r=_slicedToArray(o,2);return a.variable=r[0],t=r[1],t}return a},o=function(a){var o,r;return r=t(a),o=a instanceof n&&a.variable!==r,o||!r.isAssignable()?r:new K("'"+r.compileWithoutComments(e)+"'")},h=function traverseRest(a,l){var i,d,c,u,m,g,f,y,p,k,T;for(k=[],T=void 0,null==l.properties&&(l=new Le(l)),d=c=0,u=a.length;c=Y?this.wrapInParentheses(d):d;var W=I,q=_slicedToArray(W,1);return E=q[0],1===S&&E instanceof N&&E.error("Destructuring assignment has no target"),j=function(){var e,a,t;for(t=[],v=e=0,a=I.length;ea.call(g,v):return new Le(E.base);default:return E}}(),k=function(){switch(!1){case!(E instanceof Te):return c(i,v);default:return new Le(new K(i),[new V(new re(v))])}}();h=Je(s.unwrap().value),h&&s.error(h),f.push(l.push(new n(s,k,null,{param:t.param,subpattern:!0}).compileToFragments(e,X)))}return f},o=function(a,o,r){var i;return o=new Le(new s(a,!0)),i=r instanceof Le?r:new Le(new K(r)),l.push(new n(o,i,null,{param:t.param,subpattern:!0}).compileToFragments(e,X))},A=function(e,a,t){return m(e)?D(e,a,t):o(e,a,t)},M.length?(h=M[0],C=I.slice(0,h+(_?1:0)),w=I.slice(h+1),0!==C.length&&A(C,G,H),0!==w.length&&(L=function(){switch(!1){case!_:return p(I[h].unwrapAll().value,-1*w.length);case!b:return c(H,-1*w.length)}}(),m(w)&&(F=L,L=e.scope.freeVariable("ref"),l.push([this.makeCode(L+" = ")].concat(_toConsumableArray(F.compileToFragments(e,X))))),A(w,G,L))):A(I,G,H),U||this.subpattern||l.push(G),f=this.joinFragmentArrays(l,", "),e.levelz?this.wrapInParentheses(o):o}},{key:"eachName",value:function eachName(e){return this.variable.unwrapAll().eachName(e)}}]),n}(l);return e.prototype.children=["variable","value"],e.prototype.isAssignable=we,e}.call(this),e.FuncGlyph=I=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.glyph=e,t}return _inherits(a,e),a}(l),e.Code=h=function(){var e=function(e){function t(e,a,n,r){_classCallCheck(this,t);var l=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),s;return l.funcGlyph=n,l.paramStart=r,l.params=e||[],l.body=a||new c,l.bound="=>"===(null==(s=l.funcGlyph)?void 0:s.glyph),l.isGenerator=!1,l.isAsync=!1,l.isMethod=!1,l.body.traverseChildren(!1,function(e){if((e instanceof se&&e.isYield()||e instanceof Pe)&&(l.isGenerator=!0),(e instanceof se&&e.isAwait()||e instanceof o)&&(l.isAsync=!0),l.isGenerator&&l.isAsync)return e.error("function can't contain both yield and await")}),l}return _inherits(t,e),_createClass(t,[{key:"isStatement",value:function isStatement(){return this.isMethod}},{key:"makeScope",value:function makeScope(e){return new ye(e,this.body,this)}},{key:"compileNode",value:function compileNode(e){var t,o,n,r,c,p,h,g,f,y,T,v,i,b,$,k,l,_,C,D,m,E,x,I,S,A,L,F,w,P,j,M,U,V,B,W,X,Y,q,z,J,Z,Q;for(this.ctor&&(this.isAsync&&this.name.error("Class constructor may not be async"),this.isGenerator&&this.name.error("Class constructor may not be a generator")),this.bound&&((null==(P=e.scope.method)?void 0:P.bound)&&(this.context=e.scope.method.context),!this.context&&(this.context="this")),e.scope=Ve(e,"classScope")||this.makeScope(e.scope),e.scope.shared=Ve(e,"sharedScope"),e.indent+=De,delete e.bare,delete e.isExistentialEquals,L=[],g=[],J=null==(j=null==(M=this.thisAssignments)?void 0:M.slice())?[]:j,F=[],T=!1,y=!1,S=[],this.eachParamName(function(t,o,n,r){var l,s;if(0<=a.call(S,t)&&o.error("multiple parameters named '"+t+"'"),S.push(t),o.this)return t=o.properties[0].name.value,0<=a.call(G,t)&&(t="_"+t),s=new R(e.scope.freeVariable(t,{reserve:!1})),l=n.name instanceof le&&r instanceof d&&"="===r.operatorToken.value?new d(new R(t),s,"object"):s,n.renameParam(o,l),J.push(new d(o,s))}),U=this.params,v=b=0,l=U.length;b")),n.push(this.makeCode(" {")),null==r?void 0:r.length){var re;(re=n).push.apply(re,[this.makeCode("\n")].concat(_toConsumableArray(r),[this.makeCode("\n"+this.tab)]))}return n.push(this.makeCode("}")),this.isMethod?Ye(n,this):this.front||e.level>=H?this.wrapInParentheses(n):n}},{key:"eachParamName",value:function eachParamName(e){var a,t,o,n,r;for(n=this.params,r=[],a=0,t=n.length;a"===e||">="===e||"<="===e||"==="===e||"!=="===e}},{key:"invert",value:function invert(){var e,a,t,r,l;if(this.isChainable()&&this.first.isChainable()){for(e=!0,a=this;a&&a.operator;)e&&(e=a.operator in o),a=a.first;if(!e)return new de(this).invert();for(a=this;a&&a.operator;)a.invert=!a.invert,a.operator=o[a.operator],a=a.first;return this}return(r=o[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new de(this).invert():"!"===this.operator&&(t=this.first.unwrap())instanceof n&&("!"===(l=t.operator)||"in"===l||"instanceof"===l)?t:new n("!",this)}},{key:"unfoldSoak",value:function unfoldSoak(e){var a;return("++"===(a=this.operator)||"--"===a||"delete"===a)&&ra(e,this,"first")}},{key:"generateDo",value:function generateDo(e){var a,t,o,n,r,l,s,i;for(l=[],t=e instanceof d&&(s=e.value.unwrap())instanceof h?s:e,i=t.params||[],o=0,n=i.length;o=H?new de(this).compileToFragments(e):(o="+"===a||"-"===a,("new"===a||"typeof"===a||"delete"===a||o&&this.first instanceof n&&this.first.operator===a)&&t.push([this.makeCode(" ")]),(o&&this.first instanceof n||"new"===a&&this.first.isStatement(e))&&(this.first=new de(this.first)),t.push(this.first.compileToFragments(e,Y)),this.flip&&t.reverse(),this.joinFragmentArrays(t,""))}},{key:"compileContinuation",value:function compileContinuation(e){var t,o,n,r;return o=[],t=this.operator,null==e.scope.parent&&this.error(this.operator+" can only occur inside functions"),(null==(n=e.scope.method)?void 0:n.bound)&&e.scope.method.isGenerator&&this.error("yield cannot occur inside bound (fat arrow) functions"),0<=a.call(Object.keys(this.first),"expression")&&!(this.first instanceof Se)?null!=this.first.expression&&o.push(this.first.expression.compileToFragments(e,Y)):(e.level>=q&&o.push([this.makeCode("(")]),o.push([this.makeCode(t)]),""!==(null==(r=this.first.base)?void 0:r.value)&&o.push([this.makeCode(" ")]),o.push(this.first.compileToFragments(e,Y)),e.level>=q&&o.push([this.makeCode(")")])),this.joinFragmentArrays(o,"")}},{key:"compilePower",value:function compilePower(e){var a;return a=new Le(new R("Math"),[new r(new pe("pow"))]),new u(a,[this.first,this.second]).compileToFragments(e)}},{key:"compileFloorDivision",value:function compileFloorDivision(e){var a,t,o;return t=new Le(new R("Math"),[new r(new pe("floor"))]),o=this.second.shouldCache()?new de(this.second):this.second,a=new n("/",this.first,o),new u(t,[a]).compileToFragments(e)}},{key:"compileModulo",value:function compileModulo(e){var a;return a=new Le(new K(sa("modulo",e))),new u(a,[this.first,this.second]).compileToFragments(e)}},{key:"toString",value:function toString(e){return _get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"toString",this).call(this,e,this.constructor.name+" "+this.operator)}}]),n}(l),t,o;return t={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},o={"!==":"===","===":"!=="},e.prototype.children=["first","second"],e}.call(this),e.In=U=function(){var e=function(e){function a(e,t){_classCallCheck(this,a);var o=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.object=e,o.array=t,o}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(e){var a,t,o,n,r;if(this.array instanceof Le&&this.array.isArray()&&this.array.base.objects.length){for(r=this.array.base.objects,t=0,o=r.length;t= 0"))),We(r)===We(n))?o:(o=r.concat(this.makeCode(", "),o),e.levela.call(r,t)&&r.push(t);return delete e.comments}}),Me(r,n),Qe(n.expression,n),n}return _inherits(t,e),_createClass(t,[{key:"compileNode",value:function compileNode(e){var a,t,o;if(this.expression.front=this.front,o=this.expression.compile(e,Y),this.expression.unwrap()instanceof R&&!e.scope.check(o)){var n=this.negated?["===","||"]:["!==","&&"],r=_slicedToArray(n,2);a=r[0],t=r[1],o="typeof "+o+" "+a+' "undefined"'+("undefined"===this.comparisonTarget?"":" "+t+" "+o+" "+a+" "+this.comparisonTarget)}else a="null"===this.comparisonTarget?this.negated?"==":"!=":this.negated?"===":"!==",o=o+" "+a+" "+this.comparisonTarget;return[this.makeCode(e.level<=W?o:"("+o+")")]}}]),t}(l);return e.prototype.children=["expression"],e.prototype.invert=ae,e}.call(this),e.Parens=de=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.body=e,t}return _inherits(a,e),_createClass(a,[{key:"unwrap",value:function unwrap(){return this.body}},{key:"shouldCache",value:function shouldCache(){return this.body.shouldCache()}},{key:"compileNode",value:function compileNode(e){var a,t,o,n,r;return(t=this.body.unwrap(),r=null==(n=t.comments)?void 0:n.some(function(e){return e.here&&!e.unshift&&!e.newLine}),t instanceof Le&&t.isAtomic()&&!this.csxAttribute&&!r)?(t.front=this.front,t.compileToFragments(e)):(o=t.compileToFragments(e,q),a=e.level=o.length),this.csxAttribute?this.wrapInBraces(o):a?o:this.wrapInParentheses(o))}}]),a}(l);return e.prototype.children=["body"],e}.call(this),e.StringWithInterpolations=be=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.body=e,t}return _inherits(a,e),_createClass(a,[{key:"unwrap",value:function unwrap(){return this}},{key:"shouldCache",value:function shouldCache(){return this.body.shouldCache()}},{key:"compileNode",value:function compileNode(e){var t,o,n,r,l,s,i,d,c;if(this.csxAttribute)return c=new de(new a(this.body)),c.csxAttribute=!0,c.compileNode(e);for(r=this.body.unwrap(),n=[],d=[],r.traverseChildren(!1,function(e){var a,t,o,r,l,s;if(e instanceof ve){if(e.comments){var i;(i=d).push.apply(i,_toConsumableArray(e.comments)),delete e.comments}return n.push(e),!0}if(e instanceof de){if(0!==d.length){for(t=0,r=d.length;tP,!(this.step&&null!=P&&m)&&(_=L.freeVariable("len")),i=""+b+N+" = 0, "+_+" = "+M+".length",p=""+b+N+" = "+M+".length - 1",l=N+" < "+_,s=N+" >= 0",this.step?(null==P?(l=j+" > 0 ? "+l+" : "+s,i="("+j+" > 0 ? ("+i+") : "+p+")"):m&&(l=s,i=p),k=N+" += "+j):k=""+(v===N?N+"++":"++"+N),h=[this.makeCode(i+"; "+l+"; "+b+k)])),this.returns&&(I=""+this.tab+A+" = [];\n",S="\n"+this.tab+"return "+A+";",o.makeReturn(A)),this.guard&&(1=W?this.wrapInParentheses(n):n}},{key:"unfoldSoak",value:function unfoldSoak(){return this.soak&&this}}]),a}(l);return e.prototype.children=["condition","body","elseBody"],e}.call(this),Re={modulo:function modulo(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},objectWithoutKeys:function objectWithoutKeys(){return"function(o, ks) { var res = {}; for (var k in o) ([].indexOf.call(ks, k) < 0 && {}.hasOwnProperty.call(o, k)) && (res[k] = o[k]); return res; }"},boundMethodCheck:function boundMethodCheck(){return"function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }"},_extends:function _extends(){return"Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }"},hasProp:function hasProp(){return"{}.hasOwnProperty"},indexOf:function(){return"[].indexOf"},slice:function slice(){return"[].slice"},splice:function(){return"[].splice"}},z=1,q=2,X=3,W=4,Y=5,H=6,De=" ",fe=/^[+-]?\d+$/,sa=function(e,a){var t,o;return o=a.scope.root,e in o.utilities?o.utilities[e]:(t=o.freeVariable(e),o.assign(t,Re[e](a)),o.utilities[e]=t)},ea=function(e,a){var t=!(2=e);)e--;return a&&[a.sourceLine,a.sourceColumn]}}]),e}(),t=function(){var e=function(){function e(){_classCallCheck(this,e),this.lines=[]}return _createClass(e,[{key:"add",value:function add(e,t){var o=2=t);)t--;return n&&n.sourceLocation(o)}},{key:"generate",value:function generate(){var e=0"],y={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:f,names:[],mappings:t},(e.sourceMap||e.inlineMap)&&(y.sourcesContent=[a]),y}},{key:"encodeVlq",value:function encodeVlq(e){var a,t,l,s;for(a="",l=0>e?1:0,s=(_Mathabs(e)<<1)+l;s||!a;)t=s&r,s>>=n,s&&(t|=o),a+=this.encodeBase64(t);return a}},{key:"encodeBase64",value:function encodeBase64(e){return t[e]||function(){throw new Error("Cannot Base64 encode value: "+e)}()}}]),e}(),t,o,n,r;return n=5,o=1<",s(d,e),null==f[d]&&(f[d]=[]),f[d].push(e),y&&($=new r),S=u.tokenize(e,a),a.referencedVars=function(){var e,a,t;for(t=[],e=0,a=S.length;e"),d=e.getLineNumber(),o=e.getColumnNumber(),p=a(r,d,o),n=p?r+":"+p[0]+":"+p[1]:r+":"+d+":"+o),l=e.getFunctionName(),s=e.isConstructor(),i=!(e.isToplevel()||s),i?(c=e.getMethodName(),m=e.getTypeName(),l?(u=t="",m&&l.indexOf(m)&&(u=m+"."),c&&l.indexOf("."+c)!==l.length-c.length-1&&(t=" [as "+c+"]"),""+u+l+t+" ("+n+")"):m+"."+(c||"")+" ("+n+")"):s?"new "+(l||"")+" ("+n+")":l?l+" ("+n+")":n},i=function(e,t,n){var r,l,s,i,c,u;if(!(""===e||(i=e.slice(e.lastIndexOf(".")),0<=a.call(o,i))))return null;if(""!==e&&null!=g[e])return g[e][g[e].length-1];if(null!=g[""])for(c=g[""],l=c.length-1;0<=l;l+=-1)if(s=c[l],u=s.sourceLocation([t-1,n-1]),null!=(null==u?void 0:u[0])&&null!=u[1])return s;return null==f[e]?null:(r=d(f[e][f[e].length-1],{filename:e,sourceMap:!0,literate:p.isLiterate(e)}),r.sourceMap)},Error.prepareStackTrace=function(a,t){var o,n,r;return r=function(e,a,t){var o,n;return n=i(e,a,t),null!=n&&(o=n.sourceLocation([a-1,t-1])),null==o?null:[o[0]+1,o[1]+1]},n=function(){var a,n,l;for(l=[],a=0,n=t.length;a 0) { + if (count & 1) + result += string; + if (count >>= 1) + string += string; + } + return result; +}; +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; +exports.copyObject = function (obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; +exports.copyArray = function (array) { + var copy = []; + for (var i = 0, l = array.length; i < l; i++) { + if (array[i] && typeof array[i] == "object") + copy[i] = this.copyObject(array[i]); + else + copy[i] = array[i]; + } + return copy; +}; +exports.deepCopy = require("./deep_copy").deepCopy; +exports.arrayToMap = function (arr) { + var map = {}; + for (var i = 0; i < arr.length; i++) { + map[arr[i]] = 1; + } + return map; +}; +exports.createMap = function (props) { + var map = Object.create(null); + for (var i in props) { + map[i] = props[i]; + } + return map; +}; +exports.arrayRemove = function (array, value) { + for (var i = 0; i <= array.length; i++) { + if (value === array[i]) { + array.splice(i, 1); + } + } +}; +exports.escapeRegExp = function (str) { + return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); +}; +exports.escapeHTML = function (str) { + return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 0xffff ? 2 : 1; +}; + +}); + +define("ace/apply_delta",[], function(require, exports, module){"use strict"; +function throwDeltaError(delta, errorText) { + console.log("Invalid Delta:", delta); + throw "Invalid Delta: " + errorText; +} +function positionInDocument(docLines, position) { + return position.row >= 0 && position.row < docLines.length && + position.column >= 0 && position.column <= docLines[position.row].length; +} +function validateDelta(docLines, delta) { + if (delta.action != "insert" && delta.action != "remove") + throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); + if (!(delta.lines instanceof Array)) + throwDeltaError(delta, "delta.lines must be an Array"); + if (!delta.start || !delta.end) + throwDeltaError(delta, "delta.start/end must be an present"); + var start = delta.start; + if (!positionInDocument(docLines, delta.start)) + throwDeltaError(delta, "delta.start must be contained in document"); + var end = delta.end; + if (delta.action == "remove" && !positionInDocument(docLines, end)) + throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); + var numRangeRows = end.row - start.row; + var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); + if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) + throwDeltaError(delta, "delta.range must match delta lines"); +} +exports.applyDelta = function (docLines, delta, doNotValidate) { + var row = delta.start.row; + var startColumn = delta.start.column; + var line = docLines[row] || ""; + switch (delta.action) { + case "insert": + var lines = delta.lines; + if (lines.length === 1) { + docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); + } + else { + var args = [row, 1].concat(delta.lines); + docLines.splice.apply(docLines, args); + docLines[row] = line.substring(0, startColumn) + docLines[row]; + docLines[row + delta.lines.length - 1] += line.substring(startColumn); + } + break; + case "remove": + var endColumn = delta.end.column; + var endRow = delta.end.row; + if (row === endRow) { + docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); + } + else { + docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn)); + } + break; + } +}; + +}); + +define("ace/lib/event_emitter",[], function(require, exports, module){"use strict"; +var EventEmitter = {}; +var stopPropagation = function () { this.propagationStopped = true; }; +var preventDefault = function () { this.defaultPrevented = true; }; +EventEmitter._emit = + EventEmitter._dispatchEvent = function (eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + if (typeof e != "object" || !e) + e = {}; + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) { + listeners[i](e, this); + if (e.propagationStopped) + break; + } + if (defaultHandler && !e.defaultPrevented) + return defaultHandler(e, this); + }; +EventEmitter._signal = function (eventName, e) { + var listeners = (this._eventRegistry || {})[eventName]; + if (!listeners) + return; + listeners = listeners.slice(); + for (var i = 0; i < listeners.length; i++) + listeners[i](e, this); +}; +EventEmitter.once = function (eventName, callback) { + var _self = this; + this.on(eventName, function newCallback() { + _self.off(eventName, newCallback); + callback.apply(null, arguments); + }); + if (!callback) { + return new Promise(function (resolve) { + callback = resolve; + }); + } +}; +EventEmitter.setDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + handlers = this._defaultHandlers = { _disabled_: {} }; + if (handlers[eventName]) { + var old = handlers[eventName]; + var disabled = handlers._disabled_[eventName]; + if (!disabled) + handlers._disabled_[eventName] = disabled = []; + disabled.push(old); + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } + handlers[eventName] = callback; +}; +EventEmitter.removeDefaultHandler = function (eventName, callback) { + var handlers = this._defaultHandlers; + if (!handlers) + return; + var disabled = handlers._disabled_[eventName]; + if (handlers[eventName] == callback) { + if (disabled) + this.setDefaultHandler(eventName, disabled.pop()); + } + else if (disabled) { + var i = disabled.indexOf(callback); + if (i != -1) + disabled.splice(i, 1); + } +}; +EventEmitter.on = + EventEmitter.addEventListener = function (eventName, callback, capturing) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + listeners = this._eventRegistry[eventName] = []; + if (listeners.indexOf(callback) == -1) + listeners[capturing ? "unshift" : "push"](callback); + return callback; + }; +EventEmitter.off = + EventEmitter.removeListener = + EventEmitter.removeEventListener = function (eventName, callback) { + this._eventRegistry = this._eventRegistry || {}; + var listeners = this._eventRegistry[eventName]; + if (!listeners) + return; + var index = listeners.indexOf(callback); + if (index !== -1) + listeners.splice(index, 1); + }; +EventEmitter.removeAllListeners = function (eventName) { + if (!eventName) + this._eventRegistry = this._defaultHandlers = undefined; + if (this._eventRegistry) + this._eventRegistry[eventName] = undefined; + if (this._defaultHandlers) + this._defaultHandlers[eventName] = undefined; +}; +exports.EventEmitter = EventEmitter; + +}); + +define("ace/range",[], function(require, exports, module){"use strict"; +var Range = /** @class */ (function () { + function Range(startRow, startColumn, endRow, endColumn) { + this.start = { + row: startRow, + column: startColumn + }; + this.end = { + row: endRow, + column: endColumn + }; + } + Range.prototype.isEqual = function (range) { + return this.start.row === range.start.row && + this.end.row === range.end.row && + this.start.column === range.start.column && + this.end.column === range.end.column; + }; + Range.prototype.toString = function () { + return ("Range: [" + this.start.row + "/" + this.start.column + + "] -> [" + this.end.row + "/" + this.end.column + "]"); + }; + Range.prototype.contains = function (row, column) { + return this.compare(row, column) == 0; + }; + Range.prototype.compareRange = function (range) { + var cmp, end = range.end, start = range.start; + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } + else if (cmp == 0) { + return 1; + } + else { + return 0; + } + } + else if (cmp == -1) { + return -2; + } + else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } + else if (cmp == 1) { + return 42; + } + else { + return 0; + } + } + }; + Range.prototype.comparePoint = function (p) { + return this.compare(p.row, p.column); + }; + Range.prototype.containsRange = function (range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + Range.prototype.intersects = function (range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + Range.prototype.isEnd = function (row, column) { + return this.end.row == row && this.end.column == column; + }; + Range.prototype.isStart = function (row, column) { + return this.start.row == row && this.start.column == column; + }; + Range.prototype.setStart = function (row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } + else { + this.start.row = row; + this.start.column = column; + } + }; + Range.prototype.setEnd = function (row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } + else { + this.end.row = row; + this.end.column = column; + } + }; + Range.prototype.inside = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideStart = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.insideEnd = function (row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } + else { + return true; + } + } + return false; + }; + Range.prototype.compare = function (row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + } + } + if (row < this.start.row) + return -1; + if (row > this.end.row) + return 1; + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + return 0; + }; + Range.prototype.compareStart = function (row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareEnd = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.compareInside = function (row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } + else if (this.start.row == row && this.start.column == column) { + return -1; + } + else { + return this.compare(row, column); + } + }; + Range.prototype.clipRows = function (firstRow, lastRow) { + if (this.end.row > lastRow) + var end = { row: lastRow + 1, column: 0 }; + else if (this.end.row < firstRow) + var end = { row: firstRow, column: 0 }; + if (this.start.row > lastRow) + var start = { row: lastRow + 1, column: 0 }; + else if (this.start.row < firstRow) + var start = { row: firstRow, column: 0 }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.extend = function (row, column) { + var cmp = this.compare(row, column); + if (cmp == 0) + return this; + else if (cmp == -1) + var start = { row: row, column: column }; + else + var end = { row: row, column: column }; + return Range.fromPoints(start || this.start, end || this.end); + }; + Range.prototype.isEmpty = function () { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + Range.prototype.isMultiLine = function () { + return (this.start.row !== this.end.row); + }; + Range.prototype.clone = function () { + return Range.fromPoints(this.start, this.end); + }; + Range.prototype.collapseRows = function () { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0); + else + return new Range(this.start.row, 0, this.end.row, 0); + }; + Range.prototype.toScreenRange = function (session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column); + }; + Range.prototype.moveBy = function (row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + return Range; +}()); +Range.fromPoints = function (start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = function (p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; +exports.Range = Range; + +}); + +define("ace/anchor",[], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Anchor = /** @class */ (function () { + function Anchor(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + if (typeof row != "number") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); + } + Anchor.prototype.getPosition = function () { + return this.$clipPositionToDocument(this.row, this.column); + }; + Anchor.prototype.getDocument = function () { + return this.document; + }; + Anchor.prototype.onChange = function (delta) { + if (delta.start.row == delta.end.row && delta.start.row != this.row) + return; + if (delta.start.row > this.row) + return; + var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight); + this.setPosition(point.row, point.column, true); + }; + Anchor.prototype.setPosition = function (row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } + else { + pos = this.$clipPositionToDocument(row, column); + } + if (this.row == pos.row && this.column == pos.column) + return; + var old = { + row: this.row, + column: this.column + }; + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + Anchor.prototype.detach = function () { + this.document.off("change", this.$onChange); + }; + Anchor.prototype.attach = function (doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + Anchor.prototype.$clipPositionToDocument = function (row, column) { + var pos = {}; + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + if (column < 0) + pos.column = 0; + return pos; + }; + return Anchor; +}()); +Anchor.prototype.$insertRight = false; +oop.implement(Anchor.prototype, EventEmitter); +function $pointsInOrder(point1, point2, equalPointsInOrder) { + var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; + return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); +} +function $getTransformedPoint(delta, point, moveIfEqual) { + var deltaIsInsert = delta.action == "insert"; + var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); + var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); + var deltaStart = delta.start; + var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. + if ($pointsInOrder(point, deltaStart, moveIfEqual)) { + return { + row: point.row, + column: point.column + }; + } + if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { + return { + row: point.row + deltaRowShift, + column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) + }; + } + return { + row: deltaStart.row, + column: deltaStart.column + }; +} +exports.Anchor = Anchor; + +}); + +define("ace/document",[], function(require, exports, module){"use strict"; +var oop = require("./lib/oop"); +var applyDelta = require("./apply_delta").applyDelta; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; +var Document = /** @class */ (function () { + function Document(textOrLines) { + this.$lines = [""]; + if (textOrLines.length === 0) { + this.$lines = [""]; + } + else if (Array.isArray(textOrLines)) { + this.insertMergedLines({ row: 0, column: 0 }, textOrLines); + } + else { + this.insert({ row: 0, column: 0 }, textOrLines); + } + } + Document.prototype.setValue = function (text) { + var len = this.getLength() - 1; + this.remove(new Range(0, 0, len, this.getLine(len).length)); + this.insert({ row: 0, column: 0 }, text || ""); + }; + Document.prototype.getValue = function () { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + Document.prototype.createAnchor = function (row, column) { + return new Anchor(this, row, column); + }; + Document.prototype.$detectNewLine = function (text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineCharacter = function () { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + Document.prototype.setNewLineMode = function (newLineMode) { + if (this.$newLineMode === newLineMode) + return; + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + Document.prototype.getNewLineMode = function () { + return this.$newLineMode; + }; + Document.prototype.isNewLine = function (text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + Document.prototype.getLine = function (row) { + return this.$lines[row] || ""; + }; + Document.prototype.getLines = function (firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + Document.prototype.getAllLines = function () { + return this.getLines(0, this.getLength()); + }; + Document.prototype.getLength = function () { + return this.$lines.length; + }; + Document.prototype.getTextRange = function (range) { + return this.getLinesForRange(range).join(this.getNewLineCharacter()); + }; + Document.prototype.getLinesForRange = function (range) { + var lines; + if (range.start.row === range.end.row) { + lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; + } + else { + lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + } + return lines; + }; + Document.prototype.insertLines = function (row, lines) { + console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); + return this.insertFullLines(row, lines); + }; + Document.prototype.removeLines = function (firstRow, lastRow) { + console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); + return this.removeFullLines(firstRow, lastRow); + }; + Document.prototype.insertNewLine = function (position) { + console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); + return this.insertMergedLines(position, ["", ""]); + }; + Document.prototype.insert = function (position, text) { + if (this.getLength() <= 1) + this.$detectNewLine(text); + return this.insertMergedLines(position, this.$split(text)); + }; + Document.prototype.insertInLine = function (position, text) { + var start = this.clippedPos(position.row, position.column); + var end = this.pos(position.row, position.column + text.length); + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: [text] + }, true); + return this.clonePos(end); + }; + Document.prototype.clippedPos = function (row, column) { + var length = this.getLength(); + if (row === undefined) { + row = length; + } + else if (row < 0) { + row = 0; + } + else if (row >= length) { + row = length - 1; + column = undefined; + } + var line = this.getLine(row); + if (column == undefined) + column = line.length; + column = Math.min(Math.max(column, 0), line.length); + return { row: row, column: column }; + }; + Document.prototype.clonePos = function (pos) { + return { row: pos.row, column: pos.column }; + }; + Document.prototype.pos = function (row, column) { + return { row: row, column: column }; + }; + Document.prototype.$clipPosition = function (position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length - 1).length; + } + else { + position.row = Math.max(0, position.row); + position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); + } + return position; + }; + Document.prototype.insertFullLines = function (row, lines) { + row = Math.min(Math.max(row, 0), this.getLength()); + var column = 0; + if (row < this.getLength()) { + lines = lines.concat([""]); + column = 0; + } + else { + lines = [""].concat(lines); + row--; + column = this.$lines[row].length; + } + this.insertMergedLines({ row: row, column: column }, lines); + }; + Document.prototype.insertMergedLines = function (position, lines) { + var start = this.clippedPos(position.row, position.column); + var end = { + row: start.row + lines.length - 1, + column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length + }; + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: lines + }); + return this.clonePos(end); + }; + Document.prototype.remove = function (range) { + var start = this.clippedPos(range.start.row, range.start.column); + var end = this.clippedPos(range.end.row, range.end.column); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }); + return this.clonePos(start); + }; + Document.prototype.removeInLine = function (row, startColumn, endColumn) { + var start = this.clippedPos(row, startColumn); + var end = this.clippedPos(row, endColumn); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({ start: start, end: end }) + }, true); + return this.clonePos(start); + }; + Document.prototype.removeFullLines = function (firstRow, lastRow) { + firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); + lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1); + var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; + var deleteLastNewLine = lastRow < this.getLength() - 1; + var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow); + var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0); + var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow); + var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length); + var range = new Range(startRow, startCol, endRow, endCol); + var deletedLines = this.$lines.slice(firstRow, lastRow + 1); + this.applyDelta({ + start: range.start, + end: range.end, + action: "remove", + lines: this.getLinesForRange(range) + }); + return deletedLines; + }; + Document.prototype.removeNewLine = function (row) { + if (row < this.getLength() - 1 && row >= 0) { + this.applyDelta({ + start: this.pos(row, this.getLine(row).length), + end: this.pos(row + 1, 0), + action: "remove", + lines: ["", ""] + }); + } + }; + Document.prototype.replace = function (range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length === 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + this.remove(range); + var end; + if (text) { + end = this.insert(range.start, text); + } + else { + end = range.start; + } + return end; + }; + Document.prototype.applyDeltas = function (deltas) { + for (var i = 0; i < deltas.length; i++) { + this.applyDelta(deltas[i]); + } + }; + Document.prototype.revertDeltas = function (deltas) { + for (var i = deltas.length - 1; i >= 0; i--) { + this.revertDelta(deltas[i]); + } + }; + Document.prototype.applyDelta = function (delta, doNotValidate) { + var isInsert = delta.action == "insert"; + if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] + : !Range.comparePoints(delta.start, delta.end)) { + return; + } + if (isInsert && delta.lines.length > 20000) { + this.$splitAndapplyLargeDelta(delta, 20000); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } + }; + Document.prototype.$safeApplyDelta = function (delta) { + var docLength = this.$lines.length; + if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength + || delta.action == "insert" && delta.start.row <= docLength) { + this.applyDelta(delta); + } + }; + Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) { + var lines = delta.lines; + var l = lines.length - MAX + 1; + var row = delta.start.row; + var column = delta.start.column; + for (var from = 0, to = 0; from < l; from = to) { + to += MAX - 1; + var chunk = lines.slice(from, to); + chunk.push(""); + this.applyDelta({ + start: this.pos(row + from, column), + end: this.pos(row + to, column = 0), + action: delta.action, + lines: chunk + }, true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); + }; + Document.prototype.revertDelta = function (delta) { + this.$safeApplyDelta({ + start: this.clonePos(delta.start), + end: this.clonePos(delta.end), + action: (delta.action == "insert" ? "remove" : "insert"), + lines: delta.lines.slice() + }); + }; + Document.prototype.indexToPosition = function (index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return { row: i, column: index + lines[i].length + newlineLength }; + } + return { row: l - 1, column: index + lines[l - 1].length + newlineLength }; + }; + Document.prototype.positionToIndex = function (pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + return index + pos.column; + }; + Document.prototype.$split = function (text) { + return text.split(/\r\n|\r|\n/); + }; + return Document; +}()); +Document.prototype.$autoNewLine = ""; +Document.prototype.$newLineMode = "auto"; +oop.implement(Document.prototype, EventEmitter); +exports.Document = Document; + +}); + +define("ace/worker/mirror",[], function(require, exports, module) { +"use strict"; + +var Document = require("../document").Document; +var lang = require("../lib/lang"); + +var Mirror = exports.Mirror = function(sender) { + this.sender = sender; + var doc = this.doc = new Document(""); + + var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); + + var _self = this; + sender.on("change", function(e) { + var data = e.data; + if (data[0].start) { + doc.applyDeltas(data); + } else { + for (var i = 0; i < data.length; i += 2) { + var d, err; + if (Array.isArray(data[i+1])) { + d = {action: "insert", start: data[i], lines: data[i+1]}; + } else { + d = {action: "remove", start: data[i], end: data[i+1]}; + } + + if ((d.action == "insert" ? d.start : d.end).row >= doc.$lines.length) { + err = new Error("Invalid delta"); + err.data = { + path: _self.$path, + linesLength: doc.$lines.length, + start: d.start, + end: d.end + }; + throw err; + } + + doc.applyDelta(d, true); + } + } + if (_self.$timeout) + return deferredUpdate.schedule(_self.$timeout); + _self.onUpdate(); + }); +}; + +(function() { + + this.$timeout = 500; + + this.setTimeout = function(timeout) { + this.$timeout = timeout; + }; + + this.setValue = function(value) { + this.doc.setValue(value); + this.deferredUpdate.schedule(this.$timeout); + }; + + this.getValue = function(callbackId) { + this.sender.callback(this.doc.getValue(), callbackId); + }; + + this.onUpdate = function() { + }; + + this.isPending = function() { + return this.deferredUpdate.isPending(); + }; + +}).call(Mirror.prototype); + +}); + +define("ace/mode/css/csslint",[], function(require, exports, module) { + +var CSSLint = (function(){ + var module = module || {}, + exports = exports || {}; +var parserlib = (function () { +var require; +require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i") { + this.type = "child"; + } else if (text === "+") { + this.type = "adjacent-sibling"; + } else if (text === "~") { + this.type = "sibling"; + } + +} + +Combinator.prototype = new SyntaxUnit(); +Combinator.prototype.constructor = Combinator; + + +},{"../util/SyntaxUnit":26,"./Parser":6}],3:[function(require,module,exports){ +"use strict"; + +module.exports = Matcher; + +var StringReader = require("../util/StringReader"); +var SyntaxError = require("../util/SyntaxError"); +function Matcher(matchFunc, toString) { + this.match = function(expression) { + var result; + expression.mark(); + result = matchFunc(expression); + if (result) { + expression.drop(); + } else { + expression.restore(); + } + return result; + }; + this.toString = typeof toString === "function" ? toString : function() { + return toString; + }; +} +Matcher.prec = { + MOD: 5, + SEQ: 4, + ANDAND: 3, + OROR: 2, + ALT: 1 +}; +Matcher.parse = function(str) { + var reader, eat, expr, oror, andand, seq, mod, term, result; + reader = new StringReader(str); + eat = function(matcher) { + var result = reader.readMatch(matcher); + if (result === null) { + throw new SyntaxError( + "Expected " + matcher, reader.getLine(), reader.getCol()); + } + return result; + }; + expr = function() { + var m = [ oror() ]; + while (reader.readMatch(" | ") !== null) { + m.push(oror()); + } + return m.length === 1 ? m[0] : Matcher.alt.apply(Matcher, m); + }; + oror = function() { + var m = [ andand() ]; + while (reader.readMatch(" || ") !== null) { + m.push(andand()); + } + return m.length === 1 ? m[0] : Matcher.oror.apply(Matcher, m); + }; + andand = function() { + var m = [ seq() ]; + while (reader.readMatch(" && ") !== null) { + m.push(seq()); + } + return m.length === 1 ? m[0] : Matcher.andand.apply(Matcher, m); + }; + seq = function() { + var m = [ mod() ]; + while (reader.readMatch(/^ (?![&|\]])/) !== null) { + m.push(mod()); + } + return m.length === 1 ? m[0] : Matcher.seq.apply(Matcher, m); + }; + mod = function() { + var m = term(); + if (reader.readMatch("?") !== null) { + return m.question(); + } else if (reader.readMatch("*") !== null) { + return m.star(); + } else if (reader.readMatch("+") !== null) { + return m.plus(); + } else if (reader.readMatch("#") !== null) { + return m.hash(); + } else if (reader.readMatch(/^\{\s*/) !== null) { + var min = eat(/^\d+/); + eat(/^\s*,\s*/); + var max = eat(/^\d+/); + eat(/^\s*\}/); + return m.braces(Number(min), Number(max)); + } + return m; + }; + term = function() { + if (reader.readMatch("[ ") !== null) { + var m = expr(); + eat(" ]"); + return m; + } + return Matcher.fromType(eat(/^[^ ?*+#{]+/)); + }; + result = expr(); + if (!reader.eof()) { + throw new SyntaxError( + "Expected end of string", reader.getLine(), reader.getCol()); + } + return result; +}; +Matcher.cast = function(m) { + if (m instanceof Matcher) { + return m; + } + return Matcher.parse(m); +}; +Matcher.fromType = function(type) { + var ValidationTypes = require("./ValidationTypes"); + return new Matcher(function(expression) { + return expression.hasNext() && ValidationTypes.isType(expression, type); + }, type); +}; +Matcher.seq = function() { + var ms = Array.prototype.slice.call(arguments).map(Matcher.cast); + if (ms.length === 1) { + return ms[0]; + } + return new Matcher(function(expression) { + var i, result = true; + for (i = 0; result && i < ms.length; i++) { + result = ms[i].match(expression); + } + return result; + }, function(prec) { + var p = Matcher.prec.SEQ; + var s = ms.map(function(m) { + return m.toString(p); + }).join(" "); + if (prec > p) { + s = "[ " + s + " ]"; + } + return s; + }); +}; +Matcher.alt = function() { + var ms = Array.prototype.slice.call(arguments).map(Matcher.cast); + if (ms.length === 1) { + return ms[0]; + } + return new Matcher(function(expression) { + var i, result = false; + for (i = 0; !result && i < ms.length; i++) { + result = ms[i].match(expression); + } + return result; + }, function(prec) { + var p = Matcher.prec.ALT; + var s = ms.map(function(m) { + return m.toString(p); + }).join(" | "); + if (prec > p) { + s = "[ " + s + " ]"; + } + return s; + }); +}; +Matcher.many = function(required) { + var ms = Array.prototype.slice.call(arguments, 1).reduce(function(acc, v) { + if (v.expand) { + var ValidationTypes = require("./ValidationTypes"); + acc.push.apply(acc, ValidationTypes.complex[v.expand].options); + } else { + acc.push(Matcher.cast(v)); + } + return acc; + }, []); + + if (required === true) { + required = ms.map(function() { + return true; + }); + } + + var result = new Matcher(function(expression) { + var seen = [], max = 0, pass = 0; + var success = function(matchCount) { + if (pass === 0) { + max = Math.max(matchCount, max); + return matchCount === ms.length; + } else { + return matchCount === max; + } + }; + var tryMatch = function(matchCount) { + for (var i = 0; i < ms.length; i++) { + if (seen[i]) { + continue; + } + expression.mark(); + if (ms[i].match(expression)) { + seen[i] = true; + if (tryMatch(matchCount + (required === false || required[i] ? 1 : 0))) { + expression.drop(); + return true; + } + expression.restore(); + seen[i] = false; + } else { + expression.drop(); + } + } + return success(matchCount); + }; + if (!tryMatch(0)) { + pass++; + tryMatch(0); + } + + if (required === false) { + return max > 0; + } + for (var i = 0; i < ms.length; i++) { + if (required[i] && !seen[i]) { + return false; + } + } + return true; + }, function(prec) { + var p = required === false ? Matcher.prec.OROR : Matcher.prec.ANDAND; + var s = ms.map(function(m, i) { + if (required !== false && !required[i]) { + return m.toString(Matcher.prec.MOD) + "?"; + } + return m.toString(p); + }).join(required === false ? " || " : " && "); + if (prec > p) { + s = "[ " + s + " ]"; + } + return s; + }); + result.options = ms; + return result; +}; +Matcher.andand = function() { + var args = Array.prototype.slice.call(arguments); + args.unshift(true); + return Matcher.many.apply(Matcher, args); +}; +Matcher.oror = function() { + var args = Array.prototype.slice.call(arguments); + args.unshift(false); + return Matcher.many.apply(Matcher, args); +}; +Matcher.prototype = { + constructor: Matcher, + match: function() { + throw new Error("unimplemented"); + }, + toString: function() { + throw new Error("unimplemented"); + }, + func: function() { + return this.match.bind(this); + }, + then: function(m) { + return Matcher.seq(this, m); + }, + or: function(m) { + return Matcher.alt(this, m); + }, + andand: function(m) { + return Matcher.many(true, this, m); + }, + oror: function(m) { + return Matcher.many(false, this, m); + }, + star: function() { + return this.braces(0, Infinity, "*"); + }, + plus: function() { + return this.braces(1, Infinity, "+"); + }, + question: function() { + return this.braces(0, 1, "?"); + }, + hash: function() { + return this.braces(1, Infinity, "#", Matcher.cast(",")); + }, + braces: function(min, max, marker, optSep) { + var m1 = this, m2 = optSep ? optSep.then(this) : this; + if (!marker) { + marker = "{" + min + "," + max + "}"; + } + return new Matcher(function(expression) { + var result = true, i; + for (i = 0; i < max; i++) { + if (i > 0 && optSep) { + result = m2.match(expression); + } else { + result = m1.match(expression); + } + if (!result) { + break; + } + } + return i >= min; + }, function() { + return m1.toString(Matcher.prec.MOD) + marker; + }); + } +}; + +},{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(require,module,exports){ +"use strict"; + +module.exports = MediaFeature; + +var SyntaxUnit = require("../util/SyntaxUnit"); + +var Parser = require("./Parser"); +function MediaFeature(name, value) { + + SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE); + this.name = name; + this.value = value; +} + +MediaFeature.prototype = new SyntaxUnit(); +MediaFeature.prototype.constructor = MediaFeature; + + +},{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(require,module,exports){ +"use strict"; + +module.exports = MediaQuery; + +var SyntaxUnit = require("../util/SyntaxUnit"); + +var Parser = require("./Parser"); +function MediaQuery(modifier, mediaType, features, line, col) { + + SyntaxUnit.call(this, (modifier ? modifier + " " : "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE); + this.modifier = modifier; + this.mediaType = mediaType; + this.features = features; + +} + +MediaQuery.prototype = new SyntaxUnit(); +MediaQuery.prototype.constructor = MediaQuery; + + +},{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(require,module,exports){ +"use strict"; + +module.exports = Parser; + +var EventTarget = require("../util/EventTarget"); +var SyntaxError = require("../util/SyntaxError"); +var SyntaxUnit = require("../util/SyntaxUnit"); + +var Combinator = require("./Combinator"); +var MediaFeature = require("./MediaFeature"); +var MediaQuery = require("./MediaQuery"); +var PropertyName = require("./PropertyName"); +var PropertyValue = require("./PropertyValue"); +var PropertyValuePart = require("./PropertyValuePart"); +var Selector = require("./Selector"); +var SelectorPart = require("./SelectorPart"); +var SelectorSubPart = require("./SelectorSubPart"); +var TokenStream = require("./TokenStream"); +var Tokens = require("./Tokens"); +var Validation = require("./Validation"); +function Parser(options) { + EventTarget.call(this); + + + this.options = options || {}; + + this._tokenStream = null; +} +Parser.DEFAULT_TYPE = 0; +Parser.COMBINATOR_TYPE = 1; +Parser.MEDIA_FEATURE_TYPE = 2; +Parser.MEDIA_QUERY_TYPE = 3; +Parser.PROPERTY_NAME_TYPE = 4; +Parser.PROPERTY_VALUE_TYPE = 5; +Parser.PROPERTY_VALUE_PART_TYPE = 6; +Parser.SELECTOR_TYPE = 7; +Parser.SELECTOR_PART_TYPE = 8; +Parser.SELECTOR_SUB_PART_TYPE = 9; + +Parser.prototype = function() { + + var proto = new EventTarget(), // new prototype + prop, + additions = { + __proto__: null, + constructor: Parser, + DEFAULT_TYPE : 0, + COMBINATOR_TYPE : 1, + MEDIA_FEATURE_TYPE : 2, + MEDIA_QUERY_TYPE : 3, + PROPERTY_NAME_TYPE : 4, + PROPERTY_VALUE_TYPE : 5, + PROPERTY_VALUE_PART_TYPE : 6, + SELECTOR_TYPE : 7, + SELECTOR_PART_TYPE : 8, + SELECTOR_SUB_PART_TYPE : 9, + + _stylesheet: function() { + + var tokenStream = this._tokenStream, + count, + token, + tt; + + this.fire("startstylesheet"); + this._charset(); + + this._skipCruft(); + while (tokenStream.peek() === Tokens.IMPORT_SYM) { + this._import(); + this._skipCruft(); + } + while (tokenStream.peek() === Tokens.NAMESPACE_SYM) { + this._namespace(); + this._skipCruft(); + } + tt = tokenStream.peek(); + while (tt > Tokens.EOF) { + + try { + + switch (tt) { + case Tokens.MEDIA_SYM: + this._media(); + this._skipCruft(); + break; + case Tokens.PAGE_SYM: + this._page(); + this._skipCruft(); + break; + case Tokens.FONT_FACE_SYM: + this._font_face(); + this._skipCruft(); + break; + case Tokens.KEYFRAMES_SYM: + this._keyframes(); + this._skipCruft(); + break; + case Tokens.VIEWPORT_SYM: + this._viewport(); + this._skipCruft(); + break; + case Tokens.DOCUMENT_SYM: + this._document(); + this._skipCruft(); + break; + case Tokens.SUPPORTS_SYM: + this._supports(); + this._skipCruft(); + break; + case Tokens.UNKNOWN_SYM: // unknown @ rule + tokenStream.get(); + if (!this.options.strict) { + this.fire({ + type: "error", + error: null, + message: "Unknown @ rule: " + tokenStream.LT(0).value + ".", + line: tokenStream.LT(0).startLine, + col: tokenStream.LT(0).startCol + }); + count = 0; + while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) === Tokens.LBRACE) { + count++; // keep track of nesting depth + } + + while (count) { + tokenStream.advance([Tokens.RBRACE]); + count--; + } + + } else { + throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol); + } + break; + case Tokens.S: + this._readWhitespace(); + break; + default: + if (!this._ruleset()) { + switch (tt) { + case Tokens.CHARSET_SYM: + token = tokenStream.LT(1); + this._charset(false); + throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol); + case Tokens.IMPORT_SYM: + token = tokenStream.LT(1); + this._import(false); + throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol); + case Tokens.NAMESPACE_SYM: + token = tokenStream.LT(1); + this._namespace(false); + throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol); + default: + tokenStream.get(); // get the last token + this._unexpectedToken(tokenStream.token()); + } + + } + } + } catch (ex) { + if (ex instanceof SyntaxError && !this.options.strict) { + this.fire({ + type: "error", + error: ex, + message: ex.message, + line: ex.line, + col: ex.col + }); + } else { + throw ex; + } + } + + tt = tokenStream.peek(); + } + + if (tt !== Tokens.EOF) { + this._unexpectedToken(tokenStream.token()); + } + + this.fire("endstylesheet"); + }, + + _charset: function(emit) { + var tokenStream = this._tokenStream, + charset, + token, + line, + col; + + if (tokenStream.match(Tokens.CHARSET_SYM)) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.STRING); + + token = tokenStream.token(); + charset = token.value; + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.SEMICOLON); + + if (emit !== false) { + this.fire({ + type: "charset", + charset:charset, + line: line, + col: col + }); + } + } + }, + + _import: function(emit) { + + var tokenStream = this._tokenStream, + uri, + importToken, + mediaList = []; + tokenStream.mustMatch(Tokens.IMPORT_SYM); + importToken = tokenStream.token(); + this._readWhitespace(); + + tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); + uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1"); + + this._readWhitespace(); + + mediaList = this._media_query_list(); + tokenStream.mustMatch(Tokens.SEMICOLON); + this._readWhitespace(); + + if (emit !== false) { + this.fire({ + type: "import", + uri: uri, + media: mediaList, + line: importToken.startLine, + col: importToken.startCol + }); + } + + }, + + _namespace: function(emit) { + + var tokenStream = this._tokenStream, + line, + col, + prefix, + uri; + tokenStream.mustMatch(Tokens.NAMESPACE_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + this._readWhitespace(); + if (tokenStream.match(Tokens.IDENT)) { + prefix = tokenStream.token().value; + this._readWhitespace(); + } + + tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); + uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1"); + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.SEMICOLON); + this._readWhitespace(); + + if (emit !== false) { + this.fire({ + type: "namespace", + prefix: prefix, + uri: uri, + line: line, + col: col + }); + } + + }, + + _supports: function(emit) { + var tokenStream = this._tokenStream, + line, + col; + + if (tokenStream.match(Tokens.SUPPORTS_SYM)) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + this._supports_condition(); + this._readWhitespace(); + + tokenStream.mustMatch(Tokens.LBRACE); + this._readWhitespace(); + + if (emit !== false) { + this.fire({ + type: "startsupports", + line: line, + col: col + }); + } + + while (true) { + if (!this._ruleset()) { + break; + } + } + + tokenStream.mustMatch(Tokens.RBRACE); + this._readWhitespace(); + + this.fire({ + type: "endsupports", + line: line, + col: col + }); + } + }, + + _supports_condition: function() { + var tokenStream = this._tokenStream, + ident; + + if (tokenStream.match(Tokens.IDENT)) { + ident = tokenStream.token().value.toLowerCase(); + + if (ident === "not") { + tokenStream.mustMatch(Tokens.S); + this._supports_condition_in_parens(); + } else { + tokenStream.unget(); + } + } else { + this._supports_condition_in_parens(); + this._readWhitespace(); + + while (tokenStream.peek() === Tokens.IDENT) { + ident = tokenStream.LT(1).value.toLowerCase(); + if (ident === "and" || ident === "or") { + tokenStream.mustMatch(Tokens.IDENT); + this._readWhitespace(); + this._supports_condition_in_parens(); + this._readWhitespace(); + } + } + } + }, + + _supports_condition_in_parens: function() { + var tokenStream = this._tokenStream, + ident; + + if (tokenStream.match(Tokens.LPAREN)) { + this._readWhitespace(); + if (tokenStream.match(Tokens.IDENT)) { + ident = tokenStream.token().value.toLowerCase(); + if (ident === "not") { + this._readWhitespace(); + this._supports_condition(); + this._readWhitespace(); + tokenStream.mustMatch(Tokens.RPAREN); + } else { + tokenStream.unget(); + this._supports_declaration_condition(false); + } + } else { + this._supports_condition(); + this._readWhitespace(); + tokenStream.mustMatch(Tokens.RPAREN); + } + } else { + this._supports_declaration_condition(); + } + }, + + _supports_declaration_condition: function(requireStartParen) { + var tokenStream = this._tokenStream; + + if (requireStartParen !== false) { + tokenStream.mustMatch(Tokens.LPAREN); + } + this._readWhitespace(); + this._declaration(); + tokenStream.mustMatch(Tokens.RPAREN); + }, + + _media: function() { + var tokenStream = this._tokenStream, + line, + col, + mediaList; // = []; + tokenStream.mustMatch(Tokens.MEDIA_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + mediaList = this._media_query_list(); + + tokenStream.mustMatch(Tokens.LBRACE); + this._readWhitespace(); + + this.fire({ + type: "startmedia", + media: mediaList, + line: line, + col: col + }); + + while (true) { + if (tokenStream.peek() === Tokens.PAGE_SYM) { + this._page(); + } else if (tokenStream.peek() === Tokens.FONT_FACE_SYM) { + this._font_face(); + } else if (tokenStream.peek() === Tokens.VIEWPORT_SYM) { + this._viewport(); + } else if (tokenStream.peek() === Tokens.DOCUMENT_SYM) { + this._document(); + } else if (tokenStream.peek() === Tokens.SUPPORTS_SYM) { + this._supports(); + } else if (tokenStream.peek() === Tokens.MEDIA_SYM) { + this._media(); + } else if (!this._ruleset()) { + break; + } + } + + tokenStream.mustMatch(Tokens.RBRACE); + this._readWhitespace(); + + this.fire({ + type: "endmedia", + media: mediaList, + line: line, + col: col + }); + }, + _media_query_list: function() { + var tokenStream = this._tokenStream, + mediaList = []; + + + this._readWhitespace(); + + if (tokenStream.peek() === Tokens.IDENT || tokenStream.peek() === Tokens.LPAREN) { + mediaList.push(this._media_query()); + } + + while (tokenStream.match(Tokens.COMMA)) { + this._readWhitespace(); + mediaList.push(this._media_query()); + } + + return mediaList; + }, + _media_query: function() { + var tokenStream = this._tokenStream, + type = null, + ident = null, + token = null, + expressions = []; + + if (tokenStream.match(Tokens.IDENT)) { + ident = tokenStream.token().value.toLowerCase(); + if (ident !== "only" && ident !== "not") { + tokenStream.unget(); + ident = null; + } else { + token = tokenStream.token(); + } + } + + this._readWhitespace(); + + if (tokenStream.peek() === Tokens.IDENT) { + type = this._media_type(); + if (token === null) { + token = tokenStream.token(); + } + } else if (tokenStream.peek() === Tokens.LPAREN) { + if (token === null) { + token = tokenStream.LT(1); + } + expressions.push(this._media_expression()); + } + + if (type === null && expressions.length === 0) { + return null; + } else { + this._readWhitespace(); + while (tokenStream.match(Tokens.IDENT)) { + if (tokenStream.token().value.toLowerCase() !== "and") { + this._unexpectedToken(tokenStream.token()); + } + + this._readWhitespace(); + expressions.push(this._media_expression()); + } + } + + return new MediaQuery(ident, type, expressions, token.startLine, token.startCol); + }, + _media_type: function() { + return this._media_feature(); + }, + _media_expression: function() { + var tokenStream = this._tokenStream, + feature = null, + token, + expression = null; + + tokenStream.mustMatch(Tokens.LPAREN); + this._readWhitespace(); + + feature = this._media_feature(); + this._readWhitespace(); + + if (tokenStream.match(Tokens.COLON)) { + this._readWhitespace(); + token = tokenStream.LT(1); + expression = this._expression(); + } + + tokenStream.mustMatch(Tokens.RPAREN); + this._readWhitespace(); + + return new MediaFeature(feature, expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null); + }, + _media_feature: function() { + var tokenStream = this._tokenStream; + + this._readWhitespace(); + + tokenStream.mustMatch(Tokens.IDENT); + + return SyntaxUnit.fromToken(tokenStream.token()); + }, + _page: function() { + var tokenStream = this._tokenStream, + line, + col, + identifier = null, + pseudoPage = null; + tokenStream.mustMatch(Tokens.PAGE_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + if (tokenStream.match(Tokens.IDENT)) { + identifier = tokenStream.token().value; + if (identifier.toLowerCase() === "auto") { + this._unexpectedToken(tokenStream.token()); + } + } + if (tokenStream.peek() === Tokens.COLON) { + pseudoPage = this._pseudo_page(); + } + + this._readWhitespace(); + + this.fire({ + type: "startpage", + id: identifier, + pseudo: pseudoPage, + line: line, + col: col + }); + + this._readDeclarations(true, true); + + this.fire({ + type: "endpage", + id: identifier, + pseudo: pseudoPage, + line: line, + col: col + }); + + }, + _margin: function() { + var tokenStream = this._tokenStream, + line, + col, + marginSym = this._margin_sym(); + + if (marginSym) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this.fire({ + type: "startpagemargin", + margin: marginSym, + line: line, + col: col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endpagemargin", + margin: marginSym, + line: line, + col: col + }); + return true; + } else { + return false; + } + }, + _margin_sym: function() { + + var tokenStream = this._tokenStream; + + if (tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM, + Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM, + Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM, + Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM, + Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM, + Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM, + Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM])) { + return SyntaxUnit.fromToken(tokenStream.token()); + } else { + return null; + } + + }, + + _pseudo_page: function() { + + var tokenStream = this._tokenStream; + + tokenStream.mustMatch(Tokens.COLON); + tokenStream.mustMatch(Tokens.IDENT); + + return tokenStream.token().value; + }, + + _font_face: function() { + var tokenStream = this._tokenStream, + line, + col; + tokenStream.mustMatch(Tokens.FONT_FACE_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + this.fire({ + type: "startfontface", + line: line, + col: col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endfontface", + line: line, + col: col + }); + }, + + _viewport: function() { + var tokenStream = this._tokenStream, + line, + col; + + tokenStream.mustMatch(Tokens.VIEWPORT_SYM); + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + + this._readWhitespace(); + + this.fire({ + type: "startviewport", + line: line, + col: col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endviewport", + line: line, + col: col + }); + + }, + + _document: function() { + + var tokenStream = this._tokenStream, + token, + functions = [], + prefix = ""; + + tokenStream.mustMatch(Tokens.DOCUMENT_SYM); + token = tokenStream.token(); + if (/^@-([^-]+)-/.test(token.value)) { + prefix = RegExp.$1; + } + + this._readWhitespace(); + functions.push(this._document_function()); + + while (tokenStream.match(Tokens.COMMA)) { + this._readWhitespace(); + functions.push(this._document_function()); + } + + tokenStream.mustMatch(Tokens.LBRACE); + this._readWhitespace(); + + this.fire({ + type: "startdocument", + functions: functions, + prefix: prefix, + line: token.startLine, + col: token.startCol + }); + + var ok = true; + while (ok) { + switch (tokenStream.peek()) { + case Tokens.PAGE_SYM: + this._page(); + break; + case Tokens.FONT_FACE_SYM: + this._font_face(); + break; + case Tokens.VIEWPORT_SYM: + this._viewport(); + break; + case Tokens.MEDIA_SYM: + this._media(); + break; + case Tokens.KEYFRAMES_SYM: + this._keyframes(); + break; + case Tokens.DOCUMENT_SYM: + this._document(); + break; + default: + ok = Boolean(this._ruleset()); + } + } + + tokenStream.mustMatch(Tokens.RBRACE); + token = tokenStream.token(); + this._readWhitespace(); + + this.fire({ + type: "enddocument", + functions: functions, + prefix: prefix, + line: token.startLine, + col: token.startCol + }); + }, + + _document_function: function() { + + var tokenStream = this._tokenStream, + value; + + if (tokenStream.match(Tokens.URI)) { + value = tokenStream.token().value; + this._readWhitespace(); + } else { + value = this._function(); + } + + return value; + }, + + _operator: function(inFunction) { + + var tokenStream = this._tokenStream, + token = null; + + if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) || + inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS])) { + token = tokenStream.token(); + this._readWhitespace(); + } + return token ? PropertyValuePart.fromToken(token) : null; + + }, + + _combinator: function() { + + var tokenStream = this._tokenStream, + value = null, + token; + + if (tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])) { + token = tokenStream.token(); + value = new Combinator(token.value, token.startLine, token.startCol); + this._readWhitespace(); + } + + return value; + }, + + _unary_operator: function() { + + var tokenStream = this._tokenStream; + + if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])) { + return tokenStream.token().value; + } else { + return null; + } + }, + + _property: function() { + + var tokenStream = this._tokenStream, + value = null, + hack = null, + propertyName = "", + token, + line, + col; + if (tokenStream.peek() === Tokens.STAR && this.options.starHack) { + tokenStream.get(); + token = tokenStream.token(); + hack = token.value; + line = token.startLine; + col = token.startCol; + } + if (tokenStream.peek() === Tokens.MINUS) { + tokenStream.get(); + token = tokenStream.token(); + propertyName = token.value; + line = token.startLine; + col = token.startCol; + } + + if (tokenStream.match(Tokens.IDENT)) { + token = tokenStream.token(); + propertyName += token.value; + if (propertyName.charAt(0) === "_" && this.options.underscoreHack) { + hack = "_"; + propertyName = propertyName.substring(1); + } + + value = new PropertyName(propertyName, hack, line || token.startLine, col || token.startCol); + this._readWhitespace(); + } else { + var tt = tokenStream.peek(); + if (tt !== Tokens.EOF && tt !== Tokens.RBRACE) { + this._unexpectedToken(tokenStream.LT(1)); + } + } + + return value; + }, + _ruleset: function() { + + var tokenStream = this._tokenStream, + tt, + selectors; + try { + selectors = this._selectors_group(); + } catch (ex) { + if (ex instanceof SyntaxError && !this.options.strict) { + this.fire({ + type: "error", + error: ex, + message: ex.message, + line: ex.line, + col: ex.col + }); + tt = tokenStream.advance([Tokens.RBRACE]); + if (tt === Tokens.RBRACE) { + } else { + throw ex; + } + + } else { + throw ex; + } + return true; + } + if (selectors) { + + this.fire({ + type: "startrule", + selectors: selectors, + line: selectors[0].line, + col: selectors[0].col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endrule", + selectors: selectors, + line: selectors[0].line, + col: selectors[0].col + }); + + } + + return selectors; + + }, + _selectors_group: function() { + var tokenStream = this._tokenStream, + selectors = [], + selector; + + selector = this._selector(); + if (selector !== null) { + + selectors.push(selector); + while (tokenStream.match(Tokens.COMMA)) { + this._readWhitespace(); + selector = this._selector(); + if (selector !== null) { + selectors.push(selector); + } else { + this._unexpectedToken(tokenStream.LT(1)); + } + } + } + + return selectors.length ? selectors : null; + }, + _selector: function() { + + var tokenStream = this._tokenStream, + selector = [], + nextSelector = null, + combinator = null, + ws = null; + nextSelector = this._simple_selector_sequence(); + if (nextSelector === null) { + return null; + } + + selector.push(nextSelector); + + do { + combinator = this._combinator(); + + if (combinator !== null) { + selector.push(combinator); + nextSelector = this._simple_selector_sequence(); + if (nextSelector === null) { + this._unexpectedToken(tokenStream.LT(1)); + } else { + selector.push(nextSelector); + } + } else { + if (this._readWhitespace()) { + ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol); + combinator = this._combinator(); + nextSelector = this._simple_selector_sequence(); + if (nextSelector === null) { + if (combinator !== null) { + this._unexpectedToken(tokenStream.LT(1)); + } + } else { + + if (combinator !== null) { + selector.push(combinator); + } else { + selector.push(ws); + } + + selector.push(nextSelector); + } + } else { + break; + } + + } + } while (true); + + return new Selector(selector, selector[0].line, selector[0].col); + }, + _simple_selector_sequence: function() { + + var tokenStream = this._tokenStream, + elementName = null, + modifiers = [], + selectorText = "", + components = [ + function() { + return tokenStream.match(Tokens.HASH) ? + new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : + null; + }, + this._class, + this._attrib, + this._pseudo, + this._negation + ], + i = 0, + len = components.length, + component = null, + line, + col; + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol; + + elementName = this._type_selector(); + if (!elementName) { + elementName = this._universal(); + } + + if (elementName !== null) { + selectorText += elementName; + } + + while (true) { + if (tokenStream.peek() === Tokens.S) { + break; + } + while (i < len && component === null) { + component = components[i++].call(this); + } + + if (component === null) { + if (selectorText === "") { + return null; + } else { + break; + } + } else { + i = 0; + modifiers.push(component); + selectorText += component.toString(); + component = null; + } + } + + + return selectorText !== "" ? + new SelectorPart(elementName, modifiers, selectorText, line, col) : + null; + }, + _type_selector: function() { + + var tokenStream = this._tokenStream, + ns = this._namespace_prefix(), + elementName = this._element_name(); + + if (!elementName) { + if (ns) { + tokenStream.unget(); + if (ns.length > 1) { + tokenStream.unget(); + } + } + + return null; + } else { + if (ns) { + elementName.text = ns + elementName.text; + elementName.col -= ns.length; + } + return elementName; + } + }, + _class: function() { + + var tokenStream = this._tokenStream, + token; + + if (tokenStream.match(Tokens.DOT)) { + tokenStream.mustMatch(Tokens.IDENT); + token = tokenStream.token(); + return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1); + } else { + return null; + } + + }, + _element_name: function() { + + var tokenStream = this._tokenStream, + token; + + if (tokenStream.match(Tokens.IDENT)) { + token = tokenStream.token(); + return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol); + + } else { + return null; + } + }, + _namespace_prefix: function() { + var tokenStream = this._tokenStream, + value = ""; + if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE) { + + if (tokenStream.match([Tokens.IDENT, Tokens.STAR])) { + value += tokenStream.token().value; + } + + tokenStream.mustMatch(Tokens.PIPE); + value += "|"; + + } + + return value.length ? value : null; + }, + _universal: function() { + var tokenStream = this._tokenStream, + value = "", + ns; + + ns = this._namespace_prefix(); + if (ns) { + value += ns; + } + + if (tokenStream.match(Tokens.STAR)) { + value += "*"; + } + + return value.length ? value : null; + + }, + _attrib: function() { + + var tokenStream = this._tokenStream, + value = null, + ns, + token; + + if (tokenStream.match(Tokens.LBRACKET)) { + token = tokenStream.token(); + value = token.value; + value += this._readWhitespace(); + + ns = this._namespace_prefix(); + + if (ns) { + value += ns; + } + + tokenStream.mustMatch(Tokens.IDENT); + value += tokenStream.token().value; + value += this._readWhitespace(); + + if (tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH, + Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])) { + + value += tokenStream.token().value; + value += this._readWhitespace(); + + tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); + value += tokenStream.token().value; + value += this._readWhitespace(); + } + + tokenStream.mustMatch(Tokens.RBRACKET); + + return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol); + } else { + return null; + } + }, + _pseudo: function() { + + var tokenStream = this._tokenStream, + pseudo = null, + colons = ":", + line, + col; + + if (tokenStream.match(Tokens.COLON)) { + + if (tokenStream.match(Tokens.COLON)) { + colons += ":"; + } + + if (tokenStream.match(Tokens.IDENT)) { + pseudo = tokenStream.token().value; + line = tokenStream.token().startLine; + col = tokenStream.token().startCol - colons.length; + } else if (tokenStream.peek() === Tokens.FUNCTION) { + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol - colons.length; + pseudo = this._functional_pseudo(); + } + + if (pseudo) { + pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col); + } else { + var startLine = tokenStream.LT(1).startLine, + startCol = tokenStream.LT(0).startCol; + throw new SyntaxError("Expected a `FUNCTION` or `IDENT` after colon at line " + startLine + ", col " + startCol + ".", startLine, startCol); + } + } + + return pseudo; + }, + _functional_pseudo: function() { + + var tokenStream = this._tokenStream, + value = null; + + if (tokenStream.match(Tokens.FUNCTION)) { + value = tokenStream.token().value; + value += this._readWhitespace(); + value += this._expression(); + tokenStream.mustMatch(Tokens.RPAREN); + value += ")"; + } + + return value; + }, + _expression: function() { + + var tokenStream = this._tokenStream, + value = ""; + + while (tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION, + Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH, + Tokens.FREQ, Tokens.ANGLE, Tokens.TIME, + Tokens.RESOLUTION, Tokens.SLASH])) { + + value += tokenStream.token().value; + value += this._readWhitespace(); + } + + return value.length ? value : null; + + }, + _negation: function() { + + var tokenStream = this._tokenStream, + line, + col, + value = "", + arg, + subpart = null; + + if (tokenStream.match(Tokens.NOT)) { + value = tokenStream.token().value; + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + value += this._readWhitespace(); + arg = this._negation_arg(); + value += arg; + value += this._readWhitespace(); + tokenStream.match(Tokens.RPAREN); + value += tokenStream.token().value; + + subpart = new SelectorSubPart(value, "not", line, col); + subpart.args.push(arg); + } + + return subpart; + }, + _negation_arg: function() { + + var tokenStream = this._tokenStream, + args = [ + this._type_selector, + this._universal, + function() { + return tokenStream.match(Tokens.HASH) ? + new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : + null; + }, + this._class, + this._attrib, + this._pseudo + ], + arg = null, + i = 0, + len = args.length, + line, + col, + part; + + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol; + + while (i < len && arg === null) { + + arg = args[i].call(this); + i++; + } + if (arg === null) { + this._unexpectedToken(tokenStream.LT(1)); + } + if (arg.type === "elementName") { + part = new SelectorPart(arg, [], arg.toString(), line, col); + } else { + part = new SelectorPart(null, [arg], arg.toString(), line, col); + } + + return part; + }, + + _declaration: function() { + + var tokenStream = this._tokenStream, + property = null, + expr = null, + prio = null, + invalid = null, + propertyName = ""; + + property = this._property(); + if (property !== null) { + + tokenStream.mustMatch(Tokens.COLON); + this._readWhitespace(); + + expr = this._expr(); + if (!expr || expr.length === 0) { + this._unexpectedToken(tokenStream.LT(1)); + } + + prio = this._prio(); + propertyName = property.toString(); + if (this.options.starHack && property.hack === "*" || + this.options.underscoreHack && property.hack === "_") { + + propertyName = property.text; + } + + try { + this._validateProperty(propertyName, expr); + } catch (ex) { + invalid = ex; + } + + this.fire({ + type: "property", + property: property, + value: expr, + important: prio, + line: property.line, + col: property.col, + invalid: invalid + }); + + return true; + } else { + return false; + } + }, + + _prio: function() { + + var tokenStream = this._tokenStream, + result = tokenStream.match(Tokens.IMPORTANT_SYM); + + this._readWhitespace(); + return result; + }, + + _expr: function(inFunction) { + + var values = [], + value = null, + operator = null; + + value = this._term(inFunction); + if (value !== null) { + + values.push(value); + + do { + operator = this._operator(inFunction); + if (operator) { + values.push(operator); + } /*else { + values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col)); + valueParts = []; + }*/ + + value = this._term(inFunction); + + if (value === null) { + break; + } else { + values.push(value); + } + } while (true); + } + + return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null; + }, + + _term: function(inFunction) { + + var tokenStream = this._tokenStream, + unary = null, + value = null, + endChar = null, + part = null, + token, + line, + col; + unary = this._unary_operator(); + if (unary !== null) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + if (tokenStream.peek() === Tokens.IE_FUNCTION && this.options.ieFilters) { + + value = this._ie_function(); + if (unary === null) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])) { + + token = tokenStream.token(); + endChar = token.endChar; + value = token.value + this._expr(inFunction).text; + if (unary === null) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + } + tokenStream.mustMatch(Tokens.type(endChar)); + value += endChar; + this._readWhitespace(); + } else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH, + Tokens.ANGLE, Tokens.TIME, + Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])) { + + value = tokenStream.token().value; + if (unary === null) { + line = tokenStream.token().startLine; + col = tokenStream.token().startCol; + part = PropertyValuePart.fromToken(tokenStream.token()); + } + this._readWhitespace(); + } else { + token = this._hexcolor(); + if (token === null) { + if (unary === null) { + line = tokenStream.LT(1).startLine; + col = tokenStream.LT(1).startCol; + } + if (value === null) { + if (tokenStream.LA(3) === Tokens.EQUALS && this.options.ieFilters) { + value = this._ie_function(); + } else { + value = this._function(); + } + } + + } else { + value = token.value; + if (unary === null) { + line = token.startLine; + col = token.startCol; + } + } + + } + + return part !== null ? part : value !== null ? + new PropertyValuePart(unary !== null ? unary + value : value, line, col) : + null; + + }, + + _function: function() { + + var tokenStream = this._tokenStream, + functionText = null, + expr = null, + lt; + + if (tokenStream.match(Tokens.FUNCTION)) { + functionText = tokenStream.token().value; + this._readWhitespace(); + expr = this._expr(true); + functionText += expr; + if (this.options.ieFilters && tokenStream.peek() === Tokens.EQUALS) { + do { + + if (this._readWhitespace()) { + functionText += tokenStream.token().value; + } + if (tokenStream.LA(0) === Tokens.COMMA) { + functionText += tokenStream.token().value; + } + + tokenStream.match(Tokens.IDENT); + functionText += tokenStream.token().value; + + tokenStream.match(Tokens.EQUALS); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) { + tokenStream.get(); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + } + } while (tokenStream.match([Tokens.COMMA, Tokens.S])); + } + + tokenStream.match(Tokens.RPAREN); + functionText += ")"; + this._readWhitespace(); + } + + return functionText; + }, + + _ie_function: function() { + + var tokenStream = this._tokenStream, + functionText = null, + lt; + if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])) { + functionText = tokenStream.token().value; + + do { + + if (this._readWhitespace()) { + functionText += tokenStream.token().value; + } + if (tokenStream.LA(0) === Tokens.COMMA) { + functionText += tokenStream.token().value; + } + + tokenStream.match(Tokens.IDENT); + functionText += tokenStream.token().value; + + tokenStream.match(Tokens.EQUALS); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) { + tokenStream.get(); + functionText += tokenStream.token().value; + lt = tokenStream.peek(); + } + } while (tokenStream.match([Tokens.COMMA, Tokens.S])); + + tokenStream.match(Tokens.RPAREN); + functionText += ")"; + this._readWhitespace(); + } + + return functionText; + }, + + _hexcolor: function() { + + var tokenStream = this._tokenStream, + token = null, + color; + + if (tokenStream.match(Tokens.HASH)) { + + token = tokenStream.token(); + color = token.value; + if (!/#[a-f0-9]{3,6}/i.test(color)) { + throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); + } + this._readWhitespace(); + } + + return token; + }, + + _keyframes: function() { + var tokenStream = this._tokenStream, + token, + tt, + name, + prefix = ""; + + tokenStream.mustMatch(Tokens.KEYFRAMES_SYM); + token = tokenStream.token(); + if (/^@-([^-]+)-/.test(token.value)) { + prefix = RegExp.$1; + } + + this._readWhitespace(); + name = this._keyframe_name(); + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.LBRACE); + + this.fire({ + type: "startkeyframes", + name: name, + prefix: prefix, + line: token.startLine, + col: token.startCol + }); + + this._readWhitespace(); + tt = tokenStream.peek(); + while (tt === Tokens.IDENT || tt === Tokens.PERCENTAGE) { + this._keyframe_rule(); + this._readWhitespace(); + tt = tokenStream.peek(); + } + + this.fire({ + type: "endkeyframes", + name: name, + prefix: prefix, + line: token.startLine, + col: token.startCol + }); + + this._readWhitespace(); + tokenStream.mustMatch(Tokens.RBRACE); + this._readWhitespace(); + + }, + + _keyframe_name: function() { + var tokenStream = this._tokenStream; + + tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); + return SyntaxUnit.fromToken(tokenStream.token()); + }, + + _keyframe_rule: function() { + var keyList = this._key_list(); + + this.fire({ + type: "startkeyframerule", + keys: keyList, + line: keyList[0].line, + col: keyList[0].col + }); + + this._readDeclarations(true); + + this.fire({ + type: "endkeyframerule", + keys: keyList, + line: keyList[0].line, + col: keyList[0].col + }); + + }, + + _key_list: function() { + var tokenStream = this._tokenStream, + keyList = []; + keyList.push(this._key()); + + this._readWhitespace(); + + while (tokenStream.match(Tokens.COMMA)) { + this._readWhitespace(); + keyList.push(this._key()); + this._readWhitespace(); + } + + return keyList; + }, + + _key: function() { + + var tokenStream = this._tokenStream, + token; + + if (tokenStream.match(Tokens.PERCENTAGE)) { + return SyntaxUnit.fromToken(tokenStream.token()); + } else if (tokenStream.match(Tokens.IDENT)) { + token = tokenStream.token(); + + if (/from|to/i.test(token.value)) { + return SyntaxUnit.fromToken(token); + } + + tokenStream.unget(); + } + this._unexpectedToken(tokenStream.LT(1)); + }, + _skipCruft: function() { + while (this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])) { + } + }, + _readDeclarations: function(checkStart, readMargins) { + var tokenStream = this._tokenStream, + tt; + + + this._readWhitespace(); + + if (checkStart) { + tokenStream.mustMatch(Tokens.LBRACE); + } + + this._readWhitespace(); + + try { + + while (true) { + + if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())) { + } else if (this._declaration()) { + if (!tokenStream.match(Tokens.SEMICOLON)) { + break; + } + } else { + break; + } + this._readWhitespace(); + } + + tokenStream.mustMatch(Tokens.RBRACE); + this._readWhitespace(); + + } catch (ex) { + if (ex instanceof SyntaxError && !this.options.strict) { + this.fire({ + type: "error", + error: ex, + message: ex.message, + line: ex.line, + col: ex.col + }); + tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]); + if (tt === Tokens.SEMICOLON) { + this._readDeclarations(false, readMargins); + } else if (tt !== Tokens.EOF && tt !== Tokens.RBRACE) { + throw ex; + } + + } else { + throw ex; + } + } + + }, + _readWhitespace: function() { + + var tokenStream = this._tokenStream, + ws = ""; + + while (tokenStream.match(Tokens.S)) { + ws += tokenStream.token().value; + } + + return ws; + }, + _unexpectedToken: function(token) { + throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); + }, + _verifyEnd: function() { + if (this._tokenStream.LA(1) !== Tokens.EOF) { + this._unexpectedToken(this._tokenStream.LT(1)); + } + }, + _validateProperty: function(property, value) { + Validation.validate(property, value); + }, + + parse: function(input) { + this._tokenStream = new TokenStream(input, Tokens); + this._stylesheet(); + }, + + parseStyleSheet: function(input) { + return this.parse(input); + }, + + parseMediaQuery: function(input) { + this._tokenStream = new TokenStream(input, Tokens); + var result = this._media_query(); + this._verifyEnd(); + return result; + }, + parsePropertyValue: function(input) { + + this._tokenStream = new TokenStream(input, Tokens); + this._readWhitespace(); + + var result = this._expr(); + this._readWhitespace(); + this._verifyEnd(); + return result; + }, + parseRule: function(input) { + this._tokenStream = new TokenStream(input, Tokens); + this._readWhitespace(); + + var result = this._ruleset(); + this._readWhitespace(); + this._verifyEnd(); + return result; + }, + parseSelector: function(input) { + + this._tokenStream = new TokenStream(input, Tokens); + this._readWhitespace(); + + var result = this._selector(); + this._readWhitespace(); + this._verifyEnd(); + return result; + }, + parseStyleAttribute: function(input) { + input += "}"; // for error recovery in _readDeclarations() + this._tokenStream = new TokenStream(input, Tokens); + this._readDeclarations(); + } + }; + for (prop in additions) { + if (Object.prototype.hasOwnProperty.call(additions, prop)) { + proto[prop] = additions[prop]; + } + } + + return proto; +}(); + +},{"../util/EventTarget":23,"../util/SyntaxError":25,"../util/SyntaxUnit":26,"./Combinator":2,"./MediaFeature":4,"./MediaQuery":5,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./TokenStream":17,"./Tokens":18,"./Validation":19}],7:[function(require,module,exports){ + +"use strict"; + +var Properties = module.exports = { + __proto__: null, + "align-items" : "flex-start | flex-end | center | baseline | stretch", + "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", + "align-self" : "auto | flex-start | flex-end | center | baseline | stretch", + "all" : "initial | inherit | unset", + "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch", + "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", + "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch", + "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ", + "alignment-baseline" : "auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", + "animation" : 1, + "animation-delay" : "
-
+
-
+
-
+
-
+
@@ -72,17 +72,17 @@
-
+
-
+
-
+
-- 2.40.1 From fbf1ea63ad640be1d5026edc63537e07865842c7 Mon Sep 17 00:00:00 2001 From: Youssof Date: Thu, 31 Oct 2024 15:55:20 +0000 Subject: [PATCH 8/9] Add logic for pulling & building cockpit-docker --- .gitignore | 1 + ensure-cockpit.sh | 6 + reload-cockpit.sh | 1 + ui/cockpit-docker/.cockpit-ci/container | 1 - ui/cockpit-docker/.cockpit-ci/run | 1 - ui/cockpit-docker/.eslintignore | 2 - ui/cockpit-docker/.eslintrc.json | 55 - ui/cockpit-docker/.fmf/version | 1 - .../.github/ISSUE_TEMPLATE/bug_report.md | 31 - ui/cockpit-docker/.github/dependabot.yml | 38 - .../.github/workflows/dependabot.yml | 82 - .../.github/workflows/nightly.yml | 22 - .../.github/workflows/release.yml | 35 - .../workflows/tasks-container-update.yml | 37 - ui/cockpit-docker/.gitignore | 37 - ui/cockpit-docker/.gitmodules | 7 - ui/cockpit-docker/.stylelintrc.json | 39 - ui/cockpit-docker/HACKING.md | 107 - ui/cockpit-docker/LICENSE | 502 --- ui/cockpit-docker/Makefile | 217 -- ui/cockpit-docker/README.md | 86 - ui/cockpit-docker/build.js | 108 - .../me.chabad360.docker.metainfo.xml | 16 - ui/cockpit-docker/node-modules-fix.sh | 9 - ui/cockpit-docker/package.json | 61 - ui/cockpit-docker/packaging/debian/control | 22 - ui/cockpit-docker/packaging/debian/copyright | 38 - ui/cockpit-docker/packaging/debian/rules | 13 - .../packaging/debian/source/format | 1 - .../packaging/debian/source/lintian-overrides | 2 - .../packaging/debian/upstream/metadata | 4 - ui/cockpit-docker/packaging/debian/watch | 5 - ui/cockpit-docker/packit.yaml | 80 - ui/cockpit-docker/plans/all.fmf | 23 - ui/cockpit-docker/po/cs.po | 1510 --------- ui/cockpit-docker/po/de.po | 1505 --------- ui/cockpit-docker/po/es.po | 1489 --------- ui/cockpit-docker/po/fi.po | 1484 --------- ui/cockpit-docker/po/fr.po | 1529 ---------- ui/cockpit-docker/po/ja.po | 1467 --------- ui/cockpit-docker/po/ka.po | 1408 --------- ui/cockpit-docker/po/ko.po | 1461 --------- ui/cockpit-docker/po/pl.po | 1508 --------- ui/cockpit-docker/po/sk.po | 1553 ---------- ui/cockpit-docker/po/sv.po | 1484 --------- ui/cockpit-docker/po/tr.po | 1501 --------- ui/cockpit-docker/po/uk.po | 1522 --------- ui/cockpit-docker/po/zh_CN.po | 1479 --------- ui/cockpit-docker/pyproject.toml | 51 - .../src/ContainerCheckpointModal.jsx | 68 - .../src/ContainerCommitModal.jsx | 158 - .../src/ContainerDeleteModal.jsx | 42 - ui/cockpit-docker/src/ContainerDetails.jsx | 80 - ui/cockpit-docker/src/ContainerHeader.jsx | 22 - ui/cockpit-docker/src/ContainerHealthLogs.jsx | 158 - .../src/ContainerIntegration.jsx | 125 - ui/cockpit-docker/src/ContainerLogs.jsx | 174 -- .../src/ContainerRenameModal.jsx | 107 - .../src/ContainerRestoreModal.jsx | 74 - ui/cockpit-docker/src/ContainerTerminal.css | 7 - ui/cockpit-docker/src/ContainerTerminal.jsx | 265 -- ui/cockpit-docker/src/Containers.jsx | 611 ---- ui/cockpit-docker/src/Containers.scss | 93 - ui/cockpit-docker/src/Env.jsx | 96 - ui/cockpit-docker/src/ForceRemoveModal.jsx | 33 - ui/cockpit-docker/src/ImageDeleteModal.jsx | 121 - ui/cockpit-docker/src/ImageDetails.jsx | 47 - ui/cockpit-docker/src/ImageHistory.jsx | 64 - ui/cockpit-docker/src/ImageRunModal.jsx | 1114 ------- ui/cockpit-docker/src/ImageRunModal.scss | 47 - ui/cockpit-docker/src/ImageSearchModal.css | 59 - ui/cockpit-docker/src/ImageSearchModal.jsx | 212 -- ui/cockpit-docker/src/ImageUsedBy.jsx | 44 - ui/cockpit-docker/src/Images.css | 23 - ui/cockpit-docker/src/Images.jsx | 398 --- ui/cockpit-docker/src/Notification.jsx | 45 - .../src/PruneUnusedContainersModal.jsx | 96 - .../src/PruneUnusedImagesModal.jsx | 101 - ui/cockpit-docker/src/PublishPort.jsx | 142 - ui/cockpit-docker/src/Volume.jsx | 90 - ui/cockpit-docker/src/app.jsx | 617 ---- ui/cockpit-docker/src/client.js | 172 -- ui/cockpit-docker/src/docker.scss | 149 - ui/cockpit-docker/src/index.html | 36 - ui/cockpit-docker/src/index.js | 30 - ui/cockpit-docker/src/rest.js | 100 - ui/cockpit-docker/src/util.js | 214 -- ui/cockpit-docker/test/browser/browser.sh | 82 - ui/cockpit-docker/test/browser/main.fmf | 20 - ui/cockpit-docker/test/browser/run-test.sh | 54 - ui/cockpit-docker/test/check-application | 2714 ----------------- ui/cockpit-docker/test/reference-image | 1 - ui/cockpit-docker/test/run | 17 - ui/cockpit-docker/test/vm.install | 39 - ui/general/manifest.json | 2 +- .../docker/override.json} | 8 +- 96 files changed, 12 insertions(+), 31600 deletions(-) create mode 100644 .gitignore delete mode 100644 ui/cockpit-docker/.cockpit-ci/container delete mode 120000 ui/cockpit-docker/.cockpit-ci/run delete mode 100644 ui/cockpit-docker/.eslintignore delete mode 100644 ui/cockpit-docker/.eslintrc.json delete mode 100644 ui/cockpit-docker/.fmf/version delete mode 100644 ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 ui/cockpit-docker/.github/dependabot.yml delete mode 100644 ui/cockpit-docker/.github/workflows/dependabot.yml delete mode 100644 ui/cockpit-docker/.github/workflows/nightly.yml delete mode 100644 ui/cockpit-docker/.github/workflows/release.yml delete mode 100644 ui/cockpit-docker/.github/workflows/tasks-container-update.yml delete mode 100644 ui/cockpit-docker/.gitignore delete mode 100644 ui/cockpit-docker/.gitmodules delete mode 100644 ui/cockpit-docker/.stylelintrc.json delete mode 100644 ui/cockpit-docker/HACKING.md delete mode 100644 ui/cockpit-docker/LICENSE delete mode 100644 ui/cockpit-docker/Makefile delete mode 100644 ui/cockpit-docker/README.md delete mode 100755 ui/cockpit-docker/build.js delete mode 100644 ui/cockpit-docker/me.chabad360.docker.metainfo.xml delete mode 100755 ui/cockpit-docker/node-modules-fix.sh delete mode 100644 ui/cockpit-docker/package.json delete mode 100644 ui/cockpit-docker/packaging/debian/control delete mode 100644 ui/cockpit-docker/packaging/debian/copyright delete mode 100755 ui/cockpit-docker/packaging/debian/rules delete mode 100644 ui/cockpit-docker/packaging/debian/source/format delete mode 100644 ui/cockpit-docker/packaging/debian/source/lintian-overrides delete mode 100644 ui/cockpit-docker/packaging/debian/upstream/metadata delete mode 100644 ui/cockpit-docker/packaging/debian/watch delete mode 100644 ui/cockpit-docker/packit.yaml delete mode 100644 ui/cockpit-docker/plans/all.fmf delete mode 100644 ui/cockpit-docker/po/cs.po delete mode 100644 ui/cockpit-docker/po/de.po delete mode 100644 ui/cockpit-docker/po/es.po delete mode 100644 ui/cockpit-docker/po/fi.po delete mode 100644 ui/cockpit-docker/po/fr.po delete mode 100644 ui/cockpit-docker/po/ja.po delete mode 100644 ui/cockpit-docker/po/ka.po delete mode 100644 ui/cockpit-docker/po/ko.po delete mode 100644 ui/cockpit-docker/po/pl.po delete mode 100644 ui/cockpit-docker/po/sk.po delete mode 100644 ui/cockpit-docker/po/sv.po delete mode 100644 ui/cockpit-docker/po/tr.po delete mode 100644 ui/cockpit-docker/po/uk.po delete mode 100644 ui/cockpit-docker/po/zh_CN.po delete mode 100644 ui/cockpit-docker/pyproject.toml delete mode 100644 ui/cockpit-docker/src/ContainerCheckpointModal.jsx delete mode 100644 ui/cockpit-docker/src/ContainerCommitModal.jsx delete mode 100644 ui/cockpit-docker/src/ContainerDeleteModal.jsx delete mode 100644 ui/cockpit-docker/src/ContainerDetails.jsx delete mode 100644 ui/cockpit-docker/src/ContainerHeader.jsx delete mode 100644 ui/cockpit-docker/src/ContainerHealthLogs.jsx delete mode 100644 ui/cockpit-docker/src/ContainerIntegration.jsx delete mode 100644 ui/cockpit-docker/src/ContainerLogs.jsx delete mode 100644 ui/cockpit-docker/src/ContainerRenameModal.jsx delete mode 100644 ui/cockpit-docker/src/ContainerRestoreModal.jsx delete mode 100644 ui/cockpit-docker/src/ContainerTerminal.css delete mode 100644 ui/cockpit-docker/src/ContainerTerminal.jsx delete mode 100644 ui/cockpit-docker/src/Containers.jsx delete mode 100644 ui/cockpit-docker/src/Containers.scss delete mode 100644 ui/cockpit-docker/src/Env.jsx delete mode 100644 ui/cockpit-docker/src/ForceRemoveModal.jsx delete mode 100644 ui/cockpit-docker/src/ImageDeleteModal.jsx delete mode 100644 ui/cockpit-docker/src/ImageDetails.jsx delete mode 100644 ui/cockpit-docker/src/ImageHistory.jsx delete mode 100644 ui/cockpit-docker/src/ImageRunModal.jsx delete mode 100644 ui/cockpit-docker/src/ImageRunModal.scss delete mode 100644 ui/cockpit-docker/src/ImageSearchModal.css delete mode 100644 ui/cockpit-docker/src/ImageSearchModal.jsx delete mode 100644 ui/cockpit-docker/src/ImageUsedBy.jsx delete mode 100644 ui/cockpit-docker/src/Images.css delete mode 100644 ui/cockpit-docker/src/Images.jsx delete mode 100644 ui/cockpit-docker/src/Notification.jsx delete mode 100644 ui/cockpit-docker/src/PruneUnusedContainersModal.jsx delete mode 100644 ui/cockpit-docker/src/PruneUnusedImagesModal.jsx delete mode 100644 ui/cockpit-docker/src/PublishPort.jsx delete mode 100644 ui/cockpit-docker/src/Volume.jsx delete mode 100644 ui/cockpit-docker/src/app.jsx delete mode 100644 ui/cockpit-docker/src/client.js delete mode 100644 ui/cockpit-docker/src/docker.scss delete mode 100644 ui/cockpit-docker/src/index.html delete mode 100644 ui/cockpit-docker/src/index.js delete mode 100644 ui/cockpit-docker/src/rest.js delete mode 100644 ui/cockpit-docker/src/util.js delete mode 100755 ui/cockpit-docker/test/browser/browser.sh delete mode 100644 ui/cockpit-docker/test/browser/main.fmf delete mode 100644 ui/cockpit-docker/test/browser/run-test.sh delete mode 100755 ui/cockpit-docker/test/check-application delete mode 100644 ui/cockpit-docker/test/reference-image delete mode 100755 ui/cockpit-docker/test/run delete mode 100755 ui/cockpit-docker/test/vm.install rename ui/{cockpit-docker/src/manifest.json => overrides/docker/override.json} (55%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a8bddf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +cockpit-docker \ No newline at end of file diff --git a/ensure-cockpit.sh b/ensure-cockpit.sh index d1e866f..e9c076d 100755 --- a/ensure-cockpit.sh +++ b/ensure-cockpit.sh @@ -16,6 +16,12 @@ else $SUDO apt install cockpit -y fi +$SUDO apt install -y nodejs gettext make +$SUDO wget https://github.com/chabad360/cockpit-docker/releases/download/16/cockpit-docker-16.tar.xz +$SUDO tar xvf cockpit-docker-16.tar.xz +$SUDO cd cockpit-docker ; export NODE_ENV=production ; sudo make install PREFIX="/usr" +sudo systemctl restart cockpit.{socket,service} + # Change the port to 443/80 and restart $SUDO sed -i 's/9090/443/g' /lib/systemd/system/cockpit.socket $SUDO sed -i '/ListenStream=80/d' /lib/systemd/system/cockpit.socket diff --git a/reload-cockpit.sh b/reload-cockpit.sh index 795abda..00ea518 100755 --- a/reload-cockpit.sh +++ b/reload-cockpit.sh @@ -21,6 +21,7 @@ cp -rf ui/general/* /usr/share/cockpit/general/ cp -rf ui/branding-ubuntu/* /usr/share/cockpit/branding/ubuntu/ cp -rf ui/static/* /usr/share/cockpit/static/ cp -rf ui/base1/* /usr/share/cockpit/base1/ +cp -rf ui/overrides/* /usr/share/cockpit/ [ -d $LOCAL/echopilot ] || mkdir $LOCAL/echopilot install -Dm755 version.txt $LOCAL/echopilot/. diff --git a/ui/cockpit-docker/.cockpit-ci/container b/ui/cockpit-docker/.cockpit-ci/container deleted file mode 100644 index 218f87f..0000000 --- a/ui/cockpit-docker/.cockpit-ci/container +++ /dev/null @@ -1 +0,0 @@ -ghcr.io/cockpit-project/tasks:2024-04-08 diff --git a/ui/cockpit-docker/.cockpit-ci/run b/ui/cockpit-docker/.cockpit-ci/run deleted file mode 120000 index 40892d3..0000000 --- a/ui/cockpit-docker/.cockpit-ci/run +++ /dev/null @@ -1 +0,0 @@ -cockpit-docker/../test/run \ No newline at end of file diff --git a/ui/cockpit-docker/.eslintignore b/ui/cockpit-docker/.eslintignore deleted file mode 100644 index 85f5a45..0000000 --- a/ui/cockpit-docker/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -pkg/lib/* diff --git a/ui/cockpit-docker/.eslintrc.json b/ui/cockpit-docker/.eslintrc.json deleted file mode 100644 index dd1624f..0000000 --- a/ui/cockpit-docker/.eslintrc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es2022": true - }, - "extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react", "plugin:jsx-a11y/recommended"], - "parserOptions": { - "ecmaVersion": 2022 - }, - "plugins": ["react", "react-hooks", "jsx-a11y"], - "rules": { - "indent": ["error", 4, - { - "ObjectExpression": "first", - "CallExpression": {"arguments": "first"}, - "MemberExpression": 2, - "ignoredNodes": [ "JSXAttribute" ] - }], - "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }], - "no-var": "error", - "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], - "prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }], - "react/jsx-indent": ["error", 4], - "semi": ["error", "always", { "omitLastInOneLineBlock": true }], - - "camelcase": "off", - "comma-dangle": "off", - "curly": "off", - "jsx-quotes": "off", - "no-console": "off", - "no-undef": "error", - "quotes": "off", - "react/jsx-curly-spacing": "off", - "react/jsx-indent-props": "off", - "react/jsx-closing-bracket-location": "off", - "react/jsx-closing-tag-location": "off", - "react/jsx-first-prop-new-line": "off", - "react/jsx-curly-newline": "off", - "react/jsx-handler-names": "off", - "react/prop-types": "off", - "react/jsx-no-useless-fragment": "error", - "space-before-function-paren": "off", - "standard/no-callback-literal": "off", - - "jsx-a11y/anchor-is-valid": "off", - - "eqeqeq": "off", - "react/jsx-no-bind": "off" - }, - "globals": { - "require": false, - "module": false - } -} diff --git a/ui/cockpit-docker/.fmf/version b/ui/cockpit-docker/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/ui/cockpit-docker/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md b/ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index a649814..0000000 --- a/ui/cockpit-docker/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug report -about: For bugs and general problems -title: -labels: 'bug' -assignees: '' - ---- - -Cockpit version: xxx -Cockpit-docker version: xxx -Docker version: xxx -OS: - - - - - -Steps to reproduce - -1. -2. -3. - - diff --git a/ui/cockpit-docker/.github/dependabot.yml b/ui/cockpit-docker/.github/dependabot.yml deleted file mode 100644 index a6ca0d0..0000000 --- a/ui/cockpit-docker/.github/dependabot.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - # run these when most of our developers don't work, don't DoS our CI over the day - time: "22:00" - timezone: "Europe/Berlin" - open-pull-requests-limit: 3 - commit-message: - prefix: "[no-test]" - labels: - - "node_modules" - groups: - eslint: - patterns: - - "eslint*" - esbuild: - patterns: - - "esbuild*" - stylelint: - patterns: - - "stylelint*" - xterm: - patterns: - - "xterm*" - patternfly: - patterns: - - "@patternfly*" - - - package-ecosystem: "github-actions" - directory: "/" - open-pull-requests-limit: 3 - labels: - - "no-test" - schedule: - interval: "weekly" diff --git a/ui/cockpit-docker/.github/workflows/dependabot.yml b/ui/cockpit-docker/.github/workflows/dependabot.yml deleted file mode 100644 index 0ab8975..0000000 --- a/ui/cockpit-docker/.github/workflows/dependabot.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: update node_modules -on: - pull_request_target: - types: [opened, reopened, synchronize, labeled] - -jobs: - dependabot: - environment: npm-update - permissions: - contents: read - pull-requests: write - timeout-minutes: 5 - # 22.04's podman has issues with piping and causes tar errors - runs-on: ubuntu-20.04 - if: ${{ contains(github.event.pull_request.labels.*.name, 'node_modules') }} - - steps: - - name: Clone repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - fetch-depth: 0 - - - name: Clear node_modules label - uses: actions/github-script@v7 - with: - script: | - try { - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - name: 'node_modules' - }); - } catch (e) { - if (e.name == 'HttpError' && e.status == 404) { - /* expected: 404 if label is unset */ - } else { - throw e; - } - } - - - name: Update node_modules for package.json changes - run: | - make tools/node-modules - git config --global user.name "GitHub Workflow" - git config --global user.email "cockpituous@cockpit-project.org" - eval $(ssh-agent) - ssh-add - <<< '${{ secrets.NODE_CACHE_DEPLOY_KEY }}' - ./tools/node-modules install - ./tools/node-modules push - git add node_modules - ssh-add -D - ssh-agent -k - - - name: Clear [no-test] prefix from PR title - if: ${{ contains(github.event.pull_request.title, '[no-test]') }} - uses: actions/github-script@v7 - env: - TITLE: '${{ github.event.pull_request.title }}' - with: - script: | - const title = process.env['TITLE'].replace(/\[no-test\]\W+ /, '') - await github.rest.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - title, - }); - - - name: Force push node_modules update - run: | - # Dependabot prefixes the commit with [no-test] which we don't want to keep in the commit - title=$(git show --pretty="%s" -s | sed -E "s/\[no-test\]\W+ //") - body=$(git show -s --pretty="%b") - git commit --amend -m "${title}" -m "${body}" --no-edit node_modules - eval $(ssh-agent) - ssh-add - <<< '${{ secrets.SELF_DEPLOY_KEY }}' - git push --force 'git@github.com:${{ github.repository }}' '${{ github.head_ref }}' - ssh-add -D - ssh-agent -k diff --git a/ui/cockpit-docker/.github/workflows/nightly.yml b/ui/cockpit-docker/.github/workflows/nightly.yml deleted file mode 100644 index ec7a633..0000000 --- a/ui/cockpit-docker/.github/workflows/nightly.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: nightly -on: - schedule: - - cron: '0 1 * * *' - # can be run manually on https://github.com/cockpit-project/cockpit-podman/actions - workflow_dispatch: -jobs: - trigger: - permissions: - statuses: write - runs-on: ubuntu-22.04 - steps: - - name: Clone repository - uses: actions/checkout@v4 - - - name: Trigger updates-testing scenario - run: | - make bots - mkdir -p ~/.config/cockpit-dev - echo "${{ github.token }}" >> ~/.config/cockpit-dev/github-token - TEST_OS=$(PYTHONPATH=bots python3 -c 'from lib.constants import TEST_OS_DEFAULT; print(TEST_OS_DEFAULT)') - bots/tests-trigger --force "-" "${TEST_OS}/updates-testing" "${TEST_OS}/docker-next" diff --git a/ui/cockpit-docker/.github/workflows/release.yml b/ui/cockpit-docker/.github/workflows/release.yml deleted file mode 100644 index 0ddfe21..0000000 --- a/ui/cockpit-docker/.github/workflows/release.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: release -on: - push: - tags: - # this is a glob, not a regexp - - '[0-9]*' -jobs: - source: - runs-on: ubuntu-latest - container: - image: ghcr.io/cockpit-project/tasks:latest - options: --user root - permissions: - # create GitHub release - contents: write - steps: - - name: Clone repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # https://github.blog/2022-04-12-git-security-vulnerability-announced/ - - name: Pacify git's permission check - run: git config --global --add safe.directory /__w/cockpit-docker/cockpit-docker - - - name: Workaround for https://github.com/actions/checkout/pull/697 - run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags) - - - name: Build release - run: make dist - - - name: Publish GitHub release - uses: cockpit-project/action-release@7d2e2657382e8d34f88a24b5987f2b81ea165785 - with: - filename: "cockpit-docker-${{ github.ref_name }}.tar.xz" diff --git a/ui/cockpit-docker/.github/workflows/tasks-container-update.yml b/ui/cockpit-docker/.github/workflows/tasks-container-update.yml deleted file mode 100644 index 8473ac6..0000000 --- a/ui/cockpit-docker/.github/workflows/tasks-container-update.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: tasks-container-update -on: - schedule: - - cron: '0 2 * * 1' - # can be run manually on https://github.com/cockpit-project/cockpit-podman/actions - workflow_dispatch: -jobs: - tasks-container-update: - environment: self - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - statuses: write - container: - image: ghcr.io/cockpit-project/tasks - options: --user root - steps: - - name: Set up configuration and secrets - run: | - printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig - mkdir -p ~/.config - echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token - - - name: Clone repository - uses: actions/checkout@v4 - with: - ssh-key: ${{ secrets.DEPLOY_KEY }} - - # https://github.blog/2022-04-12-git-security-vulnerability-announced/ - - name: Pacify git's permission check - run: git config --global --add safe.directory /__w/cockpit-docker/cockpit-docker - - - name: Run tasks-container-update - run: | - make bots - bots/tasks-container-update diff --git a/ui/cockpit-docker/.gitignore b/ui/cockpit-docker/.gitignore deleted file mode 100644 index 841ffcc..0000000 --- a/ui/cockpit-docker/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# Please keep this file sorted (LC_COLLATE=C.UTF-8), -# grouped into the 3 categories below: -# - general patterns (match in all directories) -# - patterns to match files at the toplevel -# - patterns to match files in subdirs - -# general patterns -*.pyc -*.rpm - -# toplevel (/...) -/Test*.html -/Test*.json -/Test*.log -/Test*.log.gz -/Test*.png -/*.whl -/bots -/cockpit-*.tar.xz -/cockpit-docker.spec -/dist/ -/package-lock.json -/pkg/ -/tmp/ -/tools/ -/node_modules/ -/.idea/ -/.vscode/ - -# subdirs (/subdir/...) -/packaging/arch/PKGBUILD -/packaging/debian/changelog -/po/*.pot -/po/LINGUAS -/test/common/ -/test/images/ -/test/static-code diff --git a/ui/cockpit-docker/.gitmodules b/ui/cockpit-docker/.gitmodules deleted file mode 100644 index 2ca4fcf..0000000 --- a/ui/cockpit-docker/.gitmodules +++ /dev/null @@ -1,7 +0,0 @@ -[submodule "test/reference"] - path = test/reference - url = https://github.com/cockpit-project/pixel-test-reference - branch = empty -[submodule "node_modules"] - path = node_modules - url = https://github.com/cockpit-project/node-cache.git diff --git a/ui/cockpit-docker/.stylelintrc.json b/ui/cockpit-docker/.stylelintrc.json deleted file mode 100644 index 67a29f0..0000000 --- a/ui/cockpit-docker/.stylelintrc.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "extends": "stylelint-config-standard-scss", - "plugins": [ - "stylelint-use-logical-spec" - ], - "rules": { - "at-rule-empty-line-before": null, - "declaration-empty-line-before": null, - "custom-property-empty-line-before": null, - "comment-empty-line-before": null, - "scss/double-slash-comment-empty-line-before": null, - "scss/dollar-variable-colon-space-after": null, - - "custom-property-pattern": null, - "declaration-block-no-duplicate-properties": null, - "declaration-block-no-redundant-longhand-properties": null, - "declaration-block-no-shorthand-property-overrides": null, - "declaration-block-single-line-max-declarations": null, - "font-family-no-duplicate-names": null, - "function-url-quotes": null, - "keyframes-name-pattern": null, - "media-feature-range-notation": "prefix", - "no-descending-specificity": null, - "no-duplicate-selectors": null, - "scss/at-extend-no-missing-placeholder": null, - "scss/at-import-partial-extension": null, - "scss/at-import-no-partial-leading-underscore": null, - "scss/load-no-partial-leading-underscore": true, - "scss/at-mixin-pattern": null, - "scss/comment-no-empty": null, - "scss/dollar-variable-pattern": null, - "scss/double-slash-comment-whitespace-inside": null, - "scss/no-global-function-names": null, - "scss/operator-no-unspaced": null, - "selector-class-pattern": null, - "selector-id-pattern": null, - "liberty/use-logical-spec": "always" - } -} diff --git a/ui/cockpit-docker/HACKING.md b/ui/cockpit-docker/HACKING.md deleted file mode 100644 index 58a0898..0000000 --- a/ui/cockpit-docker/HACKING.md +++ /dev/null @@ -1,107 +0,0 @@ -# Hacking on Cockpit docker - -The commands here assume you're in the top level of the Cockpit docker git -repository checkout. - -## Running out of git checkout - -For development, you usually want to run your module straight out of the git -tree. To do that, run `make devel-install`, which links your checkout to the -location were `cockpit-bridge` looks for packages. If you prefer to do this -manually: - -``` -mkdir -p ~/.local/share/cockpit -ln -s `pwd`/dist ~/.local/share/cockpit/docker -``` - -After changing the code and running `make` again, reload the Cockpit page in -your browser. - -You can also use -[watch mode](https://esbuild.github.io/api/#watch) to -automatically update the bundle on every code change with - - $ make watch - -When developing against a virtual machine, watch mode can also automatically upload -the code changes by setting the `RSYNC` environment variable to -the remote hostname. - - $ RSYNC=c make watch - -When developing against a remote host as a normal user, `RSYNC_DEVEL` can be -set to upload code changes to `~/.local/share/cockpit/` instead of -`/usr/local`. - - $ RSYNC_DEVEL=example.com make watch - -## Running eslint - -Cockpit docker uses [ESLint](https://eslint.org/) to automatically check -JavaScript code style in `.jsx` and `.js` files. - -eslint is executed as part of `test/static-code`, aka. `make codecheck`. - -For developer convenience, the ESLint can be started explicitly by: - - $ npm run eslint - -Violations of some rules can be fixed automatically by: - - $ npm run eslint:fix - -Rules configuration can be found in the `.eslintrc.json` file. - -## Running stylelint - -Cockpit uses [Stylelint](https://stylelint.io/) to automatically check CSS code -style in `.css` and `scss` files. - -styleint is executed as part of `test/static-code`, aka. `make codecheck`. - -For developer convenience, the Stylelint can be started explicitly by: - - $ npm run stylelint - -Violations of some rules can be fixed automatically by: - - $ npm run stylelint:fix - -Rules configuration can be found in the `.stylelintrc.json` file. - -# Running tests locally - -Run `make vm` to build an RPM and install it into a standard Cockpit test VM. -This will be `fedora-39` by default. You can set `$TEST_OS` to use a different -image, for example - - TEST_OS=centos-8-stream make vm - -Then run - - make test/common - -to pull in [Cockpit's shared test API](https://github.com/cockpit-project/cockpit/tree/main/test/common) -for running Chrome DevTools Protocol based browser tests. - -With this preparation, you can manually run a single test without -rebuilding the VM, possibly with extra options for tracing and halting on test -failures (for interactive debugging): - - TEST_OS=... test/check-application TestApplication.testRunImageSystem -stv - -Use this command to list all known tests: - - test/check-application -l - -You can also run all of the tests: - - TEST_OS=centos-8-stream make check - -However, this is rather expensive, and most of the time it's better to let the -CI machinery do this on a draft pull request. - -Please see [Cockpit's test documentation](https://github.com/cockpit-project/cockpit/blob/main/test/README.md) -for details how to run against existing VMs, interactive browser window, -interacting with the test VM, and more. diff --git a/ui/cockpit-docker/LICENSE b/ui/cockpit-docker/LICENSE deleted file mode 100644 index 4362b49..0000000 --- a/ui/cockpit-docker/LICENSE +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/ui/cockpit-docker/Makefile b/ui/cockpit-docker/Makefile deleted file mode 100644 index af04f76..0000000 --- a/ui/cockpit-docker/Makefile +++ /dev/null @@ -1,217 +0,0 @@ -# extract name from package.json -PACKAGE_NAME := $(shell awk '/"name":/ {gsub(/[",]/, "", $$2); print $$2}' package.json) -RPM_NAME := cockpit-$(PACKAGE_NAME) -VERSION := $(shell T=$$(git describe --tags 2>/dev/null) || T=1; echo $$T | tr '-' '.') -ifeq ($(TEST_OS),) -TEST_OS = fedora-39 -endif -export TEST_OS -TARFILE=$(RPM_NAME)-$(VERSION).tar.xz -NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz -SPEC=$(RPM_NAME).spec -PREFIX ?= /usr/local -APPSTREAMFILE=me.chabad360.$(PACKAGE_NAME).metainfo.xml -VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) -# stamp file to check for node_modules/ -NODE_MODULES_TEST=package-lock.json -# one example file in dist/ from bundler to check if that already ran -DIST_TEST=dist/manifest.json -# one example file in pkg/lib to check if it was already checked out -COCKPIT_REPO_STAMP=pkg/lib/cockpit-po-plugin.js -# common arguments for tar, mostly to make the generated tarballs reproducible -TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0 - -VM_CUSTOMIZE_FLAGS = - -# HACK: https://github.com/containers/podman/issues/21896 -VM_CUSTOMIZE_FLAGS += --run-command 'nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1 >&2' - -# the following scenarios need network access -ifeq ("$(TEST_SCENARIO)","updates-testing") -VM_CUSTOMIZE_FLAGS += --run-command 'dnf -y update --setopt=install_weak_deps=False --enablerepo=updates-testing >&2' -else ifeq ("$(TEST_SCENARIO)","docker-next") -VM_CUSTOMIZE_FLAGS += --run-command 'dnf -y copr enable rhcontainerbot/docker-next >&2; dnf -y update --repo "copr*" >&2' -else -# default scenario does not install packages -VM_CUSTOMIZE_FLAGS += --no-network -endif - -ifeq ($(TEST_COVERAGE),yes) -RUN_TESTS_OPTIONS+=--coverage -NODE_ENV=development -endif - -all: $(DIST_TEST) - -# checkout common files from Cockpit repository required to build this project; -# this has no API stability guarantee, so check out a stable tag when you start -# a new project, use the latest release, and update it from time to time -COCKPIT_REPO_FILES = \ - pkg/lib \ - test/common \ - test/static-code \ - tools/node-modules \ - $(NULL) - -COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = d39255f6f768cc1c37a5786be8e8dc9d8f4d5ed2 # 315 + 83 commits - -$(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) -COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' -$(COCKPIT_REPO_STAMP): Makefile - @git rev-list --quiet --objects $(COCKPIT_REPO_TREE) -- 2>/dev/null || \ - git fetch --no-tags --no-write-fetch-head --depth=1 $(COCKPIT_REPO_URL) $(COCKPIT_REPO_COMMIT) - git archive $(COCKPIT_REPO_TREE) -- $(COCKPIT_REPO_FILES) | tar x - -# -# i18n -# - -LINGUAS=$(basename $(notdir $(wildcard po/*.po))) - -po/$(PACKAGE_NAME).js.pot: - xgettext --default-domain=$(PACKAGE_NAME) --output=$@ --language=C --keyword= \ - --keyword=_:1,1t --keyword=_:1c,2,2t --keyword=C_:1c,2 \ - --keyword=N_ --keyword=NC_:1c,2 \ - --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ - --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ - --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ - --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') - -po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) - pkg/lib/html2po.js -o $@ $$(find src -name '*.html') - -po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) - pkg/lib/manifest2po.js src/manifest.json -o $@ - -po/$(PACKAGE_NAME).metainfo.pot: $(APPSTREAMFILE) - xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< - -po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot po/$(PACKAGE_NAME).metainfo.pot - msgcat --sort-output --output-file=$@ $^ - -po/LINGUAS: - echo $(LINGUAS) | tr ' ' '\n' > $@ - -# -# Build/Install/dist -# -$(SPEC): packaging/$(SPEC).in $(NODE_MODULES_TEST) - provides=$$(npm ls --omit dev --package-lock-only --depth=Infinity | grep -Eo '[^[:space:]]+@[^[:space:]]+' | sort -u | sed 's/^/Provides: bundled(npm(/; s/\(.*\)@/\1)) = /'); \ - awk -v p="$$provides" '{gsub(/%{VERSION}/, "$(VERSION)"); gsub(/%{NPM_PROVIDES}/, p)}1' $< > $@ - -packaging/arch/PKGBUILD: packaging/arch/PKGBUILD.in - sed 's/VERSION/$(VERSION)/; s/SOURCE/$(TARFILE)/' $< > $@ - -packaging/debian/changelog: packaging/debian/changelog.in - sed 's/VERSION/$(VERSION)/' $< > $@ - -$(DIST_TEST): $(COCKPIT_REPO_STAMP) $(shell find src/ -type f) package.json build.js - $(MAKE) package-lock.json && NODE_ENV=$(NODE_ENV) ./build.js - -watch: $(NODE_MODULES_TEST) - NODE_ENV=$(NODE_ENV) ./build.js -w - -clean: - rm -rf dist/ - rm -f $(SPEC) packaging/arch/PKGBUILD packaging/debian/changelog - rm -f po/LINGUAS - -install: $(DIST_TEST) po/LINGUAS - mkdir -p $(DESTDIR)$(PREFIX)/share/cockpit/$(PACKAGE_NAME) - cp -r dist/* $(DESTDIR)$(PREFIX)/share/cockpit/$(PACKAGE_NAME) - mkdir -p $(DESTDIR)$(PREFIX)/share/metainfo/ - msgfmt --xml -d po \ - --template $(APPSTREAMFILE) \ - -o $(DESTDIR)$(PREFIX)/share/metainfo/$(APPSTREAMFILE) - -# this requires a built source tree and avoids having to install anything system-wide -devel-install: $(DIST_TEST) - mkdir -p ~/.local/share/cockpit - ln -s `pwd`/dist ~/.local/share/cockpit/$(PACKAGE_NAME) - -# assumes that there was symlink set up using the above devel-install target, -# and removes it -devel-uninstall: - rm -f ~/.local/share/cockpit/$(PACKAGE_NAME) - -print-version: - @echo "$(VERSION)" - -# required for running integration tests; commander and ws are deps of chrome-remote-interface -TEST_NPMS = \ - node_modules/chrome-remote-interface \ - node_modules/commander \ - node_modules/sizzle \ - node_modules/ws \ - $(NULL) - -dist: $(TARFILE) - @ls -1 $(TARFILE) - -# when building a distribution tarball, call bundler with a 'production' environment by default -# we don't ship most node_modules for license and compactness reasons, only the ones necessary for running tests -# we ship a pre-built dist/ (so it's not necessary) and ship package-lock.json (so that node_modules/ can be reconstructed if necessary) -$(TARFILE): export NODE_ENV ?= production -$(TARFILE): $(DIST_TEST) $(SPEC) packaging/arch/PKGBUILD packaging/debian/changelog - if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi - tar --xz $(TAR_ARGS) -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ - --exclude '*.in' --exclude test/reference \ - $$(git ls-files | grep -v node_modules) \ - $(COCKPIT_REPO_FILES) $(NODE_MODULES_TEST) $(SPEC) $(TEST_NPMS) \ - packaging/arch/PKGBUILD packaging/debian/changelog dist/ - -# convenience target for developers -rpm: $(TARFILE) - rpmbuild -tb --define "_topdir $(CURDIR)/tmp/rpmbuild" $(TARFILE) - find tmp/rpmbuild -name '*.rpm' -printf '%f\n' -exec mv {} . \; - rm -r tmp/rpmbuild - -# build a VM with locally built distro pkgs installed -$(VM_IMAGE): $(TARFILE) packaging/debian/rules packaging/debian/control packaging/arch/PKGBUILD bots - # HACK for ostree images: skip the rpm build/install - if [ "$${TEST_OS%coreos}" != "$$TEST_OS" ] || [ "$${TEST_OS%bootc}" != "$$TEST_OS" ] || [ "$$TEST_OS" = "rhel4edge" ]; then \ - bots/image-customize --verbose --fresh --no-network --run-command 'mkdir -p /usr/local/share/cockpit' \ - --upload dist/:/usr/local/share/cockpit/docker \ - --script $(CURDIR)/test/vm.install $(TEST_OS); \ - else \ - bots/image-customize --verbose --fresh $(VM_CUSTOMIZE_FLAGS) --build $(TARFILE) \ - --script $(CURDIR)/test/vm.install $(TEST_OS); \ - fi - -# convenience target for the above -vm: $(VM_IMAGE) - @echo $(VM_IMAGE) - -# convenience target to print the filename of the test image -print-vm: - @echo $(VM_IMAGE) - -# run static code checks for python code -PYEXEFILES=$(shell git grep -lI '^#!.*python') - -codecheck: test/static-code $(NODE_MODULES_TEST) - test/static-code - -# convenience target to setup all the bits needed for the integration tests -# without actually running them -prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common test/reference - -# run the browser integration tests; skip check for SELinux denials -# this will run all tests/check-* and format them as TAP -check: prepare-check - TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} - -bots: $(COCKPIT_REPO_STAMP) - test/common/make-bots - -test/reference: test/common - test/common/pixel-tests pull - -# We want tools/node-modules to run every time package-lock.json is requested -# See https://www.gnu.org/software/make/manual/html_node/Force-Targets.html -FORCE: -$(NODE_MODULES_TEST): FORCE tools/node-modules - ./node-modules-fix.sh - -.PHONY: all clean install devel-install devel-uninstall print-version dist rpm prepare-check check vm print-vm diff --git a/ui/cockpit-docker/README.md b/ui/cockpit-docker/README.md deleted file mode 100644 index cbab395..0000000 --- a/ui/cockpit-docker/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# cockpit-docker - -This is the [Cockpit](https://cockpit-project.org/) user interface for [docker -containers](https://docker.io/). - -## Technologies - - - cockpit-docker communicates to docker through its [REST API](https://docs.docker.com/engine/api/v1.43/). - - - This project is based on [cockpit-podman](https://github.com/cockpit-project/cockpit-podman), I ported as much as I could to the docker API, but not everything maps (e.g. pods) and not everything is ported yet. - -# Development dependencies - -On Debian/Ubuntu: - - $ sudo apt install gettext nodejs make - -On Fedora: - - $ sudo dnf install gettext nodejs make - -# Getting and building the source - -These commands check out the source and build it into the `dist/` directory: - -``` -git clone https://github.com/cockpit-docker/cockpit-docker -cd cockpit-docker -make -``` - -# Installing - -`sudo make install` installs the package in `/usr/local/share/cockpit/`. This depends -on the `dist` target, which generates the distribution tarball. - -You can also run `make rpm` to build RPMs for local installation. - -In `production` mode, source files are automatically minified and compressed. -Set `NODE_ENV=production` if you want to duplicate this behavior. - -## Arch Derivatives -[AUR package](https://aur.archlinux.org/packages/cockpit-docker) - -`yay -Ss cockpit-docker` - -OR for Manjaro - -`pamac install cockpit-docker` - -# Development instructions - -See [HACKING.md](./HACKING.md) for details about how to efficiently change the -code, run, and test it. - -# Automated release - -The intention is that the only manual step for releasing a project is to create -a signed tag for the version number, which includes a summary of the noteworthy -changes: - -``` -123 - -- this new feature -- fix bug #123 -``` - -Pushing the release tag triggers the [release.yml](.github/workflows/release.yml) -[GitHub action](https://github.com/features/actions) workflow. This creates the -official release tarball and publishes as upstream release to GitHub. - -The Fedora and COPR releases are done with [Packit](https://packit.dev/), -see the [packit.yaml](./packit.yaml) control file. - -# Automated maintenance - -It is important to keep your [NPM modules](./package.json) up to date, to keep -up with security updates and bug fixes. This happens with -[dependabot](https://github.com/dependabot), -see [configuration file](.github/dependabot.yml). - -Translations are refreshed every Tuesday evening (or manually) through the -[weblate-sync-po.yml](.github/workflows/weblate-sync-po.yml) action. -Conversely, the PO template is uploaded to weblate every day through the -[weblate-sync-pot.yml](.github/workflows/weblate-sync-pot.yml) action. diff --git a/ui/cockpit-docker/build.js b/ui/cockpit-docker/build.js deleted file mode 100755 index ba8f1d1..0000000 --- a/ui/cockpit-docker/build.js +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env node - -import fs from 'node:fs'; -import os from 'node:os'; - -import copy from 'esbuild-plugin-copy'; - -import { cockpitCompressPlugin } from './pkg/lib/esbuild-compress-plugin.js'; -import { cockpitPoEsbuildPlugin } from './pkg/lib/cockpit-po-plugin.js'; -import { cockpitRsyncEsbuildPlugin } from './pkg/lib/cockpit-rsync-plugin.js'; -import { cleanPlugin } from './pkg/lib/esbuild-cleanup-plugin.js'; -import { esbuildStylesPlugins } from './pkg/lib/esbuild-common.js'; - -const useWasm = os.arch() !== 'x64'; -const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')); - -const production = process.env.NODE_ENV === 'production'; -/* List of directories to use when resolving import statements */ -const nodePaths = ['pkg/lib']; -const outdir = 'dist'; - -// Obtain package name from package.json -const packageJson = JSON.parse(fs.readFileSync('package.json')); - -const parser = (await import('argparse')).default.ArgumentParser(); -parser.add_argument('-r', '--rsync', { help: "rsync bundles to ssh target after build", metavar: "HOST" }); -parser.add_argument('-w', '--watch', { action: 'store_true', help: "Enable watch mode", default: process.env.ESBUILD_WATCH === "true" }); -const args = parser.parse_args(); - -if (args.rsync) - process.env.RSYNC = args.rsync; - -function notifyEndPlugin() { - return { - name: 'notify-end', - setup(build) { - let startTime; - - build.onStart(() => { - startTime = new Date(); - }); - - build.onEnd(() => { - const endTime = new Date(); - const timeStamp = endTime.toTimeString().split(' ')[0]; - console.log(`${timeStamp}: Build finished in ${endTime - startTime} ms`); - }); - } - }; -} - -const context = await esbuild.context({ - ...!production ? { sourcemap: "linked" } : {}, - bundle: true, - entryPoints: ["./src/index.js"], - external: ['*.woff', '*.woff2', '*.jpg', '*.svg', '../../assets*'], // Allow external font files which live in ../../static/fonts - legalComments: 'external', // Move all legal comments to a .LEGAL.txt file - loader: { ".js": "jsx" }, - minify: production, - nodePaths, - outdir, - target: ['es2020'], - plugins: [ - cleanPlugin(), - // Esbuild will only copy assets that are explicitly imported and used - // in the code. This is a problem for index.html and manifest.json which are not imported - copy({ - assets: [ - { from: ['./src/manifest.json'], to: ['./manifest.json'] }, - { from: ['./src/index.html'], to: ['./index.html'] }, - ] - }), - ...esbuildStylesPlugins, - cockpitPoEsbuildPlugin(), - - ...production ? [cockpitCompressPlugin()] : [], - cockpitRsyncEsbuildPlugin({ dest: packageJson.name }), - - notifyEndPlugin(), - ] -}); - -try { - console.log(`Building ${production ? "for production" : "for dev"}...`); - await context.rebuild(); -} catch (e) { - if (!args.watch) - process.exit(1); - // ignore errors in watch mode -} - -if (args.watch) { - // Attention: this does not watch subdirectories -- if you ever introduce one, need to set up one watch per subdir - fs.watch('src', {}, async (ev, path) => { - // only listen for "change" events, as renames are noisy - if (ev !== "change") - return; - console.log("change detected:", path); - await context.cancel(); - try { - await context.rebuild(); - } catch (e) {} // ignore in watch mode - }); - // wait forever until Control-C - await new Promise(() => {}); -} - -context.dispose(); diff --git a/ui/cockpit-docker/me.chabad360.docker.metainfo.xml b/ui/cockpit-docker/me.chabad360.docker.metainfo.xml deleted file mode 100644 index 6725aad..0000000 --- a/ui/cockpit-docker/me.chabad360.docker.metainfo.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - me.chabad360.docker - CC0-1.0 - Docker - - Cockpit component for Docker containers - - -

- The Cockpit user interface for Docker containers. -

-
- org.cockpit_project.cockpit - docker -
diff --git a/ui/cockpit-docker/node-modules-fix.sh b/ui/cockpit-docker/node-modules-fix.sh deleted file mode 100755 index 05665ef..0000000 --- a/ui/cockpit-docker/node-modules-fix.sh +++ /dev/null @@ -1,9 +0,0 @@ -tools/node-modules make_package_lock_json || ( \ - sed -i 's/local sha="${1-$(get_index_gitlink node_modules)}"/local sha="${2-$(get_index_gitlink node_modules)}"/' tools/node-modules && \ - tools/node-modules checkout --force && \ - sed -i 's/"name": "podman"/"name": "docker"/' node_modules/.package.json && \ - sed -i 's/"description": "Cockpit UI for Podman Containers"/"description": "Cockpit UI for Docker Containers"/' node_modules/.package.json && \ - sed -i 's/"repository": "git@github.com:cockpit-project\/cockpit-podman.git"/"repository": "https:\/\/github.com\/chabad360\/cockpit-docker.git"/' node_modules/.package.json && \ - sed -i 's/"name": "podman"/"name": "docker"/' node_modules/.package-lock.json && \ - tools/node-modules make_package_lock_json \ - ) \ No newline at end of file diff --git a/ui/cockpit-docker/package.json b/ui/cockpit-docker/package.json deleted file mode 100644 index 75b6130..0000000 --- a/ui/cockpit-docker/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "docker", - "description": "Cockpit UI for Docker Containers", - "type": "module", - "main": "index.js", - "repository": "https://github.com/chabad360/cockpit-docker.git", - "author": "", - "license": "LGPL-2.1", - "scripts": { - "watch": "./build.js -w", - "build": "./build.js", - "eslint": "eslint --ext .jsx --ext .js src/", - "eslint:fix": "eslint --fix --ext .jsx --ext .js src/", - "stylelint": "stylelint src/*{.css,scss}", - "stylelint:fix": "stylelint --fix src/*{.css,scss}" - }, - "devDependencies": { - "argparse": "2.0.1", - "chrome-remote-interface": "^0.33.0", - "esbuild": "0.20.2", - "esbuild-plugin-copy": "2.1.1", - "esbuild-plugin-replace": "1.4.0", - "esbuild-sass-plugin": "3.2.0", - "esbuild-wasm": "0.20.2", - "eslint": "8.57.0", - "eslint-config-standard": "17.1.0", - "eslint-config-standard-jsx": "11.0.0", - "eslint-config-standard-react": "13.0.0", - "eslint-plugin-import": "2.29.1", - "eslint-plugin-jsx-a11y": "6.8.0", - "eslint-plugin-promise": "6.1.1", - "eslint-plugin-react": "7.34.1", - "eslint-plugin-react-hooks": "4.6.0", - "gettext-parser": "8.0.0", - "htmlparser": "1.7.7", - "jed": "1.1.1", - "sass": "1.75.0", - "sizzle": "2.3.10", - "stylelint": "16.4.0", - "stylelint-config-standard-scss": "13.1.0", - "stylelint-formatter-pretty": "4.0.0", - "stylelint-use-logical-spec": "5.0.1" - }, - "dependencies": { - "@patternfly/patternfly": "5.3.0", - "@patternfly/react-core": "5.3.0", - "@patternfly/react-icons": "5.3.0", - "@patternfly/react-styles": "5.3.0", - "@patternfly/react-table": "5.3.0", - "@patternfly/react-tokens": "5.3.0", - "date-fns": "3.6.0", - "docker-names": "1.2.1", - "ipaddr.js": "2.2.0", - "prop-types": "15.8.1", - "react": "18.2.0", - "react-dom": "18.2.0", - "throttle-debounce": "5.0.0", - "xterm": "5.1.0", - "xterm-addon-canvas": "0.4.0" - } -} diff --git a/ui/cockpit-docker/packaging/debian/control b/ui/cockpit-docker/packaging/debian/control deleted file mode 100644 index f5590eb..0000000 --- a/ui/cockpit-docker/packaging/debian/control +++ /dev/null @@ -1,22 +0,0 @@ -Source: cockpit-docker -Section: admin -Priority: optional -Maintainer: Martin Pitt -Build-Depends: debhelper-compat (= 13), -Standards-Version: 4.6.2 -Rules-Requires-Root: no -Homepage: https://github.com/chabad360/cockpit-docker -Vcs-Git: https://github.com/chabad360/cockpit-docker.git -Vcs-Browser: https://github.com/chabad360/cockpit-docker - -Package: cockpit-docker -Architecture: all -Multi-Arch: foreign -Depends: ${misc:Depends}, - cockpit-bridge, - docker (>= 24), -Description: Cockpit component for docker containers - The Cockpit Web Console enables users to administer GNU/Linux servers using a - web browser. - . - This package adds an user interface for docker containers. diff --git a/ui/cockpit-docker/packaging/debian/copyright b/ui/cockpit-docker/packaging/debian/copyright deleted file mode 100644 index 7262793..0000000 --- a/ui/cockpit-docker/packaging/debian/copyright +++ /dev/null @@ -1,38 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: cockpit-docker -Source: https://github.com/chabad360/cockpit-docker -Comment: - This does not directly cover the files in dist/*. These are "minified" and - compressed JavaScript/HTML files built from src/, lib/, po/, and node_modules/ - with node, npm, and a bundler. node_modules/ is not shipped as part of the - upstream release tarballs, but can be reconstructed precisely through the - shipped package-lock.json with the command "npm install". Rebuilding files in - dist/ requires internet access as that process needs to download additional - npm modules from the Internet, thus upstream ships the pre-minified bundles - as part of the upstream release tarball so that the package can be built - without internet access and lots of extra unpackaged build dependencies. - -Files: * -Copyright: 2016-2020 Red Hat, Inc and 2023 Jewish Education Media. -License: LGPL-2.1 - This package is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see . - . - On Debian systems, the complete text of the GNU Lesser General - Public License can be found in "/usr/share/common-licenses/LGPL-2.1". - -Files: *.metainfo.xml -Copyright: Copyright (C) 2018 Red Hat, Inc and 2023 Jewish Education Media. -License: CC0-1.0 - On Debian systems, the complete text of the Creative Commons Zero v1.0 - Universal Public License is in "/usr/share/common-licenses/LGPL-2.1". diff --git a/ui/cockpit-docker/packaging/debian/rules b/ui/cockpit-docker/packaging/debian/rules deleted file mode 100755 index c349516..0000000 --- a/ui/cockpit-docker/packaging/debian/rules +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/make -f - -export PREFIX=/usr - -%: - dh $@ - -override_dh_auto_clean: - # don't call `make clean`, in a release dist/ is precious - rm -f po/LINGUAS - -override_dh_auto_test: - # don't call `make check`, these are integration tests diff --git a/ui/cockpit-docker/packaging/debian/source/format b/ui/cockpit-docker/packaging/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/ui/cockpit-docker/packaging/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/ui/cockpit-docker/packaging/debian/source/lintian-overrides b/ui/cockpit-docker/packaging/debian/source/lintian-overrides deleted file mode 100644 index c8c9e0d..0000000 --- a/ui/cockpit-docker/packaging/debian/source/lintian-overrides +++ /dev/null @@ -1,2 +0,0 @@ -# source contains NPM modules required for running browser integration tests -cockpit-docker source: source-is-missing *node_modules/* diff --git a/ui/cockpit-docker/packaging/debian/upstream/metadata b/ui/cockpit-docker/packaging/debian/upstream/metadata deleted file mode 100644 index 29a8d5c..0000000 --- a/ui/cockpit-docker/packaging/debian/upstream/metadata +++ /dev/null @@ -1,4 +0,0 @@ ---- -Bug-Database: https://github.com/chabad360/cockpit-docker/issues -Bug-Submit: https://github.com/chabad360/cockpit-docker/issues/new -Repository-Browse: https://github.com/chabad360/cockpit-docker diff --git a/ui/cockpit-docker/packaging/debian/watch b/ui/cockpit-docker/packaging/debian/watch deleted file mode 100644 index 9820c0a..0000000 --- a/ui/cockpit-docker/packaging/debian/watch +++ /dev/null @@ -1,5 +0,0 @@ -version=4 -opts="searchmode=plain, \ -filenamemangle=s/.+\/@PACKAGE@-@ANY_VERSION@.tar.gz/@PACKAGE@-$1\.tar\.xz/" \ -https://api.github.com/repos/cockpit-chabad360/@PACKAGE@/releases \ -https://github.com/cockpit-chabad360/@PACKAGE@/releases/download/\d[\.\d]*/@PACKAGE@-@ANY_VERSION@.tar.xz diff --git a/ui/cockpit-docker/packit.yaml b/ui/cockpit-docker/packit.yaml deleted file mode 100644 index 2597a21..0000000 --- a/ui/cockpit-docker/packit.yaml +++ /dev/null @@ -1,80 +0,0 @@ -upstream_project_url: https://github.com/chabad360/cockpit-docker -# enable notification of failed downstream jobs as issues -issue_repository: https://github.com/chabad360/cockpit-docker -specfile_path: cockpit-docker.spec -upstream_package_name: cockpit-docker -downstream_package_name: cockpit-docker -# use the nicely formatted release description from our upstream release, instead of git shortlog -copy_upstream_release_description: true - -actions: - post-upstream-clone: make cockpit-docker.spec - create-archive: make dist - -srpm_build_deps: - - make - - npm - -jobs: - - job: copr_build - trigger: pull_request - targets: - - fedora-39 - - fedora-40 - - fedora-latest-aarch64 - - fedora-development - - centos-stream-9-x86_64 - - centos-stream-9-aarch64 - - centos-stream-8-x86_64 - - - job: tests - trigger: pull_request - targets: - - fedora-39 - - fedora-40 - - fedora-latest-aarch64 - - fedora-development - - centos-stream-9-x86_64 - - centos-stream-9-aarch64 - - centos-stream-8-x86_64 - - - job: copr_build - trigger: release - owner: "@cockpit" - project: "cockpit-preview" - preserve_project: True - actions: - post-upstream-clone: make cockpit-docker.spec - # HACK: tarball for releases (copr_build, koji, etc.), copying spec's Source0; this - # really should be the default, see https://github.com/packit/packit-service/issues/1505 - create-archive: - - sh -exc "curl -L -O https://github.com/chabad360/cockpit-docker/releases/download/${PACKIT_PROJECT_VERSION}/${PACKIT_PROJECT_NAME_VERSION}.tar.xz" - - sh -exc "ls ${PACKIT_PROJECT_NAME_VERSION}.tar.xz" - - - job: copr_build - trigger: commit - branch: "^main$" - owner: "@cockpit" - project: "main-builds" - preserve_project: True - - - job: propose_downstream - trigger: release - dist_git_branches: - - fedora-development - - fedora-39 - - fedora-40 - - - job: koji_build - trigger: commit - dist_git_branches: - - fedora-development - - fedora-39 - - fedora-40 - - - job: bodhi_update - trigger: commit - dist_git_branches: - # rawhide updates are created automatically - - fedora-39 - - fedora-40 diff --git a/ui/cockpit-docker/plans/all.fmf b/ui/cockpit-docker/plans/all.fmf deleted file mode 100644 index 1529147..0000000 --- a/ui/cockpit-docker/plans/all.fmf +++ /dev/null @@ -1,23 +0,0 @@ -discover: - how: fmf -execute: - how: tmt - -# Let's handle them upstream only, don't break Fedora/RHEL reverse dependency gating -environment: - TEST_AUDIT_NO_SELINUX: 1 - -/system: - summary: Run tests on system docker - discover+: - test: /test/browser/system - -/user: - summary: Run tests on user docker - discover+: - test: /test/browser/user - -/misc: - summary: Run other tests - discover+: - test: /test/browser/other diff --git a/ui/cockpit-docker/po/cs.po b/ui/cockpit-docker/po/cs.po deleted file mode 100644 index 48d63a2..0000000 --- a/ui/cockpit-docker/po/cs.po +++ /dev/null @@ -1,1510 +0,0 @@ -# Pavel Borecki , 2019. #zanata, 2020. -# Matej Marusak , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-11-29 13:31+0000\n" -"Last-Translator: Pavel Borecki \n" -"Language-Team: Czech \n" -"Language: cs\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" -"X-Generator: Weblate 5.2.1\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 kontejner" -msgstr[1] "$0 kontejnery" -msgstr[2] "$0 kontejnerů" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 obraz celkem, $1" -msgstr[1] "$0 obrazy celkem, $1" -msgstr[2] "$0 obrazů celkem, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 sekunda" -msgstr[1] "$0 sekundy" -msgstr[2] "$0 sekund" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 nepoužitý obraz, $1" -msgstr[1] "$0 nepoužité obrazy, $1" -msgstr[2] "$0 nepoužitých obrazů, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 až 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "" -"Akce kterou podniknout jakmile kontejner přejde do stavu, kdy nebude v " -"pořádku." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Přidat mapování portů" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Přidat proměnnou prostředí" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Přidat svazek" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Vše" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Všechny registry" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Vždy" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Došlo k chybě" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Autor" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Docker spouštět automaticky při zavádění systému" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "Procesor" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "Nápověda ke sdílení procesoru" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "Sdílení procesoru" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"Sdílení procesoru určuje prioritu spuštěných kontejnerů. Výchozí priorita je " -"1024. Vyšší číslo upřednostňuje tento kontejner. Nižší číslo jeho přednost " -"snižuje." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Storno" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Kontroluje se stav" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Kontrolní bod" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Kontrolní bod a podpora obnovení" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Kontejner kontrolního bodu $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Kliknutím zobrazíte publikované porty" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Kliknutím zobrazíte svazky" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Součást Cockpit pro Docker kontejnery" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Příkaz" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Komentáře" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Odeslat" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Odeslat kontejner" - -#: src/util.js:23 -msgid "Configured" -msgstr "Nastaveno" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konzole" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Kontejner" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Kontejner se nepodařilo vytvořit" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Kontejner se nepodařilo spustit" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Kontejner není spuštěný" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Název kontejneru" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Je třeba zadat název kontejneru." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Popis umístění kontejneru" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "Je třeba vyplnit popis umístění kontejneru" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Port kontejneru" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "Je třeba vyplnit port kontejneru" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Kontejnery" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Vytvořit" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Vytvořit nový obraz založený na stávajícím stavu kontejneru $0." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Vytvořit a spustit" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Vytvořit kontejner" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Vytvořit kontejner v $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Vytvořit kontejner v podu" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Vytvořit pod" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Vytvořeno" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Vytvořil" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Snížit podíl na procesoru" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Snížit interval" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Snížit limit počtu opětovných pokusů" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Zmenšit paměť" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Snížit počet opakovaných pokusů" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Snížit periodu startu" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Snížit časový limit" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Smazat" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "Smazat obraz $0?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "Smazat $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "Smazat obraz" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Smazat pod $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Smazat značkou označené obrazy" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Smazat nepoužívané systémové obrazy:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Smazat nepoužívané uživatelské obrazy:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Smazání kontejneru smaže veškerá data v něm." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "Smazání spuštěného kontejneru smaže veškerá data v něm." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Smazání tohoto podu odebere následující kontejnery:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Podrobnosti" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Prostor na disku" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "Formát Docker se hodí pro sdílení obrazu s enginem Docker nebo Moby" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Stáhnout" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Stáhnout si nový obraz" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Prázdný pod $0 bude nenávratně odebrán." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Vstupní bod" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Proměnné prostředí" - -#: src/util.js:26 -msgid "Error" -msgstr "Chyba" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Chybové hlášení" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Nastala chyba při připojování ke konzoli" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Příklad, vaše jméno " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Příklad: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Skončilo" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Nepodařilo se spustit kontrolu vitálnosti" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Kontejner $0 se nepodařilo opatřit kontrolním bodem" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Nepodařilo se vyčistit kontejner" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Nepodařilo se odeslat kontejner $0" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Nepodařilo se vytvořit kontejner $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Nepodařilo se stáhnout obraz $0:$1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Nepodařilo se vynutit odebrání kontejneru $0" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Nepodařilo se vynutit odebrání obrazu $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Nepodařilo se vynutit restart podu $0" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Nepodařilo se vynutit zastavení podu $0" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Nepodařilo se pozastavit kontejner $0" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Nepodařilo se pozastavit pod $0" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Nepodařilo se prořezat nepoužívané kontejnery" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Nepodařilo se prořezat nepoužívané obrazy" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Nepodařilo se odeslat obraz $0" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Nepodařilo se odebrat kontejner $0" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Nepodařilo se odebrat obraz $0" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Nepodařilo se přejmenovat kontejner $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Nepodařilo se restartovat kontejner $0" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Nepodařilo se restartovat pod $0" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Nepodařilo se obnovit kontejner $0" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Nepodařilo se navázat v chodu kontejneru $0" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Nepodařilo se navázat v chodu podu $0" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Nepodařilo se spustit kontejner $0" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Nepodařilo se zkontrolovat vitálnost kontejneru $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Nepodařilo se vyhledat obrazy." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Nepodařilo se vyhledat obrazy: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Nepodařilo se vyhledat nové obrazy" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Nepodařilo se spustit kontejner $0" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Nepodařilo se spustit pod $0" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Nepodařilo se zastavit kontejner $0" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Nepodařilo se zastavit pod $0" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Selhávající streak" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Vynutit odeslání" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Vynutit smazání" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Vynutit smazání podu $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Vynutit restart" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Vynutit zastavení" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Brána" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Kontrola vitálnosti" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Nápověda k intervalu kontroly vitálnosti" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Nápověda k opakovaným pokusům o kontrolu vitálnosti" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Nápověda k periodě startu kontroly vitálnosti" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Nápověda k časovému limitu kontroly vitálnosti" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Nápověda k akci kontroly selhání" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "V pořádku" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Skrýt obrazy" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Skrýt obrazy mezi tím" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Historie" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Popis umístění hostitele" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Port hostitele" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Nápověda k portu hostitele" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "Identif." - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP adresa" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Nápověda k IP adrese" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Ideální pro vývoj" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Ideální pro provozování služeb" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Pokud je IP adresa hostitele nastavena na 0.0.0.0 nebo vůbec nenastavena, " -"port bude navázán na všechny IP adresy hostitele." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Pokud port hostitele není nastavený, port kontejneru bude náhodně přiřazen " -"na port hostitele." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Pokud je nastavená staticky, IP adresu ignorovat" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Pokud je nastavená staticky, MAC adresu ignorovat" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Obraz" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Název obrazu už je použit" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Je třeba zadat název obrazu" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Nápověda k výběru obrazu" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Obrazy" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Zvýšit podíl na procesoru" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Prodloužit interval" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Zvýšit počet opětovných pokusů" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Zvětšit paměť" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Zvýšit počet opakování pokusů" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Zvýšit periodu startu" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Prodloužit časový limit" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Napojení" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Interval" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Jak často spouštět kontrolu vitálnosti." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Neplatné znaky. Název může obsahovat pouze písmena, číslice a vybranou " -"interpunkci (_.-)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Ponechat všechny dočasné soubory kontrolních bodů" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Klíč" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "Je třeba vyplnit klíč" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Minulých 5 spuštění" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Nejnovější kontrolní bod" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Po zapsání kontrolního bodu na disk ponechat spuštěné" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Načítání podrobností…" - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Načítání záznamů událostí…" - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Načítání…" - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Lokální" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Lokální obrazy" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Záznamy událostí" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC adresa" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Maximální počet opětovných pokusů" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Operační paměť" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Limit operační paměti" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Jednotka operační paměti" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Režim" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Pro tento obraz existuje vícero štítků. Vyberte oštítkované obrazy, které " -"smazat." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "Je třeba, aby byla platná IP adresa" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Název" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "Název je už používán" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Nový název pro kontejner" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Název nového obrazu" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Ne" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Žádná akce" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Žádné kontejnery" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Tento obraz není používán žádným kontejnerem" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "V tomto podu nejsou žádné kontejnery" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Stávajícímu filtru neodpovídají žádné kontejnery" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Nezadány žádné proměnné prostředí" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Žádné obrazy" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Nenalezeny žádné obrazy" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Žádné obrazy které by odpovídaly stávajícímu filtru" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Žádný štítek" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Nejsou vystavené žádné porty" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Žádné výsledky pro $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Žádné spuštěné kontejnery" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Nejsou určeny žádné svazky" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Při nezdaru" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Pouze spuštěné" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Volby" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Vlastník" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Nápověda k vlastníkovi" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Prošlo kontrolou vitálnosti" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Pokud chcete hromadně naimportovat, zadejte do libovolné kolonky jeden či " -"více řádků s dvojicemi klíč=hodnota" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Pozastavit" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Při vytváření obrazu pozastavit kontejner" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Pozastaveno" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Pod se nepodařilo vytvořit" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Název pro pod" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker kontejnery" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Služba docker není aktivní" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Mapování portů" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Porty" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Je možné mapovat porty do čísla 1024" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Soukromé" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokol" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Prořezat" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Prořezat nepoužívané kontejnery" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Prořezat nepoužívané obrazy" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Prořezávání kontejnerů" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Prořezávají se obrazy" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Stáhnout si nejnovější obraz" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Stahování" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Přístup pouze pro čtení" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Přístup pro čtení i zápis" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Odebrat položku" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Odebere označené (a nespuštěné) kontejnery" - -#: src/util.js:23 -msgid "Removing" -msgstr "Odebírá se" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Přejmenovat" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Přejmenovat kontejner $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Je možné nastavit limity prostředků" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Restart" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Pravidlo restartování" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Nápověda k pravidlu restartování" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "" -"Které pravidlo ohledně restartování následovat když se kontejnery ukončují." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Pravidlo ohledně restartování kterým se řídit při ukončení kontejnerů. Pokud " -"je v rámci uživatelského účtu používán např. ecryptfs, systemd-homed, NFS " -"nebo 2FA, pak se může stávat, že automatické spouštění pomocí linger za " -"určitých podmínek nemusí zafungovat." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Obnovit" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Obnovit kontejner $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Obnovit s navázanými TCP spojeními" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Omezeno oprávněními uživatelského účtu" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Navázat v chodu" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Opětovných pokusů" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Zkusit znovu jiný pojem." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Zkontrolovat vitálnost" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Spuštěné" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Hledat podle názvu nebo popisu" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Hledat podle registru (repozitáře)" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Hledat" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Hledat obraz" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Hledat řetězec nebo umístění kontejneru" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Vyhledávání..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Vyhledávání: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Sdílené" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Zobrazit" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Zobrazit obrazy" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Zobrazit obrazy mezi tím" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Zobrazit méně" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Zobrazit více" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Velikost" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Spustit" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Perioda startu" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Spustit docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Vyhledávání obrazů zahájíte psaním." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Spuštěno v" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Stav" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Stav" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Zastavit" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Zastaveno" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Podpora pro zachování navázaných TCP spojení" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Systém" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Je také k dispozici systémová služba Docker" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Štítek" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Štítky" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Cockpit uživatelské rozhraní pro Docker kontejnery." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Doba potřebná pro inicializaci zavádění kontejneru." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Nejdelší přijatelná doba pro dokončení kontroly vitálnosti, než bude " -"interval považován za nezdařilý." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Umožněný počet opětovných pokusů než bude výsledek kontroly vitálnosti " -"považován za negativní." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Časový limit" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Řešení problémů" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Filtrujte psaním…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Nepodařilo se načíst historii obrazu" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Není v pořádku" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "V chodu od $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Použít původní Docker formát" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Používáno" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Uživatel" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Je také k dispozici uživatelská služba Docker" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Uživatel:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Hodnota" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Svazky" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "Pokud v nepořádku" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "S terminálem" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Zapisovatelné" - -#: src/manifest.json:0 -msgid "container" -msgstr "kontejner" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "stahuje se" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "hostitel[:port]/[uživatel]/kontejner[:štítek]" - -#: src/manifest.json:0 -msgid "image" -msgstr "obraz" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "v" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "mezi tím" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "Obraz mezi tím" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "n/a" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "není k dispozici" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "skupina podu" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "porty" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "sekund" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "systém" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "nepoužito" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "uživatel:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "svazky" - -#~ msgid "Delete $0" -#~ msgstr "Smazat $0" - -#~ msgid "select all" -#~ msgstr "vybrat vše" - -#~ msgid "Failure action" -#~ msgstr "Akce při selhání" - -#~ msgid "Restarting" -#~ msgstr "Restartuje se" - -#, fuzzy -#~| msgid "Please confirm deletion of $0" -#~ msgid "Confirm deletion of $0" -#~ msgstr "Potvrďte smazání $0" - -#, fuzzy -#~| msgid "Please confirm deletion of pod $0" -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Potvrďte smazání podu $0" - -#, fuzzy -#~| msgid "Please confirm force deletion of pod $0" -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Potvrďte vynucení smazání podu $0" - -#, fuzzy -#~| msgid "Please confirm forced deletion of $0" -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Potvrďte vynucení smazání $0" - -#~ msgid "Container is currently running." -#~ msgstr "Kontejner je nyní spuštěný." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Do exportu nezahrnovat změny v kořenovém souborovém systému" - -#~ msgid "Default with single selectable" -#~ msgstr "Výchozí s jedním k výběru" - -#~ msgid "Start after creation" -#~ msgstr "Po vytvoření spustit" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "Smazat nepoužité $0 obrazy:" - -#~ msgid "created" -#~ msgstr "vytvořeno" - -#~ msgid "exited" -#~ msgstr "skončilo" - -#~ msgid "paused" -#~ msgstr "pozastaveno" - -#~ msgid "running" -#~ msgstr "spuštěné" - -#~ msgid "stopped" -#~ msgstr "zastaveno" - -#~ msgid "user" -#~ msgstr "uživatel" - -#~ msgid "Add on build variable" -#~ msgstr "Přídatná proměnná prostředí" - -#~ msgid "Commit image" -#~ msgstr "Odeslat obraz" - -#~ msgid "Format" -#~ msgstr "Formát" - -#~ msgid "Message" -#~ msgstr "Zpráva" - -#~ msgid "Pause the container" -#~ msgstr "Pozastavit kontejner" - -#~ msgid "Remove on build variable" -#~ msgstr "Odebrat na proměnných prostředí" - -#~ msgid "Set container on build variables" -#~ msgstr "Nastavit kontejner na proměnných prostředí" - -#~ msgid "Add item" -#~ msgstr "Přidat položku" - -#~ msgid "Host port (optional)" -#~ msgstr "Port hostitele (volitelně)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (volitelně)" - -#~ msgid "ReadOnly" -#~ msgstr "PouzeProČtení" - -#~ msgid "IP prefix length" -#~ msgstr "Délka přepony IP adresy" - -#~ msgid "Get new image" -#~ msgstr "Získat nový obraz" - -#~ msgid "Run" -#~ msgstr "Spustit" - -#~ msgid "On build" -#~ msgstr "Při sestavení" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Opravdu chcete tento obraz smazat?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Nedaří se připojit k tomuto kontejneru: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Nedaří se otevřít kanál:$0" - -#~ msgid "Everything" -#~ msgstr "Vše" - -#~ msgid "Security" -#~ msgstr "Zabezpečení" - -#~ msgid "The scan from $time ($type) found no vulnerabilities." -#~ msgstr "Sken z $time ($type) nenalezl žádné zranitelnosti." - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "Tato verze Web Console nepodporuje terminál." diff --git a/ui/cockpit-docker/po/de.po b/ui/cockpit-docker/po/de.po deleted file mode 100644 index 8f9dc55..0000000 --- a/ui/cockpit-docker/po/de.po +++ /dev/null @@ -1,1505 +0,0 @@ -# Martin Pitt , 2019. #zanata -# Mike FABIAN , 2020. -# Matej Marusak , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-09-02 07:21+0000\n" -"Last-Translator: Martin Pitt \n" -"Language-Team: German \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1\n" -"X-Generator: Weblate 4.18.2\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 Container" -msgstr[1] "$0 Container" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 Abbild insgesamt, $1" -msgstr[1] "$0 Abbilder insgesamt, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 Sekunde" -msgstr[1] "$0 Sekunden" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 ungenutztes Abbild, $1" -msgstr[1] "$0 ungenutzte Abbilder, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "" -"Zu ergreifende Maßnahmen, wenn der Container in einen ungesunden Zustand " -"übergeht." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Port-Zuordnung hinzufügen" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Variable hinzufügen" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Volumen hinzufügen" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Alle" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Alle Registries" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Immer" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Ein Fehler ist aufgetreten" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Autor" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Docker automatisch beim Hochfahren starten" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "CPU Shares Hilfe" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU-Shares" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU Shares legt die Priorität laufender Container fest. Standardwert ist " -"1024. Ein höherer Wert priorisiert den Container. Ein niedrigerer Wert senkt " -"dessen Priorität." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Abbruch" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Überprüfung der Gesundheit" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Kontrollpunkt" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Unterstützung von Kontrollpunkten und Wiederherstellung" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Kontrollpunkt für Container $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Klicken um veröffentlichte Ports zu sehen" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Klicken um Volumen zu sehen" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Cockpit Bestandteil für Docker-Container" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Befehl" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Kommentare" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Committen" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Container übergeben" - -#: src/util.js:23 -msgid "Configured" -msgstr "Konfiguriert" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konsole" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Container" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Container konnte nicht erstellt werden" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Container konnte nicht erstellt werden" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Container läuft nicht" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Container-Name" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Containername ist erforderlich." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Container-Pfad" - -#: src/Volume.jsx:23 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container path must not be empty" -msgstr "Container konnte nicht erstellt werden" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Container-Port" - -#: src/PublishPort.jsx:37 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container port must not be empty" -msgstr "Container konnte nicht erstellt werden" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Container" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Erstellen" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "" -"Ein neues Abbild auf der Grundlage des aktuellen Zustands des Containers $0 " -"erstellen." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Erstellen und ausführen" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Container erstellen" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Container in $0 erstellen" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Container in Pod erstellen" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Pod erstellen" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Erstellt" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Erstellt von" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "CPU-Anteile verringern" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Intervall verringern" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Maximale Wiederholungsversuche verringern" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Speicher verringern" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Wiederholungsversuche verringern" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Startzeitraum verringern" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Zeitüberschreitung verringern" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Löschen" - -#: src/ImageDeleteModal.jsx:92 -#, fuzzy -#| msgid "Delete $0?" -msgid "Delete $0 image?" -msgstr "$0 löschen?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "$0 löschen?" - -#: src/ImageDeleteModal.jsx:96 -#, fuzzy -#| msgid "Delete tagged images" -msgid "Delete image" -msgstr "Markierte Image löschen" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Pod $0 löschen?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Markierte Image löschen" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Nicht verwendete Systemabbilder löschen:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Nicht verwendete Benutzerabbilder löschen:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Beim Löschen des Containers werden alle Daten darin verloren gehen." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "" -"Das Löschen eines laufenden Containers führt dazu, dass alle darin " -"enthaltenen Daten gelöscht werden." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Löschen des Pods wird die folgenden Container entfernen:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Details" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Speicherplatz" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Docker-Format ist hilfreich, wenn das Image mit Docker oder Moby Engine " -"geteilt wird" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Herunterladen" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Neues Abbild herunterladen" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Leerer Pod $0 wird endgültig entfernt." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Einsprungspunkt" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Umgebungsvariablen" - -#: src/util.js:26 -msgid "Error" -msgstr "Fehler" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Fehlermeldung" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Beim Verbinden der Konsole ist ein Fehler aufgetreten" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Beispiel, Ihr Name " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Beispiel: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Beendet" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Gesundheitsprüfung fehlgeschlagen" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Überprüfung von Container $0 fehlgeschlagen" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Fehler bei der Bereinigung des Containers" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Konnte Container $0 nicht committen" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Fehler bei der Erstellung des Containers $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Konnte Image $0 nicht herunterladen: $1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Konnte Container $0 nicht neu entfernen" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Fehler bei der erzwungenen Entfernung des Abbilds $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Konnte Pod $0 nicht neu starten" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Konnte Pod $0 nicht stoppen" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Konnte Container $0 nicht pausieren" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Konnte Pod $0 nicht pausieren" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Löschen nicht gebrauchter Container fehlgeschlagen" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Reduzierung nicht gebrauchter Abbilder fehlgeschlagen" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Image $0 konnte nicht gepullt werden" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Konnte Container $0 nicht neu entfernen" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Fehler bei der Entfernung von Abbild $0" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Fehler beim Umbenennen des Containers $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Konnte Container $0 nicht neu starten" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Konnte Pod $0 nicht neu starten" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Konnte Container $0 nicht wiederherstellen" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Konnte Container $0 nicht wieder starten" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Konnte Pod $0 nicht wieder starten" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Konnte Container $0 nicht starten" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Gesundheitsprüfung von Container $0 fehlgeschlagen" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Konnte nicht nach Images suchen." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Konnte nicht nach Images suchen: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Konnte nicht nach neuen Images suchen" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Konnte Container $0 nicht starten" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Konnte Pod $0 nicht starten" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Konnte Container $0 nicht stoppen" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Konnte Pod $0 nicht stoppen" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Übergabe erzwingen" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Löschen erzwingen" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Löschen von Pod $0 erzwingen?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Neustart erzwingen" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Stoppen erzwingen" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Gateway" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Gesundheitsprüfung" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Hilfe zum Gesundheitsprüfungsintervall" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Hilfe zur Wiederholung der Gesundheitsprüfung" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Hilfe zur Periode der Gesundheitsprüfung" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Hilfe zum Zeitlimit der Gesundheitsprüfung" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Hilfe zur Gesundheitsprüfungs-Aktion" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Gesund" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Abbilder ausblenden" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Intermediate Images verstecken" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Verlauf" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Host-Pfad" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Host-Port" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Hilfe zum Host-Port" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP-Adresse" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Hilfe zur IP-Adresse" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Ideal zur Entwicklung" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Ideal für Dienste" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Wenn die Host-IP auf 0.0.0.0 oder gar nicht gesetzt ist, wird der Port an " -"alle IPs des Hosts gebunden." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Wenn der Host-Port nicht gesetzt ist, wird dem Container-Port ein zufälliger " -"Port auf dem Host zugewiesen." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "IP-Adresse ignorieren, wenn statisch festgelegt" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "MAC-Adresse ignorieren, wenn statisch festgelegt" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Image" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Abbildname ist nicht eindeutig" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Abbildname ist erforderlich" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Abbildauswahl-Hilfe" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Images" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "CPU-Anteile erhöhen" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Intervall erhöhen" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Maximale Wiederholungsversuche erhöhen" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Speicher erhöhen" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Wiederholungsversuche erhöhen" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Startzeitraum erhöhen" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Zeitüberschreitung erhöhen" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Integration" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Intervall" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Intervall, in dem die Gesundheitsprüfung durchgeführt wird." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Ungültige Zeichen. Der Name darf nur Buchstaben, Zahlen und bestimmte " -"Satzzeichen (_ . -) enthalten." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Alle temporären Kontrollpunktdateien behalten" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Schlüssel" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Letzte 5 Durchläufe" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "LetzterKontrollpunkt" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "" -"Nach dem Schreiben des Kontrollpunkts auf die Festplatte weiterlaufen lassen" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Details werden geladen ..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Protokolle werden geladen ..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Wird geladen ..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Lokal" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Lokale Abbilder" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Protokolle" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC-Adresse" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Maximale Versuche" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Speicher" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Speicher-Limit" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Speichereinheit" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Modus" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Mehrere Tags für dieses Image vorhanden. Getagte Images zum Löschen " -"auswählen." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Name" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Neuer Containername" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Neuer Abbildname" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Nein" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Keine Aktion" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Keine Container" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Keine Container benutzen dieses Abbild" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "Keine Container in diesem Pod" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Aktueller Filter passt auf keinen Container" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Keine Umgebungsvariablen angegeben" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Keine Images" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Keine Abbilder gefunden" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Aktueller Filter passt auf kein Image" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Keine Bezeichnung" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Keine offenen Ports" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Keine Ergebnisse für $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Keine laufenden Container" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Keine Volumen angegeben" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Bei einem Ausfall" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Nur laufenlassen" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Optionen" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Eigentümer" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Eigentümer-Hilfe" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Bestandener Gesundheitstest" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Fügen Sie eine oder mehrere Zeilen mit key=value Paaren in irgendein Feld " -"ein für multiplen Import" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Anhalten" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Container bei der Abbilderstellung pausieren" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Pausiert" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Pod konnte nicht erstellt werden" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Pod-Name" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker-Container" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker-Service ist nicht aktiv" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Portzuordnung" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Ports" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Privat" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokoll" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Reduzieren" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Nicht benötigte Abbilder löschen" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Reduzierung nicht benötigter Abbilder" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Räume Container auf" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Reduziere Abbilder" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Neuestes Image pullen" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Herunterladen" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Nur-Lese-Zugriff" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Lese-/Schreibzugriff" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Element entfernen" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Entfernt selektierte nicht-laufende Container" - -#: src/util.js:23 -msgid "Removing" -msgstr "Wird entfernt" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Umbenennen" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Container $0 umbenennen" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Ressourcen-Grenzen können gesetzt werden" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Neustart" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Neustartrichtlinie" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Neustartrichtlinien-Hilfe" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "" -"Neustart-Richtlinie, die beim Beenden von Containern befolgt werden soll." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Wiederherstellen" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Container $0 wiederherstellen" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Wiederherstellung mit bestehenden TCP-Verbindungen" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Eingeschränkt durch Benutzerkonto-Privilegien" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Fotfahren" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Wiederholungsversuche" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Versuchen Sie einen anderen Begriff." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Gesundheitsprüfung durchführen" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Läuft" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Nach Name oder Beschreibung suchen" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Nach Registry suchen" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Suchen nach" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Nach einem Abbild suchen" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Suchbegriff oder Containerort" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Wird gesucht ..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Wird gesucht: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Freigegeben" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Anzeigen" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Abbilder anzeigen" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Zwischenabbilder anzeigen" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Weniger anzeigen" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Mehr anzeigen" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Größe" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Starten" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Startzeitraum" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Docker starten" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Zum Suchen nach Abbildern mit dem Tippen beginnen." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Gestartet am" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Zustand" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Status" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Stoppen" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Angehalten" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Unterstützung der Aufrechterhaltung bestehender TCP-Verbindungen" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "System" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "System-Docker ist auch verfügbar" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Etikett" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Etiketten" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Die Cockpit Benutzeroberfläche für Docker Container." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "" - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Die maximal zulässige Zeit für den Abschluss der Gesundheitsprüfung, bevor " -"ein Intervall als fehlgeschlagen gilt." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Die Anzahl der zulässigen Wiederholungsversuche, bevor eine " -"Gesundheitsprüfung als ungesund gilt." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Zeitüberschreitung" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Fehler suchen" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Tippen zum filtern…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Abbildverlauf kann nicht geladen werden" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Ungesund" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Läuft seit $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Veraltetes Docker-Format verwenden" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Benutzt von" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Benutzer" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Benutzer Docker ist auch verfügbar" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Benutzer:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Wert" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Datenträger" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "Wenn ungesund" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Mit Terminal" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Beschreibbar" - -#: src/manifest.json:0 -msgid "container" -msgstr "container" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "wird heruntergeladen" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "Host[:Port]/[Benutzer]/Container[:Tag]" - -#: src/manifest.json:0 -msgid "image" -msgstr "Image" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "in" - -#: src/ImageDeleteModal.jsx:79 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate" -msgstr "Intermediate Images verstecken" - -#: src/ImageDeleteModal.jsx:59 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate image" -msgstr "Intermediate Images verstecken" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "n.v." - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "nicht verfügbar" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "Pod-Gruppe" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "Ports" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "Sekunden" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "System" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "ungenutzt" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "Benutzer:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "Volumen" - -#~ msgid "Delete $0" -#~ msgstr "$0 löschen" - -#~ msgid "select all" -#~ msgstr "Alles auswählen" - -#~ msgid "Restarting" -#~ msgstr "Wird neu gestartet" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Löschen von $0 bestätigen" - -#, fuzzy -#~| msgid "Please confirm deletion of pod $0" -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Löschen von Pod $0 bestätigen" - -#, fuzzy -#~| msgid "Please confirm force deletion of pod $0" -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Erzwungenes Löschen von Pod $0 bestätigen" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Erzwungenes Löschen von $0 bestätigen" - -#~ msgid "Container is currently running." -#~ msgstr "Container läuft gerade." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Keine root-Dateisystem-Änderungen beifügen, wenn exportieren" - -#~ msgid "Start after creation" -#~ msgstr "Nach der Erstellung starten" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "Nicht verwendete $0 Abbilder löschen:" - -#~ msgid "created" -#~ msgstr "erstellt" - -#~ msgid "exited" -#~ msgstr "beendet" - -#~ msgid "paused" -#~ msgstr "pausiert" - -#~ msgid "running" -#~ msgstr "Läuft" - -#~ msgid "stopped" -#~ msgstr "Angehalten" - -#~ msgid "user" -#~ msgstr "Benutzer" - -#~ msgid "Add on build variable" -#~ msgstr "Build-Variable hinzufügen" - -#~ msgid "Commit image" -#~ msgstr "Image committen" - -#~ msgid "Format" -#~ msgstr "Format" - -#~ msgid "Message" -#~ msgstr "Nachricht" - -#~ msgid "Pause the container" -#~ msgstr "Den Container anhalten" - -#~ msgid "Remove on build variable" -#~ msgstr "Bei Bau-Variable entfernen" - -#~ msgid "Add item" -#~ msgstr "Element hinzufügen" - -#, fuzzy -#~| msgid "Host port" -#~ msgid "Host port (optional)" -#~ msgstr "Host-Port" - -#~ msgid "ReadOnly" -#~ msgstr "Nur lesen" - -#~ msgid "IP prefix length" -#~ msgstr "IP-Präfixlänge" - -#~ msgid "Get new image" -#~ msgstr "Neues Image herunterladen" - -#~ msgid "Run" -#~ msgstr "Starten" - -#~ msgid "On build" -#~ msgstr "Beim Bauen" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Sind Sie sicher, dass Sie dieses Image löschen wollen?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Konnte nicht mit diesem Container verbinden: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Konnte keinen Kanal öffnen: $0" - -#~ msgid "Everything" -#~ msgstr "Alles" - -#~ msgid "Security" -#~ msgstr "Sicherheit" - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "Diese Version der Web-Konsole unterstützt kein Terminal." diff --git a/ui/cockpit-docker/po/es.po b/ui/cockpit-docker/po/es.po deleted file mode 100644 index 61212d3..0000000 --- a/ui/cockpit-docker/po/es.po +++ /dev/null @@ -1,1489 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Álvaro Castillo , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-12-15 14:41+0000\n" -"Last-Translator: Neftali Yagua \n" -"Language-Team: Spanish \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1\n" -"X-Generator: Weblate 5.3\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 contenedor" -msgstr[1] "$0 contenedores" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 imagen, $1" -msgstr[1] "$0 imágenes en total, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 segundo" -msgstr[1] "$0 segundos" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 imagen sin usar, $1" -msgstr[1] "$0 imágenes sin usar, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 a 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "" -"Acción a tomar una vez que el contenedor pase a un mal estado de salud." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Añadir mapeo de puertos" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Añadir variable" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Añadir volumen" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Todos" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Todos los registros" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Siempre" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Ocurrió un error" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Autor" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Iniciar docker en el arranque" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "Ayuda sobre shares de CPU" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "Shares de CPU" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"Los shares de CPU determinan la prioridad de ejecución de contenedores. La " -"prioridad por defecto es 1024. Un número mayor prioriza este contenedor. Un " -"número menor reduce la prioridad." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Cancelar" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Comprobando estado de salud" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Checkpoint" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Soporte para checkpoint y restauración" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Crear checkpoint del contenedor $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Pulse para ver los puertos publicados" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Pulse para ver los volúmenes" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Componente Cockpit para contenedores Docker" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Comando" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Comentarios" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Commit" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Confirmar contenedor" - -#: src/util.js:23 -msgid "Configured" -msgstr "Configurado" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Consola" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Contenedores" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Falló al crear el contenedor" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "El contenedor no pudo ser iniciado" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "El contenedor no se está ejecutando" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Nombre de contenedor" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Se requiere un nombre para el contenedor." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Ruta del contenedor" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "La ruta del contenedor no debe estar vacía" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Puerto del contenedor" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "El puerto de contenedores no debe estar vacío" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Contenedores" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Crear" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Crear una imagen nueva basada en el estado actual del contenedor $0." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Crear y ejecutar" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Crear contenedor" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Crear contenedor en $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Crear un contenedor en el pod" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Crear pod" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Creado" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Creada por" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Reducir shares de CPU" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Reducir intervalo" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Reducir el número máximo de reintentos" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Reducir la cantidad de memoria" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Reducir el número de reintentos" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Reducir el periodo de arranque" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Reducir el tiempo de espera" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Eliminar" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "¿Eliminar imagen de $0?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "¿Eliminar $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "Eliminar Imagen" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "¿Eliminar pod $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Borrar imágenes seleccionadas" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Borrar imágenes del sistema sin usar:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Borrar imágenes del usuario sin usar:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Eliminando un contenedor se borrará toda la información que hay en él." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "" -"Eliminando un contenedor en ejecución borrará toda la información que haya " -"en él." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Eliminando este pod eliminará los siguientes contenedores:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Detalles" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Tamaño en disco" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"El formato Docker es útil para compartir la imagen con Docker o Moby Engine" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Descargar" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Descargar nueva imagen" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "El pod $0, vacío, será eliminado permanentemente." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Punto de entrada" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Variables de entorno" - -#: src/util.js:26 -msgid "Error" -msgstr "Error" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Mensaje de error" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Hubo un error al conectar la consola" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Por ejemplo, Tu Nombre " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Por ejemplo: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Finalizado" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Comprobación de estado de salud fallada" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Fallo hacer el checkpoint del contenedor $0" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Fallo al limpiar el contenedor" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Falló hacer el commit en el contenedor $0" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Fallo al crear el contenedor $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Fallo al descargar la imagen $0:$1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Falló al forzar el borrado del contenedor $0" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Fallo al forzar el borrado de la imagen $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Fallo al reiniciar forzadamente el pod $0" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Fallo al detener forzadamente el pod $0" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Fallo al pausar el contenedor $0" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Fallo al pausar el pod $0" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Fallo al eliminar los contenedores no utilizados" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Fallo al eliminar las imágenes no usadas" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Fallo al obtener la imagen $0" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Falló al eliminar el contenedor $0" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Fallo al eliminar la imagen $0" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Fallo al renombrar el contenedor $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Falló al reiniciar el contenedor $0" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Fallo al reiniciar el pod $0" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Fallo al restaurar el contenedor $0" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Fallo al reanudar el contenedor $0" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Fallo al reanudar el pod $0" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Fallo al iniciar el contenedor $0" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Fallo al comprobar el estado de salud del contenedor $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Fallo al buscar imágenes." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Fallo al buscar las imágenes: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Falló al buscar nuevas imágenes" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Falló al iniciar el contenedor $0" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Fallo al iniciar el pod $0" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Falló al parar el contenedor $0" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Fallo al parar el pod $0" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Racha de fallos" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Forzar commit" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Forzar el borrado" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "¿Forzar la eliminación del pod $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Forzar el reinicio" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Forzar la parada" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Puerta de enlace" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Comprobación del estado de salud" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Ayuda sobre el intervalo de comprobación del estado de salud" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "" -"Ayuda sobre el número de reintentos de comprobación del estado de salud" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Ayuda sobre el periodo de arranque de comprobación del estado de salud" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Ayuda sobre el tiempo de espera de comprobación del estado de salud" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Ayuda sobre la acción al fallo al comprobar el estado de salud" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Buen estado de salud" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Ocultar imágenes" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Ocultar imágenes intermedias" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Historial" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Ruta del anfitrión" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Puerto del anfitrión" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Ayuda sobre el puerto del anfitrión" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "Dirección IP" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Ayuda sobre la dirección IP" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Idóneo para entornos de desarrollo" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Idóneo para ejecutar servicios" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Si la IP del host se asigna a 0.0.0.0 o no se asigna, el puerto se asociará " -"a todas las IP's del host." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Si no se asigna el puerto del host, el puerto del contenedor se asignará a " -"un puerto aleatorio del host." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ignorar la dirección IP si se ha configurado de forma estática" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ignorar la dirección MAC si se ha configurado de forma estática" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Imagen" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "El nombre de la imagen no es único" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Se requiere un nombre para la imagen" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Ayuda sobre la selección de imagen" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Imágenes" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Incrementar shares de CPU" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Incrementar el intervalo" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Incrementar el número máximo de reintentos" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Incrementar la cantidad de memoria" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Incrementar el número de reintentos" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Incrementar el periodo de arranque" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Incrementar el tiempo de espera" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Integración" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Intervalo" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Cada cuánto se ejecuta la comprobación del estado de salud." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Carácteres inválidos. El nombre sólo puede contener letras, números y " -"ciertos signos de puntuación (_ . -)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Mantener todos los archivos temporales de checkpoint" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Clave" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "La clave no debe estar vacía" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Últimas 5 comprobaciones" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Último checkpoint" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Seguir ejecutando tras escribir el checkpoint en disco" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Cargando detalles..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Cargando registros..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Cargando..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Local" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Imágenes locales" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Registros" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "Dirección MAC" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Número máximo de reintentos" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Memoria" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Límite de memoria" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Unidad de medida de memoria" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Modo" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Existen múltiples etiquetas para esta imagen. Seleccione las imágenes " -"etiquetadas a eliminar." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "Debe ser una dirección IP válida" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Nombre" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "Nombre ya en uso" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Nuevo nombre del contenedor" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Nombre de la nueva imagen" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "No" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Ninguna acción" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "No hay contenedores" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "No hay contenedores que utilicen esta imagen" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "No hay contenedores en este pod" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "No hay contenedores relacionados con los criterios de búsqueda" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "No se han especificado variables de entorno" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "No hay imágenes" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "No se han encontrado imágenes" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "No hay imágenes relacionadas con el criterio de búsqueda" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Sin etiqueta" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "No hay puertos expuestos" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "No hay resultados para $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "No hay contenedores ejecutándose" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "No se han especificado volúmenes" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "En caso de fallo" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Sólo los que se están ejecutando" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Opciones" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Propietario" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Ayuda sobre el propietario" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Comprobación de estado de salud superada" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Pegue una o más líneas de pares clave=valor en cualquier campo para importar " -"en masa" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Pausar" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Pausar el contenedor cuando se cree la imagen" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Pausado" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Fallo al crear el pod" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Nombre del pod" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Contenedores de Docker" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "El servicio Docker no está activo" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Mapeo de puertos" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Puertos" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Se pueden mapear puertos inferiores a 1024" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Privado" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protocolo" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Eliminar" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Eliminar contenedores no utilizados" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Eliminar imágenes no utilizadas" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Eliminando contenedores" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Eliminando imágenes no utilizadas" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Obtener la última imagen" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Obteniendo" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Acceso de sólo lectura" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Acceso de lectura y escritura" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Eliminar elemento" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Elimina los contenedores seleccionados que no se están ejecutando" - -#: src/util.js:23 -msgid "Removing" -msgstr "Eliminándose" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Renombrar" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Renombrar el contenedor $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Se pueden establecer límites sobre los recursos" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Reiniciar" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Política de reinicio" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Ayuda sobre la política de reinicio" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Política de reinicio a seguir cuando se cierren contenedores." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Política de reinicio a seguir cuando los contenedores finalicen. Utilizar " -"linger para iniciar contenedores automáticamente puede no funcionar bajo " -"ciertas circunstancias, como cuando se emplean ecryptfs, systemd-homed, NFS " -"o 2FA en una cuenta de usuario." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Restaurar" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Restaurar el contenedor $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Restaurar con las conexiones TCP establecidas" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Restringido por los permisos de la cuenta de usuario" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Reanudar" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Número de reintentos" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Pruebe con otro término." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Ejecutar comprobación de estado de salud" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Ejecutándose" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Buscar por nombre o descripción" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Buscar por registro" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Buscar" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Buscar una imagen" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Buscar cadena o ubicación de contenedor" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Buscando…" - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Buscando: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Compartido" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Mostrar" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Mostrar imágenes" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Mostrar imágenes intermedias" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Mostrar menos" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Mostrar más" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Tamaño" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Iniciar" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Periodo de arranque" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Iniciar docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Comience a escribir para buscar imágenes." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Comenzó" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Estado" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Estado" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Parar" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Detenido" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Habilitar la preservación de las conexiones TCP establecidas" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Sistema" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "El servicio de sistema Docker también está disponible" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Etiqueta" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Etiquetas" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "La interfaz de usuario de Cockpit para contenedores Docker." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "El tiempo de inicialización necesario para que un contenedor arranque." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"El máximo tiempo permitido para completar una comprobación de estado de " -"salud antes de que se considere fallada." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"El máximo número de reintentos permitidos antes de que se considere un mal " -"estado de salud." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Tiempo de espera" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Solución de errores" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Escriba para establecer un criterio de búsqueda…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "No se pudo cargar el historial de imágenes" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Mal estado de salud" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Levantado desde $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Usar el formato heredado Docker" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Usado por" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Usuario" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "El servicio de usuario Docker también está disponible" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Usuario:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Valor" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Volúmenes" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "En caso de mal estado de salud" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Con terminal" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Puede escribirse" - -#: src/manifest.json:0 -msgid "container" -msgstr "contenedor" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "descargando" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "host[:puerto]/[usuario]/contenedor[:etiqueta]" - -#: src/manifest.json:0 -msgid "image" -msgstr "imagen" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "en" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "intermedia" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "imagen intermedia" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "sin/aplicar" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "no disponible" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "Grupo de pod" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "puertos" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "segundos" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "sistema" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "sin utilizar" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "usuario:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "volúmenes" - -#~ msgid "Delete $0" -#~ msgstr "Eliminar $0" - -#~ msgid "select all" -#~ msgstr "seleccionar todas" - -#~ msgid "Failure action" -#~ msgstr "Acción al fallo" - -#~ msgid "Restarting" -#~ msgstr "Reiniciándose" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Confirme el borrado de $0" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Confirme el borrado del pod $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Confirme el borrado forzado del pod $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Confirme forzar el borrado de $0" - -#~ msgid "Container is currently running." -#~ msgstr "El contenedor se está ejecutando." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "No incluir cambios en el sistema de archivos raíz al exportar" - -#, fuzzy -#~| msgid "Get new image" -#~ msgid "Delete unused $0 images:" -#~ msgstr "Obtener nueva imagen" - -#, fuzzy -#~| msgid "Created" -#~ msgid "created" -#~ msgstr "Creado" - -#, fuzzy -#~| msgid "Exited" -#~ msgid "exited" -#~ msgstr "Cerrado" - -#, fuzzy -#~| msgid "Pause" -#~ msgid "paused" -#~ msgstr "Pausar" - -#, fuzzy -#~| msgid "user" -#~ msgid "user" -#~ msgstr "usuario" - -#, fuzzy -#~| msgid "Set container on build variables" -#~ msgid "Add on build variable" -#~ msgstr "Establecer el contenedor en las variables de construcción" - -#~ msgid "Commit image" -#~ msgstr "Commit una imagen" - -#~ msgid "Format" -#~ msgstr "Formato" - -#~ msgid "Message" -#~ msgstr "Mensaje" - -#~ msgid "Pause the container" -#~ msgstr "Pausar el contenedor" - -#, fuzzy -#~| msgid "Set container on build variables" -#~ msgid "Remove on build variable" -#~ msgstr "Establecer el contenedor en las variables de construcción" - -#~ msgid "Set container on build variables" -#~ msgstr "Establecer el contenedor en las variables de construcción" - -#, fuzzy -#~| msgid "Host port" -#~ msgid "Host port (optional)" -#~ msgstr "Puerto del anfitrión" - -#~ msgid "ReadOnly" -#~ msgstr "SoloLectura" - -#~ msgid "Run" -#~ msgstr "Ejecutar" - -#~ msgid "On build" -#~ msgstr "En construcción" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "¿Está seguro de que quiere eliminar esta imagen?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "No se pudo asociar a este contenedor: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "No se pudo abrir un canal: $0" - -#~ msgid "Everything" -#~ msgstr "Todo" - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "Esta versión de consola Web no soporta un terminal." diff --git a/ui/cockpit-docker/po/fi.po b/ui/cockpit-docker/po/fi.po deleted file mode 100644 index 996b600..0000000 --- a/ui/cockpit-docker/po/fi.po +++ /dev/null @@ -1,1484 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2024-02-20 20:36+0000\n" -"Last-Translator: Jan Kuparinen \n" -"Language-Team: Finnish \n" -"Language: fi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1\n" -"X-Generator: Weblate 5.4\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 kontti" -msgstr[1] "$0 konttia" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 levykuva yhteensä, $1" -msgstr[1] "$0 levykuvaa yhteensä, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 sekunti" -msgstr[1] "$0 sekuntia" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 käyttämätön levykuva, $1" -msgstr[1] "$0 käyttämätöntä levykuvaa, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "Toimenpiteet, kun kontti siirtyy epäterveelliseen tilaan." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Lisää porttiassosiaatio" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Lisää muuttuja" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Lisää taltio" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Kaikki" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Kaikki rekisterit" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Aina" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Tapahtui virhe" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Tekijä" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Käynnistä docker automaattisesti käynnistyksen yhteydessä" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "Suoritin" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "Ohjeita CPU-osuuksista" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "Suoritinosuus" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU-osuudet määrittävät käynnissä olevien konttien prioriteetin. " -"Oletusprioriteetti on 1024. Suurempi numero priorisoi tätä konttia. Pienempi " -"numero laskee prioriteettia." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Peru" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Tarkistetaan tilaa" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Tarkistuspiste" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Tarkistuspisteen ja palautuksen tuki" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Luo tarkistuspiste kontista $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Napsauta nähdäksesi julkaistut portit" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Napsauta nähdäksesi taltiot" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Cockpit-komponentti Docker-konteille" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Komento" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Kommentit" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Kommitoi" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Kommitoi kontti" - -#: src/util.js:23 -msgid "Configured" -msgstr "Asetukset asetettu" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konsoli" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Kontti" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Kontin luonti epäonnistui" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Kontin käynnistys epäonnistui" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Kontti ei ole käynnissä" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Kontin nimi" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Kontin nimi vaaditaan." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Kontin polku" - -#: src/Volume.jsx:23 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container path must not be empty" -msgstr "Kontin luonti epäonnistui" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Kontin portti" - -#: src/PublishPort.jsx:37 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container port must not be empty" -msgstr "Kontin luonti epäonnistui" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Kontit" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Luo" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Luo uusi levykuva $0-kontin nykyisen tilan perusteella." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Luo ja suorita" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Luo kontti" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Luo kontti kohteeseen $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Luo kontti podiin" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Luo podi" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Luotu" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Tekijä" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Vähennä suoritinosuuksia" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Pienennä väliä" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Pienennä uudelleenyritysten enimmäismäärää" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Vähennä muistia" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Vähennä uudelleenyrityksiä" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Pienennä aloitusaikaa" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Pienennä aikakatkaisua" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Poista" - -#: src/ImageDeleteModal.jsx:92 -#, fuzzy -#| msgid "Delete $0?" -msgid "Delete $0 image?" -msgstr "Poista $0?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "Poista $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "Poista levykuva" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Poista podi $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Poista merkityt kuvat" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Poista käyttämättömät järjestelmälevykuvat:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Poista käyttämättömät käyttäjän levykuvat:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Kontin poistaminen tuhoaa kaiken sillä olevan datan." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "Käynnissä olevan kontin poistaminen tuhoaa kaiken sillä olevan datan." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Tämän podin poisto poistaa seuraavat kontit:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Yksityiskohdat" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Levytila" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Docker-muoto on hyödyllinen, kun levykuvaa jaetaan Dockerin tai Moby Enginen " -"kanssa" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Lataa" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Lataa uusi levykuva" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Tyhjä podi $0 poistetaan pysyvästi." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Sisääntulokohta" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Ympäristömuuttujat" - -#: src/util.js:26 -msgid "Error" -msgstr "Virhe" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Virheviesti" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Virhe konsolia liitettäessä" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Esimerkki: Nimesi " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Esimerkki: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Päättyi" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Epäonnistunut eheysajo" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Kontin $0 tarkistuspisteen luominen epäonnistui" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Kontin poistaminen epäonnistui" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Kontin $0 kommitointi epäonnistui" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Kontin $0 luominen epäonnistui" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Levykuvan lataaminen epäonnistui $0:$1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Kontin $0 pakotettu poistaminen epäonnistui" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Levykuvan $0 pakotettu poistaminen epäonnistui" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Podin $0 pakotettu uudelleenkäynnistäminen epäonnistui" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Podin $0 pakotettu pysäyttäminen epäonnistui" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Kontin $0 keskeyttäminen epäonnistui" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Podin $0 keskeyttäminen epäonnistui" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Käyttämättömien konttien poisto epäonnistui" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Käyttämättömien levykuvien karsiminen epäonnistui" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Levykuvan $0 hakeminen epäonnistui" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Kontin $0 poistaminen epäonnistui" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Levykuvan $0 poistaminen epäonnistui" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Kontin $0 uudelleennimeäminen epäonnistui" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Kontin $0 uudelleenkäynnistäminen epäonnistui" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Podin $0 uudelleenkäynnistäminen epäonnistui" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Kontin $0 palauttaminen epäonnistui" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Kontin $0 palauttaminen epäonnistui" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Podin $0 käytön jatkaminen epäonnistui" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Kontin $0 suorittaminen epäonnistui" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Kontin $0 eheystarkastus epäonnistui" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Levykuvien etsintä epäonnistui." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Levykuvien etsintä epäonnistui: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Uusien levykuvien etsintä epäonnistui" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Kontin $0 käynnistäminen epäonnistui" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Podin $0 käynnistäminen epäonnistui" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Kontin $0 pysäyttäminen epäonnistui" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Podin $0 pysäyttäminen epäonnistui" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Epäonnistunut sarja" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Pakota kommitti" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Pakota poisto" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Pakota podin $0 poisto?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Pakota uudelleenkäynnistys" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Pakota pysäytys" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "Gt" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Yhdyskäytävä" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Eheystarkistus" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Tietoa eheystarkistuksen aikavälistä" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Tietoa eheystarkistuksen uudelleenyrityksistä" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Tietoa eheystarkistuksen aloitusjaksosta" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Tietoa eheystarkistuksen aikakatkaisusta" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Tietoa terveystarkistuksen virhetilan toimenpiteistä" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Ehjä" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Piilota levykuvat" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Piilota välivaiheen levykuvat" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Historia" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Koneen polku" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Koneen portti" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Ohjeita koneen portista" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "TUNNISTE" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP-osoite" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Ohjeita IP-osoitteesta" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Ihanteellinen kehittämiseen" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Ihanteellinen palvelujen suorittamiseen" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Jos isäntäkoneen IP-osoitteeksi on asetettu 0.0.0.0 tai sitä ei ole " -"määritetty lainkaan, portti sidotaan kaikkiin isäntäkoneen IP-osoitteisiin." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Jos isäntäporttia ei ole asetettu, konttiportille määritetään satunnainen " -"isäntäportti." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ohita IP-osoite, jos se on asetettu staattisesti" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ohita MAC-osoite, jos se on asetettu staattisesti" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Levykuva" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Kevykuvan nimi ei ole ainutlaatuinen" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Levykuvan nimi vaaditaan" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Ohjeita levykuvan valintaan" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Levykuvat" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Lisää suoritinosuuksia" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Suurenna väliä" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Lisää uudelleenyritysten enimmäismäärää" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Lisää muistia" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Lisää uudelleenyrityksiä" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Pidennä aloitusjaksoa" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Nosta aikakatkaisua" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Integraatio" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Aikaväli" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Eheystarkistusten aikaväli." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Virheellisiä merkkejä. Nimi voi sisältää vain kirjaimia, numeroita ja " -"tiettyjä välimerkkejä (_ . -)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "Kt" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Säilytä kaikki väliaikaiset tarkistuspistetiedostot" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Avain" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "Avain ei saa olla tyhjä" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Viimeiset 5 ajoa" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Viimeisin tarkistuspiste" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Jätä käyntiin tarkistuspisteen levylle kirjoittamisen jälkeen" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Ladataan tietoja..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Ladataan lokeja..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Ladataan..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Paikallinen" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Paikallisia levykuvia" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Lokit" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC-osoite" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "Mt" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Uudelleenyritysten enimmäismäärä" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Muisti" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Muistiraja" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Muistiyksikkö" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Tila" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Tälle levykuvalle on useita tunnisteita. Valitse tunnisteelliset levykuvat " -"jotka poistetaan." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Nimi" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "Nimi on jo käytössä" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Kontin uusi nimi" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Uusi levykuvan nimi" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Ei" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Ei toimintoa" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Ei kontteja" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Yksikään kontti ei käytä tätä levykuvaa" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "Tässä podissa ei ole kontteja" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Ei nykyistä suodatusta vastaavia kontteja" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Ympäristömuuttujia ei ole määritetty" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Ei levykuvia" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Levykuvia ei löytynyt" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Ei nykyistä suodatusta vastaavia levykuvia" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Ei nimiötä" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Ei paljastettuja portteja" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Ei tuloksia hakusanalle $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Ei käynnissä olevia kontteja" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Taltiota ei ole määritelty" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Epäonnistumisesta" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Vain käynnissä olevat" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Valinnat" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "omistaja" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Omistajan ohjeet" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Onnistunut eheysajo" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Liitä yksi tai useampi rivi avain=arvo-pareja mihin tahansa kenttään " -"joukkotuontia varten" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Keskeytä" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Pysäytä kontti levykuvan luomisen ajaksi" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Keskeytetty" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Podin luonti epäonnistui" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Podin nimi" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker-kontit" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker-palvelu ei ole aktiivinen" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Porttiassosiaatio" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Portit" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Portit alle 1024 voidaan kartoittaa" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Yksityinen" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokolla" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Karsi" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Poista käyttämättömiä kontteja" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Karsi käyttämättömät levykuvat" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Siivotaan kontteja" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Karsitaan levykuvia" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Hae viimeisin levykuva" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Haetaan" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Vain luku-käyttöoikeus" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Luku-kirjoitusoikeus" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Poista kohde" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Poistaa valitut ei käynnissä olevat kontit" - -#: src/util.js:23 -msgid "Removing" -msgstr "Poistetaan" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Nimeä uudelleen" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Nimeä kontti $0 uudelleen" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Resurssirajoja voidaan asettaa" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Käynnistä uudelleen" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Uudelleenkäynnistyksen käytäntö" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Ohjeita uudelleenkäynnistyksen käytännöstä" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Noudata uudelleenkäynnistyskäytäntöä, kun kontit poistuvat." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Käytettävä uudelleenkäynnistyskäytäntö, kun kontit poistuvat. Viivyttämisen " -"käyttäminen konttien automaattiseen käynnistykseen ei välttämättä toimi " -"joissain olosuhteissa, kuten kun käyttäjätilillä on käytössä ecryptfs, " -"systemd-homed, NFS tai 2FA." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Palauta" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Palauta kontti $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Palauta käyttäen luotuja TCP-yhteyksiä" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Rajoitettu käyttäjätilin käyttöoikeuksilla" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Jatka" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Uudelleenyritykset" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Yritä toisella termillä uudelleen." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Aja eheystarkistus" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Käynnissä" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Hae nimen tai kuvauksen perusteella" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Haku rekisterin perusteella" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Etsittävä" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Etsi levykuvaa" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Hae merkkijonon tai kontin sijaintia" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Etsitään..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Etsitään: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Jaettu" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Näytä" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Näytä levykuvat" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Näytä välivaiheen levykuvat" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Näytä vähemmän" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Näytä lisää" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Koko" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Käynnistä" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Aloitusjakso" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Käynnistä docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Aloita kirjoittaminen etsiäksesi levykuvia." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Käynnistetty klo" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Tila" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Tila" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Pysäytä" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Pysäytetty" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Tue jo luotujen TCP -yhteyksien säilyttämistä" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Järjestelmä" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Järjestelmän Docker-palvelu on myös saatavilla" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Tunniste" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Tunnisteet" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Cockpit-käyttöliittymä Docker-konteille." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Alustusaika, joka tarvitaan kontin käynnistymiseen." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Enimmäisaika, joka on sallittu eheystarkastuksen suorittamiseen ennen kuin " -"se katsotaan epäonnistuneeksi." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Yritysten enimmäismäärä, joka on sallittu eheystarkastuksen suorittamiseen " -"ennen kuin se katsotaan epäonnistuneeksi." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Aikakatkaisu" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Vianetsintä" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Kirjoita suodattaaksesi…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Levykuvan historian lataaminen epäonnistui" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Rikki" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Käynnissä $0 lähtien" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Käytä vanhaa Docker-muotoa" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Käyttää" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Käyttäjä" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Käyttäjän Docker-palvelu on myös saatavilla" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Käyttäjä:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Arvo" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Taltiot" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "Kun rikki" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Päätteen kanssa" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Kirjoitettavissa" - -#: src/manifest.json:0 -msgid "container" -msgstr "kontti" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "ladataan" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "host[:port]/[user]/container[:tag]" - -#: src/manifest.json:0 -msgid "image" -msgstr "levykuva" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "sijainnissa" - -#: src/ImageDeleteModal.jsx:79 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate" -msgstr "Piilota välivaiheen levykuvat" - -#: src/ImageDeleteModal.jsx:59 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate image" -msgstr "Piilota välivaiheen levykuvat" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "ei sovellu" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "ei käytettävissä" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "podiryhmä" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "portit" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "sekuntia" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "järjestelmä" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "ei käytössä" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "käyttäjä:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "taltiot" - -#~ msgid "Delete $0" -#~ msgstr "Poista $0" - -#~ msgid "select all" -#~ msgstr "valitse kaikki" - -#~ msgid "Failure action" -#~ msgstr "virhetilan toimenpiteet" - -#~ msgid "Restarting" -#~ msgstr "Käynnistyy uudelleen" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Vahvista kohteen $0 poistaminen" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Vahvista podin $0 poistaminen" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Vahvista podin $0 pakotettu poistaminen" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Vahvista kohteen $0 pakotettu poistaminen" - -#~ msgid "Container is currently running." -#~ msgstr "Kontti on parhaillaan käynnissä." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Älä sisällytä juuritiedostojärjestelmän muutoksia vientiä varten" - -#~ msgid "Default with single selectable" -#~ msgstr "Oletusarvo kun yksi valittavissa" - -#~ msgid "Start after creation" -#~ msgstr "Käynnistä luomisen jälkeen" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "Poista käyttämättömät $0 levykuvat:" - -#~ msgid "created" -#~ msgstr "luotu" - -#~ msgid "exited" -#~ msgstr "päättyi" - -#~ msgid "paused" -#~ msgstr "pysäytetty" - -#~ msgid "running" -#~ msgstr "suoritetaan" - -#~ msgid "stopped" -#~ msgstr "pysäytetty" - -#~ msgid "user" -#~ msgstr "käyttäjä" - -#~ msgid "Add on build variable" -#~ msgstr "Lisää koontimuuttuja" - -#~ msgid "Commit image" -#~ msgstr "Commit-levykuva" - -#~ msgid "Format" -#~ msgstr "Alusta" - -#~ msgid "Message" -#~ msgstr "Viesti" - -#~ msgid "Pause the container" -#~ msgstr "Keskeytä kontin ajo" - -#~ msgid "Remove on build variable" -#~ msgstr "Poista koontimuuttujalla" - -#~ msgid "Set container on build variables" -#~ msgstr "Aseta kontti koontimuuttujiin" - -#~ msgid "Add item" -#~ msgstr "Lisää kohta" - -#~ msgid "Host port (optional)" -#~ msgstr "Koneen portti (valinnainen)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (valinnainen)" - -#~ msgid "ReadOnly" -#~ msgstr "Vain-luku" - -#~ msgid "IP prefix length" -#~ msgstr "IP Prefix Pituus" - -#~ msgid "Run" -#~ msgstr "Suorita" diff --git a/ui/cockpit-docker/po/fr.po b/ui/cockpit-docker/po/fr.po deleted file mode 100644 index cce1d6e..0000000 --- a/ui/cockpit-docker/po/fr.po +++ /dev/null @@ -1,1529 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Julien Humbert , 2020. -# Timothée Ravier , 2020. -# Sébastien Pascal-Poher , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-05-30 13:20+0000\n" -"Last-Translator: Ludek Janda \n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1\n" -"X-Generator: Weblate 4.17\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 conteneur" -msgstr[1] "$0 conteneurs" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 image total, $1" -msgstr[1] "$0 images total, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 seconde" -msgstr[1] "$0 secondes" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 image non utilisée, $1" -msgstr[1] "$0 images non utilisées, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "Action à entreprendre lorsque le conteneur passe à un état insalubre." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Ajouter un mappage de port" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Ajouter une variable" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Ajouter volume" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Tous" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Tous les registres" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Toujours" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Une erreur s’est produite" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Auteur" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Démarrer automatiquement docker au démarrage" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "Assistance CPU Shares" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "Parts de CPU" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU Shares déterminent la priorité des conteneurs en cours d'exécution. La " -"priorité par défaut est de 1024. Un nombre plus élevé donne la priorité à ce " -"conteneur. Un nombre inférieur diminue la priorité." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Annuler" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Contrôle de fonctionnement" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Point de contrôle" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Prise en charge des points de contrôle et des restaurations" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Point de contrôle du conteneur $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Cliquez pour voir les ports publiés" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Cliquez pour voir les volumes" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Composant Cockpit pour les conteneurs Docker" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Commande" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Commentaires" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Valider" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Valider conteneur" - -#: src/util.js:23 -msgid "Configured" -msgstr "Configuré" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Console" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Conteneur" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Le conteneur n’a pas pu être créé" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Le conteneur n’a pas pu être démarré" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Le conteneur n’est pas en cours d’exécution" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Nom du conteneur" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Le nom du conteneur est obligatoire." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Chemin du conteneur" - -#: src/Volume.jsx:23 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container path must not be empty" -msgstr "Le conteneur n’a pas pu être créé" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Port du conteneur" - -#: src/PublishPort.jsx:37 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container port must not be empty" -msgstr "Le conteneur n’a pas pu être créé" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Conteneurs" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Créer" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Créer une nouvelle image basée sur l'état actuel du conteneur $0." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Créer et démarrer" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Créer un conteneur" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Créer un conteneur dans $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Créer un conteneur dans un pod" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Créer un pod" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Créé" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Créé par" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Diminution des parts de CPU" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Diminution de l'intervalle" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Diminuer le nombre maximum de tentatives" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Diminution de la mémoire" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Diminuer les tentatives" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Diminution de la période de démarrage" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Diminuer le délai d'attente" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Supprimer" - -#: src/ImageDeleteModal.jsx:92 -#, fuzzy -#| msgid "Delete $0?" -msgid "Delete $0 image?" -msgstr "Supprimer $0 ?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "Supprimer $0 ?" - -#: src/ImageDeleteModal.jsx:96 -#, fuzzy -#| msgid "Delete tagged images" -msgid "Delete image" -msgstr "Supprimer les images taguées" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Supprimer le pod $0 ?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Supprimer les images taguées" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Supprimer les images système non utilisées :" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Supprimer les images utilisateur non utilisées :" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Supprimer un conteneur va effacer toutes les données qu’il contient." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "" -"La suppression d'un conteneur en cours d'exécution efface toutes les données " -"qu'il contient." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "La suppression de ce pod entraînera celle des conteneurs suivants :" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Détails" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Espace disque" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Le format Docker est utile pour partager l'image avec Docker ou Moby Engine" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Télécharger" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Télécharger la nouvelle image" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Le pod vide $0 sera définitivement supprimé." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Point d’entrée" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Variables d’environnement" - -#: src/util.js:26 -msgid "Error" -msgstr "Erreur" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Message d’erreur" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Une erreur s’est produite lors de la connexion à la console" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Exemple, votre nom " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Exemple : $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Quittés" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Échec de l’exécution du bilan de fonctionnement" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Échec de la création du point de contrôle du conteneur $0" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Échec du nettoyage du conteneur" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Échec de la validation du conteneur $0" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Échec de la création du conteneur $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Échec du téléchargement de l’image $0 : $1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Échec de la suppression forcée du conteneur $0" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Échec de la suppression forcée de l’image $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Échec du redémarrage forcé du pod $0" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Échec de l'arrêt forcé du pod $0" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Échec de la mise en pause du conteneur $0" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Échec de la mise en pause du pod $0" - -#: src/PruneUnusedContainersModal.jsx:57 -#, fuzzy -#| msgid "Failed to prune unused images" -msgid "Failed to prune unused containers" -msgstr "Échec de la suppression des images non utilisées" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Échec de la suppression des images non utilisées" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Échec d’extraction de l’image $0" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Échec de la suppression du conteneur $0" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Échec de la suppression de l’image $0" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Échec du renommage du conteneur $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Échec du redémarrage du conteneur $0" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Échec du redémarrage du pod $0" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Échec de la restauration du conteneur $0" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Échec de la reprise conteneur $0" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Échec de la reprise pod $0" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Échec du démarrage du conteneur $0" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Échec de l'exécution du contrôle de fonctionnement du conteneur $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Échec de la recherche d'images." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Échec de la recherche de l'image : $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Échec de la recherche de nouvelles images" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Échec du démarrage du conteneur $0" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Échec du démarrage du pod $0" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Échec de l’arrêt du conteneur $0" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Échec de l’arrêt du pod $0" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Une série d'échecs" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Validation forcée" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Suppression forcée" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Forcer la suppression du pod $0 ?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Redémarrage forcé" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Arrêt forcé" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "Go" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Passerelle" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Bilan de fonctionnement" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Aide à l'intervalle entre les bilans de fonctionnement" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Aide pour les tentatives de bilans de fonctionnement" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Aide pour la période de démarrage du bilan de fonctionnement" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Aide sur le délai d'exécution du bilan de fonctionnement" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Aide à l’action pour les bilans de fonctionnement" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Fonctions intactes" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Cacher les images" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Cacher les images intermédiaires" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Historique" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Chemin vers l’hôte" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Port de l’hôte" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Assistance Port d’hôte" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "Adresse IP" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Assistance Adresse IP" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Idéal pour le développement" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Idéal pour le fonctionnement des services" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Si l’IP de l’hôte est définie ainsi 0.0.0.0 ou si elle n’est pas dutout " -"définie, le port sera relié à tous les IP de l’hôte." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Si le port de l’hôte n’est pas défini, le port du conteneur sera assigné au " -"hasard sur l’hôte." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ignorer l'adresse IP si définie statiquement" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ignorer l'adresse MAC si définie statiquement" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Image" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Le nom de l'image n'est pas unique" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Le nom de l'image est obligatoire" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Aide à la sélection d'images" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Images" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Augmenter les parts de CPU" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Augmenter l'intervalle" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Augmenter le nombre maximum de tentatives" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Augmenter la mémoire" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Augmenter les tentatives" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Augmenter la période de démarrage" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Augmenter le délai d'attente" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Intégration" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Intervalle" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Intervalle à partir duquel le contrôle de fonctionnement est exécuté." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Caractères non valides. Le nom ne peut contenir que des lettres, des " -"chiffres et certains signes de ponctuation (_ . -)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "Ko" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Conserver tous les fichiers de points de contrôle temporaires" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Clé" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Les 5 dernières exécutions" - -#: src/ContainerDetails.jsx:71 -#, fuzzy -#| msgid "Checkpoint" -msgid "Latest checkpoint" -msgstr "Point de contrôle" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Conserver actif après la création du point de contrôle sur le disque" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Chargement des détails..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Chargement des logs..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Chargement..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Local" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Aucune image" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Journaux" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "Adresse MAC" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "Mo" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Nombre max de nouvellles tentatives" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Mémoire" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Limite mémoire" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Unité de mémoire" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Mode" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Plusieurs tags existent pour cette image. Sélectionnez les images marquées à " -"supprimer." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Nom" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Nouveau nom du conteneur" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Nom de la nouvelle image" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Non" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Pas d'action" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Aucun conteneur" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Aucun conteneur n’utilise cette image" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "Aucun conteneur dans ce pod" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Aucun conteneur ne correspond au filtre actuel" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Aucune variables d’environnement spécifiée" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Aucune image" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Aucune image trouvée" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Aucune image ne correspond au filtre actuel" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Pas de label" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Aucuns ports exposés" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Aucun résultat pour $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Aucun conteneur en cours d’exécution" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Aucuns volumes spécifiés" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "En cas d’échec" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "En cours d’exécution seulement" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Options" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Propriétaire" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Aide au propriétaire" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Bilan de fonctionnement réussi" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Collez une ou plusieurs lignes de paires clé=valeur dans n'importe quel " -"champ pour une importation en masse" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Pause" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Mettre le conteneur en pause lors de la création de l’image" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "En pause" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Échec de la création du pod" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Nom du pod" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Conteneurs Docker" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Le service Docker n’est pas actif" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Mappage de port" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Ports" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Les ports inférieurs à 1024 peuvent être mappés" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Privé" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protocole" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Suppression de certaines images" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -#, fuzzy -#| msgid "Prune unused images" -msgid "Prune unused containers" -msgstr "Suppression d’images non utilisées" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Suppression d’images non utilisées" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -#, fuzzy -#| msgid "No running containers" -msgid "Pruning containers" -msgstr "Aucun conteneur en cours d’exécution" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Suppression de certaines images" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Extraire la dernière image" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Extraction" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Accès en lecture seule" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Accès en lecture-écriture" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Supprimer l'élément" - -#: src/PruneUnusedContainersModal.jsx:99 -#, fuzzy -#| msgid "Images and running containers" -msgid "Removes selected non-running containers" -msgstr "Images et conteneurs en cours d’exécution" - -#: src/util.js:23 -msgid "Removing" -msgstr "En cours de suppression" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Renommer" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Renommer le conteneur $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Des limites de ressources peuvent être fixées" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Redémarrer" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Redémarrer la stratégie" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Assistance pour la politique de redémarrage" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Politique de redémarrage à suivre lors de la sortie des conteneurs." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Politique de redémarrage à suivre lorsque les conteneurs se terminent. " -"L'utilisation de linger pour le démarrage automatique des conteneurs peut ne " -"pas fonctionner dans certaines circonstances, comme lorsque ecryptfs, " -"systemd-homed, NFS ou 2FA sont utilisés sur un compte utilisateur." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Restaurer" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Restaurer le conteneur $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Restaurer avec les connexions TCP établies" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Limité par les autorisations du compte de l'utilisateur" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Reprendre" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Tentatives" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Nouvelle tentative sur autre term." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Exécuter le bilan de fonctionnement" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "En fonctionnement" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Rechercher par nom ou description" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Recherche par registre" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Rechercher" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Chercher une image" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Chaîne de recherche ou emplacement du conteneur" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Recherche en cours..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Recherche en cours : $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Partagé" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Afficher" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Afficher les images" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Afficher les images intermédiaires" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Afficher moins de détails" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Montrer plus" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Taille" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Démarrer" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Période de démarrage" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Démarrer docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Commencez à saisir les données pour rechercher des images." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Commencé à" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "État" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Statut" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Arrêter" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Arrêté" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Prendre en charge le maintien des connexions TCP établies" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Système" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Le service Docker est également disponible" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Tag" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Étiquettes" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "L’interface utilisateur Cockpit pour les conteneur Docker." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Le temps d'initialisation nécessaire à l'amorçage d'un conteneur." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Le temps maximum autorisé pour compléter le contrôle de fonctionnement avant " -"qu'un intervalle soit considéré comme ayant échoué." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Le nombre de tentatives autorisées avant qu'un contrôle de fonctionnement ne " -"soit considéré non acceptable." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Délai d'attente" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Dépannage" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Entrez pour filtrer…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Impossible de charger l'historique des images" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Non acceptable" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "En cours d’exécution depuis $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Utiliser l'ancien format Docker" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Utilisé par" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Utilisateur" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Le service utilisateur Docker est également disponible" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Utilisateur :" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Valeur" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Volumes" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "En cas d'insalubrité" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Avec le terminal" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Accessible en écriture" - -#: src/manifest.json:0 -msgid "container" -msgstr "conteneur" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "En cours de téléchargement" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "host[:port]/[user]/container[:tag]" - -#: src/manifest.json:0 -msgid "image" -msgstr "image" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "dans" - -#: src/ImageDeleteModal.jsx:79 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate" -msgstr "Cacher les images intermédiaires" - -#: src/ImageDeleteModal.jsx:59 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate image" -msgstr "Cacher les images intermédiaires" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "n. d." - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "non disponible" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "groupe pod" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "ports" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "secondes" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "système" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "non utilisé" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "utilisateur :" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "volumes" - -#~ msgid "Delete $0" -#~ msgstr "Supprimer $0" - -#~ msgid "select all" -#~ msgstr "tout sélectionner" - -#~ msgid "Restarting" -#~ msgstr "Redémarrage" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Confirmer la suppression de $0" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Confirmer la suppression du pod $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Confirmer la suppression forcée du pod $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Confirmer la suppression forcée de $0" - -#~ msgid "Container is currently running." -#~ msgstr "Le conteneur est actuellement en cours d’exécution." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "" -#~ "Ne pas inclure les changements effectués sur la racine du système de " -#~ "fichier lors de l'export" - -#~ msgid "Default with single selectable" -#~ msgstr "Par défaut avec sélection simple" - -#~ msgid "Start after creation" -#~ msgstr "Démarrer après création" - -#, fuzzy -#~| msgid "Delete tagged images" -#~ msgid "Delete unused $0 images:" -#~ msgstr "Supprimer les images taguées" - -#~ msgid "created" -#~ msgstr "créé" - -#~ msgid "exited" -#~ msgstr "Quittés" - -#~ msgid "paused" -#~ msgstr "Mis en pause" - -#~ msgid "running" -#~ msgstr "en cours d'exécution" - -#~ msgid "stopped" -#~ msgstr "arrêté" - -#, fuzzy -#~| msgid "user:" -#~ msgid "user" -#~ msgstr "utilisateur :" - -#~ msgid "Add on build variable" -#~ msgstr "Ajouter une variable de build" - -#~ msgid "Commit image" -#~ msgstr "Valider image" - -#~ msgid "Format" -#~ msgstr "Format" - -#~ msgid "Message" -#~ msgstr "Message" - -#~ msgid "Pause the container" -#~ msgstr "Mettre le conteneur en pause" - -#~ msgid "Remove on build variable" -#~ msgstr "Supprimer la variable de construction" - -#~ msgid "Set container on build variables" -#~ msgstr "Définir le conteneur sur les variables de construction" - -#~ msgid "Add item" -#~ msgstr "Ajouter un élément" - -#~ msgid "Host port (optional)" -#~ msgstr "Port de l’hôte (optionnel)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (optionnel)" - -#~ msgid "ReadOnly" -#~ msgstr "LectureSeule" - -#~ msgid "IP prefix length" -#~ msgstr "Taille du préfixe IP" - -#~ msgid "Get new image" -#~ msgstr "Obtenir une nouvelle image" - -#~ msgid "Run" -#~ msgstr "Exécuter" - -#~ msgid "On build" -#~ msgstr "En construction" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Voulez-vous vraiment supprimer cette image ?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Impossible de s’attacher à ce conteneur : $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Impossible d’ouvrir le canal : $0" - -#~ msgid "Everything" -#~ msgstr "Tout" - -#~ msgid "Security" -#~ msgstr "Sécurité" - -#~ msgid "The scan from $time ($type) found no vulnerabilities." -#~ msgstr "L’analyse de $time ($type) n’a trouvé aucune vulnérabilité." - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "" -#~ "Cette version de la console web n’est compatible avec les terminaux." diff --git a/ui/cockpit-docker/po/ja.po b/ui/cockpit-docker/po/ja.po deleted file mode 100644 index dd5e9ba..0000000 --- a/ui/cockpit-docker/po/ja.po +++ /dev/null @@ -1,1467 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2024-02-19 03:30+0000\n" -"Last-Translator: Mie Yamamoto \n" -"Language-Team: Japanese \n" -"Language: ja\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0\n" -"X-Generator: Weblate 5.4\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 コンテナー" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 イメージ合計、$1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 2 番目" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 の未使用イメージ、$1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 - 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "コンテナーが異常な状態に移行したときに実行するアクション。" - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "ポートマッピングの追加" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "変数の追加" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "ボリュームの追加" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "すべて" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "すべてのレジストリー" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "常時" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "エラーが発生しました" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "作成者" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "起動時に docker を自動的に起動する" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "CPU share のヘルプ" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU 共有" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU 共有は実行中のコンテナーの優先度を決定します。デフォルトの優先度は 1024 " -"です。数値が高いほど、このコンテナーの優先度が高くなります。数値が低いほど優" -"先度が低くなります。" - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "取り消し" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "ヘルスチェック" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "チェックポイント" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "チェックポイントおよび復元のサポート" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "チェックポイントコンテナー $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "クリックして公開されたポートを表示します" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "クリックしてボリュームを表示します" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Docker コンテナーの Cockpit コンポーネント" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "コマンド" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "コメント" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "コミット" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "コンテナーのコミット" - -#: src/util.js:23 -msgid "Configured" -msgstr "設定済み" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "コンソール" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "コンテナー" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "コンテナーの作成に失敗しました" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "コンテナーの開始に失敗しました" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "コンテナーが実行されていません" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "コンテナー名" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "コンテナー名が必要です。" - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "コンテナーパス" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "コンテナーパスは空欄にできません" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "コンテナーポート" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "コンテナーポートは空欄にできません" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "コンテナー" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "作成" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "$0 コンテナーの現在の状態に基づいて、新しいイメージを作成します。" - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "作成して実行する" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "コンテナーの作成" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "$0 でのコンテナーの作成" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Pod でのコンテナーの作成" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Pod の作成" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "作成済み" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "作成元" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "CPU 共有を減らす" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "間隔を縮小する" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "最大再試行回数を減らす" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "メモリーを減らす" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "再試行回数を減らす" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "開始期間を縮小する" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "タイムアウトを縮小する" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "削除" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "$0 イメージを削除しますか?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "$0 を削除しますか?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "イメージの削除" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Pod $0 を削除しますか?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "タグ付けされたイメージの削除" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "使用されていないシステムイメージの削除:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "使用されていないユーザーイメージの削除:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "コンテナーを削除すると、コンテナー内のすべてのデータが削除されます。" - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "実行中のコンテナーを削除すると、その中のすべてのデータが削除されます。" - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "この Pod を削除すると、以下のコンテナーが削除されます:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "詳細" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "ディスクの空き容量" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Dockerフォーマットは、イメージをDockerまたはMoby Engineで共有する時に便利です" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "ダウンロード" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "新規イメージのダウンロード" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "空の Pod $0 は完全に削除されます。" - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "エントリーポイント" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "環境変数" - -#: src/util.js:26 -msgid "Error" -msgstr "エラー" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "エラーメッセージ" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "コンソールへの接続中にエラーが発生しました" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "例: 名前 " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "例: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "終了" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "失敗したヘルスの実行" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "コンテナー $0 のチェックポイントに失敗しました" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "コンテナーのクリーンアップに失敗しました" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "コンテナー $0 のコミットに失敗しました" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "コンテナー $0 の作成に失敗しました" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "イメージ $0 のダウンロードに失敗しました: $1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "コンテナー $0 を強制的に削除できませんでした" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "イメージ $0 の強制削除に失敗しました" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Pod $0 の強制再起動に失敗しました" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Pod $0 の強制停止に失敗しました" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "コンテナー $0 の一時停止に失敗しました" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Pod $0 の一時停止に失敗しました" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "使用されていないイメージの prune に失敗しました" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "使用されていないイメージのpruneに失敗しました" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "イメージ $0 のpullに失敗しました" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "コンテナー $0 の削除に失敗しました" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "イメージ $0 の削除に失敗しました" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "コンテナーの名前変更に失敗しました $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "コンテナー $0 の再起動に失敗しました" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Pod $0 の再起動に失敗しました" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "コンテナー $0 の復元に失敗しました" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "コンテナー $0 のレジュームに失敗しました" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Pod $0 の再開に失敗しました" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "コンテナー $0 の実行に失敗しました" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "コンテナーでのヘルスチェックの実行に失敗しました $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "イメージの検索に失敗しました。" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "イメージの検索に失敗しました: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "新規イメージの検索に失敗しました" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "コンテナー $0 の起動に失敗しました" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Pod $0 の起動に失敗しました" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "コンテナー $0 の停止に失敗しました" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Pod $0 の停止に失敗しました" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "失敗の連続" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "強制コミット" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "削除の強制" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Pod $0 を強制的に削除しますか?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "再起動の強制" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "停止の強制" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "ゲートウェイ" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "ヘルスチェック" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "ヘルスチェックの間隔のヘルプ" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "ヘルスチェックの再試行のヘルプ" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "ヘルスチェックの開始期間のヘルプ" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "ヘルスチェックのタイムアウトのヘルプ" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "ヘルスチェック失敗時のアクションのヘルプ" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "健全" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "イメージを非表示" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "中間イメージを非表示" - -#: src/Images.jsx:158 -msgid "History" -msgstr "履歴" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "ホストパス" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "ホストポート" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "ホストポートヘルプ" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP アドレス" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "IP アドレスヘルプ" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "開発に最適" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "実行中のサービスに最適" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"ホスト IP を 0.0.0.0 に設定した場合、またはまったく設定しなかった場合、ポート" -"はホスト上のすべての IP にバインドされます。" - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"ホストポートが設定されていない場合、コンテナーポートにはホストのポートがラン" -"ダムに割り当てられます。" - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "静的に設定された場合は IP アドレスを無視" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "静的に設定された場合は MAC アドレスを無視" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "イメージ" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "イメージ名は一意ではありません" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "イメージ名が必要です" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "イメージ選択のヘルプ" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "イメージ" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "CPU 共有を増やす" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "間隔を増やす" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "最大再試行回数を増やす" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "メモリーを増やす" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "再試行を増やす" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "開始期間を拡大する" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "タイムアウトを拡大する" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "インテグレーション" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "間隔" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "ヘルスチェックの実行頻度 (間隔)。" - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"無効な文字です。名前には文字、数字、および特定の句読点 (_ . -) のみを使用でき" -"ます。" - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "すべての一時的なチェックポイントファイルを維持" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "キー" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "キーは空欄にできません" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "過去 5 回の実行" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "最終チェックポイント" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "チェックポイントをディスクに書き込む後もそのまま実行したままにする" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "詳細をロード中..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "ログをロード中..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "ロード中..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "ローカル" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "ローカルのイメージ" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "ログ" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC アドレス" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "最大施行数" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "メモリ" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "メモリー制限" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "メモリーユニット" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "モード" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"このイメージには、複数のタグが存在します。削除するタグ付けされたイメージを選" -"択します。" - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "有効な IP アドレスにしてください" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "名前" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "名前はすでに使用中です" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "新しいコンテナー名" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "新しいイメージ名" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "いいえ" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "アクションなし" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "コンテナーなし" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "このイメージを使用するコンテナーはありません" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "この Pod 内のコンテナーはありません" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "現在のフィルターに一致するコンテナーがありません" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "環境変数が指定されていません" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "イメージなし" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "イメージが見つかりません" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "現在のフィルターに一致するイメージがありません" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "ラベルなし" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "開放されているポートはありません" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "$0 の結果なし" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "実行中のコンテナーはありません" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "指定されているボリュームはありません" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "障害発生時" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "実行のみ" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "オプション" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "所有者" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "所有者のヘルプ" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "合格したヘルスの実行" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"一括インポートのために、キー=値ペアからなる 1 つまたは複数の行を任意のフィー" -"ルドに貼り付けます" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "一時停止" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "イメージの作成時にコンテナーを一時停止します" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "一時停止" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Pod の作成に失敗しました" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Pod 名" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker コンテナー" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker サービスがアクティブではありません" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "ポートマッピング" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "ポート" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "1024 未満のポートをマッピングできます" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "プライベート" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "プロトコル" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "削除" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "使用していないコンテナーの削除" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "未使用イメージの削除" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "コンテナーに prune を実行中" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "イメージを削除中" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "最新イメージのプル" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "プル中" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "読み取り専用アクセス" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "読み書きアクセス" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "アイテムの削除" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "選択した実行中でないコンテナーを削除します" - -#: src/util.js:23 -msgid "Removing" -msgstr "削除中" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "名前変更" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "コンテナーの名前変更 $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "リソース制限を設定できます" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "再起動" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "再起動ポリシー" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "再起動ポリシーのヘルプ" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "コンテナーの終了時に従う再起動ポリシー。" - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"コンテナーの終了時に従う再起動ポリシー。コンテナーの自動起動に linger を使用" -"すると、ユーザーアカウントで ecryptfs、systemd-homed、NFS、または 2FA が使用" -"されている場合など、一部の状況では機能しない場合があります。" - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "復元" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "コンテナー $0 の復元" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "確立された TCP 接続での復元" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "ユーザーアカウントのパーミッションによって制限" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "再開" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "再試行回数" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "別の用語を再試行します。" - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "ヘルスチェックを実行する" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "実行中" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "名前または説明による検索" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "レジストリーで検索" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "検索" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "イメージの検索" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "検索文字列またはコンテナーのロケーション" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "検索中..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "検索中: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "共有" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "表示" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "イメージの表示" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "中間イメージの表示" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "簡易表示" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "詳細表示" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "サイズ" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "開始" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "開始期間" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Docker を起動" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "イメージを検索するために入力を開始します。" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "開始日時" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "状態" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "ステータス" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "停止" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "停止中" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "確立された TCP 接続の保持サポート" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "システム" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "システム Docker サービスも利用できます" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "タグ" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "タグ" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Docker コンテナーの Cockpit ユーザーインターフェイス。" - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "コンテナーのブートストラップに必要な初期化時間。" - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"間隔が失敗したとみなされる前に、ヘルスチェックを完了するために許容される最大" -"時間。" - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "ヘルスチェックが異常であると見なされるまでに許可される再試行の回数。" - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "タイムアウト" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "トラブルシュート" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "入力してフィルタリング…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "イメージ履歴をロードできません" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "異常" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "$0 から稼働中" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "レガシーの Docker フォーマットの使用" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "使用中" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "ユーザー" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "ユーザーの Docker サービスも利用できます" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "ユーザー:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "値" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "ボリューム" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "異常な場合" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "端末の使用" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "書き込み可能" - -#: src/manifest.json:0 -msgid "container" -msgstr "コンテナー" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "ダウンロード中" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "host[:port]/[user]/container[:tag]" - -#: src/manifest.json:0 -msgid "image" -msgstr "イメージ" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "場所" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "中間" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "中間イメージ" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "N/A" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "利用できません" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "Pod グループ" - -#: src/manifest.json:0 -msgid "docker" -msgstr "Docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "ポート" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "秒" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "システム" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "未使用" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "ユーザー:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "ボリューム" - -#~ msgid "Delete $0" -#~ msgstr "$0 の削除" - -#~ msgid "select all" -#~ msgstr "すべて選択" - -#~ msgid "Restarting" -#~ msgstr "再起動中" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "$0 の削除を確定する" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Pod $0 の削除を確定する" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Pod $0 の強制削除を確定する" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "$0 の強制削除を確定する" - -#~ msgid "Container is currently running." -#~ msgstr "コンテナーは現在実行中です。" - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "エクスポート時に root ファイルシステムの変更を含めないでください" - -#~ msgid "Default with single selectable" -#~ msgstr "単一項目のみ選択可能なデフォルト" - -#~ msgid "Start after creation" -#~ msgstr "作成後に開始" - -#, fuzzy -#~| msgid "Delete tagged images" -#~ msgid "Delete unused $0 images:" -#~ msgstr "タグ付けされたイメージの削除" - -#~ msgid "created" -#~ msgstr "作成済み" - -#~ msgid "exited" -#~ msgstr "終了" - -#~ msgid "paused" -#~ msgstr "一時停止" - -#~ msgid "running" -#~ msgstr "実行中" - -#~ msgid "stopped" -#~ msgstr "停止中" - -#, fuzzy -#~| msgid "user:" -#~ msgid "user" -#~ msgstr "ユーザー:" - -#~ msgid "Add on build variable" -#~ msgstr "ビルド変数の追加" - -#~ msgid "Commit image" -#~ msgstr "イメージのコミット" - -#~ msgid "Format" -#~ msgstr "フォーマット" - -#~ msgid "Message" -#~ msgstr "メッセージ" - -#~ msgid "Pause the container" -#~ msgstr "コンテナーの一時停止" - -#~ msgid "Remove on build variable" -#~ msgstr "ビルド変数の削除" - -#~ msgid "Set container on build variables" -#~ msgstr "ビルド変数にコンテナーを設定する" - -#~ msgid "Add item" -#~ msgstr "アイテムの追加" - -#~ msgid "Host port (optional)" -#~ msgstr "ホストポート (オプション)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (任意)" - -#~ msgid "ReadOnly" -#~ msgstr "読み取り専用" - -#~ msgid "IP prefix length" -#~ msgstr "IP プレフィックスの長さ" - -#~ msgid "Run" -#~ msgstr "実行" diff --git a/ui/cockpit-docker/po/ka.po b/ui/cockpit-docker/po/ka.po deleted file mode 100644 index 3737c90..0000000 --- a/ui/cockpit-docker/po/ka.po +++ /dev/null @@ -1,1408 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-11-29 13:31+0000\n" -"Last-Translator: Temuri Doghonadze \n" -"Language-Team: Georgian \n" -"Language: ka\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1\n" -"X-Generator: Weblate 5.2.1\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 ცალი კონტეინერი" -msgstr[1] "$0 კონტეინერი" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 ცალი გამოსახულება, $1" -msgstr[1] "$0 გამოსახულება, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 წამი" -msgstr[1] "$0 წამი" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 ცალი გამოუყენებელი გამოსახულება, $1" -msgstr[1] "$0 გამოუყენებელი გამოსახულება, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1-დან 65535-მდე" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "" -"ქმედება, რომელიც კონტეინერის არაჯანმრთელ მდომარეობაში გადასვლისას შესრულდება." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "პორტის ასახვის დამატება" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "ცვლადის დამატება" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "საცავის დამატება" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "ყველა" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "ყველა რეგისტრები" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "ყველთვის" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "შეცდომა" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "ავტორი" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "docker-ის გაშვება სისტემის ჩატვირთვისას" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "პროცესორი" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "პროცესორის გაზიარების დახმარება" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU გაზიარება" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU-ის ზიარები განსაზღვრავენ გაშვებულიკონტეინერების პრიორიტეტს. ნაგულისხმები " -"პრიორიტეტი 1024-ის ტოლია. რაც მეტია რიცხვი, მით მეტია პრიორიტეტი; რაც " -"ნაკლები -ნაკლები." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "გაუქმება" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "ჯანმრთელობის შემოწმება" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "საკონტროლო წერტილი" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "საკონტროლო წერტილის და აღდგენის მხარდაჭერა" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "საკონტროლო წერტილის კონტეინერი ($0)" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "დააწკაპუნეთ გამოჩენილი პორტების სანახავად" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "დააწკაპუნეთ ტომების სანახავად" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Cockpit-ის კომპონენტი Docker-ის კონტეინერებისთვის" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "ბრძანება" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "კომენტარები" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "გადაცემა" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "კონტეინერის გაგზავნა" - -#: src/util.js:23 -msgid "Configured" -msgstr "მორგებულია" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "კონსოლი" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "კონტეინერი" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "კონტეინერის შექმნის შეცდომა" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "კონტეინერის გაშვების შეცდომა" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "კონტეინერი გაშვებული არაა" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "კონტეინერის სახელი" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "კონტეინერის სახელი აუცილებელია." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "კონტეინერის ბილიკი" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "კონტეინერის ბილიკი არ შეიძლება ცარიელი იყოს" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "კონტეინერის პორტი" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "კონტეინერის პორტი არ შეიძლება ცარიელი იყოს" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "კონტეინერები" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "შექმნა" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "კონტეინერის ($0) მდგომარეობაზე დამყარებული ახალი გამოსახულების შექმნა." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "შექმნა და გაშვება" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "კონტეინერის შექმნა" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "$0-ში კონტეინერის შექმნა" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "pod-ში კონტეინერის შექმნა" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "pod-ის შექმნა" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "შექმნილია" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "ავტორი" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "CPU გაზიარებების შემცირება" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "ინტერვალის შემცირება" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "ცდების მაქსიმალური რაოდენობის შემცირება" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "მეხსიერების შემცირება" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "ცდების რაოდენობის შემცირება" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "გაშვების პერიოდის შემცირება" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "მოლოდინის დროის შემცირება" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "წაშლა" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "წავშალო $0 დისკის ასლი?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "წავშალო $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "დისკის ასლის წაშლა" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "წავშალო პოდი $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "ჭდეებიანი გამოსახულებების წაშლა" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "სისტემის გამოუყენებელი გამოსახულებების წაშლა:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "მომხმარებლის გამოუყენებელი გამოსახულებების წაშლა:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "კონტეინერის წაშლა მასში ყველა მონაცემს წაშლის." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "გაშვებული კონტეინერის წაშლა მასში ყველა მონაცემს წაშლის." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "ამ Pod-ის წაშლა ასევე წაშლის შემდეგ კონტეინერებს:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "დეტალები" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "ადგილი დისკზე" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Docker-ის ფორმატი ძალიან სასარგებლოა გამოსახულების Docker-თან ან Moby " -"Engline-სთან გაზიარებისთვის" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "გადმოწერა" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "ახალი გამოსახულების გადმოწერა" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "ცარიელი პოდი $0 სამუდამოდ წაიშლება." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "შესავალი წერტილი" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "გარემოს ცვლადები" - -#: src/util.js:26 -msgid "Error" -msgstr "შეცდომა" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "შეცდომის შეტყობინება" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "კონსოლთან დაკავშირების შეცდომა" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "მაგ. თქვენი სახელი " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "მაგალითად: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "გამოსული" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "ჯანმრთელობის შემოწმების შეცდომა" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "კონტეინერის ($0) საკონტროლო წერტილის შეცდომა" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "კონტეინერის გასუფთავების შეცდომა" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "კონტეინერის ($0) გადაცემის შეცდომა" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "კონტეინერის ($0) შექმნის შეცდომა" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "გამოსახულების ($0) გადმოწერის შეცდომა: $1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "კონტეინერის ($0) წაშლის შეცდომა" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "გამოსახულების ($0) ძალით წაშლა შეუძლებელია" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Pod-ის ($0) ძალით რესტარტის შეცდომა" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Pod-ის ($0) ძალით გაჩერების შეცდომა" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "კონტეინერის ($0) შეჩერების შეცდომა" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Pod-ის ($0) შეჩერების შეცდომა" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "გამოუყენებელი კონტეინერების წაკვეთის შეცდომა" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "გამოუყენებელი გამოსახულებების წაკვეთის შეცდომა" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "გამოსახულების ($0) გამოთხოვნის შეცდომა" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "კონტეინერის ($0) წაშლის შეცდომა" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "გამოსახულების ($0) წაშლის შეცდომა" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "კონტეინერის ($0) სახელის გადარქმევის შეცდომა" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "კონტეინერის ($0) რესტარტის შეცდომა" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Pod-ის ($0) რესტარტის შეცდომა" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "კონტეინერის ($0) აღდგენის შეცდომა" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "კონტეინერის ($0) გაგრძელების შეცდომა" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Pod-ის ($0) გაგრძელების შეცდომა" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "კონტეინერის ($0) გაშვების შეცდომა" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "კონტეინერის ($0) ჯანმრთელობის შემოწმების შეცდომა" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "გამოსახულებების ძებნის შეცდომა." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "გამოსახულების ძებნის შეცდომა: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "ახალი გამოსახულებების ძებნის შეცდომა" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "კონტეინერის ($0) გაშვების შეცდომა" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "pod-ს ($0) გაშვების შეცდომა" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "კონტეინერის ($0) გაჩერების შეცდომა" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "pod-ის ($0) გაჩერების შეცდომა" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "მრავალჯერადი წარუმატებლობა" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "ძალით გადაგზავნა" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "ძალით წაშლა" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "წავშლო ძალით პოდი $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "ძალით რესტარტი" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "ძალით გაჩერება" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "გბ" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "ნაგულისხმები რაუტერი" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "ჯანმრთელობის შემოწმება" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "ჯანმრთელობის შემოწმების ინტერვალის დახმარება" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "ჯანმრთელობის შემოწმების ცდების რაოდენობის დახმარება" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "ჯანმრთელობის შემოწმების გაშვების პერიოდის დახმარება" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "ჯანმრთელობის შემოწმების ვადის დახმარება" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "ჯანმრთელობის შემოწმების ქმედების დახმარება" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "ჯანმრთელი" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "გამოსახულებების დამალვა" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "შუალედური გამოსახულებების დამალვა" - -#: src/Images.jsx:158 -msgid "History" -msgstr "ისტორია" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "ჰოსტის ბილიკი" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "ჰოსტის პორტი" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "დახმარება ჰოსტის პორტის შესახებ" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP მისამართი" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "დახმარება IP მისამართის შესახებ" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "იდეალურია პროგრამირებისთვის" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "იდეალურია სერვისების გასაშვებად" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"თუ ჰოსტის IP დაყენებულია 0.0.0.0-ზე ან საერთოდ არაა დაყენებული, პორტი ჰოსტზე " -"არსებულ ყველა IP-ს მიებმება." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"თუ ჰოსტის პორტი დაყენებული არაა, კონტეინერის პორტი ჰოსტზე შემთხვევითად " -"იქნება არჩეული." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "სტატიკურად მინიჭებული IP მისამართის იგნორი" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "სტატიკურად მინიჭებული MAC მისამართის იგნორი" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "გამოსახულება" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "ასლის სახელი უნიკალური არაა" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "ასლის სახელი აუცილებელია" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "დახმარება გამოსახულების არჩევის შესახებ" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "გამოსახულებები" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "CPU გაზიარებების გაზრდა" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "ინტერვალის გაზრდა" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "ცდების მაქსიმალური რაოდენობის გაზრდა" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "მეხსიერების გაზრდა" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "ცდების რაოდენობის გაზრდა" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "გაშვების პერიოდის გაზრდა" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "მოლოდინის დროის გაზრდა" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "ინტეგრაცია" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "ინტერვალი" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "ჯანმრთელობის შემოწმების გაშვების ინტერვალი." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"არასწორი სიმბოლოები. სახელი მხოლოდ ასოებს, ციფრებს და ზოგიერთ პუნქტუაციის " -"ნიშანს (_,-) შეიძლება შეიცავდეს." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "კბ" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "საკონტროლო წერტილის ყველა დროებითი ფაილის შენახვა" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "გასაღები" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "გასაღები არ შეიძლება, ცარიელი იყოს" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "ბოლო 5 გაშვება" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "უახლესი საკონტროლო წერტილი" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "საკონტროლო წერტილის დისკზე ჩაწერის შემდეგ გაშვებულად დატოვება" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "დეტალების ჩატვირთვა..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "ჟურნალის ჩატვირთვა..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "ჩატვირთვა..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "ლოკალური" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "ლოკალური გამოსახულებები" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "ჟურნალი" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC მისამართი" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "მბ" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "ცდების მაქსიმალური რაოდენობა" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "მეხსიერება" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "მეხსიერების ლიმიტი" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "მეხსიერების ერთეული" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "რეჟიმი" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"ამ გამოსახულებას მრავალი ჭდე გააჩნია. წასაშლელად მონიშნეთ ჭდეებიანი " -"გამოსახულებები." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "უნდა იყოს სწორი IP მისამართი" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "სახელი" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "სახელი უკვე გამოიყენება" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "ახალი კონტეინერის სახელი" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "ახალი გამოსახულების სახელი" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "არა" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "ქმედების გარეშე" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "კონტეიენერების გარეშე" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "ამ გამოსახულებას არცერთი კონტეინერი არ იყენებს" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "ამ Pod-ში კონტეინერები არაა" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "მიმდინარე ფილტრს არცერთი კონტეინერი არ შეესაბამება" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "გარემოს ცვლადი მითითებული არაა" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "გამოსახულებების გარეშე" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "გამოსახულებების გარეშე" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "მიმდინარე ფილტრს არცერთი გამოსახულება არ შეესაბამება" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "ჭდეების გარეშე" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "პორტები გამოტანილი არაა" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "პასუხების გარეშე $0-თვის" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "გაშვებული კონტეინერების გარეშე" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "საცავი მითითებული არაა" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "შეცდომისას" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "მხოლოდ გაშვებული" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "მორგება" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "მფლობელი" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "მფლობელის დახმარება" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "ჯანმრთელობის შემოწმება წარმატებულია" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"მრავალი შემოტანისთვის ველებში ჩასვით ერთი ან მეტი გასაღები=მნიშვნელობა-ის " -"ტიპის წყვილები" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "პაუზა" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "კონტეინერის შეჩერება გამოსახულების შექმნისას" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "შეჩერებულია" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Pod-ის შექმნის შეცდომა" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Pod-ის სახელი" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker-ის კონტეინერები" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker-ის სერვისი აქტიური არაა" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "პორტების ასახვა" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "პორტები" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "შეგიძლიათ 1024-ზე ნაკლები ნომრის მქონე პორტის მიბმა" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "პირადი" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "პროტოკოლი" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "შეკვეცა" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "გამოუყენებელი კონტეინერების წაკვეთა" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "გამოუყენებელი გამოსახულებების წაკვეთა" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "კონტეინერების წაკვეთა" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "გამოსახულებების წაკვეთა" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "უახლესი გამოსახულების წამოღება" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "გამოწევა" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "მხოლოდ-კითხვის წვდომა" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "ჩაწერა/წაკითხვის წვდომა" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "ელემენტის წაშლა" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "მონიშნული არა-გაშვებული კონტეინერების წაშლა" - -#: src/util.js:23 -msgid "Removing" -msgstr "წაშლა" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "გადარქმევა" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "კონტეინერის სახელის გადარქმევა ($0)" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "შეგიძლიათ ლიმიტების დაყენება" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "გადატვირთვა" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "რესტარტის წესები" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "დახმარება რესტარტის წესების შესახებ" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "კონტეინერების მუშაობის დასასრულისას რესტარტის წესები." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"კონტეინერების მუშაობის დასრულებისას მისაყოლი გადატვირთის პოლიტიკა. " -"კონტეინერების ავტომატური გაშვებისთვის linger-მა ყოველთვის შეიძლება არ " -"იმუშაოს. მაგალითად, თუ მომხმარებელზე enccryptfs, systemd-homed, NFS ან 2FA " -"გამოიყენება." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "აღდგენა" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "კონტეინერის აღდგენა ($0)" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "დამყარებული TCP კავშირებით აღდგენა" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "შეზღუდულია მომხმარებლის ანგარიშის წვდომებით" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "გაგრძელება" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "თავიდან ცდები" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "სხვა სიტყვა სცადეთ." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "ჯანმრთელობის შემოწმების გაშვება" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "გაშვებულია" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "სახელით ან აღწერით ძებნა" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "რეგისტრის ძებნა" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "ძებნა" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "გამოსახულების ძებნა" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "სტრიქონის ან კონტეინერის მდებარეობის ძებნა" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "ძებნა..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "ძებნა: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "გაზიარებული" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "ჩვენება" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "გამოსახულებების ჩვენება" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "შუალედური გამოსახულებების ჩვენება" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "ნაკლების ჩვენება" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "მეტის ჩვენება" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "ზომა" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "დაწყება" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "გაშვების პერიოდი" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Docker-ის გაშვება" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "გამოსახულებების მოსაძებნად დაიწყეთ მისი სახელის კრეფა." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "გაშვების დრო" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "მდგომარეობა" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "სტატუსი" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "გაჩერება" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "გაჩერებულია" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "დამყარებული TCP კავშირების შენარჩუნების მხარდაჭერა" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "სისტემა" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "ასევე ხელმისაწვდომია Docker-ის სისტემური სერვისი" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "ჭდე" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "ჭდეები" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Cockpit-ის მომხმარებლის ინტერფეისი Docker-ის კონტეინერებისთვის." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "კონტეინერის მოსარგებად საჭირო ინიციალიზაციის დრო." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"მაქსიმალური დრო ჯანმრთელობის შესამოწმებლად. ამ ინტერვალის გასვლის შემდეგ " -"შემოწმება შეცდომის მქონედ ითვლება." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"ცდების რაოდენობა, რის შემდეგაც ჯანმრთელობის შემოწმება ავარიულად ითვლება." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "დროის ამოწურვა" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "პრობლემების პოვნა" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "გაფილტვრისთვის აკრიფეთ…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "გამოსახულების ისტორიის ჩატვირთვის შეცდომა" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "ჯანმრთელი არაა" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "$0 და ზემოთ" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Docker-ის ძველი ფორმატის გამოყენება" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "გამოიყენება" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "მომხმარებელი" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "ასევე ხელმისაწვდომია Docker-ის მომხმარებლის სერვისი" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "მომხმარებელი:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "მნიშვნელობა" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "საცავები" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "როცა ჯანმრთელი არაა" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "ტერმინალით" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "ჩაწერადი" - -#: src/manifest.json:0 -msgid "container" -msgstr "კონტეინერი" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "გადმოწერა" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "ჰოსტი[:პორტი]/[მომხმარებელი]/კონტეინერი[:ჭდე]" - -#: src/manifest.json:0 -msgid "image" -msgstr "გამოსახულება" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "-ში" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "შუალედური" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "შუალედური დისკის ასლი" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "ა/მ" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "ხელმიუწვდომელია" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "pod-ების ჯგუფი" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "პორტები" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "წამი" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "სისტემა" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "გამოუყენებელი" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "მომხმარებელი:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "ტომები" - -#~ msgid "Delete $0" -#~ msgstr "$0-ის წაშლა" - -#~ msgid "select all" -#~ msgstr "ყველას მონიშვნა" - -#~ msgid "Failure action" -#~ msgstr "ქმედება ავარიისას" - -#~ msgid "Restarting" -#~ msgstr "გადატვირთვა" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "დაადასტურეთ $0-ის წაშლა" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "დაადასტურეთ Pod-ის წაშლა: $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "დაადასტურეთ pod-ის ძალით წაშლა: $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "დაადასტურეთ ძალით წაშლა: $0" - -#~ msgid "Container is currently running." -#~ msgstr "ამჟამად კონტეინერი გაშვებულია." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "გატანისას ფაილური სისტემის ცვლილებების არ-გადატანა" diff --git a/ui/cockpit-docker/po/ko.po b/ui/cockpit-docker/po/ko.po deleted file mode 100644 index e21ae85..0000000 --- a/ui/cockpit-docker/po/ko.po +++ /dev/null @@ -1,1461 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2024-03-16 15:35+0000\n" -"Last-Translator: 김인수 \n" -"Language-Team: Korean \n" -"Language: ko\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0\n" -"X-Generator: Weblate 5.4\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 컨테이너" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 이미지 총계, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 초" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 미사용 이미지, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 ~ 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "컨테이너가 비정상 상태로 전이되면 수행 할 작업." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "포트 대응을 추가합니다" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "변수를 추가합니다" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "볼륨 추가" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "모두" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "모든 레지스터리" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "항상" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "오류가 발생했습니다" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "작성자" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "부트시 자동으로 docker 시작" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "CPU 공유 도움말" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU 공유" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU 공유는 동작 중인 콘테이너 우선 순위를 결정합니다. 기본 우선순위는 1024입" -"니다. 숫자가 클 수록 이 컨테이너 우선순위를 갖습니다. 낮은 번호는 우선 순위" -"가 낮아집니다." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "취소" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "상태 점검 중" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "점검점" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "점검점과 복구 지원" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "점검점 컨테이너 $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "공개된 포트를 보려면 누르세요" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "볼륨을 보려면 누르세요" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "포드맨 컨테이너를 위한 cockpit 구성요소" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "명령" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "주석" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "수행" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "컨테이너 커밋" - -#: src/util.js:23 -msgid "Configured" -msgstr "구성됨" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "콘솔" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "컨테이너" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "컨테이너 생성에 실패했습니다" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "컨테이너 시작에 실패했습니다" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "컨테이너가 동작 중이 아닙니다" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "컨테이너 이름" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "컨테이너 이름이 필요합니다." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "컨테이너 경로" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "컨테이너 경로는 비워두면 안됩니다" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "컨테이너 포트" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "컨테이너 포트는 비워두면 안됩니다" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "컨테이너" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "생성" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "$0 컨테이너의 현재 상태에서 기반된 새로운 이미지를 생성합니다." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "생성과 실행" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "컨테이너 생성" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "$0에서 컨테이너 생성" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "포드에서 컨테이너 생성" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "포드 생성" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "생성일" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "생성됨" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "CPU 공유 감소" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "간격 감소" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "최대 재시도 감소" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "메모리 감소" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "재시도 감소" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "시작 기간 감소" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "시간종료 감소" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "삭제" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "$0 이미지를 삭제할까요?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "$0 삭제?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "이미지 삭제" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "pod $0 삭제?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "태그가 지정된 이미지 삭제" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "사용하지 않는 시스템 이미지 삭제:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "사용하지 않는 사용자 이미지 삭제:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "컨테이너를 삭제는 내부의 모든 자료도 제거됩니다." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "동작 중인 컨테이너 삭제는 내부의 모든 자료도 제거됩니다." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "이 pod의 삭제는 다음 컨테이너도 제거될 것입니다:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "상세정보" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "디스크 공간" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"도커 형식은 도커 또는 모비 엔진과 같은 이미지를 공유 할 때에 유용합니다" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "내려받기" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "신규 이미지 내려받기" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "빈 pod $0는 영구적으로 제거됩니다." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "시작점" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "환경 변수" - -#: src/util.js:26 -msgid "Error" -msgstr "오류" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "오류 메시지" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "오류가 콘솔 연결 중에 발생했습니다" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "예제, 당신의 이름 " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "예제: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "종료됨" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "상태 실행에 실패함" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "컨테이너 $0 점검점에 실패" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "컨테이너를 정리하는데 실패" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "컨테이너 $0 수행에 실패" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "컨테이너 $0 생성에 실패" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "이미지 $0:$1 내려받기에 실패" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "컨테이너 $0 강제 제거에 실패" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "이미지 $0 강제 제거에 실패" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "pod $0 강제로 재시작 하는데 실패" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "pod $0 강제 멈춤에 실패" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "컨테이너 $0를 일시 중지 하는 데 실패" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "pod $0 일시정지에 실패" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "사용하지 않는 컨테이너 정리 실패" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "사용하지 않는 이미지 정리 실패" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "이미지 $0를 가져오는 데 실패" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "컨테이너 $0 제거에 실패" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "이미지 $0 제거에 실패" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "컨테이너 $0의 이름을 변경하는데 실패함" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "컨테이너 $0 재시작에 실패" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "pod $0 재시작에 실패" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "컨테이너 $0 복구에 실패" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "컨테이너 $0를 다시 시작 하는 데 실패" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "pod $0 재개에 실패" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "컨테이너 $0를 실행하는 데 실패" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "컨테이너 $0에서 상태를 점검하는데 실패함" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "이미지 검색을 실패함." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "이미지를 위한 검색 실패: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "새로운 이미지 검색 실패" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "컨테이너 $0 시작에 실패" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "pod $0를 시작하는 데 실패" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "컨테이너 $0 멈춤에 실패" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "pod $0 멈춤에 실패" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "연속 실패" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "강제 커밋" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "강제 삭제" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "pod $0 강제 삭제?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "강제 재시작" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "강제 멈춤" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "게이트웨이" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "상태 점검" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "상태 점검 간격 도움말" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "상태 점검 재시도 도움말" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "상태 점검 시작 기간 도움말" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "상태 점검 시간종료 도움말" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "상태 장애 점검 작용 도움말" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "상태좋음" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "이미지 숨김" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "중간 이미지 숨기기" - -#: src/Images.jsx:158 -msgid "History" -msgstr "기록" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "호스트 경로" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "호스트 포트" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "호스트 포트 도움말" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP 주소" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "IP 주소 도움말" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "개발을 위해 이상적인" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "실행 중인 서비스에 이상적인" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"만약 호스트 IP가 0.0.0.0으로 설정되거나 또는 전혀 설정되지 않으면, 포트는 호" -"스트의 모든 IP에서 묶이게 됩니다." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"만약 호스트 포트가 컨테이너에 설정되어 있지 않으면, 포트는 호스트에서 임의 지" -"정된 포트가 됩니다." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "정적인 상태라면 IP 주소 무시" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "정적인 상태라면 맥 주소 무시" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "이미지" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "이미지 이름은 독특하지 않습니다" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "이미지 이름이 필요합니다" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "이미지 선택 도움말" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "이미지" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "CPU 공유 증가" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "간격 증가" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "최대 재시도 증가" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "메모리 증가" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "재시도 증가" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "시작 기간 증가" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "시간종료 증가" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "통합" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "간격" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "얼마나 자주 상태 점검을 실행하는 간격." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"잘못된 문자. 이름은 문자, 수자와 특정 구두점(_ . -)만 포함 될 수 있습니다." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "모든 임시 점검점 파일을 유지합니다" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "키" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "키는 비워두면 안됩니다" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "최근 5회 실행" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "최신 점검점" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "점검점을 디스크에 쓰기 후에 계속 진행" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "세부정보 적재 중..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "기록 적재 중..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "적재 중..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "로컬" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "로컬 이미지" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "기록" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "맥(mac) 주소" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "최대 재시도" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "메모리" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "메모리 제한" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "메모리 장치" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "모드" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "다중 태그는 이 이미지에 존재합니다. 삭제에 태그된 이미지를 선택합니다." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "유효한 IP 주소이어야 합니다" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "이름" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "이미 사용 중인 이름입니다" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "신규 컨테이너 이름" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "신규 이미지 이름" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "아니오" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "반응 없음" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "컨테이너 없음" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "이 이미지에 사용 중인 컨테이너가 없습니다" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "이 포드에는 컨테이너가 없습니다" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "현재 필터에 일치하는 컨테이너가 없습니다" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "지정된 환경 변수가 없습니다" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "이미지 없음" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "이미지를 찾지 못했습니다" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "현재 필터에 일치하는 이미지가 없습니다" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "이름표가 없습니다" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "노출된 포트가 없습니다" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "$0의 결과를 찾을 수 없습니다" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "실행 중인 컨테이너가 없습니다" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "지정된 볼륨이 없습니다" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "실패한 경우" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "실행 만" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "옵션" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "소유자" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "소유자 도움말" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "상태 실행 통과됨" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"대량으로 가져오기 위해 키=값 쌍의 하나 이상의 행에 입력부분에 붙여 넣습니다" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "일시정지" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "이미지에 생성 중인 컨테이너를 일시 중지합니다" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "일시정지됨" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "포드 생성에 실패했습니다" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "포드 이름" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "포드맨" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "포드맨 컨테이너" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "포드맨 서비스가 동작하지 않습니다" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "포트 대응" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "포트" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "1024 이하 포트는 대응 될 수 있습니다" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "비공개" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "통신규약" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "프룬" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "사용하지 않은 컨테이너 정리" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "프룬 사용하지 않은 이미지" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "컨테이너 정리 중" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "프루닝 이미지" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "최신 이미지 가져오기" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "당기기" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "읽기-전용 접근" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "읽기-쓰기 접근" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "항목 제거" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "선택된 비-실행 컨테이너를 제거합니다" - -#: src/util.js:23 -msgid "Removing" -msgstr "제거 중" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "이름변경" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "컨테이너 $0 이름변경" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "자원 한계가 설정 될 수 있습니다" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "재시작" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "재시작 정책" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "정책 도움말 재시작" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "컨테이너를 종료 할 경우에 따라야 할 정책을 재시작 합니다." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"컨테이너가 종료 될 때 따라야 할 정책을 재시작합니다. 자동으로 시작하는 컨테이" -"너를 위한 linger를 사용은 ecryptfs, systemd-homed, NFS, 또는 2FA가 사용자 계" -"정에서 사용되는 것과 같이 특정 상황에서 작동하지 않을 수 있습니다." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "복구" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "컨테이너$0에서 복구" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "설정된 TCP 연결로 복구" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "사용자 계졍 권한에 의해 제한됨" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "다시 시작" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "재시도" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "다른 용어를 재시도." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "상태 점검을 실행" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "작동중" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "이름 또는 설명으로 찾기" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "레지스터리로 검색" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "찾기" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "이미지로 찾기" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "문자열 또는 컨테이너 위치 검색" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "검색 중..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "검색 중: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "공유됨" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "보기" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "이미지 보여주기" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "중간 이미지 보기" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "덜 보기" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "더 보기" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "크기" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "시작" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "시작 주기" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "포드맨 시작" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "이미지를 찾으려면 입력을 시작하세요." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "시작 시간" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "상태" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "상태" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "중지" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "정지됨" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "설정된 TCP 연결 유지 지원" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "시스템" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "시스템 포드맨 서비스도 사용 할 수 있습니다" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "꼬리표" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "꼬리표" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "포드맨 컨테이너를 위한 cockpit 사용자 연결장치." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "부트스트랩에서 컨테이너를 위해 필요한 초기화 시간." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"간격이 실패한 것으로 간주되기 전에 상태 점검을 완료하도록 허용되는 최대 시간." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "상태점검이 좋지 않은 것으로 고려되기 전에 허용되는 재시도 수." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "시간종료" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "문제 해결" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "필터 입력…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "이미지 기록을 적재 할 수 없음" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "상태나쁨" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "$0 이후 상승" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "레거시 도커 형식을 사용합니다" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "사용되었습니다" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "사용자" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "사용자 포드맨 서비스도 사용 할 수 있습니다" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "사용자:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "값" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "볼륨" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "상태나쁨" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "터미널 포함" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "쓰기 가능" - -#: src/manifest.json:0 -msgid "container" -msgstr "컨테이너" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "내려받기 중" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "host[:포트]/[사용자]/컨테이너[:태그]" - -#: src/manifest.json:0 -msgid "image" -msgstr "이미지" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "in" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "중간" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "중간 이미지" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "해당 없음" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "사용할 수 없음" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "포드 그룹" - -#: src/manifest.json:0 -msgid "docker" -msgstr "포드맨" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "포트" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "초" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "systemd" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "미사용" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "사용자:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "볼륨" - -#~ msgid "Delete $0" -#~ msgstr "$0 삭제" - -#~ msgid "select all" -#~ msgstr "모두 선택" - -#~ msgid "Failure action" -#~ msgstr "장애 작용" - -#~ msgid "Restarting" -#~ msgstr "재시작하기" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "$0 삭제를 확인합니다" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "pod $0의 삭제를 확인합니다" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "pod $0의 강제 삭제를 확인합니다" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "$0의 강제된 삭제를 확인합니다" - -#~ msgid "Container is currently running." -#~ msgstr "컨테이너가 현재 실행 중입니다." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "내보내기 할 때에 root 파일-시스템 변경을 포함하지 마세요" - -#~ msgid "Default with single selectable" -#~ msgstr "단일 선택 가능한 기본값" - -#~ msgid "Start after creation" -#~ msgstr "생성 후에 시작" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "사용하지 않는 $0 이미지 삭제:" - -#~ msgid "created" -#~ msgstr "생성 됨" - -#~ msgid "exited" -#~ msgstr "종료됨" - -#~ msgid "paused" -#~ msgstr "일시 중지됨" - -#~ msgid "running" -#~ msgstr "실행 중" - -#~ msgid "stopped" -#~ msgstr "정지됨" - -#~ msgid "user" -#~ msgstr "사용자" - -#~ msgid "Add on build variable" -#~ msgstr "빌드 변수에 추가" - -#~ msgid "Commit image" -#~ msgstr "이미지 수행" - -#~ msgid "Format" -#~ msgstr "포멧" - -#~ msgid "Message" -#~ msgstr "메세지" - -#~ msgid "Pause the container" -#~ msgstr "컨테이너 일시중지" - -#~ msgid "Remove on build variable" -#~ msgstr "빌드 변수에서 제거" - -#~ msgid "Set container on build variables" -#~ msgstr "빌드 변수에 컨테이너 설정" - -#~ msgid "Add item" -#~ msgstr "항목 추가" - -#~ msgid "Host port (optional)" -#~ msgstr "호스트 경로(선택적)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (선택적)" - -#~ msgid "ReadOnly" -#~ msgstr "읽기 전용" - -#~ msgid "IP prefix length" -#~ msgstr "IP 프리픽스 길이" - -#~ msgid "Run" -#~ msgstr "실행" diff --git a/ui/cockpit-docker/po/pl.po b/ui/cockpit-docker/po/pl.po deleted file mode 100644 index 055a67b..0000000 --- a/ui/cockpit-docker/po/pl.po +++ /dev/null @@ -1,1508 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Piotr Drąg , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2024-02-23 19:36+0000\n" -"Last-Translator: Daviteusz \n" -"Language-Team: Polish \n" -"Language: pl\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 5.4\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 kontener" -msgstr[1] "$0 kontenery" -msgstr[2] "$0 kontenerów" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 obraz, $1" -msgstr[1] "$0 obrazy razem, $1" -msgstr[2] "$0 obrazów razem, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 sekunda" -msgstr[1] "$0 sekundy" -msgstr[2] "$0 sekund" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 nieużywany obraz, $1" -msgstr[1] "$0 nieużywane obrazy, $1" -msgstr[2] "$0 nieużywanych obrazów, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 do 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "Działanie podejmowane po przejściu kontenera do niezdrowego stanu." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Dodaj mapowanie portów" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Dodaj zmienną" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Dodaj wolumin" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Wszystko" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Wszystkie rejestry" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Zawsze" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Wystąpił błąd" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Autor" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Automatyczne włączanie usługi docker podczas uruchamiania" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "Procesor" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "Pomoc udziałów procesora" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "Udziały procesora" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"Udziały procesora ustalają priorytety uruchomionych kontenerów. Domyślny " -"priorytet to 1024. Wyższa liczba zwiększa priorytet danego kontenera. " -"Mniejsza liczba zmniejsza priorytet." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Anuluj" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Sprawdzanie zdrowia" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Punkt kontrolny" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Obsługa punktu kontrolnego i przywracania" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Kontener punktu kontrolnego $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Kliknięcie wyświetli opublikowane porty" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Kliknięcie wyświetli woluminy" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Składnik Cockpit do kontenerów Docker" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Polecenie" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Komentarze" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Zatwierdź" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Zatwierdź kontener" - -#: src/util.js:23 -msgid "Configured" -msgstr "Skonfigurowane" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konsola" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Kontener" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Utworzenie kontenera się nie powiodło" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Uruchomienie kontenera się nie powiodło" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Kontener nie jest uruchomiony" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Nazwa kontenera" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Wymagana jest nazwa kontenera." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Ścieżka do kontenera" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "Ścieżka do kontenera nie może być pusta" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Port kontenera" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "Port kontenera nie może być pusty" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Kontenery" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Utwórz" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Utwórz nowy obraz na podstawie obecnego stanu kontenera $0." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Utwórz i uruchom" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Utwórz kontener" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Utwórz kontener w $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Utwórz kontener w pojemniku" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Utwórz pojemnik" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Utworzono" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Utworzony przez" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Zmniejsz udziały procesora" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Zmniejsz odstęp" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Zmniejsz maksymalną liczbę ponownych prób" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Zmniejsz pamięć" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Zmniejsz liczbę ponownych prób" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Zmniejsz okres uruchamiania" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Zmniejsz czas oczekiwania" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Usuń" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "Usunąć obraz $0?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "Usunąć $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "Usuń obraz" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Usunąć pojemnik $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Usuń oznaczone obrazy" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Usunięcie nieużywanych obrazów systemowych:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Usunięcie nieużywanych obrazów użytkownika:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "" -"Usunięcie kontenera spowoduje usunięcie wszystkich zawartych na nim danych." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "" -"Usunięcie uruchomionego kontenera spowoduje usunięcie wszystkich zawartych " -"na nim danych." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Usunięcie tego pojemnika spowoduje usunięcie tych kontenerów:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Szczegóły" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Miejsce na dysku" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Format Docker jest przydatny podczas udostępniania obrazu za pomocą Dockera " -"lub Moby Engine" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Pobierz" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Pobierz nowy obraz" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Pusty pojemnik $0 zostanie trwale usunięty." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Punkt wejścia" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Zmienne środowiskowe" - -#: src/util.js:26 -msgid "Error" -msgstr "Błąd" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Komunikat o błędzie" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Wystąpił błąd podczas łączenia konsoli" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Przykład, Imię Nazwisko " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Przykład: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Zakończono" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Niepomyślny wynik sprawdzania zdrowia" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Punkt kontrolny kontenera $0 się nie powiódł" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Wyczyszczenie kontenera się nie powiodło" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Zatwierdzenie kontenera $0 się nie powiodło" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Utworzenie kontenera $0 się nie powiodło" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Pobranie obrazu $0:$1 się nie powiodło" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Wymuszenie usunięcia kontenera $0 się nie powiodło" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Wymuszenie usunięcia obrazu $0 się nie powiodło" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Wymuszenie ponownego uruchomienia pojemnika $0 się nie powiodło" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Wymuszenie zatrzymania pojemnika $0 się nie powiodło" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Wstrzymanie kontenera $0 się nie powiodło" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Wstrzymanie pojemnika $0 się nie powiodło" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Wyczyszczenie nieużywanych kontenerów się nie powiodło" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Wyczyszczenie nieużywanych obrazów się nie powiodło" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Pobranie obrazu $0 się nie powiodło" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Usunięcie kontenera $0 się nie powiodło" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Usunięcie obrazu $0 się nie powiodło" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Zmiana nazwy kontenera $0 się nie powiodła" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Ponowne uruchomienie kontenera $0 się nie powiodło" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Ponowne uruchomienie pojemnika $0 się nie powiodło" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Przywrócenie kontenera $0 się nie powiodło" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Wznowienie kontenera $0 się nie powiodło" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Wznowienie pojemnika $0 się nie powiodło" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Uruchomienie kontenera $0 się nie powiodło" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Wykonanie sprawdzania zdrowia na kontenerze $0 się nie powiodło" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Wyszukanie obrazów się nie powiodło." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Wyszukanie obrazów się nie powiodło: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Wyszukanie nowych obrazów się nie powiodło" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Uruchomienie kontenera $0 się nie powiodło" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Uruchomienie pojemnika $0 się nie powiodło" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Zatrzymanie kontenera $0 się nie powiodło" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Zatrzymanie pojemnika $0 się nie powiodło" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Wielokrotne niepowodzenia" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Wymuś zatwierdzenie" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Wymuś usunięcie" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Wymusić usunięcie pojemnika $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Wymuś ponowne uruchomienie" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Wymuś zatrzymanie" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Brama" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Sprawdzanie zdrowia" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Pomoc odstępów między sprawdzaniem zdrowia" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Pomoc ponownych prób sprawdzania zdrowia" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Pomoc okresu uruchamiania sprawdzania zdrowia" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Pomoc czasu oczekiwania sprawdzania zdrowia" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Pomoc działania niepowodzenia sprawdzania zdrowia" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Zdrowy" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Ukryj obrazy" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Ukryj pośrednie obrazy" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Historia" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Ścieżka do hosta" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Port hosta" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Pomoc portu hosta" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "Identyfikator" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "Adres IP" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Pomoc adresu IP" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Doskonałe dla programistów" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Doskonałe do uruchamiania usług" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Jeśli adres IP hosta jest ustawiony na 0.0.0.0 lub nie jest ustawiony, to " -"port będzie dowiązany do wszystkich adresów IP na hoście." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Jeśli port hosta nie jest ustawiony, to do portu kontenera będzie losowo " -"przydzielany port na hoście." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ignorowanie adresu IP, jeśli jest ustawiony statycznie" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ignorowanie adresu MAC, jeśli jest ustawiony statycznie" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Obraz" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Nazwa obrazu nie jest unikalna" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Nazwa obrazu jest wymagana" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Pomoc przy wyborze obrazu" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Obrazy" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Zwiększ udziały procesora" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Zwiększ odstęp" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Zwiększ maksymalną liczbę ponownych prób" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Zwiększ pamięć" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Zwiększ liczbę ponownych prób" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Zwiększ okres uruchamiania" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Zwiększ czas oczekiwania" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Integracja" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Odstęp" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Odstęp między wykonywaniem sprawdzania zdrowia." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Nieprawidłowe znaki. Nazwa może zawierać tylko litery, cyfry i część znaków " -"interpunkcyjnych (_ . -)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Przechowywanie wszystkich tymczasowych plików punktów kontrolnych" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Klucz" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "Klucz nie może być pusty" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Ostatnie 5 razy" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Najnowszy punkt kontrolny" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Bez wyłączania po zapisaniu punktu kontrolnego na dysku" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Wczytywanie szczegółów…" - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Wczytywanie dzienników…" - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Wczytywanie…" - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Lokalne" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Lokalne obrazy" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Dzienniki" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "Adres MAC" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Maksymalna liczba ponownych prób" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Pamięć" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Ograniczenie pamięci" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Jednostka pamięci" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Tryb" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Dla tego obrazu istnieje wiele etykiet. Proszę wybrać oznaczone obrazy do " -"usunięcia." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "Musi być prawidłowym adresem IP" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Nazwa" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "Nazwa jest już używana" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Nowa nazwa kontenera" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Nazwa nowego obrazu" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Nie" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Brak działania" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Brak kontenerów" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Żadne kontenery nie używają tego obrazu" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "Brak kontenerów w tym pojemniku" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Żadne kontenery nie pasują do obecnego filtru" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Nie podano zmiennych środowiskowych" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Brak obrazów" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Nie odnaleziono obrazów" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Żadne obrazy nie pasują do obecnego filtru" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Brak etykiety" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Brak eksponowanych portów" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Brak wyników dla zapytania „$0”" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Brak uruchomionych kontenerów" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Nie podano woluminów" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Przy niepowodzeniu" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Tylko uruchomione" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Opcje" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Właściciel" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Pomoc na temat właściciela" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Pomyślny wynik sprawdzania zdrowia" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Należy wkleić jeden lub więcej wierszy par klucz=wartość do dowolnego pola, " -"aby zaimportować hurtowo" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Wstrzymaj" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Wstrzymaj kontener podczas tworzenia obrazu" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Wstrzymane" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Utworzenie pojemnika się nie powiodło" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Nazwa pojemnika" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Kontenery Docker" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Usługa Docker nie jest aktywna" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Mapowanie portów" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Porty" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Można mapować porty poniżej 1024" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Prywatne" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokół" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Wyczyść" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Wyczyść nieużywane kontenery" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Wyczyść nieużywane obrazy" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Czyszczenie kontenerów" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Czyszczenie obrazów" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Pobierz najnowszy obraz" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Pobieranie" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Dostęp tylko do odczytu" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Dostęp do odczytu i zapisu" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Usuń element" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Usuwa zaznaczone nieuruchomione kontenery" - -#: src/util.js:23 -msgid "Removing" -msgstr "Usuwanie" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Zmień nazwę" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Zmień nazwę kontenera $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Można ustawić ograniczenia zasobów" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Uruchom ponownie" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Zasada ponownego uruchamiania" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Pomoc zasady ponownego uruchamiania" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Zasada ponownego uruchamiania używana podczas wyłączania kontenerów." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Zasada ponownego uruchamiania używana podczas wyłączania kontenerów. " -"Używanie zwlekania do automatycznego uruchamiania kontenerów może nie " -"działać w pewnych warunkach, takich jak podczas używania eCryptfs, systemd-" -"homed, NFS lub uwierzytelniania dwuskładnikowego na koncie użytkownika." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Przywróć" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Przywróć kontener $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Przywróć z nawiązanymi połączeniami TCP" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Ograniczone przez uprawnienia konta użytkownika" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Wznów" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Ponowne próby" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Spróbuj innych słów." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Wykonaj sprawdzanie zdrowia" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Uruchomione" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Szukaj według nazwy lub opisu" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Szukaj według rejestru" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Szukaj" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Znajdź obraz" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Szukaj ciągu lub położenia kontenera" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Wyszukiwanie…" - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Wyszukiwanie: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Współdzielone" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Wyświetl" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Wyświetl obrazy" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Wyświetl pośrednie obrazy" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Wyświetl mniej" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Wyświetl więcej" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Rozmiar" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Uruchom" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Okres uruchamiania" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Uruchom usługę docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Zacznij pisać, aby wyszukać obrazy." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Uruchomiono" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Stan" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Stan" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Zatrzymaj" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Zatrzymane" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Obsługa zachowywania nawiązanych połączeń TCP" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "System" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Dostępna jest także systemowa usługa Docker" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Etykieta" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Etykiety" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Interfejs Cockpit do kontenerów Docker." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Czas inicjacji wymagany do uruchomienia kontenera." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Maksymalny dozwolony czas na ukończenie sprawdzania zdrowia, zanim odstęp " -"jest uważany za niepomyślny." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Dozwolona liczba ponownych prób, zanim wynik sprawdzania zdrowia jest " -"uważany za niepomyślny." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Czas oczekiwania" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Rozwiąż problem" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Wyszukiwanie…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Nie można wczytać historii obrazu" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Niezdrowy" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Uruchomione od $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Przestarzały format Docker" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Używane przez" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Użytkownik" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Dostępna jest także usługa Docker użytkownika" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Użytkownik:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Wartość" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Woluminy" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "Kiedy jest niezdrowy" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Z terminalem" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Zapisywalny" - -#: src/manifest.json:0 -msgid "container" -msgstr "kontener" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "pobieranie" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "komputer[:port]/[użytkownik]/kontener[:etykieta]" - -#: src/manifest.json:0 -msgid "image" -msgstr "obraz" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "w" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "pośredni" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "pośredni obraz" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "niedostępne" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "niedostępne" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "grupa pojemników" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "porty" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "s" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "systemowa" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "nieużywane" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "użytkownik:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "woluminy" - -#~ msgid "Delete $0" -#~ msgstr "Usuń $0" - -#~ msgid "select all" -#~ msgstr "zaznacz wszystko" - -#~ msgid "Failure action" -#~ msgstr "Działanie niepowodzenia" - -#~ msgid "Restarting" -#~ msgstr "Uruchamianie ponownie" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Potwierdź usunięcie $0" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Potwierdź usunięcie pojemnika $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Potwierdź wymuszenie usunięcia pojemnika $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Potwierdź wymuszenie usunięcia $0" - -#~ msgid "Container is currently running." -#~ msgstr "Kontener jest obecnie uruchomiony." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Bez dołączania zmian głównego systemu plików podczas eksportowania" - -#~ msgid "Default with single selectable" -#~ msgstr "Domyślne z jednym wyborem" - -#~ msgid "Start after creation" -#~ msgstr "Uruchom po utworzeniu" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "Usunięcie nieużywanych obrazów $0:" - -#~ msgid "created" -#~ msgstr "utworzone" - -#~ msgid "exited" -#~ msgstr "zakończone" - -#~ msgid "paused" -#~ msgstr "wstrzymane" - -#~ msgid "running" -#~ msgstr "uruchomione" - -#~ msgid "stopped" -#~ msgstr "zatrzymane" - -#~ msgid "user" -#~ msgstr "użytkownika" - -#~ msgid "Add on build variable" -#~ msgstr "Dodaj na zmiennej budowania" - -#~ msgid "Commit image" -#~ msgstr "Zatwierdź obraz" - -#~ msgid "Format" -#~ msgstr "Format" - -#~ msgid "Message" -#~ msgstr "Komunikat" - -#~ msgid "Pause the container" -#~ msgstr "Wstrzymaj kontener" - -#~ msgid "Remove on build variable" -#~ msgstr "Usuń na zmiennej budowania" - -#~ msgid "Set container on build variables" -#~ msgstr "Ustaw kontener na zmiennych budowania" - -#~ msgid "Add item" -#~ msgstr "Dodaj element" - -#~ msgid "Host port (optional)" -#~ msgstr "Port gospodarza (opcjonalnie)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (opcjonalnie)" - -#~ msgid "ReadOnly" -#~ msgstr "Tylko do odczytu" - -#~ msgid "IP prefix length" -#~ msgstr "Długość przedrostka IP" - -#~ msgid "Get new image" -#~ msgstr "Pobierz nowy obraz" - -#~ msgid "Run" -#~ msgstr "Uruchom" - -#~ msgid "On build" -#~ msgstr "Podczas budowania" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Na pewno usunąć ten obraz?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Nie można dołączyć do tego kontenera: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Nie można otworzyć kanału: $0" - -#~ msgid "Everything" -#~ msgstr "Wszystko" - -#~ msgid "Security" -#~ msgstr "Zabezpieczenia" - -#~ msgid "The scan from $time ($type) found no vulnerabilities." -#~ msgstr "Wyszukiwanie z $time ($type) nie znalazło żadnych zagrożeń." - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "Ta wersja konsoli internetowej nie obsługuje terminala." diff --git a/ui/cockpit-docker/po/sk.po b/ui/cockpit-docker/po/sk.po deleted file mode 100644 index 657498e..0000000 --- a/ui/cockpit-docker/po/sk.po +++ /dev/null @@ -1,1553 +0,0 @@ -# Matej Marusak , 2019. #zanata, 2020. -# Matej Marusak , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-11-13 13:37+0000\n" -"Last-Translator: Jose Riha \n" -"Language-Team: Slovak \n" -"Language: sk\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" -"X-Generator: Weblate 5.1.1\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 kontajner" -msgstr[1] "$0 kontajnery" -msgstr[2] "$0 kontajnerov" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 obrazov dohromady, $1" -msgstr[1] "$0 obrazy dohromady, $1" -msgstr[2] "$0 obrazov dohromady, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 nepoužitých obrazov, $1" -msgstr[1] "$0 nepoužité obrazy, $1" -msgstr[2] "$0 nepoužitých obrazov, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "" - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Pridať mapovanie portov" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Pridať premennú" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Pridať zväzok" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Všetky" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Všetky registre" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Vždy" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Vyskytla sa chyba" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Autor" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Spúšťať docker pri zavádzaní systému" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -#, fuzzy -#| msgid "IP address" -msgid "CPU Shares help" -msgstr "IP adresa" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU podiely" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Zrušiť" - -#: src/Containers.jsx:286 -#, fuzzy -#| msgid "Checkpoint" -msgid "Checking health" -msgstr "Vytvoriť kontrolný bod" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Vytvoriť kontrolný bod" - -#: src/ImageRunModal.jsx:775 -#, fuzzy -#| msgid "Checkpoint container $0" -msgid "Checkpoint and restore support" -msgstr "Vytvoriť kontrolný bod pre kontajner $0" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Vytvoriť kontrolný bod pre kontajner $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "" - -#: org.cockpit-project.docker.metainfo.xml:6 -#, fuzzy -#| msgid "Docker containers" -msgid "Cockpit component for Docker containers" -msgstr "Docker kontajnery" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Príkaz" - -#: src/ImageHistory.jsx:33 -#, fuzzy -#| msgid "Commit" -msgid "Comments" -msgstr "Vytvoriť" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Vytvoriť" - -#: src/ContainerCommitModal.jsx:136 -#, fuzzy -#| msgid "No containers" -msgid "Commit container" -msgstr "Žiadne kontajnery" - -#: src/util.js:23 -msgid "Configured" -msgstr "Nakonfigurovaný" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konzola" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Kontajner" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Kontajner sa nepodarilo vytvoriť" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Kontajner sa nepodarilo spustiť" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Kontajner nebeží" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Názov kontajneru" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -#, fuzzy -#| msgid "Container name" -msgid "Container name is required." -msgstr "Názov kontajneru" - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Cesta v kontajneri" - -#: src/Volume.jsx:23 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container path must not be empty" -msgstr "Kontajner sa nepodarilo vytvoriť" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Port kontajneru" - -#: src/PublishPort.jsx:37 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container port must not be empty" -msgstr "Kontajner sa nepodarilo vytvoriť" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Kontajnery" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Vytvoriť" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "" - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Vytvoriť a spustiť" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Vytvoriť kontajner" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Vytvoriť kontajner v $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Vytvoriť kontajner v skupine" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -#, fuzzy -#| msgid "Created" -msgid "Create pod" -msgstr "Vytvorený" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Vytvorený" - -#: src/ImageHistory.jsx:33 -#, fuzzy -#| msgid "Created" -msgid "Created by" -msgstr "Vytvorený" - -#: src/ImageRunModal.jsx:939 -#, fuzzy -#| msgid "CPU shares" -msgid "Decrease CPU shares" -msgstr "CPU podiely" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "" - -#: src/ImageRunModal.jsx:978 -#, fuzzy -#| msgid "Maximum retries" -msgid "Decrease maximum retries" -msgstr "Maximum pokusov" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "" - -#: src/ImageRunModal.jsx:1099 -#, fuzzy -#| msgid "Start docker" -msgid "Decrease start period" -msgstr "Spustiť docker" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Odstrániť" - -#: src/ImageDeleteModal.jsx:92 -#, fuzzy -#| msgid "Delete $0" -msgid "Delete $0 image?" -msgstr "Odstrániť $0" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -#, fuzzy -#| msgid "Delete $0" -msgid "Delete $0?" -msgstr "Odstrániť $0" - -#: src/ImageDeleteModal.jsx:96 -#, fuzzy -#| msgid "Delete tagged images" -msgid "Delete image" -msgstr "Zmazať označené obrazy" - -#: src/PodActions.jsx:43 -#, fuzzy -#| msgid "Delete $0" -msgid "Delete pod $0?" -msgstr "Odstrániť $0" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Zmazať označené obrazy" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Zmazať nepoužívané systémové obrazy:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Zmazať nepoužívané užívateľské obrazy:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Zmazaním kontajneru sa zmažú všetky dáta v ňom." - -#: src/Containers.jsx:70 -#, fuzzy -#| msgid "Deleting a container will erase all data in it." -msgid "Deleting a running container will erase all data in it." -msgstr "Zmazaním kontajneru sa zmažú všetky dáta v ňom." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Zmazanie tohto podu zmaže nasledujúce kontajnery:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Podrobnosti" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Stiahnuť" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Stiahnuť nový obraz" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "" - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Vstupný bod" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Premenné prostredia" - -#: src/util.js:26 -msgid "Error" -msgstr "Chyba" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Chybová správa" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Príklad, Vaše Meno " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Príklad: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Skončený" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Nepodarilo sa vytvoriť kontrolný bod pre kontajner $0" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Nepodarilo sa zmazať kontajner" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Nepodarilo sa vytvoriť kontajner $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Nepodarilo sa stiahnuť obraz $0:$1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Nepodarilo sa vynútiť zmazanie kontajneru $0" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Nepodarilo sa vynútiť zmazanie obrazu $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Nepodarilo sa nútene reštartovať pod $0" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Nepodarilo sa vynútiť zmazanie podu $0" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Nepodarilo sa zastaviť kontajner $0" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Nepodarilo sa zastaviť pod $0" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Nepodarilo sa vyčistiť nepoužívané kontajnery" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Nepodarilo sa vyčistiť nepoužívané obrazy" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Nepodarilo sa stiahnuť obraz $0" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Nepodarilo sa zmazať kontajner $0" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Nepodarilo sa zmazať obraz $0" - -#: src/ContainerRenameModal.jsx:54 -#, fuzzy -#| msgid "Failed to resume container $0" -msgid "Failed to rename container $0" -msgstr "Nepodarilo sa spustiť kontajner $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Nepodarilo sa reštartovať kontajner $0" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Nepodarilo sa reštartovať pod $0" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Nepodarilo sa obnoviť kontajner $0" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Nepodarilo sa spustiť kontajner $0" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Nepodarilo sa znovuspustiť pod $0" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Nepodarilo sa spustiť kontajner $0" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -#, fuzzy -#| msgid "Failed to checkpoint container $0" -msgid "Failed to run health check on container $0" -msgstr "Nepodarilo sa vytvoriť kontrolný bod pre kontajner $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -#, fuzzy -#| msgid "Failed to search for images: $0" -msgid "Failed to search for images." -msgstr "Nepodarilo sa nájsť obrazy: $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Nepodarilo sa nájsť obrazy: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Nepodarilo sa nájsť nové obrazy" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Nepodarilo sa spustiť kontajner $0" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Nepodarilo sa spustiť pod $0" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Nepodarilo sa zastaviť kontajner $0" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Nepodarilo sa zastaviť pod $0" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "" - -#: src/ContainerCommitModal.jsx:151 -#, fuzzy -#| msgid "Force stop" -msgid "Force commit" -msgstr "Vynútiť zastavenie" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Vynútiť odstránenie" - -#: src/PodActions.jsx:42 -#, fuzzy -#| msgid "Force delete" -msgid "Force delete pod $0?" -msgstr "Vynútiť odstránenie" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Vynútiť reštartovanie" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Vynútiť zastavenie" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Brána" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Skryť obrazy" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Skryť dočasné obrazy" - -#: src/Images.jsx:158 -msgid "History" -msgstr "" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Cesta na hostiteľovi" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Port na hostiteľovi" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Nápoveda k portu na hostiteľovi" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP adresa" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Nápoveda k IP adrese" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ignorovať staticky nastavené IP adresy" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ignorovať staticky nastavené MAC adresy" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Obraz" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "" - -#: src/ContainerCommitModal.jsx:35 -#, fuzzy -#| msgid "Container name" -msgid "Image name is required" -msgstr "Názov kontajneru" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Nápoveda k výberu obrazu" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Obrazy" - -#: src/ImageRunModal.jsx:940 -#, fuzzy -#| msgid "CPU shares" -msgid "Increase CPU shares" -msgstr "CPU podiely" - -#: src/ImageRunModal.jsx:1050 -#, fuzzy -#| msgid "Integration" -msgid "Increase interval" -msgstr "Integrácia" - -#: src/ImageRunModal.jsx:979 -#, fuzzy -#| msgid "Maximum retries" -msgid "Increase maximum retries" -msgstr "Maximum pokusov" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "" - -#: src/ImageRunModal.jsx:1100 -#, fuzzy -#| msgid "Start docker" -msgid "Increase start period" -msgstr "Spustiť docker" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Integrácia" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -#, fuzzy -#| msgid "Integration" -msgid "Interval" -msgstr "Integrácia" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "" - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Kľúč" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "" - -#: src/ContainerDetails.jsx:71 -#, fuzzy -#| msgid "Checkpoint" -msgid "Latest checkpoint" -msgstr "Vytvoriť kontrolný bod" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -#, fuzzy -#| msgid "Loading logs..." -msgid "Loading details..." -msgstr "Načítanie záznamov udalostí..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Načítanie záznamov udalostí..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Načítanie..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Miestne" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Miestne obrazy" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Záznamy udalostí" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC adresa" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Maximum pokusov" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Pamäť" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Pamäťový limit" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Pamäťová jednotka" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Mód" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Názov" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "" - -#: src/ContainerRenameModal.jsx:68 -#, fuzzy -#| msgid "Container name" -msgid "New container name" -msgstr "Názov kontajneru" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Názov nového obrazu" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Nie" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Žiadne kontajnery" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Tento obraz nepoužívajú žiadne kontajnery" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "V tomto pode nie sú žiadne kontajnery" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Žiadne kontajneri nevyhovujú danému filtru" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Neboli definované žiadne premenné prostredia" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Žiadne obrazy" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Žiadne obrazy neboli nájdené" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Žiadne obrazy nevyhovujú danému filtru" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Žiaden výsledok pre $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Žiadne spustené kontajnery" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Žiadne špecifikované zväzky" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Pri chybe" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Iba bežiace" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Možnosti" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Vlastník" - -#: src/ImageRunModal.jsx:761 -#, fuzzy -#| msgid "Owner" -msgid "Owner help" -msgstr "Vlastník" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Pozastaviť" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Zastaviť kontajner keď sa vytvára obraz" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Pozastavený" - -#: src/PodCreateModal.jsx:89 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Pod failed to be created" -msgstr "Kontajner sa nepodarilo vytvoriť" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker kontajnery" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Služba Docker nie je aktívna" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Mapovanie portov" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Porty" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Súkromný" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokol" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Vyčistiť" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Vyčistiť nepoužívané kontajnery" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Vyčistiť nepoužívané obrazy" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -#, fuzzy -#| msgid "No running containers" -msgid "Pruning containers" -msgstr "Žiadne spustené kontajnery" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Prerezávanie obrazov" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Stiahnúť najnovší obraz" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Sťahuje sa" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Odstrániť položku" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Odstráni vybrané nespustené kontajnery" - -#: src/util.js:23 -msgid "Removing" -msgstr "Odstraňuje sa" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "" - -#: src/ContainerRenameModal.jsx:85 -#, fuzzy -#| msgid "Restore container $0" -msgid "Rename container $0" -msgstr "Obnovenie kontajneru $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Reštartovať" - -#: src/ImageRunModal.jsx:948 -#, fuzzy -#| msgid "Restart" -msgid "Restart policy" -msgstr "Reštartovať" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -#, fuzzy -#| msgid "Host path" -msgid "Restart policy help" -msgstr "Cesta na hostiteľovi" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "" - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Obnoviť" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Obnovenie kontajneru $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "" - -#: src/ImageSearchModal.jsx:190 -#, fuzzy -#| msgid "Please retry another term." -msgid "Retry another term." -msgstr "Skúste iný pojem." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Hľadať podľa mena alebo popisu" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Hľadanie obrazu" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Hľadá sa..." - -#: src/ImageRunModal.jsx:822 -#, fuzzy -#| msgid "Loading..." -msgid "Searching: $0" -msgstr "Načítanie..." - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Zdielaný" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Zobraziť obrazy" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "" - -#: src/ContainerIntegration.jsx:82 -#, fuzzy -#| msgid "Show images" -msgid "Show less" -msgstr "Zobraziť obrazy" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Zobraziť viac" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Veľkosť" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Spustiť" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -#, fuzzy -#| msgid "Start docker" -msgid "Start period" -msgstr "Spustiť docker" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Spustiť docker" - -#: src/ImageSearchModal.jsx:185 -#, fuzzy -#| msgid "Please start typing to look for images." -msgid "Start typing to look for images." -msgstr "Začnite písať na vyhľadanie obrazov." - -#: src/ContainerHealthLogs.jsx:105 -#, fuzzy -#| msgid "Start" -msgid "Started at" -msgstr "Spustiť" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Stav" - -#: src/ContainerHealthLogs.jsx:56 -#, fuzzy -#| msgid "State" -msgid "Status" -msgstr "Stav" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Zastaviť" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Zastavený" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Systém" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Systémový docker je tiež dostupný" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Tag" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Tagy" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "" - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "" - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Riešiť problém" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -#, fuzzy -#| msgid "Failed to download image $0:$1" -msgid "Unable to load image history" -msgstr "Nepodarilo sa stiahnuť obraz $0:$1" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Aktívny od $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Využívaný s" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Užívateľský docker je tiež dostupný" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Používateľ:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Hodnota" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Zväzky" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -#, fuzzy -#| msgid "Checkpoint" -msgid "When unhealthy" -msgstr "Vytvoriť kontrolný bod" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "S terminálom" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "" - -#: src/manifest.json:0 -msgid "container" -msgstr "kontajner" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "sťahuje sa" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "" - -#: src/manifest.json:0 -msgid "image" -msgstr "obraz" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "" - -#: src/ImageDeleteModal.jsx:79 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate" -msgstr "Skryť dočasné obrazy" - -#: src/ImageDeleteModal.jsx:59 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate image" -msgstr "Skryť dočasné obrazy" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "Nedostupné" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "nedostupné" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -#, fuzzy -#| msgid "Ports" -msgid "ports" -msgstr "Porty" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "systém" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "nepoužitý" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "používateľ:" - -#: src/Containers.jsx:547 -#, fuzzy -#| msgid "Volumes" -msgid "volumes" -msgstr "Zväzky" - -#~ msgid "Delete $0" -#~ msgstr "Odstrániť $0" - -#, fuzzy -#~| msgid "Restart" -#~ msgid "Restarting" -#~ msgstr "Reštartovať" - -#, fuzzy -#~| msgid "Please confirm deletion of $0" -#~ msgid "Confirm deletion of $0" -#~ msgstr "Potvrďte zmazanie $0" - -#, fuzzy -#~| msgid "Please confirm deletion of pod $0" -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Potvrďte zmazanie podu $0" - -#, fuzzy -#~| msgid "Please confirm force deletion of pod $0" -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Potvrďte vynútené zmazanie podu $0" - -#, fuzzy -#~| msgid "Please confirm forced deletion of $0" -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Potvrďte nútené zmazanie $0" - -#~ msgid "Container is currently running." -#~ msgstr "Kontajner momentálne beží." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Do exportu nezahŕnať zmeny v koreňovom súborovovom systéme" - -#, fuzzy -#~| msgid "Delete tagged images" -#~ msgid "Delete unused $0 images:" -#~ msgstr "Zmazať označené obrazy" - -#~ msgid "created" -#~ msgstr "vytvorený" - -#~ msgid "exited" -#~ msgstr "skončený" - -#~ msgid "paused" -#~ msgstr "pozastavený" - -#, fuzzy -#~| msgid "user" -#~ msgid "user" -#~ msgstr "používateľ" - -#~ msgid "Commit image" -#~ msgstr "Vytvoriť obraz" - -#~ msgid "Format" -#~ msgstr "Formát" - -#~ msgid "Message" -#~ msgstr "Správa" - -#~ msgid "Pause the container" -#~ msgstr "Pozastaviť kontajner" - -#~ msgid "Add item" -#~ msgstr "Pridať položku" - -#, fuzzy -#~| msgid "Host port" -#~ msgid "Host port (optional)" -#~ msgstr "Port na hostiteľovi" - -#~ msgid "IP prefix length" -#~ msgstr "Dĺžka predpony IP adresy" - -#~ msgid "Run" -#~ msgstr "Spustiť" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Ste si istý/istá, že chcete odstrániť tento obraz?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Nepodarilo sa pripojiť k tomuto kontajneru: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Nepodarilo sa otvoriť kanál: $0" - -#~ msgid "Everything" -#~ msgstr "Všetko" - -#~ msgid "Security" -#~ msgstr "Bezpečnosť" diff --git a/ui/cockpit-docker/po/sv.po b/ui/cockpit-docker/po/sv.po deleted file mode 100644 index 7bf540f..0000000 --- a/ui/cockpit-docker/po/sv.po +++ /dev/null @@ -1,1484 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Gleb Vassiljev , 2020. -# Göran Uddeborg , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-11-29 13:31+0000\n" -"Last-Translator: Luna Jernberg \n" -"Language-Team: Swedish \n" -"Language: sv\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1\n" -"X-Generator: Weblate 5.2.1\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 behållare" -msgstr[1] "$0 behållare" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 avbild, total, $1" -msgstr[1] "$0 avbilder, totalt, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 sekund" -msgstr[1] "$0 sekunder" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 oanvänd avbild, $1" -msgstr[1] "$0 oanvända avbilder, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 till 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "Åtgärd att ta när behållaren övergår till ett ohälsosamt tillstånd." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Lägg till portmappning" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Lägg till variabel" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Lägg till volym" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Alla" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Alla register" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Alltid" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Ett fel uppstod" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Upphovsman" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Kör igång docker automatiskt vid uppstart" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "CPU-andelar hjälp" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU-andelar" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU-andelar avgör prioriteten på körande behållare. Standardprioriteten är " -"1024. Ett högre tal prioriterar denna behållare. Ett lägre tal sänker " -"prioriteten." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Avbryt" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Kontrollerar hälsa" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Checkpunkt" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "checkpunkt och återställnings stöd" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Ta checkpunkt på behållare $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Klicka för att se publicerade portar" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Klicka för att se volymer" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Cockpit komponent för Docker-behållare" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Kommando" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Kommentarer" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Fastställ" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Commit behållare" - -#: src/util.js:23 -msgid "Configured" -msgstr "Konfigurerad" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konsol" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Behållare" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Behållaren misslyckades att skapas" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Behållaren misslyckades att startas" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Behållaren kör inte" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Behållarnamn" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Behållarnamn krävs." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Behållarsökväg" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "Behållarens sökväg får inte vara tom" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Behållarport" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "Behållarporten får inte vara tom" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Behållare" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Skapa" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Skapa en ny avbild baserad på det aktuella läget för $0 behållaren." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Skapa och kör" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Skapa behållare" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Skapa behållare i $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Skapa behållare i kapsel" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Skapa pod" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Skapad" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Skapad av" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Minska CPU-andelar" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Minska intervallet" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Minska maximalt antal försök igen" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Minska minne" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Minska återförsök" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Minska startintervallet" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Minska timeout" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Radera" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "Radera $0 avbild?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "Radera $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "Radera avbild" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Radera podd $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Radera taggade avbilder" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Ta bort oanvända systemavbilder:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Ta bort oanvända användaravbilder:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "När en behållare raderas försvinner även all data i den." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "När en behållare som körs raderas försvinner även all data i den." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Att ta bort denna kapsel kommer ta bort följande behållare:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Detaljer" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Disk utrymme" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Docker-format är användbart när du delar avbilden med Docker eller Moby " -"Engine" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Ladda ner" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Ladda ner ny avbild" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Tom podd $0 kommer att tas bort permanent." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Ingångspunkt" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Miljövariabler" - -#: src/util.js:26 -msgid "Error" -msgstr "Fel" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Felmeddelande" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Ett fel uppstod vid anslutning till konsolen" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Exempel, Ditt Namn " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Exempel: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Avslutats" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Misslyckad hälsokörning" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Kunde inte ta checkpunkt av behållare $0" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Misslyckades med att rensa upp behållaren" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Kunde inte fastställa behållaren $0" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Misslyckades att skapa behållaren $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Kunde inte ladda ner avbild $0:$1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Misslyckades att tvingande ta bort behållare $0" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Misslyckades att tvingande ta bort avbilden $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Misslyckades med tvingad omstart av kapseln $0" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Misslyckades att tvinga stopp av kapsel $0" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Misslyckades med att pausa behållaren $0" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Misslyckades att pausa kapseln $0" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Misslyckades att rensa oanvända behållare" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Misslyckades att rensa oanvända avbilder" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Misslyckades med att hämta avbilden $0" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Misslyckades att ta bort behållaren $0" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Misslyckades att ta bort avbilden $0" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Misslyckades att byta namn på behållaren $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Misslyckades att starta om behållaren $0" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Misslyckades att starta om kapseln $0" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Misslyckades att återställa behållaren $0" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Misslyckades att återuppta behållaren $0" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Misslyckades att återuppta kapseln $0" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Misslyckades att köra behållaren $0" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Misslyckades att köra hälsokontrollen på behållare $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Misslyckades att söka efter avbilder." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Misslyckades att söka efter avbilder: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Misslyckades att söka efter nya avbilder" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Misslyckades att starta behållaren $0" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Misslyckades att starta kapseln $0" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Misslyckades att stoppa behållaren $0" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Misslyckades att stoppa kapseln $0" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Misslyckanden i följd" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Framtvinga commit" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Framtvinga borttagande" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Framtvinga borttagande av podd $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Framtvinga omstart" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Framtvinga stopp" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Gateway" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Hälsokontroll" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Hälsokontrollens intervallhjälp" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Hälsokontrollens återförsökshjälp" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Hälsokontrollens startintervallshjälp" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Hälsokontrollens tidsgränshjälp" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Hälsokontrollens checkåtgärd hjälp" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Hälsosam" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Dölj avbilder" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Dölj mellanliggande avbilder" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Historik" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Värdsökväg" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Värdport" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Värdport hjälp" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP-adress" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "IP-adress hjälp" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Ideal för utveckling" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Ideal för att köra tjänster" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Om värd-IP är inställd på 0.0.0.0 eller inte alls, kommer porten att bindas " -"till alla IP-adresser på värden." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Om värdporten inte är inställd kommer behållareporten att slumpmässigt " -"tilldelas en port på värden." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ignorera IP-adressen om den är statiskt satt" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ignorera MAC-adressen om den är statiskt satt" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Avbild" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Avbildsnamn är inte unikt" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Avbildsnamn krävs" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Avbildsval hjälp" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Avbilder" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Öka CPU-andelar" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Öka intervallet" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Öka maximalt antal försök igen" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Öka minne" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Öka återförsöken" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Öka startintervallet" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Öka timeout" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Integration" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Intervall" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Intervallet hur ofta hälsokontroller körs." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Ogiltiga tecken. Namn kan bara innehålla bokstäver, siffror och vissa " -"skiljetecken (_ . -)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Behåll alla tillfälliga checkpunktsfiler" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Nyckel" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "Nyckel får inte vara tom" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Senaste 5 körningarna" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Senaste checkpunkt" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Låt fortsätta köra efter att skriva checkpunkt till disk" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Läser in detaljer …" - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Läser in loggar …" - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Läser in …" - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Lokal" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Lokala avbilder" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Loggar" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC-adress" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Maximalt antal försök igen" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Minne" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Minnesgräns" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Minnesenhet" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Läge" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Flera taggar finns för denna avbild. Välj vilka taggade avbilder som skall " -"raderas." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "Måste vara en giltig IP adress" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Namn" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "Namn används redan" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Nytt behållarnamn" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Nytt Avbildsnamn" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Nej" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Ingen åtgärd" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Inga behållare" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Inga behållare använder denna avbild" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "Inga behållare i denna kapsel" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Inga behållare som stämmer med det aktuella filtret" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Inga miljövariabler specificerade" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Inga avbilder" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Inga avbilder funna" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Inga avbilder som stämmer med det aktuella filtret" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Ingen Etikett" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Inga portar exponerade" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Inga resultat för $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Inga körande behållare" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Inga volymer specificerade" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Vid misslyckande" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Endast körande" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Alternativ" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Ägare" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Ägare hjälp" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Lyckad hälsokontrollskörning" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Klistra in en eller flera rader med nyckel=värdepar i valfritt fält för " -"massimport" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Pausa" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Pausa behållaren när du skapar en avbild" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Pausad" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Podden kunde inte skapas" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Pod namn" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker-behållare" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker-tjänsten är inte aktiv" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Portkartering" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Portar" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Portar under 1024 kan inte mappas" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Privat" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokoll" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Rensa" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Rensa oanvända behållare" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Rensa oanvända avbilder" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Rensar behållare" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Rensar avbilder" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Hämta senaste avbild" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Hämtar" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Skrivskyddad åtkomst" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Läs och skrivåtkomst" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Ta bort post" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Tar bort valda icke-körande behållare" - -#: src/util.js:23 -msgid "Removing" -msgstr "Tar bort" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Byt namn" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Byt namn på behållaren $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Resursgränser kan ställas in" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Starta om" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Starta om policy" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Starta om policy hjälp" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Starta om policy att följa när behållare avslutas." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Starta om policyn till att följa när behållare avslutar. Att använda " -"fortlevande (linger) för automatstartande behållare fungerar kanske inte i " -"vissa situationer, som när ecryptfs, systemd-homed, NFS eller 2FA används " -"för ett användarkonto." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Återställ" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Återställ behållaren $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Återställ med etablerade TCP-förbindelser" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Begränsat av användarkontobehörigheter" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Återuppta" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Omförsök" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Försök igen med en annan term." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Kör hälsokontroll" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Kör" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Sök efter namn eller beskrivning" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Sök efter register" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Sök efter" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Sök efter en avbild" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Söksträng eller behållareplats" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Söker …" - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Söker: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Delad" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Visa" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Visa avbilder" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Visa mellanliggande avbilder" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Visa mindre" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Visa mer" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Storlek" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Starta" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Startperiod" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Starta docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Börja skriva för att leta efter avbilder." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Startad vid" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Tillstånd" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Status" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Stoppa" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Stoppad" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Stöd att bevara etablerade TCP-förbindelser" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "System" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "System-docker-tjänsten är också tillgänglig" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Tagg" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Taggar" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Cockpit-användargränssnittet för Docker-behållare." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Initieringstiden sombehövs för att en behållare skall komma igång." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Den maximala tiden som tillåts för att klara av hälsokontrollen före ett " -"intervall betraktas som misslyckat." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Antalet återförsök som tillåts före en hälsokontroll betraktas som ohälsosam." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Tidsgräns" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Felsök" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Skriv för att filtrera …" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Kunde inte ladda avbildshistoriken" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Ohälsosam" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Uppe sedan $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Använd gammalt Docker-format" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Används av" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Användare" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Användar-docker-tjänsten är också tillgänglig" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Användare:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Värde" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Volymer" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "När ohälsosam" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Med terminal" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Skrivbar" - -#: src/manifest.json:0 -msgid "container" -msgstr "behållare" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "hämtar" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "värd[:port]/[användare]/behållare[:tagg]" - -#: src/manifest.json:0 -msgid "image" -msgstr "avbild" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "i" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "mellanliggande" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "mellanliggande avbild" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "ej tillämpligt" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "inte tillgängligt" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "kapselgrupp" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "portar" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "sekunder" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "system" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "oanvänd" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "användare:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "volymer" - -#~ msgid "Delete $0" -#~ msgstr "Radera $0" - -#~ msgid "select all" -#~ msgstr "välj alla" - -#~ msgid "Failure action" -#~ msgstr "Misslyckad åtgärd" - -#~ msgid "Restarting" -#~ msgstr "Startar om" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Bekräfta borttagning av $0" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Bekräfta borttagning av kapsel $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Bekräfta tvångsradering av kapsel $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Bekräfta tvångsradering av $0" - -#~ msgid "Container is currently running." -#~ msgstr "Behållaren kör för närvarande." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Inkludera inte rotfilsystemsändringar vid export" - -#~ msgid "Default with single selectable" -#~ msgstr "Standard med enkel valbar" - -#~ msgid "Start after creation" -#~ msgstr "Starta efter skapande" - -#, fuzzy -#~| msgid "Delete tagged images" -#~ msgid "Delete unused $0 images:" -#~ msgstr "Radera taggade avbilder" - -#~ msgid "created" -#~ msgstr "skapad" - -#~ msgid "exited" -#~ msgstr "avslutad" - -#~ msgid "paused" -#~ msgstr "pausad" - -#~ msgid "running" -#~ msgstr "kör" - -#~ msgid "stopped" -#~ msgstr "stoppad" - -#~ msgid "user" -#~ msgstr "användare" - -#~ msgid "Add on build variable" -#~ msgstr "Lägg till byggvariabel" - -#~ msgid "Commit image" -#~ msgstr "Fastställningsavbild" - -#~ msgid "Format" -#~ msgstr "Format" - -#~ msgid "Message" -#~ msgstr "Meddelande" - -#~ msgid "Pause the container" -#~ msgstr "Pausa behållaren" - -#~ msgid "Remove on build variable" -#~ msgstr "Ta bort byggvariabel" - -#~ msgid "Set container on build variables" -#~ msgstr "Sätt behållare på byggvariabler" - -#~ msgid "Add item" -#~ msgstr "Lägg till post" - -#~ msgid "Host port (optional)" -#~ msgstr "Värdport (valfri)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (valfri)" - -#~ msgid "ReadOnly" -#~ msgstr "LäsEndast" - -#~ msgid "IP prefix length" -#~ msgstr "IP-prefixlängd" - -#~ msgid "Get new image" -#~ msgstr "Hämta ny avbild" - -#~ msgid "Run" -#~ msgstr "Kör" - -#~ msgid "On build" -#~ msgstr "Vid bygge" - -#~ msgid "Everything" -#~ msgstr "Allting" diff --git a/ui/cockpit-docker/po/tr.po b/ui/cockpit-docker/po/tr.po deleted file mode 100644 index 5d77909..0000000 --- a/ui/cockpit-docker/po/tr.po +++ /dev/null @@ -1,1501 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Oğuz Ersen , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-12-01 18:43+0000\n" -"Last-Translator: Weblate Translation Memory \n" -"Language-Team: Turkish \n" -"Language: tr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1\n" -"X-Generator: Weblate 5.2.1\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 kapsayıcı" -msgstr[1] "$0 kapsayıcı" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "Toplam $0 kalıp, $1" -msgstr[1] "Toplam $0 kalıp, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 saniye" -msgstr[1] "$0 saniye" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 kullanılmayan kalıp, $1" -msgstr[1] "$0 kullanılmayan kalıp, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1'den 65535'e" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "" -"Kapsayıcı sağlıksız bir duruma geçtikten sonra gerçekleştirilecek eylem." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Bağlantı noktası eşlemesi ekle" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Değişken ekle" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Birim ekle" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Tümü" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Tüm kayıtlar" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Her zaman" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Bir hata meydana geldi" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Hazırlayan" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Docker'ı önyüklemede otomatik olarak başlat" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "CPU Paylaşımları yardımı" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU paylaşımları" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU paylaşımları, kapsayıcıları çalıştırmanın önceliğini belirler. " -"Varsayılan öncelik 1024'dür. Daha yüksek bir sayı bu kapsayıcıya öncelik " -"verir. Daha düşük bir sayı önceliği azaltır." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "İptal" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Sağlık denetleniyor" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Denetim noktası" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Denetim noktası ve geri yükleme desteği" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "$0 kapsayıcısı denetim noktası" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Yayınlanan bağlantı noktalarını görmek için tıklayın" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Birimleri görmek için tıklayın" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Docker kapsayıcıları için Cockpit bileşeni" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Komut" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Açıklamalar" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "İşle" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Kapsayıcı işle" - -#: src/util.js:23 -msgid "Configured" -msgstr "Yapılandırıldı" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Konsol" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Kapsayıcı" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Kapsayıcının oluşturulması başarısız oldu" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Kapsayıcının başlatılması başarısız oldu" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Kapsayıcı çalışmıyor" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Kapsayıcı adı" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Kapsayıcı adı gerekli." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Kapsayıcı yolu" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "Kapsayıcı yolu boş olmamak zorundadır" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Kapsayıcı bağlantı noktası" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "Kapsayıcı bağlantı noktası boş olmamak zorundadır" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Kapsayıcılar" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Oluştur" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "$0 kapsayıcısının şu anki durumuna göre yeni bir kalıp oluşturun." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Oluştur ve çalıştır" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Kapsayıcı oluştur" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "$0 içinde kapsayıcı oluştur" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Bölme içinde kapsayıcı oluştur" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Bölme oluştur" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Oluşturuldu" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Oluşturan" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "CPU paylaşımlarını azalt" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Aralığı azalt" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "En fazla yeniden denemeyi azalt" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Belleği azalt" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Yeniden denemeleri azalt" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Başlangıç süresini azalt" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Zaman aşımını azalt" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Sil" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "$0 kalıbı silinsin mi?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "$0 silinsin mi?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "Kalıbı sil" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "$0 bölmesi silinsin mi?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Etiketli kalıpları sil" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Kullanılmayan sistem kalıplarını sil:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Kullanılmayan kullanıcı kalıplarını sil:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "Bir kapsayıcıyı silmek içindeki tüm verileri silecek." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "Çalışan bir kapsayıcıyı silmek içindeki tüm verileri silecek." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Bu bölmeyi silmek aşağıdaki kapsayıcıları kaldıracak:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Ayrıntılar" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Disk alanı" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Docker biçimi, kalıbı Docker veya Moby Engine ile paylaşırken kullanışlıdır" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "İndir" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Yeni kalıbı indir" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Boş bölme $0 kalıcı olarak kaldırılacaktır." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Giriş noktası" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Ortam değişkenleri" - -#: src/util.js:26 -msgid "Error" -msgstr "Hata" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Hata iletisi" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Konsola bağlanırken hata meydana geldi" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Örnek, Adınız " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Örnek: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Çıkıldı" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Sağlık işlemini çalıştırma başarısız oldu" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "$0 kapsayıcısını denetleme noktası başarısız oldu" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Kapsayıcıyı temizleme başarısız oldu" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "$0 kapsayıcısını işleme başarısız oldu" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "$0 kapsayıcısını oluşturma başarısız oldu" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "$0:$1 kalıbını indirme başarısız oldu" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "$0 kapsayıcısını zorla kaldırma başarısız oldu" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "$0 kalıbını zorla kaldırma başarısız oldu" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "$0 bölmesini yeniden başlatmaya zorlama başarısız oldu" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "$0 bölmesini zorla durdurma başarısız oldu" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "$0 kapsayıcısını duraklatma başarısız oldu" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "$0 bölmesini duraklatma başarısız oldu" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Kullanılmayan kapsayıcıları ayıklama başarısız oldu" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Kullanılmayan kalıpları ayıklama başarısız oldu" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "$0 kalıbını çekme başarısız oldu" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "$0 kapsayıcısını kaldırma başarısız oldu" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "$0 kalıbını kaldırma başarısız oldu" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "$0 kapsayıcısını yeniden adlandırma başarısız oldu" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "$0 kapsayıcısını yeniden başlatma başarısız oldu" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "$0 bölmesini yeniden başlatma başarısız oldu" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "$0 kapsayıcısını geri yükleme başarısız oldu" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "$0 kapsayıcısını sürdürme başarısız oldu" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "$0 bölmesini sürdürme başarısız oldu" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "$0 kapsayıcısını çalıştırma başarısız oldu" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "$0 kapsayıcısında sağlık denetimi çalıştırma başarısız oldu" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Kalıpları arama başarısız oldu." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Kalıpları arama başarısız oldu: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Yeni kalıpları arama başarısız oldu" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "$0 kapsayıcısını başlatma başarısız oldu" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "$0 bölmesini başlatma başarısız oldu" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "$0 kapsayıcısını durdurma başarısız oldu" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "$0 bölmesini durdurma başarısız oldu" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Başarısız olan seri" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "İşlemeye zorla" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Silmeye zorla" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "$0 bölmesi silmeye zorlansın mı?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Yeniden başlatmaya zorla" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Durdurmaya zorla" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Ağ geçidi" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Sağlık denetimi" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Sağlık denetimi aralığı yardımı" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Sağlık denetimi yeniden denemeleri yardımı" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Sağlık denetimi başlangıç dönemi yardımı" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Sağlık denetimi zaman aşımı yardımı" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Sağlık denetimi hatası eylem yardımı" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Sağlıklı" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Kalıpları gizle" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Ara kalıpları gizle" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Geçmiş" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Anamakine yolu" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Anamakine bağlantı noktası" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Anamakine b.noktası yardım" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "Kimlik" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP adresi" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "IP adresi yardım" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Geliştirme için ideal" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Çalışan hizmetler için ideal" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Eğer anamakine IP'si 0.0.0.0 olarak ayarlanırsa veya hiç ayarlanmazsa, " -"bağlantı noktası anamakinedeki tüm IP'lere bağlanır." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Eğer anamakine bağlantı noktası ayarlanmazsa, kapsayıcı bağlantı noktası " -"anamakinede rastgele bir bağlantı noktasına atanacaktır." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Sabit olarak ayarlanmışsa IP adresini yoksay" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Sabit olarak ayarlanmışsa MAC adresini yoksay" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Kalıp" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Kalıp adı benzersiz değil" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Kalıp adı gerekli" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Kalıp seçim yardımı" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Kalıplar" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "CPU paylaşımlarını artır" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Aralığı artır" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "En fazla yeniden denemeyi artır" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Belleği artır" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Yeniden denemeleri artır" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Başlangıç süresini artır" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Zaman aşımını artır" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Bütünleştirme" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Aralık" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Sağlık denetiminin ne sıklıkta çalıştırıldığı aralığı." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Geçersiz karakterler. Ad sadece harf, sayı ve belirli noktalama işaretlerini " -"(_ . -) içerebilir." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Tüm geçici denetim noktası dosyalarını sakla" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Anahtar" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "Anahtar boş olmamak zorundadır" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Son 5 çalıştırma" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Son denetim noktası" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Denetim noktasını diske yazdıktan sonra çalışır durumda bırak" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Ayrıntılar yükleniyor..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Günlükler yükleniyor..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Yükleniyor..." - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Yerel" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Yerel kalıplar" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Günlükler" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC adresi" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "En fazla yeniden deneme" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Bellek" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Bellek sınırı" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Bellek birimi" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Mod" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Bu kalıp için birden fazla etiket var. Silinecek etiketlenmiş kalıpları " -"seçin." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "Geçerli bir IP adresi olmak zorundadır" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Ad" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "Ad zaten kullanımda" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Yeni kapsayıcı adı" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Yeni kalıp adı" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Hayır" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Eylem yok" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Kapsayıcılar yok" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Bu kalıbı hiçbir kapsayıcı kullanmıyor" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "Bu bölmede kapsayıcılar yok" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Şu anki süzgeçle eşleşen kapsayıcılar yok" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Belirtilen ortam değişkenleri yok" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Kalıplar yok" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Bulunan kalıplar yok" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Şu anki süzgeçle eşleşen kalıplar yok" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Etiket yok" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Açığa çıkan bağlantı noktaları yok" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "$0 için sonuçlar yok" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Çalışan kapsayıcılar yok" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Belirtilen birimler yok" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "Başarısızlıkla" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Sadece çalışanlar" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Seçenekler" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Sahibi" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Sahibi yardımı" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Sağlık çalıştırması geçti" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Toplu içe aktarma için herhangi bir alana bir veya daha fazla anahtar=değer " -"çifti satırı yapıştırın" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Duraklat" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Kalıp oluştururken kapsayıcıyı duraklatın" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Duraklatıldı" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Bölmenin oluşturulması başarısız oldu" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Bölme adı" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker kapsayıcıları" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker hizmeti etkin değil" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Bağlantı noktası eşleme" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Bağlantı noktaları" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "1024 altındaki bağlantı noktaları eşlenebilir" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Özel" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Protokol" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Ayıkla" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Kullanılmayan kapsayıcıları ayıkla" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Kullanılmayan kalıpları ayıkla" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Kapsayıcılar ayıklanıyor" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Kalıplar ayıklanıyor" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Son kalıbı çek" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Çekiliyor" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Salt-okunur erişim" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Okuma-yazma erişimi" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Öğeyi kaldır" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Seçilen çalışmayan kapsayıcıları kaldırır" - -#: src/util.js:23 -msgid "Removing" -msgstr "Kaldırılıyor" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Yeniden adlandır" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "$0 kapsayıcısını yeniden adlandır" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Kaynak sınırları ayarlanabilir" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Yeniden başlat" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Yeniden başlatma ilkesi" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Yeniden başlatma ilkesi yardımı" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Kapsayıcılardan çıkıldığında izlenecek ilkeyi yeniden başlatın." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Kapsayıcılar çıktığında izlenecek ilkeyi yeniden başlatın. Otomatik başlatma " -"kapsayıcıları için geciktirme kullanılması, bir kullanıcı hesabında " -"ecryptfs, systemd-homed, NFS veya 2FA kullanıldığında olduğu gibi bazı " -"durumlarda çalışmayabilir." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Geri yükle" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "$0 kapsayıcısını geri yükle" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Kurulu TCP bağlantıları ile geri yükle" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Kullanıcı hesabı izinleri tarafından kısıtlanmış" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Sürdür" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Yeniden denemeler" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Başka bir terimi yeniden deneyin." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Sağlık denetimini çalıştır" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Çalışıyor" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Ada veya açıklamaya göre ara" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Kayıt defterine göre ara" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Ara" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Kalıp ara" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Arama dizgisi veya kapsayıcı konumu" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Aranıyor..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Aranan: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Paylaşılan" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Göster" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Kalıpları göster" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Ara kalıpları göster" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Daha az göster" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Daha fazlasını göster" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Boyut" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Başlat" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Başlangıç süresi" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Docker'ı başlat" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Kalıpları aramak için yazmaya başlayın." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Başlama zamanı" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Durum" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Durum" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Durdur" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Durduruldu" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Kurulu TCP bağlantılarını korumayı destekle" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Sistem" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Sistem Docker hizmeti de kullanılabilir" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Etiket" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Etiketler" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Docker kapsayıcıları için Cockpit kullanıcı arayüzü." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Bir kapsayıcının önyükleme yapması için gereken başlatma süresi." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Bir aralığın başarısız olduğu kabul edilmeden önce sağlık denetimini " -"tamamlanması için izin verilen en fazla süre." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Bir sağlık denetiminden önce izin verilen yeniden deneme sayısı sağlıksız " -"olarak kabul edilir." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Zaman aşımı" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Sorun Giderme" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Süzmek için yazın…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Kalıp geçmişini yükleme başarısız oldu" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Sağlıksız" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "$0'dan beri aktif" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Eski Docker biçimini kullan" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Kullanan" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Kullanıcı" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Kullanıcı Docker hizmeti de kullanılabilir" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Kullanıcı:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Değer" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Birimler" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "Sağlıksız olduğunda" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "Terminal ile" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Yazılabilir" - -#: src/manifest.json:0 -msgid "container" -msgstr "kapsayıcı" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "indiriliyor" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "anamakine[:b.noktası]/[kullanıcı]/kapsayıcı[:etiket]" - -#: src/manifest.json:0 -msgid "image" -msgstr "kalıp" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "şurada" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "orta seviye" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "orta seviye kalıp" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "yok" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "kullanılabilir değil" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "bölme grubu" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "bağlantı noktaları" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "saniye" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "sistem" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "kullanılmayan" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "kullanıcı:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "birimler" - -#~ msgid "Delete $0" -#~ msgstr "$0 sil" - -#~ msgid "select all" -#~ msgstr "tümünü seç" - -#~ msgid "Failure action" -#~ msgstr "Başarısız eylem" - -#~ msgid "Restarting" -#~ msgstr "Yeniden başlatılıyor" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "$0 için silme işlemini onaylayın" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "$0 bölmesinin silme işlemini onaylayın" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "$0 bölmesinin zorla silme işlemini onaylayın" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "$0 için zorla silme işlemini onaylayın" - -#~ msgid "Container is currently running." -#~ msgstr "Kapsayıcı şu anda çalışıyor." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Dışa aktarırken kök dosya sistemi değişikliklerini dahil etme" - -#~ msgid "Default with single selectable" -#~ msgstr "Tek seçilebilir ile varsayılan" - -#~ msgid "Start after creation" -#~ msgstr "Oluşturmadan sonra başlat" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "Kullanılmayan $0 kalıplarını sil:" - -#~ msgid "created" -#~ msgstr "oluşturuldu" - -#~ msgid "exited" -#~ msgstr "çıkıldı" - -#~ msgid "paused" -#~ msgstr "duraklatıldı" - -#~ msgid "running" -#~ msgstr "çalışıyor" - -#~ msgid "stopped" -#~ msgstr "durduruldu" - -#~ msgid "user" -#~ msgstr "kullanıcı" - -#~ msgid "Add on build variable" -#~ msgstr "Yapım değişkeninde ekle" - -#~ msgid "Commit image" -#~ msgstr "Kalıbı işle" - -#~ msgid "Format" -#~ msgstr "Biçim" - -#~ msgid "Message" -#~ msgstr "İleti" - -#~ msgid "Pause the container" -#~ msgstr "Konteyneri duraklat" - -#~ msgid "Remove on build variable" -#~ msgstr "Yapım değişkeninde kaldır" - -#~ msgid "Set container on build variables" -#~ msgstr "Yapım değişkenlerinde kapsayıcıyı ayarla" - -#~ msgid "Add item" -#~ msgstr "Öğe ekle" - -#~ msgid "Host port (optional)" -#~ msgstr "Anamakine bağlantı noktası (isteğe bağlı)" - -#~ msgid "IP (optional)" -#~ msgstr "IP (isteğe bağlı)" - -#~ msgid "ReadOnly" -#~ msgstr "SadeceOku" - -#~ msgid "IP prefix length" -#~ msgstr "IP ön ek uzunluğu" - -#~ msgid "Get new image" -#~ msgstr "Yeni kalıp al" - -#~ msgid "Run" -#~ msgstr "Çalıştır" - -#~ msgid "On build" -#~ msgstr "Yapım anında" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Bu kalıbı silmek istediğinizden emin misiniz?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Bu konteynere iliştirilemedi: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Kanal açılamadı: $0" - -#~ msgid "Everything" -#~ msgstr "Her şey" - -#~ msgid "Security" -#~ msgstr "Güvenlik" - -#~ msgid "The scan from $time ($type) found no vulnerabilities." -#~ msgstr "$time ($type) taraması hiçbir güvenlik açığı bulamadı." - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "Web Konsolu'nun bu sürümü bir terminali desteklememektedir." diff --git a/ui/cockpit-docker/po/uk.po b/ui/cockpit-docker/po/uk.po deleted file mode 100644 index 7bb2894..0000000 --- a/ui/cockpit-docker/po/uk.po +++ /dev/null @@ -1,1522 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Yuri Chornoivan , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-08-07 10:58+0000\n" -"Last-Translator: Yuri Chornoivan \n" -"Language-Team: Ukrainian \n" -"Language: uk\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.18.2\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0 контейнер" -msgstr[1] "$0 контейнери" -msgstr[2] "$0 контейнерів" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "$0 образ загалом, $1" -msgstr[1] "$0 образи загалом, $1" -msgstr[2] "$0 образів загалом, $1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 секунда" -msgstr[1] "$0 секунди" -msgstr[2] "$0 секунд" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0 невикористаний образ, $1" -msgstr[1] "$0 невикористані образи, $1" -msgstr[2] "$0 невикористаних образів, $1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "Дія, яку слід виконати після переходу контейнера у небезпечний стан." - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "Додати прив'язку портів" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "Додати змінну" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "Додати том" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "Усі" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "Усі реєстри" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "Завжди" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "Сталася помилка" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "Автор" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "Автоматично запускати docker під час завантаження" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "Процесор" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "Довідка щодо спільних процесорів" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "Спільне використання процесора" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"Спільні процесори визначають пріоритетність запуску контейнерів. Типовою " -"пріоритетністю є 1024. Більші числа роблять контейнер пріоритетнішим. Менші " -"числа зменшують пріоритетність." - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "Скасувати" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "Перевіряємо працездатність" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "Контрольна точка" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "Підтримка контрольних точок і відновлення" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "Контрольна точка контейнера $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "Натисніть, щоб переглянути оприлюднені порти" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "Натисніть, щоб переглянути томи" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Компонент Cockpit для контейнерів Docker" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "Команда" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "Коментарі" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "Надіслати" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "Внести контейнер" - -#: src/util.js:23 -msgid "Configured" -msgstr "Налаштовано" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "Консоль" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "Контейнер" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "Не вдалося створити контейнер" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "Не вдалося запустити контейнер" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "Контейнер не запущено" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "Назва контейнера" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "Слід вказати назву контейнера." - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "Шлях до контейнера" - -#: src/Volume.jsx:23 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container path must not be empty" -msgstr "Не вдалося створити контейнер" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "Порт контейнера" - -#: src/PublishPort.jsx:37 -#, fuzzy -#| msgid "Container failed to be created" -msgid "Container port must not be empty" -msgstr "Не вдалося створити контейнер" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "Контейнери" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "Створити" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "Створити образ на основі поточного стану контейнера $0." - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "Створити і запустити" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "Створити контейнер" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "Створити контейнер у $0" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "Створити контейнер у стручку" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "Створити стручок" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "Створено" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "Створено" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "Зменшити спільне використання процесора" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "Зменшити інтервал" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "Зменшити максимум повторних спроб" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "Зменшити пам'ять" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "Зменшити кількість повторних спроб" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "Зменшити період запуску" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "Зменшити час очікування" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "Вилучити" - -#: src/ImageDeleteModal.jsx:92 -#, fuzzy -#| msgid "Delete $0?" -msgid "Delete $0 image?" -msgstr "Вилучити $0?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "Вилучити $0?" - -#: src/ImageDeleteModal.jsx:96 -#, fuzzy -#| msgid "Delete tagged images" -msgid "Delete image" -msgstr "Вилучити позначені міткою образи" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "Вилучити кокон $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "Вилучити позначені міткою образи" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "Вилучити невикористані образи системи:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "Вилучити невикористані образи користувача:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "" -"Вилучення контейнера призведе до витирання усіх даних, що на ньому " -"зберігаються." - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "" -"Вилучення запущеного контейнера призведе до витирання усіх даних, що на " -"ньому зберігаються." - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "Вилучення цього кокону призведе до вилучення таких контейнерів:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "Подробиці" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "Місце на диску" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "" -"Формат Docker корисний, якщо ви захочете використовувати образ спільно у " -"середовищах Docker або Moby Engine" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "Отримати" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "Отримати новий образ" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "Порожній кокон $0 буде остаточно вилучено." - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "Точка входження" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "Змінні середовища" - -#: src/util.js:26 -msgid "Error" -msgstr "Помилка" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "Повідомлення про помилку" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "Під час спроби встановити з'єднання з консоллю сталася помилка" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "Приклад: Ваше Ім'я " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "Приклад: $0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "Вийшов" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "Не вдалося запустити перевірку працездатності" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "Не вдалося створити контрольну точку контейнера $0" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "Не вдалося очистити контейнер" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "Не вдалося надіслати на обробку контейнер $0" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "Не вдалося створити контейнер $0" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "Не вдалося отримати образ $0:$1" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "Не вдалося примусово вилучити контейнер $0" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "Не вдалося примусово вилучити образ $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "Не вдалося примусово перезапустити кокон $0" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "Не вдалося примусово зупинити кокон $0" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "Не вдалося призупинити роботу контейнера $0" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "Не вдалося призупинити кокон $0" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "Не вдалося позбутися невикористаних контейнерів" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "Не вдалося позбутися невикористаних образів" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "Не вдалося отримати образ $0" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "Не вдалося вилучити контейнер $0" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "Не вдалося вилучити образ $0" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "Не вдалося перейменувати контейнер $0" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "Не вдалося перезапустити контейнер $0" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "Не вдалося перезапустити кокон $0" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "Не вдалося відновити контейнер $0" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "Не вдалося відновити роботу контейнера $0" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "Не вдалося відновити кокон $0" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "Не вдалося запустити контейнер $0" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "Не вдалося запустити перевірку працездатності контейнера $0" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "Не вдалося виконати пошук образів." - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "Не вдалося виконати пошук образів: $0" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "Не вдалося виконати пошук нових образів" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "Не вдалося запустити роботу контейнера $0" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "Не вдалося запустити кокон $0" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "Не вдалося зупинити роботу контейнера $0" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "Не вдалося зупинити кокон $0" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "Помилкова смужка" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "Примусово внести" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "Примусове вилучення" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "Примусово вилучити кокон $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "Примусовий перезапуск" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "Примусово зупинити" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "ГБ" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "Шлюз" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "Перевірка працездатності" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "Довідка з інтервалу перевірки працездатності" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "Довідка з повторних спроб перевірки працездатності" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "Довідка із початкового періоду перевірки працездатності" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "Довідка з часу очікування перевірки працездатності" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "Довідка щодо дії при перевірці небезпечності стану" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "Працездатний" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "Приховати образи" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "Приховати проміжні образи" - -#: src/Images.jsx:158 -msgid "History" -msgstr "Журнал" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "Шлях у основній системі" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "Порт в основній системі" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "Довідка щодо порту в основній системі" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "Ід." - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP-адреса" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "Довідка щодо IP-адреси" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "Ідеальне для розробки" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "Ідеальне для запуску служб" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "" -"Якщо встановлено IP-адресу основної системи 0.0.0.0 або адресу не " -"встановлено взагалі, порт буде пов'язано із усіма IP-адресами в основній " -"системі." - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "" -"Якщо порт в основній системі не встановлено, порт контейнера буде випадковим " -"чином пов'язано із портом в основній системі." - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "Ігнорувати IP-адресу, якщо її встановлено статично" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "Ігнорувати MAC-адресу, якщо її встановлено статично" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "Образ" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "Назва образу не є унікальною" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "Слід вказати назву образу" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "Довідка щодо вибору образу" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "Образи" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "Збільшити спільне використання процесора" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "Збільшити інтервал" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "Збільшити максимум повторних спроб" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "Збільшити пам'ять" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "Збільшити кількість повторних спроб" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "Збільшити початковий період" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "Збільшити час очікування" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "Інтеграція" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "Інтервал" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "Частота запуску перевірки працездатності." - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "" -"Некоректні символи. Назва може складатися лише з літер, цифр та деяких " -"символів пунктуації (_ . -)." - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "кБ" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "Зберігати усі тимчасові файли контрольних точок" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "Ключ" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "Останні 5 запусків" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "Найсвіжіша контрольна точка" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "Лишати запущеним після запису контрольної точки на диск" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "Завантаження подробиць…" - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "Завантаження журналу…" - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "Завантаження…" - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "Локальний" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "Локальні образи" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "Журнал" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC-адреса" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "МБ" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "Максимум повторних спроб" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "Пам'ять" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "Обмеження пам’яті" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "Одиниця пам’яті" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "Режим" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "" -"Для цього образу існує декілька міток. Виберіть позначені міткою образи для " -"вилучення." - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "Назва" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "Назва нового контейнера" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "Назва нового образу" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "Ні" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "Без дії" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "Немає контейнерів" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "Цей образ не використовує жоден контейнер" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "У цьому коконі немає контейнерів" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "Немає контейнерів, які проходять поточні умови фільтрування" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "Змінних середовища не визначено" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "Немає образів" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "Образів не знайдено" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "Немає образів, які проходять поточні умови фільтрування" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "Немає мітки" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "Не відкрито жодного порту" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "Немає результатів, що відповідають $0" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "Немає запущених контейнерів" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "Томів не визначено" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "При помилці" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "Лише запущені" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "Параметри" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "Власник" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "Довідка щодо власника" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "Перевірку працездатності пройдено" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "" -"Вставте один або декілька рядків у форматі парт «ключ=значення» до будь-" -"якого поля для пакетного імпортування" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "Призупинити" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "Призупинити роботу контейнера при створенні образу" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "Призупинено" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "Не вдалося створити стручок" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Назва стручка" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Контейнери Docker" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Служба Docker є неактивною" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "Прив'язка портів" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "Порти" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "Можна прив'язувати порти нижче 1024" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "Приватний" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "Протокол" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "Позбутися" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "Позбутися невикористаних контейнерів" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "Позбутися невикористаних образів" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "Очищуємо контейнери" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "Позбуваємося образів" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "Отримати найсвіжіший образ" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "Отримання даних" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "Доступ лише до читання" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "Доступ до читання і запису" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "Вилучити запис" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "Вилучає позначені незапущені контейнери" - -#: src/util.js:23 -msgid "Removing" -msgstr "Вилучення" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "Перейменувати" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "Перейменувати контейнер $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "Можна встановлювати обмеження на ресурси" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "Перезапустити" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "Правила перезапуску" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "Довідка щодо правил перезапуску" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "Правила перезапуску, які слід виконувати при виході з контейнерів." - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"Перезапускати правила після виходу з контейнерів. Використання очікування " -"для автозапуску контейнерів може за певних обставин не працювати, зокрема " -"воно не працює, якщо для облікового запису користувача використано ecryptfs, " -"systemd-homed, NFS або 2FA." - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "Відновити" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "Відновити контейнер $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "Відновити із встановленими з'єднаннями TCP" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "Обмежено правами доступу до облікового запису користувача" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "Продовжити" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "Повторні спроби" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "Повторіть спробу із іншим ключем пошуку." - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "Виконати перевірку працездатності" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "Запущено" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "Шукати за назвою і описом" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "Шукати за реєстром" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "Шукати" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "Шукати образ" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "Рядок для пошуку або розташування контейнера" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "Пошук…" - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "Шукаємо: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "Спільний" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "Показати" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "Показати образи" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "Показати проміжні образи" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "Стислий показ" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "Додаткові відомості" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "Розмір" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "Запустити" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "Початковий період" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "Запустити docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "Почніть щось вводити, щоб виконати пошук образів." - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "Запущено" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "Стан" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "Стан" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "Зупинити" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "Зупинено" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "Підтримка збереження встановлених з'єднань TCP" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "Система" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "Також доступна загальносистемна служба Docker" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "Мітка" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "Мітки" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Інтерфейс користувача Cockpit для контейнерів Docker." - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "Час ініціалізації, потрібний контейнеру для самозапуску." - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "" -"Максимальний припустимий час для завершення перевірки працездатності до " -"моменту реєстрації помилки." - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "" -"Кількість повторних спроб, якими можна скористатися, доки перевірка " -"працездатності вважатиметься непройденою." - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "Час очікування" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "Діагностика проблем" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "Введіть щось для фільтрування…" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "Не вдалося завантажити журнал образу" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "Непрацездатний" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "Працює з $0" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "Скористатися застарілим форматом Docker" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "Використовується" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "Користувач" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "Також доступна служба користувачів Docker" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "Користувач:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "Значення" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "Томи" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "Якщо непрацездатні" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "За допомогою термінала" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "Придатний до запису" - -#: src/manifest.json:0 -msgid "container" -msgstr "контейнер" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "отримання" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "вузол[:порт]/[користувач]/контейнер[:мітка]" - -#: src/manifest.json:0 -msgid "image" -msgstr "образ" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "у" - -#: src/ImageDeleteModal.jsx:79 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate" -msgstr "Приховати проміжні образи" - -#: src/ImageDeleteModal.jsx:59 -#, fuzzy -#| msgid "Hide intermediate images" -msgid "intermediate image" -msgstr "Приховати проміжні образи" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "н/д" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "не доступне" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "група коконів" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "порти" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "секунд" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "система" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "не використано" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "користувач:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "томи" - -#~ msgid "Delete $0" -#~ msgstr "Вилучити $0" - -#~ msgid "select all" -#~ msgstr "вибрати все" - -#~ msgid "Failure action" -#~ msgstr "Дія при критичній помилці" - -#~ msgid "Restarting" -#~ msgstr "Перезапуск" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "Підтвердьте вилучення $0" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "Підтвердьте вилучення кокона $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "Підтвердьте примусове вилучення кокона $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "Підтвердьте примусове вилучення $0" - -#~ msgid "Container is currently running." -#~ msgstr "Контейнер працює." - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "Не включати зміни у кореневій файловій системі при експортуванні" - -#~ msgid "Default with single selectable" -#~ msgstr "Типове із одним варіантом вибору" - -#~ msgid "Start after creation" -#~ msgstr "Запустити після створення" - -#~ msgid "Delete unused $0 images:" -#~ msgstr "Вилучити невикористані $0 образів:" - -#~ msgid "created" -#~ msgstr "створено" - -#~ msgid "exited" -#~ msgstr "здійснено вихід" - -#~ msgid "paused" -#~ msgstr "призупинено" - -#~ msgid "running" -#~ msgstr "працює" - -#~ msgid "stopped" -#~ msgstr "зупинився" - -#~ msgid "user" -#~ msgstr "користувач" - -#~ msgid "Add on build variable" -#~ msgstr "Додати змінну збирання" - -#~ msgid "Commit image" -#~ msgstr "Надіслати образ" - -#~ msgid "Format" -#~ msgstr "Формат" - -#~ msgid "Message" -#~ msgstr "Повідомлення" - -#~ msgid "Pause the container" -#~ msgstr "Призупинити роботу контейнера" - -#~ msgid "Remove on build variable" -#~ msgstr "Встановити змінну збирання" - -#~ msgid "Set container on build variables" -#~ msgstr "Встановити змінні збирання контейнера" - -#~ msgid "Add item" -#~ msgstr "Додати запис" - -#~ msgid "Host port (optional)" -#~ msgstr "Порт основної системи (необов'язковий)" - -#~ msgid "IP (optional)" -#~ msgstr "IP-адреса (необов'язкова)" - -#~ msgid "ReadOnly" -#~ msgstr "Лише читання" - -#~ msgid "IP prefix length" -#~ msgstr "Довжина префікса IP" - -#~ msgid "Get new image" -#~ msgstr "Отримати новий образ" - -#~ msgid "Run" -#~ msgstr "Запустити" - -#~ msgid "On build" -#~ msgstr "При збиранні" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "Ви справді хочете вилучити цей образ?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "Не вдалося долучитися до цього контейнера: $0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "Не вдалося відкрити канал: $0" - -#~ msgid "Everything" -#~ msgstr "Все" - -#~ msgid "Security" -#~ msgstr "Безпека" - -#~ msgid "The scan from $time ($type) found no vulnerabilities." -#~ msgstr "Скануванням від $time ($type) вразливостей не знайдено." - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "У цій версії Web Console не передбачено підтримки терміналів." diff --git a/ui/cockpit-docker/po/zh_CN.po b/ui/cockpit-docker/po/zh_CN.po deleted file mode 100644 index 37ac1bc..0000000 --- a/ui/cockpit-docker/po/zh_CN.po +++ /dev/null @@ -1,1479 +0,0 @@ -# #-#-#-#-# docker.js.pot (PACKAGE VERSION) #-#-#-#-# -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Pany , 2020. -# Harry Chen , 2020. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE_VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-11 02:46+0000\n" -"PO-Revision-Date: 2023-12-22 22:18+0000\n" -"Last-Translator: Jingge Chen \n" -"Language-Team: Chinese (Simplified) \n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0\n" -"X-Generator: Weblate 5.3\n" - -#: src/Images.jsx:89 -msgid "$0 container" -msgid_plural "$0 containers" -msgstr[0] "$0容器" - -#: src/Images.jsx:271 -msgid "$0 image total, $1" -msgid_plural "$0 images total, $1" -msgstr[0] "共$0个镜像,$1" - -#: src/ContainerHealthLogs.jsx:35 -msgid "$0 second" -msgid_plural "$0 seconds" -msgstr[0] "$0 秒" - -#: src/Images.jsx:275 -msgid "$0 unused image, $1" -msgid_plural "$0 unused images, $1" -msgstr[0] "$0个未使用镜像,$1" - -#: src/PublishPort.jsx:30 src/PublishPort.jsx:41 -msgid "1 to 65535" -msgstr "1 到 65535" - -#: src/ImageRunModal.jsx:1134 -msgid "Action to take once the container transitions to an unhealthy state." -msgstr "容器转换到不健康状态后要执行的操作。" - -#: src/PodCreateModal.jsx:179 src/ImageRunModal.jsx:995 -msgid "Add port mapping" -msgstr "添加端口映射" - -#: src/ImageRunModal.jsx:1017 -msgid "Add variable" -msgstr "添加变量" - -#: src/PodCreateModal.jsx:191 src/ImageRunModal.jsx:1005 -msgid "Add volume" -msgstr "添加卷" - -#: src/ContainerHeader.jsx:21 src/Containers.jsx:730 -#: src/ImageDeleteModal.jsx:104 src/ImageRunModal.jsx:702 -msgid "All" -msgstr "所有" - -#: src/ImageSearchModal.jsx:176 -msgid "All registries" -msgstr "所有 registry" - -#: src/ImageRunModal.jsx:965 -msgid "Always" -msgstr "总是" - -#: src/PodActions.jsx:57 -msgid "An error occurred" -msgstr "发生了错误" - -#: src/ContainerCommitModal.jsx:105 -msgid "Author" -msgstr "作者" - -#: src/app.jsx:641 -msgid "Automatically start docker on boot" -msgstr "开机自动启动 docker" - -#: src/Containers.jsx:505 src/Containers.jsx:508 src/Containers.jsx:567 -msgid "CPU" -msgstr "CPU" - -#: src/ImageRunModal.jsx:918 -msgid "CPU Shares help" -msgstr "CPU 份额帮助" - -#: src/ImageRunModal.jsx:916 -msgid "CPU shares" -msgstr "CPU 份额" - -#: src/ImageRunModal.jsx:920 -msgid "" -"CPU shares determine the priority of running containers. Default priority is " -"1024. A higher number prioritizes this container. A lower number decreases " -"priority." -msgstr "" -"CPU 份额决定了运行容器的优先级。默认优先级为 1024。数字越大,容器的优先级越" -"高。数字越小,优先级越低。" - -#: src/PodCreateModal.jsx:213 src/PruneUnusedContainersModal.jsx:96 -#: src/PodActions.jsx:52 src/ContainerCommitModal.jsx:157 -#: src/ContainerDeleteModal.jsx:34 src/ContainerRestoreModal.jsx:53 -#: src/ImageDeleteModal.jsx:98 src/PruneUnusedImagesModal.jsx:97 -#: src/ImageRunModal.jsx:1175 src/ContainerRenameModal.jsx:97 -#: src/ImageSearchModal.jsx:152 src/ForceRemoveModal.jsx:25 -#: src/ContainerCheckpointModal.jsx:50 -msgid "Cancel" -msgstr "取消" - -#: src/Containers.jsx:286 -msgid "Checking health" -msgstr "检查健康状况" - -#: src/Containers.jsx:207 src/ContainerCheckpointModal.jsx:46 -msgid "Checkpoint" -msgstr "检查点" - -#: src/ImageRunModal.jsx:775 -msgid "Checkpoint and restore support" -msgstr "检查点和恢复支持" - -#: src/ContainerCheckpointModal.jsx:41 -msgid "Checkpoint container $0" -msgstr "检查点容器 $0" - -#: src/Containers.jsx:523 -msgid "Click to see published ports" -msgstr "点击以查看公布的端口" - -#: src/Containers.jsx:538 -msgid "Click to see volumes" -msgstr "点击以查看卷" - -#: org.cockpit-project.docker.metainfo.xml:6 -msgid "Cockpit component for Docker containers" -msgstr "Docker 容器的 Cockpit 组件" - -#: src/ContainerCommitModal.jsx:112 src/ContainerHealthLogs.jsx:60 -#: src/ImageRunModal.jsx:871 src/ImageRunModal.jsx:1026 -#: src/ContainerDetails.jsx:39 src/ImageDetails.jsx:15 -msgid "Command" -msgstr "命令" - -#: src/ImageHistory.jsx:33 -msgid "Comments" -msgstr "注释" - -#: src/ContainerCommitModal.jsx:144 src/Containers.jsx:242 -msgid "Commit" -msgstr "提交" - -#: src/ContainerCommitModal.jsx:136 -msgid "Commit container" -msgstr "提交容器" - -#: src/util.js:23 -msgid "Configured" -msgstr "已配置" - -#: src/Containers.jsx:432 -msgid "Console" -msgstr "控制台" - -#: src/Containers.jsx:565 -msgid "Container" -msgstr "容器" - -#: src/ImageRunModal.jsx:258 -msgid "Container failed to be created" -msgstr "容器创建失败" - -#: src/ImageRunModal.jsx:241 -msgid "Container failed to be started" -msgstr "容器启动失败" - -#: src/ContainerTerminal.jsx:259 -msgid "Container is not running" -msgstr "容器未运行" - -#: src/ImageRunModal.jsx:742 -msgid "Container name" -msgstr "容器名称" - -#: src/ContainerRenameModal.jsx:28 src/ContainerRenameModal.jsx:39 -msgid "Container name is required." -msgstr "容器名称是必需的。" - -#: src/Volume.jsx:50 -msgid "Container path" -msgstr "容器路径" - -#: src/Volume.jsx:23 -msgid "Container path must not be empty" -msgstr "容器路径不能为空" - -#: src/PublishPort.jsx:105 -msgid "Container port" -msgstr "容器端口" - -#: src/PublishPort.jsx:37 -msgid "Container port must not be empty" -msgstr "容器端口不能为空" - -#: src/Containers.jsx:784 src/Containers.jsx:790 src/Containers.jsx:820 -msgid "Containers" -msgstr "容器" - -#: src/PodCreateModal.jsx:210 src/ImageRunModal.jsx:1172 -msgid "Create" -msgstr "创建" - -#: src/ContainerCommitModal.jsx:137 -msgid "Create a new image based on the current state of the $0 container." -msgstr "根据 $0 容器的当前状态创建一个新镜像。" - -#: src/ImageRunModal.jsx:1169 -msgid "Create and run" -msgstr "创建并运行" - -#: src/Containers.jsx:747 src/ImageRunModal.jsx:1166 src/Images.jsx:402 -#: src/Images.jsx:411 -msgid "Create container" -msgstr "创建容器" - -#: src/ImageRunModal.jsx:1166 -msgid "Create container in $0" -msgstr "在 $0 中创建容器" - -#: src/Containers.jsx:830 -msgid "Create container in pod" -msgstr "在 pod 中创建容器" - -#: src/PodCreateModal.jsx:206 src/Containers.jsx:739 -msgid "Create pod" -msgstr "创建 pod" - -#: src/PruneUnusedContainersModal.jsx:65 src/util.js:23 src/util.js:26 -#: src/ImageHistory.jsx:33 src/Images.jsx:180 src/ContainerDetails.jsx:63 -msgid "Created" -msgstr "已创建" - -#: src/ImageHistory.jsx:33 -msgid "Created by" -msgstr "创建" - -#: src/ImageRunModal.jsx:939 -msgid "Decrease CPU shares" -msgstr "减少 CPU 共享" - -#: src/ImageRunModal.jsx:1049 -msgid "Decrease interval" -msgstr "缩短间隔" - -#: src/ImageRunModal.jsx:978 -msgid "Decrease maximum retries" -msgstr "减小最大重试次数" - -#: src/ImageRunModal.jsx:897 -msgid "Decrease memory" -msgstr "减少内存" - -#: src/ImageRunModal.jsx:1123 -msgid "Decrease retries" -msgstr "减少重试" - -#: src/ImageRunModal.jsx:1099 -msgid "Decrease start period" -msgstr "减少启动周期" - -#: src/ImageRunModal.jsx:1074 -msgid "Decrease timeout" -msgstr "减少超时" - -#: src/PodActions.jsx:48 src/PodActions.jsx:181 src/ContainerDeleteModal.jsx:33 -#: src/Containers.jsx:261 src/Images.jsx:417 -msgid "Delete" -msgstr "删除" - -#: src/ImageDeleteModal.jsx:92 -msgid "Delete $0 image?" -msgstr "删除 $0 图片?" - -#: src/ContainerDeleteModal.jsx:31 src/ForceRemoveModal.jsx:18 -msgid "Delete $0?" -msgstr "删除 $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete image" -msgstr "删除镜像" - -#: src/PodActions.jsx:43 -msgid "Delete pod $0?" -msgstr "删除 pod $0?" - -#: src/ImageDeleteModal.jsx:96 -msgid "Delete tagged images" -msgstr "删除标记的镜像" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused system images:" -msgstr "删除未使用的系统镜像:" - -#: src/PruneUnusedImagesModal.jsx:32 -msgid "Delete unused user images:" -msgstr "删除未使用的用户镜像:" - -#: src/ContainerDeleteModal.jsx:37 -msgid "Deleting a container will erase all data in it." -msgstr "删除容器会清空其中的全部数据。" - -#: src/Containers.jsx:70 -msgid "Deleting a running container will erase all data in it." -msgstr "删除正在运行的容器将会清除其中的所有数据。" - -#: src/PodActions.jsx:63 -msgid "Deleting this pod will remove the following containers:" -msgstr "删除这个 Pod 将会移除这些容器:" - -#: src/Containers.jsx:415 src/ImageRunModal.jsx:757 src/Images.jsx:149 -msgid "Details" -msgstr "详情" - -#: src/Images.jsx:182 -msgid "Disk space" -msgstr "磁盘空间" - -#: src/ContainerCommitModal.jsx:126 -msgid "" -"Docker format is useful when sharing the image with Docker or Moby Engine" -msgstr "当与 Docker 或 Moby Engine 共享镜像时,Docker 格式非常有用" - -#: src/ImageSearchModal.jsx:149 -msgid "Download" -msgstr "下载" - -#: src/Images.jsx:339 -msgid "Download new image" -msgstr "现在新镜像" - -#: src/PodActions.jsx:59 -msgid "Empty pod $0 will be permanently removed." -msgstr "空 pod $0 将被永久删除。" - -#: src/ImageRunModal.jsx:866 src/ImageDetails.jsx:21 -msgid "Entrypoint" -msgstr "入口点" - -#: src/ContainerIntegration.jsx:114 src/ImageRunModal.jsx:1016 -msgid "Environment variables" -msgstr "环境变量" - -#: src/util.js:26 -msgid "Error" -msgstr "错误" - -#: src/Images.jsx:58 src/Notification.jsx:42 -msgid "Error message" -msgstr "错误信息" - -#: src/ContainerTerminal.jsx:263 -msgid "Error occurred while connecting console" -msgstr "连接到控制台时出现错误" - -#: src/ContainerCommitModal.jsx:107 -msgid "Example, Your Name " -msgstr "示例,您的名字 " - -#: src/ImageRunModal.jsx:821 -msgid "Example: $0" -msgstr "示例:$0" - -#: src/util.js:23 src/util.js:26 src/ContainerDetails.jsx:14 -msgid "Exited" -msgstr "已退出" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Failed health run" -msgstr "失败的健康运行" - -#: src/ContainerCheckpointModal.jsx:28 -msgid "Failed to checkpoint container $0" -msgstr "检查点容器 $0 失败" - -#: src/ImageRunModal.jsx:247 -msgid "Failed to clean up container" -msgstr "清理容器失败" - -#: src/ContainerCommitModal.jsx:81 -msgid "Failed to commit container $0" -msgstr "提交容器 $0 失败" - -#: src/ImageRunModal.jsx:312 -msgid "Failed to create container $0" -msgstr "创建容器 $0 失败" - -#: src/Images.jsx:55 -msgid "Failed to download image $0:$1" -msgstr "下载镜像 $0:$1 失败" - -#: src/Containers.jsx:59 -msgid "Failed to force remove container $0" -msgstr "强制移除容器 $0 失败" - -#: src/ImageDeleteModal.jsx:49 -msgid "Failed to force remove image $0" -msgstr "强制删除镜像失败 $0" - -#: src/PodActions.jsx:117 -msgid "Failed to force restart pod $0" -msgstr "强制重启 pod $0 失败" - -#: src/PodActions.jsx:95 -msgid "Failed to force stop pod $0" -msgstr "强制停止 Pod $0 失败" - -#: src/Containers.jsx:108 -msgid "Failed to pause container $0" -msgstr "暂停容器 $0 失败" - -#: src/PodActions.jsx:162 -msgid "Failed to pause pod $0" -msgstr "暂停 Pod $0 失败" - -#: src/PruneUnusedContainersModal.jsx:57 -msgid "Failed to prune unused containers" -msgstr "删除未使用的容器失败" - -#: src/PruneUnusedImagesModal.jsx:73 -msgid "Failed to prune unused images" -msgstr "删除未使用的映像失败" - -#: src/ImageRunModal.jsx:318 -msgid "Failed to pull image $0" -msgstr "拉取镜像 $0 失败" - -#: src/ContainerDeleteModal.jsx:21 -msgid "Failed to remove container $0" -msgstr "移除容器 $0 失败" - -#: src/ImageDeleteModal.jsx:73 -msgid "Failed to remove image $0" -msgstr "删除镜像 $0 失败" - -#: src/ContainerRenameModal.jsx:54 -msgid "Failed to rename container $0" -msgstr "重命名容器 $0 失败" - -#: src/Containers.jsx:133 -msgid "Failed to restart container $0" -msgstr "重启容器 $0 失败" - -#: src/PodActions.jsx:106 -msgid "Failed to restart pod $0" -msgstr "重启 pod $0 失败" - -#: src/ContainerRestoreModal.jsx:31 -msgid "Failed to restore container $0" -msgstr "恢复容器 $0 失败" - -#: src/Containers.jsx:100 -msgid "Failed to resume container $0" -msgstr "恢复容器 $0 失败" - -#: src/PodActions.jsx:147 -msgid "Failed to resume pod $0" -msgstr "恢复 Pod $0 失败" - -#: src/ImageRunModal.jsx:305 -msgid "Failed to run container $0" -msgstr "运行容器 $0 失败" - -#: src/Containers.jsx:121 src/ContainerHealthLogs.jsx:94 -msgid "Failed to run health check on container $0" -msgstr "在容器 $0 上运行健康检查失败" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images." -msgstr "搜索镜像失败。" - -#: src/ImageRunModal.jsx:399 src/ImageSearchModal.jsx:93 -msgid "Failed to search for images: $0" -msgstr "搜索镜像 $0 失败" - -#: src/ImageRunModal.jsx:397 src/ImageSearchModal.jsx:92 -msgid "Failed to search for new images" -msgstr "搜索新镜像失败" - -#: src/Containers.jsx:92 -msgid "Failed to start container $0" -msgstr "启动容器 $0 失败" - -#: src/PodActions.jsx:132 -msgid "Failed to start pod $0" -msgstr "启动 Pod $0 失败" - -#: src/Containers.jsx:84 -msgid "Failed to stop container $0" -msgstr "停止容器 $0 失败" - -#: src/PodActions.jsx:84 -msgid "Failed to stop pod $0" -msgstr "停止 Pod $0 失败" - -#: src/ContainerHealthLogs.jsx:84 -msgid "Failing streak" -msgstr "streak 失败" - -#: src/ContainerCommitModal.jsx:151 -msgid "Force commit" -msgstr "强制提交" - -#: src/PodActions.jsx:48 src/ForceRemoveModal.jsx:23 -msgid "Force delete" -msgstr "强制删除" - -#: src/PodActions.jsx:42 -msgid "Force delete pod $0?" -msgstr "强制删除 pod $0?" - -#: src/PodActions.jsx:121 src/Containers.jsx:182 -msgid "Force restart" -msgstr "强制重启" - -#: src/PodActions.jsx:99 src/Containers.jsx:174 src/ContainerHealthLogs.jsx:42 -#: src/ImageRunModal.jsx:61 -msgid "Force stop" -msgstr "强制停止" - -#: src/ImageRunModal.jsx:908 -msgid "GB" -msgstr "GB" - -#: src/ContainerDetails.jsx:51 -msgid "Gateway" -msgstr "网关" - -#: src/Containers.jsx:441 src/ImageRunModal.jsx:1025 -msgid "Health check" -msgstr "健康检查" - -#: src/ImageRunModal.jsx:1034 -msgid "Health check interval help" -msgstr "健康检查间隔帮助" - -#: src/ImageRunModal.jsx:1109 -msgid "Health check retries help" -msgstr "健康检查重试帮助" - -#: src/ImageRunModal.jsx:1084 -msgid "Health check start period help" -msgstr "健康检查启动周期帮助" - -#: src/ImageRunModal.jsx:1059 -msgid "Health check timeout help" -msgstr "健康检查超时帮助" - -#: src/ImageRunModal.jsx:1132 -msgid "Health failure check action help" -msgstr "健康检查失败操作帮助" - -#: src/Containers.jsx:282 -msgid "Healthy" -msgstr "健康" - -#: src/Images.jsx:302 -msgid "Hide images" -msgstr "隐藏镜像" - -#: src/Images.jsx:252 -msgid "Hide intermediate images" -msgstr "隐藏中间镜像" - -#: src/Images.jsx:158 -msgid "History" -msgstr "历史" - -#: src/Volume.jsx:36 -msgid "Host path" -msgstr "主机路径" - -#: src/PublishPort.jsx:78 -msgid "Host port" -msgstr "主机端口" - -#: src/PublishPort.jsx:81 -msgid "Host port help" -msgstr "主机端口帮助" - -#: src/Images.jsx:181 src/ContainerDetails.jsx:31 -msgid "ID" -msgstr "ID" - -#: src/ContainerDetails.jsx:47 src/PublishPort.jsx:55 -msgid "IP address" -msgstr "IP 地址" - -#: src/PublishPort.jsx:58 -msgid "IP address help" -msgstr "IP 地址帮助" - -#: src/ImageRunModal.jsx:786 -msgid "Ideal for development" -msgstr "非常适合开发" - -#: src/ImageRunModal.jsx:769 -msgid "Ideal for running services" -msgstr "非常适合运行服务" - -#: src/PublishPort.jsx:60 -msgid "" -"If host IP is set to 0.0.0.0 or not set at all, the port will be bound on " -"all IPs on the host." -msgstr "如果主机 IP 设置为 0.0.0.0 或没有设置,端口将被绑定到主机上的所有 IP。" - -#: src/PublishPort.jsx:83 -msgid "" -"If the host port is not set the container port will be randomly assigned a " -"port on the host." -msgstr "如果主机端口没有设置,容器端口将被随机分配到主机上的一个端口。" - -#: src/ContainerRestoreModal.jsx:63 -msgid "Ignore IP address if set statically" -msgstr "如果以静态方式设置,则忽略 IP 地址" - -#: src/ContainerRestoreModal.jsx:66 -msgid "Ignore MAC address if set statically" -msgstr "忽略被静态设定的 MAC 地址" - -#: src/ImageRunModal.jsx:814 src/Images.jsx:178 src/ContainerDetails.jsx:35 -msgid "Image" -msgstr "镜像" - -#: src/ContainerCommitModal.jsx:44 -msgid "Image name is not unique" -msgstr "镜像名称不是唯一的" - -#: src/ContainerCommitModal.jsx:35 -msgid "Image name is required" -msgstr "镜像名称是必需的" - -#: src/ImageRunModal.jsx:816 -msgid "Image selection help" -msgstr "镜像选择帮助" - -#: src/Images.jsx:258 src/Images.jsx:288 -msgid "Images" -msgstr "镜像" - -#: src/ImageRunModal.jsx:940 -msgid "Increase CPU shares" -msgstr "增加 CPU 共享" - -#: src/ImageRunModal.jsx:1050 -msgid "Increase interval" -msgstr "增加间隔" - -#: src/ImageRunModal.jsx:979 -msgid "Increase maximum retries" -msgstr "增加最大重试次数" - -#: src/ImageRunModal.jsx:898 -msgid "Increase memory" -msgstr "增加内存" - -#: src/ImageRunModal.jsx:1124 -msgid "Increase retries" -msgstr "增加重试" - -#: src/ImageRunModal.jsx:1100 -msgid "Increase start period" -msgstr "增加开始周期" - -#: src/ImageRunModal.jsx:1075 -msgid "Increase timeout" -msgstr "增加超时" - -#: src/Containers.jsx:422 src/ImageRunModal.jsx:989 -msgid "Integration" -msgstr "集成" - -#: src/ContainerHealthLogs.jsx:64 src/ImageRunModal.jsx:1032 -msgid "Interval" -msgstr "间隔" - -#: src/ImageRunModal.jsx:1036 -msgid "Interval how often health check is run." -msgstr "健康检查运行的频率间隔。" - -#: src/PodCreateModal.jsx:113 src/ContainerRenameModal.jsx:32 -msgid "" -"Invalid characters. Name can only contain letters, numbers, and certain " -"punctuation (_ . -)." -msgstr "无效的字符。名称只能包含字母、数字和某些标点符号 (_ . -)。" - -#: src/ImageRunModal.jsx:906 -msgid "KB" -msgstr "KB" - -#: src/ContainerRestoreModal.jsx:58 src/ContainerCheckpointModal.jsx:55 -msgid "Keep all temporary checkpoint files" -msgstr "保留所有临时检查点文件" - -#: src/Env.jsx:56 -msgid "Key" -msgstr "键" - -#: src/Env.jsx:18 -msgid "Key must not be empty" -msgstr "键不能为空" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Last 5 runs" -msgstr "最后 5 个运行" - -#: src/ContainerDetails.jsx:71 -msgid "Latest checkpoint" -msgstr "最新的检查点" - -#: src/ContainerCheckpointModal.jsx:57 -msgid "Leave running after writing checkpoint to disk" -msgstr "在将检查点写入磁盘后保持运行" - -#: src/ImageHistory.jsx:59 src/ContainerIntegration.jsx:93 -msgid "Loading details..." -msgstr "加载详细信息..." - -#: src/ContainerLogs.jsx:54 -msgid "Loading logs..." -msgstr "正在加载日志..." - -#: src/Containers.jsx:579 src/ImageUsedBy.jsx:12 -msgid "Loading..." -msgstr "加载中……" - -#: src/ImageRunModal.jsx:711 -msgid "Local" -msgstr "本地" - -#: src/ImageRunModal.jsx:502 -msgid "Local images" -msgstr "本地镜像" - -#: src/Containers.jsx:427 src/ContainerHealthLogs.jsx:102 -msgid "Logs" -msgstr "日志" - -#: src/ContainerDetails.jsx:55 -msgid "MAC address" -msgstr "MAC 地址" - -#: src/ImageRunModal.jsx:907 -msgid "MB" -msgstr "MB" - -#: src/ImageRunModal.jsx:971 -msgid "Maximum retries" -msgstr "最大重试次数" - -#: src/Containers.jsx:512 src/Containers.jsx:515 src/Containers.jsx:568 -msgid "Memory" -msgstr "内存" - -#: src/ImageRunModal.jsx:884 -msgid "Memory limit" -msgstr "内存限制" - -#: src/ImageRunModal.jsx:901 -msgid "Memory unit" -msgstr "内存单元" - -#: src/Volume.jsx:64 -msgid "Mode" -msgstr "模式" - -#: src/ImageDeleteModal.jsx:102 -msgid "Multiple tags exist for this image. Select the tagged images to delete." -msgstr "此镜像存在多个标签。选择标记的镜像以删除。" - -#: src/PublishPort.jsx:24 -msgid "Must be a valid IP address" -msgstr "必须是有效的 IP 地址" - -#: src/PodCreateModal.jsx:144 src/PruneUnusedContainersModal.jsx:64 -#: src/ImageRunModal.jsx:739 -msgid "Name" -msgstr "名称" - -#: src/ImageRunModal.jsx:612 -msgid "Name already in use" -msgstr "名称已被使用" - -#: src/ContainerRenameModal.jsx:68 -msgid "New container name" -msgstr "新容器名称" - -#: src/ContainerCommitModal.jsx:90 -msgid "New image name" -msgstr "新镜像名称" - -#: src/ImageRunModal.jsx:963 -msgid "No" -msgstr "否" - -#: src/ContainerHealthLogs.jsx:39 src/ImageRunModal.jsx:58 -msgid "No action" -msgstr "无操作" - -#: src/Containers.jsx:576 -msgid "No containers" -msgstr "没有容器" - -#: src/ImageUsedBy.jsx:14 -msgid "No containers are using this image" -msgstr "没有使用该镜像的容器" - -#: src/Containers.jsx:577 -msgid "No containers in this pod" -msgstr "此 pod 中没有容器" - -#: src/Containers.jsx:581 -msgid "No containers that match the current filter" -msgstr "没有符合当前筛选条件的容器" - -#: src/ImageRunModal.jsx:1014 -msgid "No environment variables specified" -msgstr "没有指定环境变量" - -#: src/Images.jsx:185 -msgid "No images" -msgstr "没有镜像" - -#: src/ImageRunModal.jsx:839 src/ImageSearchModal.jsx:185 -msgid "No images found" -msgstr "没有找到镜像" - -#: src/Images.jsx:189 -msgid "No images that match the current filter" -msgstr "没有符合当前筛选条件的镜像" - -#: src/Volume.jsx:75 -msgid "No label" -msgstr "无标签" - -#: src/PodCreateModal.jsx:176 src/ImageRunModal.jsx:992 -msgid "No ports exposed" -msgstr "没有公开的端口" - -#: src/ImageSearchModal.jsx:189 -msgid "No results for $0" -msgstr "没有 $0 的结果" - -#: src/Containers.jsx:583 -msgid "No running containers" -msgstr "没有正在运行的容器" - -#: src/PodCreateModal.jsx:188 src/ImageRunModal.jsx:1002 -msgid "No volumes specified" -msgstr "没有指定卷" - -#: src/ImageRunModal.jsx:964 -msgid "On failure" -msgstr "失败时" - -#: src/Containers.jsx:731 -msgid "Only running" -msgstr "仅运行" - -#: src/ContainerCommitModal.jsx:118 -msgid "Options" -msgstr "选项" - -#: src/PodCreateModal.jsx:162 src/PruneUnusedContainersModal.jsx:69 -#: src/ContainerHeader.jsx:15 src/Containers.jsx:566 src/ImageRunModal.jsx:759 -#: src/Images.jsx:179 src/ImageSearchModal.jsx:159 -msgid "Owner" -msgstr "所有者" - -#: src/ImageRunModal.jsx:761 -msgid "Owner help" -msgstr "所有者帮助" - -#: src/ContainerHealthLogs.jsx:115 -msgid "Passed health run" -msgstr "通过的健康运行" - -#: src/ImageRunModal.jsx:1022 -msgid "" -"Paste one or more lines of key=value pairs into any field for bulk import" -msgstr "将一个或多个 key=value 对行粘贴到批量导入的任何字段" - -#: src/PodActions.jsx:166 src/Containers.jsx:190 -msgid "Pause" -msgstr "暂停" - -#: src/ContainerCommitModal.jsx:122 -msgid "Pause container when creating image" -msgstr "创建镜像时暂停容器" - -#: src/util.js:23 src/util.js:26 -msgid "Paused" -msgstr "已暂停" - -#: src/PodCreateModal.jsx:89 -msgid "Pod failed to be created" -msgstr "创建 Pod 失败" - -#: src/PodCreateModal.jsx:147 -msgid "Pod name" -msgstr "Pod 名称" - -#: org.cockpit-project.docker.metainfo.xml:5 -msgid "Docker" -msgstr "Docker" - -#: src/index.html:20 src/manifest.json:0 -msgid "Docker containers" -msgstr "Docker 容器" - -#: src/app.jsx:637 -msgid "Docker service is not active" -msgstr "Docker 服务未激活" - -#: src/PodCreateModal.jsx:178 src/ImageRunModal.jsx:994 -msgid "Port mapping" -msgstr "端口映射" - -#: src/ContainerIntegration.jsx:106 src/ImageDetails.jsx:39 -msgid "Ports" -msgstr "端口" - -#: src/ImageRunModal.jsx:778 -msgid "Ports under 1024 can be mapped" -msgstr "1024 以下的端口可以映射" - -#: src/Volume.jsx:77 -msgid "Private" -msgstr "私有" - -#: src/PublishPort.jsx:122 -msgid "Protocol" -msgstr "协议" - -#: src/PruneUnusedContainersModal.jsx:94 src/PruneUnusedImagesModal.jsx:95 -msgid "Prune" -msgstr "删除" - -#: src/PruneUnusedContainersModal.jsx:87 src/Containers.jsx:300 -msgid "Prune unused containers" -msgstr "删除未使用的容器" - -#: src/PruneUnusedImagesModal.jsx:88 src/Images.jsx:350 -msgid "Prune unused images" -msgstr "删除未使用的镜像" - -#: src/PruneUnusedContainersModal.jsx:90 src/PruneUnusedContainersModal.jsx:94 -msgid "Pruning containers" -msgstr "正在删除容器" - -#: src/PruneUnusedImagesModal.jsx:91 src/PruneUnusedImagesModal.jsx:95 -msgid "Pruning images" -msgstr "删除镜像" - -#: src/ImageRunModal.jsx:860 -msgid "Pull latest image" -msgstr "拉取最新的镜像" - -#: src/Images.jsx:325 -msgid "Pulling" -msgstr "正在拉取" - -#: src/ContainerIntegration.jsx:42 -msgid "Read-only access" -msgstr "只读访问" - -#: src/ContainerIntegration.jsx:41 -msgid "Read-write access" -msgstr "读写访问" - -#: src/Env.jsx:91 src/Volume.jsx:84 src/PublishPort.jsx:137 -msgid "Remove item" -msgstr "删除项目" - -#: src/PruneUnusedContainersModal.jsx:99 -msgid "Removes selected non-running containers" -msgstr "删除选择的、没有在运行的容器" - -#: src/util.js:23 -msgid "Removing" -msgstr "删除" - -#: src/Containers.jsx:160 src/ContainerRenameModal.jsx:92 -msgid "Rename" -msgstr "重命名" - -#: src/ContainerRenameModal.jsx:85 -msgid "Rename container $0" -msgstr "重命名容器 $0" - -#: src/ImageRunModal.jsx:772 -msgid "Resource limits can be set" -msgstr "可以设置资源限制" - -#: src/PodActions.jsx:110 src/util.js:23 src/Containers.jsx:178 -#: src/ContainerHealthLogs.jsx:40 src/ImageRunModal.jsx:59 -msgid "Restart" -msgstr "重启" - -#: src/ImageRunModal.jsx:948 -msgid "Restart policy" -msgstr "重启策略" - -#: src/ImageRunModal.jsx:950 src/ImageRunModal.jsx:960 -msgid "Restart policy help" -msgstr "重启策略帮助" - -#: src/ImageRunModal.jsx:952 -msgid "Restart policy to follow when containers exit." -msgstr "容器退出时遵循重启策略。" - -#: src/ImageRunModal.jsx:952 -msgid "" -"Restart policy to follow when containers exit. Using linger for auto-" -"starting containers may not work in some circumstances, such as when " -"ecryptfs, systemd-homed, NFS, or 2FA are used on a user account." -msgstr "" -"容器退出时重启策略。在某些情况下,使用 linger 进行自动启动容器可能无法正常工" -"作,如在用户账户中使用了 ecryptfs、systemd-homed、NFS 或 2FA。" - -#: src/Containers.jsx:228 src/ContainerRestoreModal.jsx:49 -msgid "Restore" -msgstr "恢复" - -#: src/ContainerRestoreModal.jsx:44 -msgid "Restore container $0" -msgstr "恢复容器 $0" - -#: src/ContainerRestoreModal.jsx:60 -msgid "Restore with established TCP connections" -msgstr "使用已建立的 TCP 连接恢复" - -#: src/ImageRunModal.jsx:789 -msgid "Restricted by user account permissions" -msgstr "受用户帐户权限限制" - -#: src/PodActions.jsx:151 src/Containers.jsx:197 -msgid "Resume" -msgstr "继续" - -#: src/ContainerHealthLogs.jsx:68 src/ImageRunModal.jsx:1107 -msgid "Retries" -msgstr "重试" - -#: src/ImageSearchModal.jsx:190 -msgid "Retry another term." -msgstr "重试另一个项。" - -#: src/Containers.jsx:251 src/ContainerHealthLogs.jsx:98 -msgid "Run health check" -msgstr "运行健康检查" - -#: src/util.js:23 src/util.js:26 src/ImageUsedBy.jsx:35 -msgid "Running" -msgstr "正在运行" - -#: src/Volume.jsx:71 -msgid "SELinux" -msgstr "SELinux" - -#: src/ImageSearchModal.jsx:167 -msgid "Search by name or description" -msgstr "按名称或描述搜索" - -#: src/ImageRunModal.jsx:701 -msgid "Search by registry" -msgstr "按照注册表搜索" - -#: src/ImageSearchModal.jsx:164 -msgid "Search for" -msgstr "搜索" - -#: src/ImageSearchModal.jsx:136 -msgid "Search for an image" -msgstr "搜索镜像" - -#: src/ImageRunModal.jsx:844 -msgid "Search string or container location" -msgstr "搜索字符串或容器位置" - -#: src/ImageSearchModal.jsx:183 -msgid "Searching..." -msgstr "搜索中..." - -#: src/ImageRunModal.jsx:822 -msgid "Searching: $0" -msgstr "搜索: $0" - -#: src/Volume.jsx:76 -msgid "Shared" -msgstr "共享" - -#: src/Containers.jsx:726 -msgid "Show" -msgstr "显示" - -#: src/Images.jsx:302 -msgid "Show images" -msgstr "显示镜像" - -#: src/Images.jsx:252 -msgid "Show intermediate images" -msgstr "显示中间镜像" - -#: src/ContainerIntegration.jsx:82 -msgid "Show less" -msgstr "显示更少" - -#: src/PruneUnusedImagesModal.jsx:48 src/ContainerIntegration.jsx:82 -msgid "Show more" -msgstr "显示更多" - -#: src/ImageHistory.jsx:33 -msgid "Size" -msgstr "大小" - -#: src/PodActions.jsx:136 src/app.jsx:683 src/Containers.jsx:217 -msgid "Start" -msgstr "启动" - -#: src/ContainerHealthLogs.jsx:72 src/ImageRunModal.jsx:1082 -msgid "Start period" -msgstr "开始期间" - -#: src/app.jsx:644 -msgid "Start docker" -msgstr "启动 docker" - -#: src/ImageSearchModal.jsx:185 -msgid "Start typing to look for images." -msgstr "开始键入来查找镜像。" - -#: src/ContainerHealthLogs.jsx:105 -msgid "Started at" -msgstr "开始于" - -#: src/Containers.jsx:569 src/ContainerDetails.jsx:67 -msgid "State" -msgstr "状态" - -#: src/ContainerHealthLogs.jsx:56 -msgid "Status" -msgstr "状态" - -#: src/PodActions.jsx:88 src/Containers.jsx:170 src/ContainerHealthLogs.jsx:41 -#: src/ImageRunModal.jsx:60 -msgid "Stop" -msgstr "停止" - -#: src/util.js:23 src/util.js:26 -msgid "Stopped" -msgstr "已停止" - -#: src/ContainerCheckpointModal.jsx:60 -msgid "Support preserving established TCP connections" -msgstr "支持保留已建立的 TCP 连接" - -#: src/PodCreateModal.jsx:164 src/ContainerHeader.jsx:20 -#: src/ImageRunModal.jsx:766 src/ImageRunModal.jsx:801 -msgid "System" -msgstr "系统" - -#: src/app.jsx:690 -msgid "System Docker service is also available" -msgstr "系统 Docker 服务同样可用" - -#: src/PublishPort.jsx:128 -msgid "TCP" -msgstr "TCP" - -#: src/ContainerCommitModal.jsx:98 src/ImageSearchModal.jsx:139 -msgid "Tag" -msgstr "标签" - -#: src/ImageDetails.jsx:27 -msgid "Tags" -msgstr "标签" - -#: org.cockpit-project.docker.metainfo.xml:10 -msgid "The Cockpit user interface for Docker containers." -msgstr "Docker 容器的 Cockpit 用户界面。" - -#: src/ImageRunModal.jsx:1086 -msgid "The initialization time needed for a container to bootstrap." -msgstr "容器进行 bootstrap 所需的初始化时间。" - -#: src/ImageRunModal.jsx:1061 -msgid "" -"The maximum time allowed to complete the health check before an interval is " -"considered failed." -msgstr "当间隔被视为失败前,允许完成健康检查的最长时间。" - -#: src/ImageRunModal.jsx:1111 -msgid "" -"The number of retries allowed before a healthcheck is considered to be " -"unhealthy." -msgstr "在健康检查被视为不健康前,允许的重试次数。" - -#: src/ContainerHealthLogs.jsx:76 src/ImageRunModal.jsx:1057 -msgid "Timeout" -msgstr "超时" - -#: src/app.jsx:649 -msgid "Troubleshoot" -msgstr "故障排除" - -#: src/ContainerHeader.jsx:28 -msgid "Type to filter…" -msgstr "输入筛选条件……" - -#: src/PublishPort.jsx:129 -msgid "UDP" -msgstr "UDP" - -#: src/ImageHistory.jsx:59 -msgid "Unable to load image history" -msgstr "无法加载镜像历史记录" - -#: src/Containers.jsx:284 -msgid "Unhealthy" -msgstr "不健康" - -#: src/ContainerDetails.jsx:12 -msgid "Up since $0" -msgstr "自 $0 开始运行" - -#: src/ContainerCommitModal.jsx:127 -msgid "Use legacy Docker format" -msgstr "使用旧的 Docker 格式" - -#: src/Images.jsx:183 src/ImageDetails.jsx:33 -msgid "Used by" -msgstr "使用者" - -#: src/app.jsx:67 src/app.jsx:528 -msgid "User" -msgstr "用户" - -#: src/app.jsx:697 -msgid "User Docker service is also available" -msgstr "用户 Docker 服务同样可用" - -#: src/PodCreateModal.jsx:169 src/ImageRunModal.jsx:783 -#: src/ImageRunModal.jsx:807 -msgid "User:" -msgstr "用户:" - -#: src/Env.jsx:72 -msgid "Value" -msgstr "值" - -#: src/PodCreateModal.jsx:190 src/ContainerIntegration.jsx:110 -#: src/ImageRunModal.jsx:1004 -msgid "Volumes" -msgstr "卷" - -#: src/ContainerHealthLogs.jsx:80 src/ImageRunModal.jsx:1130 -msgid "When unhealthy" -msgstr "当不健康时" - -#: src/ImageRunModal.jsx:880 -msgid "With terminal" -msgstr "使用终端" - -#: src/Volume.jsx:66 -msgid "Writable" -msgstr "可写入" - -#: src/manifest.json:0 -msgid "container" -msgstr "容器" - -#: src/ImageRunModal.jsx:289 -msgid "downloading" -msgstr "下载" - -#: src/ImageRunModal.jsx:820 -msgid "host[:port]/[user]/container[:tag]" -msgstr "host[:port]/[user]/container[:tag]" - -#: src/manifest.json:0 -msgid "image" -msgstr "镜像" - -#: src/ImageSearchModal.jsx:172 -msgid "in" -msgstr "于" - -#: src/ImageDeleteModal.jsx:79 -msgid "intermediate" -msgstr "中间体" - -#: src/ImageDeleteModal.jsx:59 -msgid "intermediate image" -msgstr "中间镜像" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "n/a" -msgstr "不适用" - -#: src/Containers.jsx:353 src/Containers.jsx:354 -msgid "not available" -msgstr "不可用" - -#: src/Containers.jsx:847 -msgid "pod group" -msgstr "pod 组" - -#: src/manifest.json:0 -msgid "docker" -msgstr "docker" - -#: src/Containers.jsx:532 -msgid "ports" -msgstr "端口" - -#: src/ImageRunModal.jsx:1054 src/ImageRunModal.jsx:1079 -#: src/ImageRunModal.jsx:1104 -msgid "seconds" -msgstr "秒" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 src/ImageSearchModal.jsx:160 -msgid "system" -msgstr "系统" - -#: src/Images.jsx:85 src/Images.jsx:92 -msgid "unused" -msgstr "未使用" - -#: src/PruneUnusedContainersModal.jsx:28 src/Containers.jsx:390 -#: src/Images.jsx:134 -msgid "user:" -msgstr "用户:" - -#: src/Containers.jsx:547 -msgid "volumes" -msgstr "卷" - -#~ msgid "Delete $0" -#~ msgstr "删除 $0" - -#~ msgid "select all" -#~ msgstr "全选" - -#~ msgid "Restarting" -#~ msgstr "正在重启" - -#~ msgid "Confirm deletion of $0" -#~ msgstr "确认删除 $0" - -#~ msgid "Confirm deletion of pod $0" -#~ msgstr "确认删除 pod $0" - -#~ msgid "Confirm force deletion of pod $0" -#~ msgstr "确认强制删除 pod $0" - -#~ msgid "Confirm forced deletion of $0" -#~ msgstr "确认强制删除 $0" - -#~ msgid "Container is currently running." -#~ msgstr "容器正在运行。" - -#~ msgid "Do not include root file-system changes when exporting" -#~ msgstr "导出时不包含 root 文件系统更改" - -#~ msgid "Default with single selectable" -#~ msgstr "默认使用单选" - -#~ msgid "Start after creation" -#~ msgstr "创建后启动" - -#, fuzzy -#~| msgid "Delete tagged images" -#~ msgid "Delete unused $0 images:" -#~ msgstr "删除标记的镜像" - -#~ msgid "created" -#~ msgstr "创建" - -#~ msgid "exited" -#~ msgstr "退出" - -#~ msgid "paused" -#~ msgstr "已暂停" - -#~ msgid "running" -#~ msgstr "正在运行" - -#~ msgid "stopped" -#~ msgstr "已停止" - -#, fuzzy -#~| msgid "user:" -#~ msgid "user" -#~ msgstr "用户:" - -#~ msgid "Add on build variable" -#~ msgstr "添加构建变量" - -#~ msgid "Commit image" -#~ msgstr "提交镜像" - -#~ msgid "Format" -#~ msgstr "格式" - -#~ msgid "Message" -#~ msgstr "消息" - -#~ msgid "Pause the container" -#~ msgstr "暂停该容器" - -#~ msgid "Remove on build variable" -#~ msgstr "删除构建变量" - -#~ msgid "Set container on build variables" -#~ msgstr "设置容器构建时的变量" - -#~ msgid "Add item" -#~ msgstr "添加项目" - -#~ msgid "Host port (optional)" -#~ msgstr "主机端口(可选)" - -#~ msgid "IP (optional)" -#~ msgstr "IP(可选)" - -#~ msgid "ReadOnly" -#~ msgstr "只读" - -#~ msgid "IP prefix length" -#~ msgstr "IP 前缀长度" - -#~ msgid "Get new image" -#~ msgstr "获取新镜像" - -#~ msgid "Run" -#~ msgstr "运行" - -#~ msgid "On build" -#~ msgstr "构建时" - -#~ msgid "Are you sure you want to delete this image?" -#~ msgstr "您确定要删除该镜像吗?" - -#~ msgid "Could not attach to this container: $0" -#~ msgstr "无法附加到该容器:$0" - -#~ msgid "Could not open channel: $0" -#~ msgstr "无法打开通道:$0" - -#~ msgid "Everything" -#~ msgstr "全部" - -#~ msgid "Security" -#~ msgstr "安全性" - -#~ msgid "The scan from $time ($type) found no vulnerabilities." -#~ msgstr "$time ($type) 发起的扫描未发现漏洞。" - -#~ msgid "This version of the Web Console does not support a terminal." -#~ msgstr "该版本的网页控制台不支持终端。" diff --git a/ui/cockpit-docker/pyproject.toml b/ui/cockpit-docker/pyproject.toml deleted file mode 100644 index 462e002..0000000 --- a/ui/cockpit-docker/pyproject.toml +++ /dev/null @@ -1,51 +0,0 @@ -[tool.ruff] -exclude = [ - ".git/", - "modules/", - "node_modules/", -] -line-length = 118 -preview = true -src = [] - -[tool.ruff.lint] -select = [ - "A", # flake8-builtins - "B", # flake8-bugbear - "C4", # flake8-comprehensions - "D300", # pydocstyle: Forbid ''' in docstrings - "DTZ", # flake8-datetimez - "E", # pycodestyle - "EXE", # flake8-executable - "F", # pyflakes - "FBT", # flake8-boolean-trap - "G", # flake8-logging-format - "I", # isort - "ICN", # flake8-import-conventions - "ISC", # flake8-implicit-str-concat - "PLE", # pylint errors - "PGH", # pygrep-hooks - "RSE", # flake8-raise - "RUF", # ruff rules - "T10", # flake8-debugger - "TCH", # flake8-type-checking - "UP032", # f-string - "W", # warnings (mostly whitespace) - "YTT", # flake8-2020 -] -ignore = [ - "FBT002", # Boolean default value in function definition - "FBT003", # Boolean positional value in function call -] - -[tool.ruff.lint.flake8-pytest-style] -fixture-parentheses = false -mark-parentheses = false - -[tool.ruff.lint.isort] -known-first-party = ["cockpit"] - -[tool.vulture] -ignore_names = [ - "test[A-Z0-9]*", -] diff --git a/ui/cockpit-docker/src/ContainerCheckpointModal.jsx b/ui/cockpit-docker/src/ContainerCheckpointModal.jsx deleted file mode 100644 index 11bae17..0000000 --- a/ui/cockpit-docker/src/ContainerCheckpointModal.jsx +++ /dev/null @@ -1,68 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; -import { Form } from "@patternfly/react-core/dist/esm/components/Form"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { useDialogs } from "dialogs.jsx"; -import cockpit from 'cockpit'; - -import * as client from './client.js'; - -const _ = cockpit.gettext; - -const ContainerCheckpointModal = ({ containerWillCheckpoint, onAddNotification }) => { - const Dialogs = useDialogs(); - const [inProgress, setProgress] = useState(false); - const [keep, setKeep] = useState(false); - const [leaveRunning, setLeaveRunning] = useState(false); - const [tcpEstablished, setTcpEstablished] = useState(false); - - const handleCheckpointContainer = () => { - setProgress(true); - client.postContainer("checkpoint", containerWillCheckpoint.Id, { - keep, - leaveRunning, - tcpEstablished, - }) - .catch(ex => { - const error = cockpit.format(_("Failed to checkpoint container $0"), containerWillCheckpoint.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - setProgress(false); - }) - .finally(() => { - Dialogs.close(); - }); - }; - - return ( - - - - } - > -
- setKeep(val)} /> - setLeaveRunning(val)} /> - setTcpEstablished(val) } /> - -
- ); -}; - -export default ContainerCheckpointModal; diff --git a/ui/cockpit-docker/src/ContainerCommitModal.jsx b/ui/cockpit-docker/src/ContainerCommitModal.jsx deleted file mode 100644 index 4e02100..0000000 --- a/ui/cockpit-docker/src/ContainerCommitModal.jsx +++ /dev/null @@ -1,158 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; -import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import cockpit from 'cockpit'; - -import { FormHelper } from 'cockpit-components-form-helper.jsx'; -import * as utils from './util.js'; -import * as client from './client.js'; -import { ErrorNotification } from './Notification.jsx'; -import { fmt_to_fragments } from 'utils.jsx'; -import { useDialogs } from "dialogs.jsx"; - -const _ = cockpit.gettext; - -const ContainerCommitModal = ({ container, localImages }) => { - const Dialogs = useDialogs(); - - const [imageName, setImageName] = useState(""); - const [tag, setTag] = useState(""); - const [author, setAuthor] = useState(""); - const [command, setCommand] = useState(utils.quote_cmdline(container.Config.Cmd)); - const [pause, setPause] = useState(false); - - const [dialogError, setDialogError] = useState(""); - const [dialogErrorDetail, setDialogErrorDetail] = useState(""); - const [commitInProgress, setCommitInProgress] = useState(false); - const [nameError, setNameError] = useState(""); - - const handleCommit = (force) => { - if (!force && !imageName) { - setNameError(_("Image name is required")); - return; - } - - let full_name = imageName + ":" + (tag !== "" ? tag : "latest"); - if (full_name.indexOf("/") < 0) - full_name = "localhost/" + full_name; - - if (!force && localImages.some(image => image.Name === full_name)) { - setNameError(_("Image name is not unique")); - return; - } - - function quote(word) { - word = word.replace(/"/g, '\\"'); - return '"' + word + '"'; - } - - const commitData = {}; - commitData.container = container.Id; - commitData.repo = imageName; - commitData.author = author; - commitData.pause = pause; - commitData.format = 'docker'; - - if (tag) - commitData.tag = tag; - - commitData.changes = []; - if (command.trim() !== "") { - let cmdData = ""; - const words = utils.unquote_cmdline(command.trim()); - const cmdStr = words.map(quote).join(", "); - cmdData = "CMD [" + cmdStr + "]"; - commitData.changes.push(cmdData); - } - - setCommitInProgress(true); - setNameError(""); - setDialogError(""); - setDialogErrorDetail(""); - client.commitContainer(commitData) - .then(() => Dialogs.close()) - .catch(ex => { - setDialogError(cockpit.format(_("Failed to commit container $0"), container.Name)); - setDialogErrorDetail(cockpit.format("$0: $1", ex.message, ex.reason)); - setCommitInProgress(false); - }); - }; - - const commitContent = ( -
- {dialogError && setDialogError("")} />} - - { setNameError(""); setImageName(value) }} /> - - - - - { setNameError(""); setTag(value) }} /> - - - - ")} - value={author} - onChange={(_, value) => setAuthor(value)} /> - - - - setCommand(value)} /> - - - - setPause(val)} - label={_("Pause container when creating image")} /> - - - ); - - return ( - {container.Name})} - footer={<> - - {nameError && } - - } - > - {commitContent} - - ); -}; - -export default ContainerCommitModal; diff --git a/ui/cockpit-docker/src/ContainerDeleteModal.jsx b/ui/cockpit-docker/src/ContainerDeleteModal.jsx deleted file mode 100644 index ce2087d..0000000 --- a/ui/cockpit-docker/src/ContainerDeleteModal.jsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { useDialogs } from "dialogs.jsx"; -import cockpit from 'cockpit'; - -import * as client from './client.js'; - -const _ = cockpit.gettext; - -const ContainerDeleteModal = ({ containerWillDelete, onAddNotification }) => { - const Dialogs = useDialogs(); - - const handleRemoveContainer = () => { - const container = containerWillDelete; - const id = container ? container.Id : ""; - - Dialogs.close(); - client.delContainer(id, false) - .catch(ex => { - const error = cockpit.format(_("Failed to remove container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - }; - - return ( - - {' '} - - } - > - {_("Deleting a container will erase all data in it.")} - - ); -}; - -export default ContainerDeleteModal; diff --git a/ui/cockpit-docker/src/ContainerDetails.jsx b/ui/cockpit-docker/src/ContainerDetails.jsx deleted file mode 100644 index 96549ae..0000000 --- a/ui/cockpit-docker/src/ContainerDetails.jsx +++ /dev/null @@ -1,80 +0,0 @@ -import React from 'react'; -import cockpit from 'cockpit'; -import * as utils from './util.js'; - -import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; -import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; - -const _ = cockpit.gettext; - -const render_container_state = (container) => { - if (container.State.Status === "running") { - return cockpit.format(_("Up since $0"), utils.localize_time(Date.parse(container.State.StartedAt) / 1000)); - } - return cockpit.format(_("Exited")); -}; - -const ContainerDetails = ({ container }) => { - const networkOptions = ( - [ - container.NetworkSettings?.IPAddress, - container.NetworkSettings?.Gateway, - container.NetworkSettings?.MacAddress, - ].some(itm => !!itm) - ); - - return ( - - - - - {_("ID")} - {utils.truncate_id(container.Id)} - - - {_("Image")} - {container.Config.Image} - - - {_("Command")} - {utils.quote_cmdline(container.Config?.Cmd)} - - - - - {networkOptions && - {container.NetworkSettings?.IPAddress && - {_("IP address")} - {container.NetworkSettings.IPAddress} - } - {container.NetworkSettings?.Gateway && - {_("Gateway")} - {container.NetworkSettings.Gateway} - } - {container.NetworkSettings?.MacAddress && - {_("MAC address")} - {container.NetworkSettings.MacAddress} - } - } - - - - - {_("Created")} - {utils.localize_time(new Date(container.Created) / 1000)} - - - {_("State")} - {render_container_state(container)} - - {container.State?.Checkpointed && - {_("Latest checkpoint")} - {utils.localize_time(Date.parse(container.State.CheckpointedAt) / 1000)} - } - - - - ); -}; - -export default ContainerDetails; diff --git a/ui/cockpit-docker/src/ContainerHeader.jsx b/ui/cockpit-docker/src/ContainerHeader.jsx deleted file mode 100644 index f7ecacc..0000000 --- a/ui/cockpit-docker/src/ContainerHeader.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import cockpit from 'cockpit'; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import { Toolbar, ToolbarContent, ToolbarItem } from "@patternfly/react-core/dist/esm/components/Toolbar"; -const _ = cockpit.gettext; - -const ContainerHeader = ({ textFilter, handleFilterChanged }) => { - return ( - - - - handleFilterChanged(value)} /> - - - - ); -}; - -export default ContainerHeader; diff --git a/ui/cockpit-docker/src/ContainerHealthLogs.jsx b/ui/cockpit-docker/src/ContainerHealthLogs.jsx deleted file mode 100644 index 1d9b354..0000000 --- a/ui/cockpit-docker/src/ContainerHealthLogs.jsx +++ /dev/null @@ -1,158 +0,0 @@ -/* - * This file is part of Cockpit. - * - * Copyright (C) 2022 Red Hat, Inc and 2023 Jewish Education Media. - * - * Cockpit is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * Cockpit is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Cockpit; If not, see . - */ - -import React from 'react'; -import cockpit from 'cockpit'; -import * as utils from './util.js'; - -import { ListingTable } from "cockpit-components-table.jsx"; -import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; -import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { CheckCircleIcon, ErrorCircleOIcon } from "@patternfly/react-icons"; -import { CodeBlock, CodeBlockAction, CodeBlockCode } from '@patternfly/react-core/dist/esm/components/CodeBlock'; -import { ClipboardCopyButton } from '@patternfly/react-core/dist/esm/components/ClipboardCopy'; -import { ExpandableSection, ExpandableSectionToggle } from '@patternfly/react-core/dist/esm/components/ExpandableSection'; -const _ = cockpit.gettext; - -const format_nanoseconds = (ns) => { - const seconds = ns / 1000000000; - return cockpit.format(cockpit.ngettext("$0 second", "$0 seconds", seconds), seconds); -}; - -const HealthcheckOnFailureActionText = { - none: _("No action"), - restart: _("Restart"), - stop: _("Stop"), - kill: _("Force stop"), -}; - -const HealthLogBlock = ({ log }) => { - const [expanded, setExpanded] = React.useState(false); - const toggleExpanded = () => setExpanded(!expanded); - - const actions = ( - <> - - - - - ); - - let output = log.Output.split("\n"); - let extra = null; - if (output.length > 10) { - extra = output.slice(10).join("\n"); - output = output.slice(0, 10).join("\n"); - } else { - output = output.join("\n"); - } - - return ( - - - {output} - {extra && - {extra} - } - - { extra && - {expanded ? 'Show Less' : 'Show More'} - } - - ); -}; - -const ContainerHealthLogs = ({ container, onAddNotification, state }) => { - const healthCheck = container.Config?.Healthcheck ?? container.Config?.Health ?? {}; // not-covered: only on old version - const healthState = container.State?.Healthcheck ?? container.State?.Health ?? {}; // not-covered: only on old version - const logs = [...(healthState.Log || [])].reverse(); // not-covered: Log should always exist, belt-and-suspenders - - return ( - <> - - - - - {_("Status")} - {state} - - - {_("Command")} - {utils.quote_cmdline(healthCheck.Test)} - - {healthCheck.Interval && - {_("Interval")} - {format_nanoseconds(healthCheck.Interval)} - } - {healthCheck.Retries && - {_("Retries")} - {healthCheck.Retries} - } - {healthCheck.StartPeriod && - {_("Start period")} - {format_nanoseconds(healthCheck.StartPeriod)} - } - {healthCheck.Timeout && - {_("Timeout")} - {format_nanoseconds(healthCheck.Timeout)} - } - {container.Config?.HealthcheckOnFailureAction && - {_("When unhealthy")} - {HealthcheckOnFailureActionText[container.Config.HealthcheckOnFailureAction]} - } - {healthState.FailingStreak && - {_("Failing streak")} - {healthState.FailingStreak} - } - - - - { - const id = "hc" + log.Start + container.Id; - return { - expandedContent: log.Output ? : null, - columns: [ - { - title: - {log.ExitCode === 0 ? : } - {log.ExitCode === 0 ? _("Passed health run") : _("Failed health run")} - - }, - { - title:
{log.ExitCode}
- }, - utils.localize_time(Date.parse(log.Start) / 1000) - ], - props: { - key: id, - "data-row-id": id, - }, - }; - }) - } /> - - ); -}; - -export default ContainerHealthLogs; diff --git a/ui/cockpit-docker/src/ContainerIntegration.jsx b/ui/cockpit-docker/src/ContainerIntegration.jsx deleted file mode 100644 index 999bead..0000000 --- a/ui/cockpit-docker/src/ContainerIntegration.jsx +++ /dev/null @@ -1,125 +0,0 @@ -import React, { useState } from 'react'; -import cockpit from 'cockpit'; - -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; -import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List"; -import { Tooltip } from "@patternfly/react-core/dist/esm/components/Tooltip"; - -import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; - -const _ = cockpit.gettext; - -// ports is a mapping like { "5000/tcp": [{"HostIp": "", "HostPort": "6000"}] } -export const renderContainerPublishedPorts = ports => { - if (!ports) - return null; - - const items = []; - Object.entries(ports).forEach(([containerPort, hostBindings]) => { - (hostBindings ?? []).forEach(binding => { // not-covered: null was observed in the wild, but unknown how to reproduce - items.push( - - { binding.HostIp || "0.0.0.0" }:{ binding.HostPort } → { containerPort } - - ); - }); - }); - - return {items}; -}; - -export const renderContainerVolumes = (volumes) => { - if (!volumes.length) - return null; - - const result = volumes.map(volume => { - let source = volume.Source; - if (volume.Source.includes(`docker/volumes/${volume.Name}`)) { - source = volume.Name; - } - return ( - - {source} - {volume.RW - ? - : } - {volume.Destination} - - ); - }); - - return {result}; -}; - -const ContainerEnv = ({ containerEnv, imageEnv }) => { - // filter out some Environment variables set by docker or by image - const toRemoveEnv = [...imageEnv, 'container=docker']; - let toShow = containerEnv.filter(variable => { - if (toRemoveEnv.includes(variable)) { - return false; - } - - return !variable.match(/(HOME|TERM)=.*/); - }); - - // append filtered out variables to always shown variables when 'show more' is clicked - const [showMore, setShowMore] = useState(false); - if (showMore) - toShow = toShow.concat(containerEnv.filter(variable => !toShow.includes(variable))); - - if (!toShow.length) - return null; - - const result = toShow.map(variable => { - return ( - - {variable} - - ); - }); - - result.push( - - - - ); - - return {result}; -}; - -const ContainerIntegration = ({ container, localImages }) => { - if (localImages === null) { // not-covered: not a stable UI state - return ( - - ); - } - - const ports = renderContainerPublishedPorts(container.NetworkSettings.Ports); - const volumes = renderContainerVolumes(container.Mounts); - - const image = localImages.filter(img => img.Id === container.Image)[0]; - const env = ; - - return ( - - {ports && - {_("Ports")} - {ports} - } - {volumes && - {_("Volumes")} - {volumes} - } - {env && - {_("Environment variables")} - {env} - } - - ); -}; - -export default ContainerIntegration; diff --git a/ui/cockpit-docker/src/ContainerLogs.jsx b/ui/cockpit-docker/src/ContainerLogs.jsx deleted file mode 100644 index 7bcf0a7..0000000 --- a/ui/cockpit-docker/src/ContainerLogs.jsx +++ /dev/null @@ -1,174 +0,0 @@ -/* - * This file is part of Cockpit. - * - * Copyright (C) 2020 Red Hat, Inc. - * - * Cockpit is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * Cockpit is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Cockpit; If not, see . - */ - -import React from 'react'; -import PropTypes from 'prop-types'; -import { Terminal } from "xterm"; -import { CanvasAddon } from 'xterm-addon-canvas'; -import { ExclamationCircleIcon } from '@patternfly/react-icons'; - -import cockpit from 'cockpit'; -import rest from './rest.js'; -import * as client from './client.js'; -import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; - -import "./ContainerTerminal.css"; - -const _ = cockpit.gettext; - -class ContainerLogs extends React.Component { - constructor(props) { - super(props); - - this.onStreamClose = this.onStreamClose.bind(this); - this.onStreamMessage = this.onStreamMessage.bind(this); - this.connectStream = this.connectStream.bind(this); - - this.view = new Terminal({ - cols: 80, - rows: 24, - convertEol: true, - cursorBlink: false, - disableStdin: true, - fontSize: 12, - fontFamily: 'Menlo, Monaco, Consolas, monospace', - screenReaderMode: true - }); - this.view._core.cursorHidden = true; - this.view.write(_("Loading logs...")); - - this.logRef = React.createRef(); - - this.state = { - opened: false, - loading: true, - errorMessage: "", - streamer: null, - }; - } - - componentDidMount() { - this._ismounted = true; - this.connectStream(); - } - - componentDidUpdate(prevProps, prevState) { - // Connect channel when there is none and container started - if (!this.state.streamer && this.props.containerStatus === "running" && prevProps.containerStatus !== "running") - this.connectStream(); - if (prevProps.width !== this.props.width) { - this.resize(this.props.width); - } - } - - resize(width) { - // 24 PF padding * 4 - // 3 line border - // 21 inner padding of xterm.js - // xterm.js scrollbar 20 - const padding = 24 * 4 + 3 + 21 + 20; - const realWidth = this.view._core._renderService.dimensions.css.cell.width; - const cols = Math.floor((width - padding) / realWidth); - this.view.resize(cols, 24); - } - - componentWillUnmount() { - this._ismounted = false; - if (this.state.streamer) - this.state.streamer.close(); - this.view.dispose(); - } - - connectStream() { - if (this.state.streamer !== null) - return; - - // Show the terminal. Once it was shown, do not show it again but reuse the previous one - if (!this.state.opened) { - this.view.open(this.logRef.current); - this.view.loadAddon(new CanvasAddon()); - this.setState({ opened: true }); - } - this.resize(this.props.width); - - const connection = rest.connect(client.getAddress()); - const options = { - method: "GET", - path: client.VERSION + "/containers/" + this.props.containerId + "/logs", - body: "", - binary: true, - params: { - follow: true, - stdout: true, - stderr: true, - }, - }; - - connection.monitor(options, this.onStreamMessage, true) - .then(this.onStreamClose) - .catch(e => { - const error = JSON.parse(new TextDecoder().decode(e.message)); - this.setState({ - errorMessage: error.message, - streamer: null, - }); - }); - this.setState({ - streamer: connection, - errorMessage: "", - }); - } - - onStreamMessage(data) { - if (data) { - if (this.state.loading) { - this.view.reset(); - this.view._core.cursorHidden = true; - this.setState({ loading: false }); - } - // First 8 bytes encode information about stream and frame - // See 'Stream format' on https://docs.docker.com/engine/api/v1.40/#operation/ContainerAttach - this.view.writeln(data.slice(8)); - } - } - - onStreamClose() { - if (this._ismounted) { - this.setState({ - streamer: null, - }); - this.view.write("Streaming disconnected"); - } - } - - render() { - let element =
; - if (this.state.errorMessage) - element = ; - - return element; - } -} - -ContainerLogs.propTypes = { - containerId: PropTypes.string.isRequired, - width: PropTypes.number.isRequired -}; - -export default ContainerLogs; diff --git a/ui/cockpit-docker/src/ContainerRenameModal.jsx b/ui/cockpit-docker/src/ContainerRenameModal.jsx deleted file mode 100644 index c81c0f2..0000000 --- a/ui/cockpit-docker/src/ContainerRenameModal.jsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import cockpit from 'cockpit'; - -import * as client from './client.js'; -import * as utils from './util.js'; -import { ErrorNotification } from './Notification.jsx'; -import { useDialogs } from "dialogs.jsx"; -import { FormHelper } from 'cockpit-components-form-helper.jsx'; - -const _ = cockpit.gettext; - -const ContainerRenameModal = ({ container, updateContainer }) => { - const Dialogs = useDialogs(); - const [name, setName] = useState(container.Name.replace(/^\//, "")); - const { version } = utils.useDockerInfo(); - const [nameError, setNameError] = useState(null); - const [dialogError, setDialogError] = useState(null); - const [dialogErrorDetail, setDialogErrorDetail] = useState(null); - - const handleInputChange = (targetName, value) => { - if (targetName === "name") { - setName(value); - if (value === "") { - setNameError(_("Container name is required.")); - } else if (utils.is_valid_container_name(value)) { - setNameError(null); - } else { - setNameError(_("Invalid characters. Name can only contain letters, numbers, and certain punctuation (_ . -).")); - } - } - }; - - const handleRename = () => { - if (!name) { - setNameError(_("Container name is required.")); - return; - } - - setNameError(null); - setDialogError(null); - client.renameContainer(container.Id, { name }) - .then(() => { - Dialogs.close(); - // HACK: This is a workaround for missing API rename event in docker versions less than 4.1. - if (version.localeCompare("4.1", undefined, { numeric: true, sensitivity: 'base' }) < 0) { - updateContainer(container.Id); // not-covered: only on old version - } - }) - .catch(ex => { - setDialogError(cockpit.format(_("Failed to rename container $0"), container.Name)); // not-covered: OS error - setDialogErrorDetail(cockpit.format("$0: $1", ex.message, ex.reason)); - }); - }; - - const handleKeyDown = (event) => { - if (event.key === "Enter") { - event.preventDefault(); - handleRename(); - } - }; - - const renameContent = ( -
- - handleInputChange("name", value)} /> - - -
- ); - - return ( - - - - } - > - {dialogError && setDialogError(null)} />} - {renameContent} - - ); -}; - -export default ContainerRenameModal; diff --git a/ui/cockpit-docker/src/ContainerRestoreModal.jsx b/ui/cockpit-docker/src/ContainerRestoreModal.jsx deleted file mode 100644 index c3575bb..0000000 --- a/ui/cockpit-docker/src/ContainerRestoreModal.jsx +++ /dev/null @@ -1,74 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; -import { Form } from "@patternfly/react-core/dist/esm/components/Form"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { useDialogs } from "dialogs.jsx"; -import cockpit from 'cockpit'; - -import * as client from './client.js'; - -const _ = cockpit.gettext; - -const ContainerRestoreModal = ({ containerWillRestore, onAddNotification }) => { - const Dialogs = useDialogs(); - - const [inProgress, setInProgress] = useState(false); - const [keep, setKeep] = useState(false); - const [tcpEstablished, setTcpEstablished] = useState(false); - const [ignoreStaticIP, setIgnoreStaticIP] = useState(false); - const [ignoreStaticMAC, setIgnoreStaticMAC] = useState(false); - - const handleRestoreContainer = () => { - setInProgress(true); - client.postContainer("restore", containerWillRestore.Id, { - keep, - tcpEstablished, - ignoreStaticIP, - ignoreStaticMAC, - }) - .catch(ex => { - const error = cockpit.format(_("Failed to restore container $0"), containerWillRestore.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - setInProgress(false); - }) - .finally(() => { - Dialogs.close(); - }); - }; - - return ( - - - - } - > -
- setKeep(val)} /> - setTcpEstablished(val)} /> - setIgnoreStaticIP(val)} /> - setIgnoreStaticMAC(val)} /> - -
- ); -}; - -export default ContainerRestoreModal; diff --git a/ui/cockpit-docker/src/ContainerTerminal.css b/ui/cockpit-docker/src/ContainerTerminal.css deleted file mode 100644 index 27d2f5b..0000000 --- a/ui/cockpit-docker/src/ContainerTerminal.css +++ /dev/null @@ -1,7 +0,0 @@ -@import "xterm/css/xterm.css"; - -.terminal { - /* 5px all around and on right +11 since the scrollbar is 11px wide */ - padding-block: 5px; - padding-inline: 5px 16px; -} diff --git a/ui/cockpit-docker/src/ContainerTerminal.jsx b/ui/cockpit-docker/src/ContainerTerminal.jsx deleted file mode 100644 index 8840456..0000000 --- a/ui/cockpit-docker/src/ContainerTerminal.jsx +++ /dev/null @@ -1,265 +0,0 @@ -/* - * This file is part of Cockpit. - * - * Copyright (C) 2019 Red Hat, Inc and 2023 Jewish Education Media. - * - * Cockpit is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * Cockpit is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Cockpit; If not, see . - */ - -import React from 'react'; -import PropTypes from 'prop-types'; -import cockpit from 'cockpit'; -import { Terminal } from "xterm"; -import { CanvasAddon } from 'xterm-addon-canvas'; -import { ErrorNotification } from './Notification.jsx'; - -import * as client from './client.js'; -import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; - -import "./ContainerTerminal.css"; - -const _ = cockpit.gettext; -const decoder = cockpit.utf8_decoder(); -const encoder = cockpit.utf8_encoder(); - -function sequence_find(seq, find) { - let f; - const fl = find.length; - let s; - const sl = (seq.length - fl) + 1; - for (s = 0; s < sl; s++) { - for (f = 0; f < fl; f++) { - if (seq[s + f] !== find[f]) - break; - } - if (f == fl) - return s; - } - - return -1; -} - -class ContainerTerminal extends React.Component { - constructor(props) { - super(props); - - this.onChannelClose = this.onChannelClose.bind(this); - this.onChannelMessage = this.onChannelMessage.bind(this); - this.disconnectChannel = this.disconnectChannel.bind(this); - this.connectChannel = this.connectChannel.bind(this); - this.resize = this.resize.bind(this); - this.connectToTty = this.connectToTty.bind(this); - this.execAndConnect = this.execAndConnect.bind(this); - this.setUpBuffer = this.setUpBuffer.bind(this); - - this.terminalRef = React.createRef(); - - this.term = new Terminal({ - cols: 80, - rows: 24, - screenKeys: true, - cursorBlink: true, - fontSize: 12, - fontFamily: 'Menlo, Monaco, Consolas, monospace', - screenReaderMode: true - }); - - this.state = { - container: props.containerId, - sessionId: props.containerId, - channel: null, - buffer: null, - opened: false, - errorMessage: "", - }; - } - - componentDidMount() { - this.connectChannel(); - } - - componentDidUpdate(prevProps, prevState) { - // Connect channel when there is none and either container started or tty was resolved - if (!this.state.channel && ( - (this.props.containerStatus === "running" && prevProps.containerStatus !== "running") || - (this.props.tty !== undefined && prevProps.tty === undefined))) - this.connectChannel(); - if (prevProps.width !== this.props.width) { - this.resize(this.props.width); - } - } - - resize(width) { - // 24 PF padding * 4 - // 3 line border - // 21 inner padding of xterm.js - // xterm.js scrollbar 20 - const padding = 24 * 4 + 3 + 21 + 20; - const realWidth = this.term._core._renderService.dimensions.css.cell.width; - const cols = Math.floor((width - padding) / realWidth); - this.term.resize(cols, 24); - client.resizeContainersTTY(this.state.sessionId, this.props.tty, cols, 24) - .catch(e => this.setState({ errorMessage: e.message })); - } - - connectChannel() { - if (this.state.channel) - return; - - if (this.props.containerStatus !== "running") - return; - - if (this.props.tty === undefined) - return; - - if (this.props.tty) - this.connectToTty(); - else - this.execAndConnect(); - } - - setUpBuffer(channel) { - const buffer = channel.buffer(); - - // Parse the full HTTP response - buffer.callback = (data) => { - let ret = 0; - let pos = 0; - // let headers = ""; - - // Double line break separates header from body - pos = sequence_find(data, [13, 10, 13, 10]); - if (pos == -1) - return ret; - - if (data.subarray) { - data = data.subarray(pos + 4); - ret += pos + 4; - } else { - data = data.slice(pos + 4); - ret += pos + 4; - } - // Set up callback for new incoming messages and if the first response - // contained any body, pass it into the callback - buffer.callback = this.onChannelMessage; - const consumed = this.onChannelMessage(data); - return ret + consumed; - }; - - channel.addEventListener('close', this.onChannelClose); - - // Show the terminal. Once it was shown, do not show it again but reuse the previous one - if (!this.state.opened) { - this.term.open(this.terminalRef.current); - this.term.loadAddon(new CanvasAddon()); - this.setState({ opened: true }); - - this.term.onData((data) => { - if (this.state.channel) - this.state.channel.send(encoder.encode(data)); - }); - } - channel.send(String.fromCharCode(12)); // Send SIGWINCH to show prompt on attaching - - return buffer; - } - - execAndConnect() { - client.execContainer(this.state.container) - .then(r => { - const channel = cockpit.channel({ - payload: "stream", - unix: client.getAddress(), - binary: true - }); - - const body = JSON.stringify({ Detach: false, Tty: false }); - channel.send("POST " + client.VERSION + "/exec/" + encodeURIComponent(r.Id) + - "/start HTTP/1.0\r\n" + - "Content-Type: application/json; charset=utf-8\r\n" + - "Content-Length: " + body.length + "\r\n\r\n" + body); - - const buffer = this.setUpBuffer(channel); - this.setState({ channel, errorMessage: "", buffer, sessionId: r.Id }, () => { console.log(this.props.width); this.resize(this.props.width) }); - }) - .catch(e => this.setState({ errorMessage: e.message })); - } - - connectToTty() { - const channel = cockpit.channel({ - payload: "stream", - unix: client.getAddress(), - binary: true - }); - - channel.send("POST " + client.VERSION + "/containers/" + encodeURIComponent(this.state.container) + - "/attach?stdin=true&stdout=true&stderr=true&stream=true HTTP/1.0\r\n" + - "Upgrade: tcp\r\nConnection: Upgrade\r\n\r\n"); - - const buffer = this.setUpBuffer(channel); - this.setState({ channel, errorMessage: "", buffer }); - this.resize(this.props.width); - } - - componentWillUnmount() { - this.disconnectChannel(); - if (this.state.channel) - this.state.channel.close(); - this.term.dispose(); - } - - onChannelMessage(buffer) { - if (buffer) - this.term.write(decoder.decode(buffer)); - return buffer.length; - } - - onChannelClose(event, options) { - this.term.write('\x1b[31m disconnected \x1b[m\r\n'); - this.disconnectChannel(); - this.setState({ channel: null }); - this.term.cursorHidden = true; - } - - disconnectChannel() { - if (this.state.buffer) - this.state.buffer.callback = null; // eslint-disable-line react/no-direct-mutation-state - if (this.state.channel) { - this.state.channel.removeEventListener('close', this.onChannelClose); - } - } - - render() { - let element =
; - - if (this.props.containerStatus !== "running" && !this.state.opened) - element = ; - - return ( - <> - {this.state.errorMessage && this.setState({ errorMessage: "" })} />} - {element} - - ); - } -} - -ContainerTerminal.propTypes = { - containerId: PropTypes.string.isRequired, - containerStatus: PropTypes.string.isRequired, - width: PropTypes.number.isRequired, - tty: PropTypes.bool, -}; - -export default ContainerTerminal; diff --git a/ui/cockpit-docker/src/Containers.jsx b/ui/cockpit-docker/src/Containers.jsx deleted file mode 100644 index b9a0cf2..0000000 --- a/ui/cockpit-docker/src/Containers.jsx +++ /dev/null @@ -1,611 +0,0 @@ -import React from 'react'; -import { Badge } from "@patternfly/react-core/dist/esm/components/Badge"; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Card, CardBody, CardHeader, CardTitle } from "@patternfly/react-core/dist/esm/components/Card"; -import { Divider } from "@patternfly/react-core/dist/esm/components/Divider"; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/index.js'; -import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { LabelGroup } from "@patternfly/react-core/dist/esm/components/Label"; -import { Text, TextVariants } from "@patternfly/react-core/dist/esm/components/Text"; -import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; -import { Toolbar, ToolbarContent, ToolbarItem } from "@patternfly/react-core/dist/esm/components/Toolbar"; -import { cellWidth, SortByDirection } from '@patternfly/react-table'; - -import cockpit from 'cockpit'; -import { ListingTable } from "cockpit-components-table.jsx"; -import { ListingPanel } from 'cockpit-components-listing-panel.jsx'; -import ContainerDetails from './ContainerDetails.jsx'; -import ContainerIntegration from './ContainerIntegration.jsx'; -import ContainerTerminal from './ContainerTerminal.jsx'; -import ContainerLogs from './ContainerLogs.jsx'; -import ContainerHealthLogs from './ContainerHealthLogs.jsx'; -import ContainerDeleteModal from './ContainerDeleteModal.jsx'; -import ForceRemoveModal from './ForceRemoveModal.jsx'; -import * as utils from './util.js'; -import * as client from './client.js'; -import ContainerCommitModal from './ContainerCommitModal.jsx'; -import ContainerRenameModal from './ContainerRenameModal.jsx'; -import { useDialogs, DialogsContext } from "dialogs.jsx"; - -import './Containers.scss'; -import '@patternfly/patternfly/utilities/Accessibility/accessibility.css'; -import { ImageRunModal } from './ImageRunModal.jsx'; -import PruneUnusedContainersModal from './PruneUnusedContainersModal.jsx'; - -import { KebabDropdown } from "cockpit-components-dropdown.jsx"; - -const _ = cockpit.gettext; - -const ContainerActions = ({ container, healthcheck, onAddNotification, localImages, updateContainer }) => { - const Dialogs = useDialogs(); - const { version } = utils.useDockerInfo(); - const isRunning = container.State.Status === "running"; - const isPaused = container.State.Status === "paused"; - const isRestarting = container.State.Status === "restarting"; - - const deleteContainer = (event) => { - if (container.State.Status == "running") { - const handleForceRemoveContainer = () => { - const id = container ? container.Id : ""; - - return client.delContainer(id, true) - .catch(ex => { - const error = cockpit.format(_("Failed to force remove container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - throw ex; - }) - .finally(() => { - Dialogs.close(); - }); - }; - - Dialogs.show(); - } else { - Dialogs.show(); - } - }; - - const stopContainer = (force) => { - const args = {}; - - if (force) - args.t = 0; - client.postContainer("stop", container.Id, args) - .catch(ex => { - const error = cockpit.format(_("Failed to stop container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - }; - - const startContainer = () => { - client.postContainer("start", container.Id, {}) - .catch(ex => { - const error = cockpit.format(_("Failed to start container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - }; - - const resumeContainer = () => { - client.postContainer("unpause", container.Id, {}) - .catch(ex => { - const error = cockpit.format(_("Failed to resume container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - }; - - const pauseContainer = () => { - client.postContainer("pause", container.Id, {}) - .catch(ex => { - const error = cockpit.format(_("Failed to pause container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - }; - - const commitContainer = () => { - Dialogs.show(); - }; - - const restartContainer = (force) => { - const args = {}; - - if (force) - args.t = 0; - client.postContainer("restart", container.Id, args) - .catch(ex => { - const error = cockpit.format(_("Failed to restart container $0"), container.Name); // not-covered: OS error - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - }; - - const renameContainer = () => { - if (container.State.Status !== "running" || - version.localeCompare("3.0.1", undefined, { numeric: true, sensitivity: 'base' }) >= 0) { - Dialogs.show(); - } - }; - - const addRenameAction = () => { - actions.push( - renameContainer()}> - {_("Rename")} - - ); - }; - - const actions = []; - if (isRunning || isPaused || isRestarting) { - actions.push( - stopContainer()}> - {_("Stop")} - , - stopContainer(true)}> - {_("Force stop")} - , - restartContainer()}> - {_("Restart")} - , - restartContainer(true)}> - {_("Force restart")} - - ); - - if (!isPaused) { - actions.push( - pauseContainer()}> - {_("Pause")} - - ); - } else { - actions.push( - resumeContainer()}> - {_("Resume")} - - ); - } - } - - if (!isRunning && !isPaused) { - actions.push( - startContainer()}> - {_("Start")} - - ); - actions.push(); - if (version.localeCompare("3", undefined, { numeric: true, sensitivity: 'base' }) >= 0) { - addRenameAction(); - } - } else { // running or paused - actions.push(); - if (version.localeCompare("3.0.1", undefined, { numeric: true, sensitivity: 'base' }) >= 0) { - addRenameAction(); - } - } - - actions.push(); - actions.push( - commitContainer()}> - {_("Commit")} - - ); - - actions.push(); - actions.push( - - {_("Delete")} - - ); - - return ; -}; - -export let onDownloadContainer = function funcOnDownloadContainer(container) { - this.setState(prevState => ({ - downloadingContainers: [...prevState.downloadingContainers, container] - })); -}; - -export let onDownloadContainerFinished = function funcOnDownloadContainerFinished(container) { - this.setState(prevState => ({ - downloadingContainers: prevState.downloadingContainers.filter(entry => entry.name !== container.name), - })); -}; - -const localize_health = (state) => { - if (state === "healthy") - return _("Healthy"); - else if (state === "unhealthy") - return _("Unhealthy"); - else if (state === "starting") - return _("Checking health"); - else - console.error("Unexpected health check status", state); - return null; -}; - -const ContainerOverActions = ({ handlePruneUnusedContainers, unusedContainers }) => { - const actions = [ - handlePruneUnusedContainers()} - isDisabled={unusedContainers.length === 0}> - {_("Prune unused containers")} - , - ]; - - return ; -}; - -class Containers extends React.Component { - static contextType = DialogsContext; - - constructor(props) { - super(props); - this.state = { - width: 0, - downloadingContainers: [], - showPruneUnusedContainersModal: false, - }; - this.renderRow = this.renderRow.bind(this); - this.onWindowResize = this.onWindowResize.bind(this); - - this.cardRef = React.createRef(); - - onDownloadContainer = onDownloadContainer.bind(this); - onDownloadContainerFinished = onDownloadContainerFinished.bind(this); - - window.addEventListener('resize', this.onWindowResize); - } - - componentDidMount() { - this.onWindowResize(); - } - - componentWillUnmount() { - window.removeEventListener('resize', this.onWindowResize); - } - - renderRow(containersStats, container, localImages) { - const containerStats = containersStats[container.Id]; - // if (containerStats?.name === "/build-jaeger-1") { - // console.log(container); - // console.log(containerStats); - // } - const image = container.Config?.Image || container.Image; - const isToolboxContainer = container.Config?.Labels?.["com.github.containers.toolbox"] === "true"; - const isDistroboxContainer = container.Config?.Labels?.manager === "distrobox"; - let localized_health = null; - - // this needs to get along with stub containers from image run dialog, where most properties don't exist yet - const healthcheck = container.State?.Health?.Status ?? container.State?.Healthcheck?.Status; // not-covered: only on old version - const status = container.State?.Status ?? ""; // not-covered: race condition - - let proc_text = ""; - let mem_text = ""; - let proc = 0; - let mem = 0; - if (this.props.cgroupVersion === 'v1' && status === 'running') { // not-covered: only on old version - proc_text =
{_("n/a")}
; - mem_text =
{_("n/a")}
; - } - if (containerStats && status === "running") { - [proc_text, proc] = utils.format_cpu_usage(containerStats); - [mem_text, mem] = utils.format_memory_and_limit(containerStats); - } - - const info_block = ( -
- - {container.Name} - {isToolboxContainer && toolbox} - {isDistroboxContainer && distrobox} - - {image.includes("sha256:") ? utils.truncate_id(image) : image} - {utils.quote_cmdline(container.Config?.Cmd)} -
- ); - - let containerStateClass = "ct-badge-container-" + status.toLowerCase(); - if (container.isDownloading) - containerStateClass += " downloading"; - - const containerState = status.charAt(0).toUpperCase() + status.slice(1); - - const state = [{_(containerState)}]; // States are defined in util.js - if (healthcheck) { - localized_health = localize_health(healthcheck); - if (localized_health) - state.push({localized_health}); - } - - const columns = [ - { title: info_block, sortKey: container.Name }, - { title: proc_text, props: { modifier: "nowrap" }, sortKey: containerState === "Running" ? proc ?? -1 : -1 }, - { title: mem_text, props: { modifier: "nowrap" }, sortKey: mem ?? -1 }, - { title: {state}, sortKey: containerState }, - ]; - - if (!container.isDownloading) { - columns.push({ - title: , - props: { className: "pf-v5-c-table__action" } - }); - } - - const tty = !!container.Config?.Tty; - - const tabs = []; - if (container.State) { - tabs.push({ - name: _("Details"), - renderer: ContainerDetails, - data: { container } - }); - - if (!container.isDownloading) { - tabs.push({ - name: _("Integration"), - renderer: ContainerIntegration, - data: { container, localImages } - }); - tabs.push({ - name: _("Logs"), - renderer: ContainerLogs, - data: { containerId: container.Id, containerStatus: container.State.Status, width: this.state.width } - }); - tabs.push({ - name: _("Console"), - renderer: ContainerTerminal, - data: { containerId: container.Id, containerStatus: container.State?.Status, width: this.state.width, tty } - }); - } - } - - if (healthcheck) { - tabs.push({ - name: _("Health check"), - renderer: ContainerHealthLogs, - data: { container, onAddNotification: this.props.onAddNotification, state: localized_health } - }); - } - - return { - expandedContent: , - columns, - initiallyExpanded: document.location.hash.substr(1) === container.Id, - props: { - key: container.Id, - "data-row-id": container.Id, - "data-started-at": container.StartedAt, - }, - }; - } - - onWindowResize() { - this.setState({ width: this.cardRef.current.clientWidth }); - } - - onOpenPruneUnusedContainersDialog = () => { - this.setState({ showPruneUnusedContainersModal: true }); - }; - - render() { - const Dialogs = this.context; - const columnTitles = [ - { title: _("Container"), transforms: [cellWidth(20)], sortable: true }, - { title: _("CPU"), sortable: true }, - { title: _("Memory"), sortable: true }, - { title: _("State"), sortable: true }, - '' - ]; - let filtered = []; - const unusedContainers = []; - - let emptyCaption = _("No containers"); - if (this.props.containers === null) - emptyCaption = _("Loading..."); - else if (this.props.textFilter.length > 0) - emptyCaption = _("No containers that match the current filter"); - else if (this.props.filter === "running") - emptyCaption = _("No running containers"); - - if (this.props.containers !== null) { - filtered = Object.keys(this.props.containers).filter(id => !(this.props.filter === "running") || ["running", "restarting"].includes(this.props.containers[id].State?.Status)); - - const getHealth = id => { - const state = this.props.containers[id]?.State; - return state?.Health?.Status || state?.Healthcheck?.Status; - }; - - filtered.sort((a, b) => { - // Show unhealthy containers first - const a_health = getHealth(a); - const b_health = getHealth(b); - if (a_health !== b_health) { - if (a_health === "unhealthy") - return -1; - if (b_health === "unhealthy") - return 1; - } - return this.props.containers[a].Name > this.props.containers[b].Name ? 1 : -1; - }); - - const prune_states = ["created", "configured", "stopped", "exited"]; - for (const containerid of Object.keys(this.props.containers)) { - const container = this.props.containers[containerid]; - // Ignore pods and running containers - if (!prune_states.includes(container.State)) - continue; - - unusedContainers.push({ - id: container.Id, - name: container.Name, - created: container.Created, - }); - } - } - - // Convert to the search result output - let localImages = null; - let nonIntermediateImages = null; - if (this.props.images) { - localImages = Object.keys(this.props.images).map(id => { - const img = this.props.images[id]; - img.Index = img.RepoTags?.[0] ? img.RepoTags[0].split('/')[0] : ""; - img.Name = utils.image_name(img); - img.toString = function imgToString() { return this.Name }; - return img; - }, []); - nonIntermediateImages = localImages.filter(img => img.Index !== ""); - } - - const createContainer = (inPod) => { - if (nonIntermediateImages) - Dialogs.show( - - {(dockerInfo) => ( - - {(Dialogs) => ( - - )} - - )} - ); - }; - - const filterRunning = ( - - - - {_("Show")} - - - this.props.handleFilterChange(value)}> - - - - - - - - - - - - - - ); - - const sortRows = (rows, direction, idx) => { - // CPU / Memory /States - const isNumeric = idx == 1 || idx == 2 || idx == 3; - const stateOrderMapping = {}; - utils.states.forEach((elem, index) => { - stateOrderMapping[elem] = index; - }); - const sortedRows = rows.sort((a, b) => { - let aitem = a.columns[idx].sortKey ?? a.columns[idx].title; - let bitem = b.columns[idx].sortKey ?? b.columns[idx].title; - // Sort the states based on the order defined in utils. so Running first. - if (idx === 3) { - aitem = stateOrderMapping[aitem]; - bitem = stateOrderMapping[bitem]; - } - if (isNumeric) { - return bitem - aitem; - } else { - return aitem.localeCompare(bitem); - } - }); - return direction === SortByDirection.asc ? sortedRows : sortedRows.reverse(); - }; - - const card = ( - - - {_("Containers")} - - - - {(this.props.containers === null) - ? - : - {/* {caption && */} - {/* */} - {/* */} - {/*

{caption}

*/} - {/* {_("pod group")} */} - {/*
*/} - {/*
*/} - {/*
} */} - { - return this.renderRow(this.props.containersStats, this.props.containers[container], - localImages); - })} - aria-label={_("Containers")} /> -
- } -
- {this.state.showPruneUnusedContainersModal && - this.setState({ showPruneUnusedContainersModal: false })} - unusedContainers={unusedContainers} - onAddNotification={this.props.onAddNotification} - serviceAvailable={this.props.serviceAvailable} - user={this.props.user} /> } -
-
- ); - - return
{card}
; - } -} - -export default Containers; diff --git a/ui/cockpit-docker/src/Containers.scss b/ui/cockpit-docker/src/Containers.scss deleted file mode 100644 index 309c7a2..0000000 --- a/ui/cockpit-docker/src/Containers.scss +++ /dev/null @@ -1,93 +0,0 @@ -@import "global-variables"; - -.container-pod { - .pf-v5-c-card__header { - border-color: #ddd; - padding-block-start: var(--pf-v5-global--spacer--md); - } - - .pod-header-details { - border-color: #ddd; - margin-block-start: var(--pf-v5-global--spacer--md); - margin-inline: var(--pf-v5-global--spacer--md); - } - - .pod-details-button { - padding-inline: 0; - margin-inline-end: var(--pf-v5-global--spacer--md); - } - - .pod-details-button-color { - color: var(--pf-v5-c-button--m-secondary--Color); - } - - .pf-v5-c-card__title { - padding: 0; - font-weight: var(--pf-v5-global--FontWeight--normal); - font-size: var(--pf-v5-global--FontSize--sm); - - .pod-name { - font-weight: var(--pf-v5-global--FontWeight--bold); - font-size: var(--pf-v5-global--FontSize--md); - padding-inline-end: 1rem; - } - } - - > .pf-v5-c-card__header { - &:not(:last-child) { - padding-block-end: var(--pf-v5-global--spacer-sm); - } - - // Reduce vertical padding of pod header items - > .pf-v5-c-card__title > .pf-l-flex { - row-gap: var(--pf-v5-global--spacer--sm); - } - } -} - -// override ct-card font size, so cpu/ram don't look absurdly big -#app .pf-v5-c-card.container-pod div.pf-v5-c-card__title-text { - font-weight: normal; - font-size: var(--pf-v5-global--FontSize--md); -} - -.pod-stat { - @media (max-width: $pf-v5-global--breakpoint--sm - 1) { - // Place each pod stat on its own row - flex-basis: 100%; - display: grid; - // Give labels to the same space - grid-template-columns: minmax(auto, 4rem) 1fr; - - > svg { - // Hide icons in mobile to be consistent with container lists - display: none; - } - } - - // Center the icons for proper vertical alignment - > svg { - align-self: center; - } -} - -.ct-table-empty td { - padding-block: var(--pf-v5-global--spacer--sm) var(--pf-v5-global--spacer--lg); - padding-inline: var(--pf-v5-global--spacer--md); -} - -/* HACK - force DescriptionList to wrap but not fill the width */ -#container-details-healthcheck { - display: flex; - flex-wrap: wrap; -} - -/* Upstream issue https://github.com/patternfly/patternfly/pull/3714 */ -.containers-containers .pf-v5-c-toolbar__content-section { - gap: var(--pf-v5-global--spacer--sm); -} - -/* Drop the excessive margin for a Dropdown button */ -.containers-containers .pf-v5-c-toolbar__content-section > :nth-last-child(2) { - margin-inline-end: 0; -} diff --git a/ui/cockpit-docker/src/Env.jsx b/ui/cockpit-docker/src/Env.jsx deleted file mode 100644 index e36b658..0000000 --- a/ui/cockpit-docker/src/Env.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import React from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; -import { FormHelper } from "cockpit-components-form-helper.jsx"; -import { Grid } from "@patternfly/react-core/dist/esm/layouts/Grid"; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import { TrashIcon } from '@patternfly/react-icons'; -import cockpit from 'cockpit'; - -import * as utils from './util.js'; - -const _ = cockpit.gettext; - -export function validateEnvVar(env, key) { - switch (key) { - case "envKey": - if (!env) - return _("Key must not be empty"); - break; - case "envValue": - break; - default: - console.error(`Unknown key "${key}"`); // not-covered: unreachable assertion - } -} - -const handleEnvValue = (key, value, idx, onChange, additem, itemCount, companionField) => { - // Allow the input of KEY=VALUE separated value pairs for bulk import only if the other - // field is not empty. - if (value.includes('=') && !companionField) { - const parts = value.trim().split(" "); - let index = idx; - for (const part of parts) { - const [envKey, ...envVar] = part.split('='); - if (!envKey || !envVar) { - continue; - } - - if (index !== idx) { - additem(); - } - onChange(index, 'envKey', envKey); - onChange(index, 'envValue', envVar.join('=')); - index++; - } - } else { - onChange(idx, key, value); - } -}; - -export const EnvVar = ({ id, item, onChange, idx, removeitem, additem, itemCount, validationFailed, onValidationChange }) => - ( - - - { - utils.validationClear(validationFailed, "envKey", onValidationChange); - utils.validationDebounce(() => onValidationChange({ ...validationFailed, envKey: validateEnvVar(value, "envKey") })); - handleEnvValue('envKey', value, idx, onChange, additem, itemCount, item.envValue); - }} /> - - - - { - utils.validationClear(validationFailed, "envValue", onValidationChange); - utils.validationDebounce(() => onValidationChange({ ...validationFailed, envValue: validateEnvVar(value, "envValue") })); - handleEnvValue('envValue', value, idx, onChange, additem, itemCount, item.envValue); - }} /> - - - - - - } - > - {reason} - - ); -}; - -export default ForceRemoveModal; diff --git a/ui/cockpit-docker/src/ImageDeleteModal.jsx b/ui/cockpit-docker/src/ImageDeleteModal.jsx deleted file mode 100644 index 2e97c80..0000000 --- a/ui/cockpit-docker/src/ImageDeleteModal.jsx +++ /dev/null @@ -1,121 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; -import { List, ListItem } from '@patternfly/react-core/dist/esm/components/List'; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { Stack, StackItem } from "@patternfly/react-core/dist/esm/layouts/Stack"; -import { useDialogs } from "dialogs.jsx"; - -import cockpit from 'cockpit'; - -import ForceRemoveModal from './ForceRemoveModal.jsx'; -import * as client from './client.js'; - -const _ = cockpit.gettext; - -function sortTags(a, b) { - if (a.endsWith(":latest")) - return -1; - if (b.endsWith(":latest")) - return 1; - return a.localeCompare(b); -} - -export const ImageDeleteModal = ({ imageWillDelete, onAddNotification }) => { - const Dialogs = useDialogs(); - const repoTags = imageWillDelete.RepoTags ? imageWillDelete.RepoTags : []; - const isIntermediateImage = repoTags.length === 0; - - const [tags, setTags] = useState(repoTags.sort(sortTags).reduce((acc, item, i) => { - acc[item] = (i === 0); - return acc; - }, {})); - - const checkedTags = Object.keys(tags).sort(sortTags) - .filter(x => tags[x]); - - const onValueChanged = (item, value) => { - setTags(prevState => ({ - ...prevState, - [item]: value, - })); - }; - - const handleRemoveImage = (tags, all) => { - const handleForceRemoveImage = () => { - Dialogs.close(); - return client.delImage(imageWillDelete.Id, true) - .catch(ex => { - const error = cockpit.format(_("Failed to force remove image $0"), imageWillDelete.RepoTags[0]); - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - throw ex; - }); - }; - - Dialogs.close(); - if (all) - client.delImage(imageWillDelete.Id, false) - .catch(ex => { - Dialogs.show(); - }); - else { - // Call another untag once previous one resolved. Calling all at once can result in undefined behavior - const tag = tags.shift(); - const i = tag.lastIndexOf(":"); - client.untagImage(imageWillDelete.Id, tag.substring(0, i), tag.substring(i + 1, tag.length)) - .then(() => { - if (tags.length > 0) - handleRemoveImage(tags, all); - }) - .catch(ex => { - const error = cockpit.format(_("Failed to remove image $0"), tag); - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - } - }; - - const imageName = repoTags[0]?.split(":")[0].split("/").at(-1) ?? _("intermediate"); - - let isAllSelected = null; - if (checkedTags.length === repoTags.length) - isAllSelected = true; - else if (checkedTags.length === 0) - isAllSelected = false; - - return ( - - - - } - > - - { repoTags.length > 1 && {_("Multiple tags exist for this image. Select the tagged images to delete.")} } - - {repoTags.length > 1 && repoTags.forEach(item => onValueChanged(item, checked))} - body={ - repoTags.map(x => ( - -1} - id={"delete-" + x} - aria-label={x} - key={x} - label={x} - onChange={(_event, checked) => onValueChanged(x, checked)} /> - )) - } />} - {repoTags.length === 1 && {repoTags[0]}} - - - - ); -}; diff --git a/ui/cockpit-docker/src/ImageDetails.jsx b/ui/cockpit-docker/src/ImageDetails.jsx deleted file mode 100644 index 6266243..0000000 --- a/ui/cockpit-docker/src/ImageDetails.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import cockpit from 'cockpit'; -import * as utils from './util.js'; - -import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; - -import ImageUsedBy from './ImageUsedBy.jsx'; -const _ = cockpit.gettext; - -const ImageDetails = ({ containers, image, showAll }) => { - return ( - - {image.Command !== "" && - - {_("Command")} - {utils.quote_cmdline(image.Command)} - - } - {image.Entrypoint && - - {_("Entrypoint")} - {image.Entrypoint.join(" ")} - - } - {image.RepoTags && - - {_("Tags")} - {image.RepoTags ? image.RepoTags.join(" ") : ""} - - } - {containers && - - {_("Used by")} - - - } - {image.Ports.length !== 0 && - - {_("Ports")} - {image.Ports.join(', ')} - - } - - ); -}; - -export default ImageDetails; diff --git a/ui/cockpit-docker/src/ImageHistory.jsx b/ui/cockpit-docker/src/ImageHistory.jsx deleted file mode 100644 index 585dff8..0000000 --- a/ui/cockpit-docker/src/ImageHistory.jsx +++ /dev/null @@ -1,64 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import cockpit from 'cockpit'; -import * as utils from './util.js'; -import * as client from './client.js'; - -import { ListingTable } from "cockpit-components-table.jsx"; - -const _ = cockpit.gettext; - -const IdColumn = Id => { - Id = utils.truncate_id(Id); - // Not an id but or something else - if (/<[a-z]+>/.test(Id)) { - return
{Id}
; - } - return Id; -}; - -const ImageDetails = ({ image }) => { - const [history, setHistory] = useState([]); - const [error, setError] = useState(null); - const id = image.Id; - - useEffect(() => { - client.imageHistory(id).then(setHistory) - .catch(ex => { - console.error("Cannot get image history", ex); - setError(true); - }); - }, [id]); - - const columns = ["ID", _("Created"), _("Created by"), _("Size"), _("Comments")]; - let showComments = false; - const rows = history.map(layer => { - const row = { - columns: [ - { title: IdColumn(layer.Id), props: { className: "ignore-pixels" } }, - { title: utils.localize_time(layer.Created), props: { className: "ignore-pixels" } }, - { title: layer.CreatedBy, props: { className: "ignore-pixels" } }, - { title: cockpit.format_bytes(layer.Size), props: { className: "ignore-pixels" } }, - { title: layer.Comment, props: { className: "ignore-pixels" } }, - ] - }; - if (layer.Comment) { - showComments = true; - } - return row; - }); - - if (!showComments) { - columns.pop(); - } - - return ( - - ); -}; - -export default ImageDetails; diff --git a/ui/cockpit-docker/src/ImageRunModal.jsx b/ui/cockpit-docker/src/ImageRunModal.jsx deleted file mode 100644 index 9baff84..0000000 --- a/ui/cockpit-docker/src/ImageRunModal.jsx +++ /dev/null @@ -1,1114 +0,0 @@ -import React from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; -import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; -import { FormHelper } from "cockpit-components-form-helper.jsx"; -import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; -import { Grid, GridItem } from "@patternfly/react-core/dist/esm/layouts/Grid"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { Radio } from "@patternfly/react-core/dist/esm/components/Radio"; -import { Select, SelectGroup, SelectOption, SelectVariant } from "@patternfly/react-core/dist/esm/deprecated/components/Select"; -import { NumberInput } from "@patternfly/react-core/dist/esm/components/NumberInput"; -import { InputGroup, InputGroupText } from "@patternfly/react-core/dist/esm/components/InputGroup"; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import { Tab, TabTitleText, Tabs } from "@patternfly/react-core/dist/esm/components/Tabs"; -import { Text, TextContent, TextList, TextListItem, TextVariants } from "@patternfly/react-core/dist/esm/components/Text"; -import { ToggleGroup, ToggleGroupItem } from "@patternfly/react-core/dist/esm/components/ToggleGroup"; -import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { Popover } from "@patternfly/react-core/dist/esm/components/Popover"; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; -import * as dockerNames from 'docker-names'; - -import { ErrorNotification } from './Notification.jsx'; -import * as utils from './util.js'; -import * as client from './client.js'; -import rest from './rest.js'; -import cockpit from 'cockpit'; -import { onDownloadContainer, onDownloadContainerFinished } from './Containers.jsx'; -import { PublishPort, validatePublishPort } from './PublishPort.jsx'; -import { DynamicListForm } from 'cockpit-components-dynamic-list.jsx'; -import { validateVolume, Volume } from './Volume.jsx'; -import { EnvVar, validateEnvVar } from './Env.jsx'; - -import { debounce } from 'throttle-debounce'; - -import "./ImageRunModal.scss"; - -const _ = cockpit.gettext; - -const units = { - KB: { - name: "KB", - baseExponent: 1, - }, - MB: { - name: "MB", - baseExponent: 2, - }, - GB: { - name: "GB", - baseExponent: 3, - }, -}; - -// healthchecks.go HealthCheckOnFailureAction -const HealthCheckOnFailureActionOrder = [ - { value: 0, label: _("No action") }, - { value: 3, label: _("Restart") }, - { value: 4, label: _("Stop") }, - { value: 2, label: _("Force stop") }, -]; - -export class ImageRunModal extends React.Component { - constructor(props) { - super(props); - - let command = ""; - if (this.props.image && this.props.image.Command) { - command = utils.quote_cmdline(this.props.image.Command); - } - - const entrypoint = utils.quote_cmdline(this.props.image?.Entrypoint); - - let selectedImage = ""; - if (this.props.image) { - selectedImage = utils.image_name(this.props.image); - } - - this.state = { - command, - containerName: dockerNames.getRandomName(), - entrypoint, - env: [], - hasTTY: true, - publish: [], - image: props.image, - memory: 512, - cpuShares: 1024, - memoryConfigure: false, - cpuSharesConfigure: false, - memoryUnit: 'MB', - validationFailed: {}, - volumes: [], - restartPolicy: "no", - restartTries: 5, - pullLatestImage: false, - activeTabKey: 0, - /* image select */ - selectedImage, - searchFinished: false, - searchInProgress: false, - searchText: "", - imageResults: {}, - isImageSelectOpen: false, - searchByRegistry: 'all', - /* health check */ - healthcheck_command: "", - healthcheck_shell: false, - healthcheck_interval: 30, - healthcheck_timeout: 30, - healthcheck_start_period: 0, - healthcheck_retries: 3, - healthcheck_action: 0, - }; - this.getCreateConfig = this.getCreateConfig.bind(this); - this.onValueChanged = this.onValueChanged.bind(this); - } - - componentDidMount() { - this._isMounted = true; - this.onSearchTriggered(this.state.searchText); - } - - componentWillUnmount() { - this._isMounted = false; - - if (this.activeConnection) - this.activeConnection.close(); - } - - getCreateConfig() { - const createConfig = {}; - createConfig.HostConfig = {}; - - if (this.state.image) { - createConfig.image = this.state.image.RepoTags.length > 0 ? this.state.image.RepoTags[0] : ""; - } else { - let img = this.state.selectedImage.Name; - // Make implicit :latest - if (!img.includes(":")) { - img += ":latest"; - } - createConfig.image = img; - } - - if (this.state.containerName) - createConfig.name = this.state.containerName; - - if (this.state.command) - createConfig.command = utils.unquote_cmdline(this.state.command); - - if (this.state.memoryConfigure && this.state.memory) { - const memorySize = this.state.memory * (1000 ** units[this.state.memoryUnit].baseExponent); - createConfig.HostConfig.Memory = memorySize; - } - - if (this.state.cpuSharesConfigure && parseInt(this.state.cpuShares) !== 0) - createConfig.HostConfig.CpuShares = parseInt(this.state.cpuShares); - - createConfig.terminal = this.state.hasTTY; - if (this.state.publish.some(port => port !== undefined)) { - const PortBindings = {}; - const ExposedPorts = {}; - this.state.publish.filter(port => port?.containerPort).forEach(item => { - ExposedPorts[item.containerPort + "/" + item.protocol] = {}; - const mapping = { HostPort: item.hostPort }; - if (item.IP) - mapping.HostIp = item.hostIp; - PortBindings[item.containerPort + "/" + item.protocol] = [mapping]; - }); - - createConfig.HostConfig.PortBindings = PortBindings; - createConfig.ExposedPorts = ExposedPorts; - } - if (this.state.env.some(item => item !== undefined)) { - const envs = []; - this.state.env.forEach(item => { - if (item !== undefined) - envs.push(item.envKey + "=" + item.envValue); - }); - createConfig.Env = envs; - } - if (this.state.volumes.some(volume => volume !== undefined)) { - createConfig.HostConfig.mounts = this.state.volumes - .filter(volume => volume?.hostPath && volume?.containerPath) - .map(volume => { - return { - Source: volume.hostPath, - Target: volume.containerPath, - Type: "bind", - ReadOnly: volume.ReadOnly - }; - }); - } - - if (this.state.restartPolicy !== "no") { - createConfig.HostConfig.RestartPolicy = { Name: this.state.restartPolicy }; - if (this.state.restartPolicy === "on-failure" && this.state.restartTries !== null) { - createConfig.HostConfig.RestartPolicy.MaximumRetryCount = parseInt(this.state.restartTries); - } - if (this.state.restartPolicy === "always" && (this.props.serviceAvailable)) { - this.enableDockerRestartService(); - } - } - - if (this.state.healthcheck_command !== "") { - const test = utils.unquote_cmdline(this.state.healthcheck_command); - if (this.state.healthcheck_shell) { - test.unshift("CMD-SHELL"); - } else { - test.unshift("CMD"); - } - createConfig.Healthcheck = { - Interval: parseInt(this.state.healthcheck_interval) * 1000000000, - Retries: this.state.healthcheck_retries, - StartPeriod: parseInt(this.state.healthcheck_start_period) * 1000000000, - Test: test, - Timeout: parseInt(this.state.healthcheck_timeout) * 1000000000, - }; - createConfig.health_check_on_failure_action = parseInt(this.state.healthcheck_action); - } - - console.log("createConfig", createConfig); - - return createConfig; - } - - createContainer = (createConfig, runImage) => { - const Dialogs = this.props.dialogs; - client.createContainer(createConfig) - .then(reply => { - if (runImage) { - client.postContainer("start", reply.Id, {}) - .then(() => Dialogs.close()) - .catch(ex => { - // If container failed to start remove it, so a user can fix the settings and retry and - // won't get another error that the container name is already taken. - client.delContainer(reply.Id, true) - .then(() => { - this.setState({ - dialogError: _("Container failed to be started"), - dialogErrorDetail: cockpit.format("$0: $1", ex.reason, ex.message) - }); - }) - .catch(ex => { - this.setState({ - dialogError: _("Failed to clean up container"), - dialogErrorDetail: cockpit.format("$0: $1", ex.reason, ex.message) - }); - }); - }); - } else { - Dialogs.close(); - } - }) - .catch(ex => { - this.setState({ - dialogError: _("Container failed to be created"), - dialogErrorDetail: cockpit.format("$0: $1", ex.reason, ex.message) - }); - }); - }; - - async onCreateClicked(runImage = false) { - if (!await this.validateForm()) - return; - - const Dialogs = this.props.dialogs; - const createConfig = this.getCreateConfig(); - const { pullLatestImage } = this.state; - let imageExists = true; - - try { - await client.imageExists(createConfig.image); - } catch (error) { - imageExists = false; - } - - if (imageExists && !pullLatestImage) { - this.createContainer(createConfig, runImage); - } else { - Dialogs.close(); - const tempImage = { ...createConfig }; - - // Assign temporary properties to allow rendering - tempImage.Id = tempImage.name; - tempImage.State = { Status: _("downloading") }; - tempImage.Created = new Date(); - tempImage.Name = [tempImage.name]; - tempImage.Image = createConfig.image; - tempImage.isDownloading = true; - - onDownloadContainer(tempImage); - - client.pullImage(createConfig.image).then(reply => { - client.createContainer(createConfig) - .then(reply => { - if (runImage) { - client.postContainer("start", reply.Id, {}) - .then(() => onDownloadContainerFinished(createConfig)) - .catch(ex => { - onDownloadContainerFinished(createConfig); - const error = cockpit.format(_("Failed to run container $0"), tempImage.name); - this.props.onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - } - }) - .catch(ex => { - onDownloadContainerFinished(createConfig); - const error = cockpit.format(_("Failed to create container $0"), tempImage.name); - this.props.onAddNotification({ type: 'danger', error, errorDetail: ex.reason }); - }); - }) - .catch(ex => { - onDownloadContainerFinished(createConfig); - const error = cockpit.format(_("Failed to pull image $0"), tempImage.image); - this.props.onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - }); - } - } - - onValueChanged(key, value) { - this.setState({ [key]: value }); - } - - onPlusOne(key) { - this.setState(state => ({ [key]: parseInt(state[key]) + 1 })); - } - - onMinusOne(key) { - this.setState(state => ({ [key]: parseInt(state[key]) - 1 })); - } - - handleTabClick = (event, tabIndex) => { - // Prevent the form from being submitted. - event.preventDefault(); - this.setState({ - activeTabKey: tabIndex, - }); - }; - - onSearchTriggered = value => { - // Do not call the SearchImage API if the input string is not at least 2 chars, - // The comparison was done considering the fact that we miss always one letter due to delayed setState - if (value.length < 2) - return; - - // Don't search for a value with a tag specified - const patt = /:[\w|\d]+$/; - if (patt.test(value)) { - return; - } - - if (this.activeConnection) - this.activeConnection.close(); - - this.setState({ searchFinished: false, searchInProgress: true }); - this.activeConnection = rest.connect(client.getAddress()); - let searches = []; - - // If there are registries configured search in them, or if a user searches for `docker.io/cockpit` let - // docker search in the user specified registry. - if (Object.keys(this.props.dockerInfo.registries).length !== 0 || value.includes('/')) { - searches.push(this.activeConnection.call({ - method: "GET", - path: client.VERSION + "/images/search", - body: "", - params: { - term: value, - } - })); - } else { - searches = searches.concat(utils.fallbackRegistries.map(registry => - this.activeConnection.call({ - method: "GET", - path: client.VERSION + "/images/search", - body: "", - params: { - term: registry + "/" + value - } - }))); - } - - Promise.allSettled(searches) - .then(reply => { - if (reply && this._isMounted) { - let imageResults = []; - let dialogError = ""; - let dialogErrorDetail = ""; - - for (const result of reply) { - if (result.status === "fulfilled") { - imageResults = imageResults.concat(JSON.parse(result.value)); - } else { - dialogError = _("Failed to search for new images"); - // TODO: add registry context, docker does not include it in the reply. - dialogErrorDetail = result.reason ? cockpit.format(_("Failed to search for images: $0"), result.reason.message) : _("Failed to search for images."); - } - } - // Group images on registry - const images = {}; - imageResults.forEach(image => { - // Add Tag is it's there - image.toString = function imageToString() { - if (this.Tag) { - return this.Name + ':' + this.Tag; - } - return this.Name; - }; - - let index = image.Index; - - // listTags results do not return the registry Index. - // https://github.com/containers/common/pull/803 - if (!index) { - index = image.Name.split('/')[0]; - } - - if (index in images) { - images[index].push(image); - } else { - images[index] = [image]; - } - }); - this.setState({ - imageResults: images || {}, - searchFinished: true, - searchInProgress: false, - dialogError, - dialogErrorDetail, - }); - } - }); - }; - - clearImageSelection = () => { - // Reset command if it was prefilled - let command = this.state.command; - if (this.state.command === utils.quote_cmdline(this.state.selectedImage?.Command)) - command = ""; - - this.setState({ - selectedImage: "", - image: "", - isImageSelectOpen: false, - imageResults: {}, - searchText: "", - searchFinished: false, - command, - entrypoint: "", - }); - }; - - onImageSelectToggle = (_, isOpen) => { - this.setState({ - isImageSelectOpen: isOpen, - }); - }; - - onImageSelect = (event, value, placeholder) => { - if (event === undefined) - return; - - let command = this.state.command; - if (value.Command && !command) - command = utils.quote_cmdline(value.Command); - - const entrypoint = utils.quote_cmdline(value?.Entrypoint); - - this.setState({ - selectedImage: value, - isImageSelectOpen: false, - command, - entrypoint, - }); - }; - - handleImageSelectInput = value => { - this.setState({ - searchText: value, - // Reset searchFinished status when text input changes - searchFinished: false, - selectedImage: "", - }); - this.onSearchTriggered(value); - }; - - debouncedInputChanged = debounce(300, this.handleImageSelectInput); - - handleOwnerSelect = (event) => { - const value = event.currentTarget.value; - this.setState({ - owner: value - }); - }; - - filterImages = () => { - const { localImages } = this.props; - const { imageResults, searchText } = this.state; - const local = _("Local images"); - const images = { ...imageResults }; - - let imageRegistries = []; - if (this.state.searchByRegistry == 'local' || this.state.searchByRegistry == 'all') { - imageRegistries.push(local); - images[local] = localImages; - - if (this.state.searchByRegistry == 'all') - imageRegistries = imageRegistries.concat(Object.keys(imageResults)); - } else { - imageRegistries.push(this.state.searchByRegistry); - } - - // Strip out all non-allowed container image characters when filtering. - let regexString = searchText.replace(/[^\w_.:-]/g, ""); - // Strip image registry option if set for comparing results for docker.io searching for docker.io/fedora - // returns docker.io/$username/fedora for example. - if (regexString.includes('/')) { - regexString = searchText.replace(searchText.split('/')[0], ''); - } - const input = new RegExp(regexString, 'i'); - - const results = imageRegistries - .map((reg, index) => { - const filtered = (reg in images ? images[reg] : []) - .filter(image => { - return image.Name.search(input) !== -1; - }) - .map((image, index) => { - return ( - - ); - }); - - if (filtered.length === 0) { - return []; - } else { - return ( - - {filtered} - - ); - } - }) - .filter(group => group.length !== 0); // filter out empty groups - - // Remove when there is a filter selected. - if (this.state.searchByRegistry !== 'all' && imageRegistries.length === 1 && results.length === 1) { - return results[0].props.children; - } - - return results; - }; - - // Similar to the output of docker search and docker's //images/search endpoint only show the root domain. - truncateRegistryDomain = (domain) => { - const parts = domain.split('.'); - if (parts.length > 2) { - return parts[parts.length - 2] + "." + parts[parts.length - 1]; - } - return domain; - }; - - enableDockerRestartService = () => { - const argv = ["systemctl", "enable", "docker.service"]; - - cockpit.spawn(argv, { superuser: "require", err: "message" }) - .catch(err => { - console.warn("Failed to enable docker.service:", JSON.stringify(err)); - }); - }; - - isFormInvalid = validationFailed => { - const groupHasError = row => row && Object.values(row) - .filter(val => val) // Filter out empty/undefined properties - .length > 0; // If one field has error, the whole group (dynamicList) is invalid - - // If at least one group is invalid, then the whole form is invalid - return validationFailed.publish?.some(groupHasError) || - validationFailed.volumes?.some(groupHasError) || - validationFailed.env?.some(groupHasError) || - !!validationFailed.containerName; - }; - - async validateContainerName(containerName) { - try { - await client.containerExists(containerName); - } catch (error) { - return; - } - return _("Name already in use"); - } - - async validateForm() { - const { publish, volumes, env, containerName } = this.state; - const validationFailed = { }; - - const publishValidation = publish.map(a => { - if (a === undefined) - return undefined; - - return { - IP: validatePublishPort(a.IP, "IP"), - hostPort: validatePublishPort(a.hostPort, "hostPort"), - containerPort: validatePublishPort(a.containerPort, "containerPort"), - }; - }); - if (publishValidation.some(entry => entry && Object.keys(entry).length > 0)) - validationFailed.publish = publishValidation; - - const volumesValidation = volumes.map(a => { - if (a === undefined) - return undefined; - - return { - hostPath: validateVolume(a.hostPath, "hostPath"), - containerPath: validateVolume(a.containerPath, "containerPath"), - }; - }); - if (volumesValidation.some(entry => entry && Object.keys(entry).length > 0)) - validationFailed.volumes = volumesValidation; - - const envValidation = env.map(a => { - if (a === undefined) - return undefined; - - return { - envKey: validateEnvVar(a.envKey, "envKey"), - envValue: validateEnvVar(a.envValue, "envValue"), - }; - }); - if (envValidation.some(entry => entry && Object.keys(entry).length > 0)) - validationFailed.env = envValidation; - - const containerNameValidation = await this.validateContainerName(containerName); - - if (containerNameValidation) - validationFailed.containerName = containerNameValidation; - - this.setState({ validationFailed }); - - return !this.isFormInvalid(validationFailed); - } - - /* Updates a validation object of the whole dynamic list's form (e.g. the whole port-mapping form) - * - * Arguments - * - key: [publish/volumes/env] - Specifies the validation of which dynamic form of the Image run dialog is being updated - * - value: An array of validation errors of the form. Each item of the array represents a row of the dynamic list. - * Index needs to corellate with a row number - */ - dynamicListOnValidationChange = (key, value) => { - const validationFailedDelta = { ...this.state.validationFailed }; - - validationFailedDelta[key] = value; - - if (validationFailedDelta[key].every(a => a === undefined)) - delete validationFailedDelta[key]; - - this.onValueChanged('validationFailed', validationFailedDelta); - }; - - render() { - const Dialogs = this.props.dialogs; - const { registries, dockerRestartAvailable, selinuxAvailable, version } = this.props.dockerInfo; - const { image } = this.props; - const dialogValues = this.state; - const { activeTabKey, selectedImage } = this.state; - - let imageListOptions = []; - if (!image) { - imageListOptions = this.filterImages(); - } - - const localImage = this.state.image || (selectedImage && this.props.localImages.some(img => img.Id === selectedImage.Id)); - const dockerRegistries = registries && registries.search ? registries.search : utils.fallbackRegistries; - - // Add the search component - const footer = ( - - { - ev.stopPropagation(); - this.setState({ searchByRegistry: 'all' }); - }} - // Ignore SelectToggle's touchstart's default behaviour - onTouchStart={ev => { - ev.stopPropagation(); - }} - /> - { - ev.stopPropagation(); - this.setState({ searchByRegistry: 'local' }); - }} - onTouchStart={ev => { - ev.stopPropagation(); - }} - /> - {dockerRegistries.map(registry => { - const index = this.truncateRegistryDomain(registry); - return ( - { - ev.stopPropagation(); - this.setState({ searchByRegistry: index }); - } } - onTouchStart={ ev => ev.stopPropagation() } - /> - ); - })} - - ); - - const defaultBody = ( -
- {this.state.dialogError && } - - { - utils.validationClear(dialogValues.validationFailed, "containerName", (value) => this.onValueChanged("validationFailed", value)); - utils.validationDebounce(async () => { - const delta = await this.validateContainerName(value); - if (delta) - this.onValueChanged("validationFailed", { ...dialogValues.validationFailed, containerName: delta }); - }); - this.onValueChanged('containerName', value); - }} /> - - - - {_("Details")}} className="pf-v5-c-form pf-m-horizontal"> - - {_("host[:port]/[user]/container[:tag]")} - {cockpit.format(_("Example: $0"), "quay.io//busybox")} - {cockpit.format(_("Searching: $0"), "quay.io/busybox")} - - }> - - - } - > - - - - {(image || localImage) && - - this.onValueChanged('pullLatestImage', value)} label={_("Pull latest image")} - /> - - } - - {dialogValues.entrypoint && - - {dialogValues.entrypoint} - - } - - - this.onValueChanged('command', value)} /> - - - - this.onValueChanged('hasTTY', checked)} /> - - - - - this.onValueChanged('memoryConfigure', checked)} /> - !this.state.memoryConfigure && this.onValueChanged('memoryConfigure', true)} - onPlus={() => this.onPlusOne('memory')} - onMinus={() => this.onMinusOne('memory')} - minusBtnAriaLabel={_("Decrease memory")} - plusBtnAriaLabel={_("Increase memory")} - onChange={ev => this.onValueChanged('memory', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> - this.onValueChanged('memoryUnit', value)}> - - - - - - - - - - - }> - - this.onValueChanged('cpuSharesConfigure', checked)} /> - !this.state.cpuSharesConfigure && this.onValueChanged('cpuSharesConfigure', true)} - min={2} - max={262144} - isDisabled={!this.state.cpuSharesConfigure} - onPlus={() => this.onPlusOne('cpuShares')} - onMinus={() => this.onMinusOne('cpuShares')} - minusBtnAriaLabel={_("Decrease CPU shares")} - plusBtnAriaLabel={_("Increase CPU shares")} - onChange={ev => this.onValueChanged('cpuShares', parseInt(ev.target.value) < 2 ? 2 : ev.target.value)} /> - - - {(dockerRestartAvailable) && - - - - - - } - > - this.onValueChanged('restartPolicy', value)}> - - - - - - - {dialogValues.restartPolicy === "on-failure" && - - this.onMinusOne('restartTries')} - onPlus={() => this.onPlusOne('restartTries')} - onChange={ev => this.onValueChanged('restartTries', parseInt(ev.target.value) < 1 ? 1 : ev.target.value)} - /> - - } - - } - - {_("Integration")}} id="create-image-dialog-tab-integration" className="pf-v5-c-form"> - - this.dynamicListOnValidationChange('publish', value)} - onChange={value => this.onValueChanged('publish', value)} - default={{ IP: null, containerPort: null, hostPort: null, protocol: 'tcp' }} - itemcomponent={ } /> - this.dynamicListOnValidationChange('volumes', value)} - onChange={value => this.onValueChanged('volumes', value)} - default={{ containerPath: null, hostPath: null, readOnly: false }} - options={{ selinuxAvailable }} - itemcomponent={ } /> - - this.dynamicListOnValidationChange('env', value)} - onChange={value => this.onValueChanged('env', value)} - default={{ envKey: null, envValue: null }} - helperText={_("Paste one or more lines of key=value pairs into any field for bulk import")} - itemcomponent={ } /> - - {_("Health check")}} id="create-image-dialog-tab-healthcheck" className="pf-v5-c-form pf-m-horizontal"> - - this.onValueChanged('healthcheck_command', value)} /> - - - - this.onValueChanged('healthcheck_shell', checked)} /> - - - - - - }> - - this.onMinusOne('healthcheck_interval')} - onPlus={() => this.onPlusOne('healthcheck_interval')} - onChange={ev => this.onValueChanged('healthcheck_interval', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> - {_("seconds")} - - - - - - }> - - this.onMinusOne('healthcheck_timeout')} - onPlus={() => this.onPlusOne('healthcheck_timeout')} - onChange={ev => this.onValueChanged('healthcheck_timeout', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> - {_("seconds")} - - - - - - }> - - this.onMinusOne('healthcheck_start_period')} - onPlus={() => this.onPlusOne('healthcheck_start_period')} - onChange={ev => this.onValueChanged('healthcheck_start_period', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> - {_("seconds")} - - - - - - }> - this.onMinusOne('healthcheck_retries')} - onPlus={() => this.onPlusOne('healthcheck_retries')} - onChange={ev => this.onValueChanged('healthcheck_retries', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} /> - - {version.localeCompare("4.3", undefined, { numeric: true, sensitivity: 'base' }) >= 0 && - - - - }> - {HealthCheckOnFailureActionOrder.map(item => - this.onValueChanged('healthcheck_action', item.value)} /> - )} - - } - - - - ); - return ( - { - if (this.state.isImageSelectOpen) { - this.onImageSelectToggle(!this.state.isImageSelectOpen); - } else { - Dialogs.close(); - } - }} - title={_("Create container")} - footer={<> - - - - } - > - {defaultBody} - - ); - } -} diff --git a/ui/cockpit-docker/src/ImageRunModal.scss b/ui/cockpit-docker/src/ImageRunModal.scss deleted file mode 100644 index 6a5399d..0000000 --- a/ui/cockpit-docker/src/ImageRunModal.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import "global-variables"; - -// Ensure the width fits within the screen boundaries (with padding on the sides) -.pf-v5-c-select__menu { - // 3xl is the left+right padding for an iPhone SE; - // this works on other screen sizes as well - max-inline-size: calc(100vw - var(--pf-v5-global--spacer--3xl)); -} - -// Make sure the footer is visible with more then 5 results. -.pf-c-select__menu-list { - // 35% viewport height is for 1280x720; - // since it picks the min of the two, it works everywhere - max-block-size: min(20rem, 35vh); - overflow: hidden scroll; -} - -// Fix the dot next to spinner: https://github.com/patternfly/patternfly-react/issues/6383 -.pf-v5-c-select__list-item.pf-m-loading { - list-style-type: none; -} - -.image-search-footer { - flex-wrap: wrap; - - .pf-v5-c-toggle-group__text { - word-wrap: break-word; - } -} - - // PF4 does not yet support multiple form fields for the same label -.ct-input-group-spacer-sm.pf-v5-l-flex { - // Limit width for select entries and inputs in the input groups otherwise they take up the whole space - > .pf-v5-c-select, .pf-v5-c-form-control:not(.pf-v5-c-select__toggle-typeahead) { - max-inline-size: 8ch; - } -} - -// HACK: A local copy of pf-m-horizontal (as ct-m-horizontal), -// but applied at the FormGroup level instead of Form -@media (min-width: $pf-v5-global--breakpoint--md) { - .pf-v5-c-form__group.ct-m-horizontal { - display: grid; - grid-column-gap: var(--pf-v5-c-form--m-horizontal__group-label--md--GridColumnGap); - grid-template-columns: var(--pf-v5-c-form--m-horizontal__group-label--md--GridColumnWidth) var(--pf-v5-c-form--m-horizontal__group-control--md--GridColumnWidth); - } -} diff --git a/ui/cockpit-docker/src/ImageSearchModal.css b/ui/cockpit-docker/src/ImageSearchModal.css deleted file mode 100644 index ff09dff..0000000 --- a/ui/cockpit-docker/src/ImageSearchModal.css +++ /dev/null @@ -1,59 +0,0 @@ -.docker-search .pf-v5-c-modal-box__body { - display: grid; - grid-auto-flow: row; - overflow: hidden; - grid-template-rows: auto auto 1fr; - grid-gap: var(--pf-v5-global--spacer--sm); -} - -.image-list-item { - display: grid; - grid-gap: 0 1rem; -} - -.image-list-item + .image-list-item { - border-block-start: 1px solid var(--pf-v5-global--BorderColor--200); -} - -.image-list-item > .image-name { - color: var(--pf-v5-global--Color--100); -} - -@media (min-width: 768px) { - .image-list-item { - grid-template-columns: 1fr max-content; - } -} - -.docker-search .image-search-modal-footer-grid { - display: grid; - grid-template-columns: 1fr auto auto; - grid-gap: 0.25rem; -} - -.image-tag-entry { - max-inline-size: 15rem; -} - -@media (max-width: 340px) { - /* Shrink buttons to accommodate iPhone 5/SE */ - .docker-search .modal-footer > .btn { - padding-inline: 0.25rem; - } -} - -.image-search-tag-form { - margin-block-end: var(--pf-v5-global--spacer--md); -} - -.docker-search .pf-v5-c-modal-box__footer { - display: initial; -} - -.docker-search .pf-v5-c-data-list { - overflow-y: auto; -} - -.docker-search .pf-v5-l-flex .pf-v5-c-form__group:nth-child(2) { - grid-template-columns: 2rem var(--pf-v5-c-form--m-horizontal__group-control--md--GridColumnWidth); -} diff --git a/ui/cockpit-docker/src/ImageSearchModal.jsx b/ui/cockpit-docker/src/ImageSearchModal.jsx deleted file mode 100644 index 8ebec49..0000000 --- a/ui/cockpit-docker/src/ImageSearchModal.jsx +++ /dev/null @@ -1,212 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { DataList, DataListCell, DataListItem, DataListItemCells, DataListItemRow } from "@patternfly/react-core/dist/esm/components/DataList"; -import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; -import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { Radio } from "@patternfly/react-core/dist/esm/components/Radio"; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import { ExclamationCircleIcon } from '@patternfly/react-icons'; - -import { EmptyStatePanel } from "cockpit-components-empty-state.jsx"; -import { ErrorNotification } from './Notification.jsx'; -import cockpit from 'cockpit'; -import rest from './rest.js'; -import * as client from './client.js'; -import { fallbackRegistries, useDockerInfo } from './util.js'; -import { useDialogs } from "dialogs.jsx"; - -import './ImageSearchModal.css'; - -const _ = cockpit.gettext; - -export const ImageSearchModal = ({ downloadImage }) => { - const [searchInProgress, setSearchInProgress] = useState(false); - const [searchFinished, setSearchFinished] = useState(false); - const [imageIdentifier, setImageIdentifier] = useState(''); - const [imageList, setImageList] = useState([]); - const [imageTag, setImageTag] = useState(""); - const [selectedRegistry, setSelectedRegistry] = useState(""); - const [selected, setSelected] = useState(""); - const [dialogError, setDialogError] = useState(""); - const [dialogErrorDetail, setDialogErrorDetail] = useState(""); - const [typingTimeout, setTypingTimeout] = useState(null); - - let activeConnection = null; - const { registries } = useDockerInfo(); - const Dialogs = useDialogs(); - // Registries to use for searching - const searchRegistries = registries.search && registries.length !== 0 ? registries.search : fallbackRegistries; - - // Don't use on selectedRegistry state variable for finding out the - // registry to search in as with useState we can only call something after a - // state update with useEffect but as onSearchTriggered also changes state we - // can't use that so instead we pass the selected registry. - const onSearchTriggered = (searchRegistry = "", forceSearch = false) => { - // When search re-triggers close any existing active connection - activeConnection = rest.connect(client.getAddress()); - if (activeConnection) - activeConnection.close(); - setSearchFinished(false); - - // Do not call the SearchImage API if the input string is not at least 2 chars, - // unless Enter is pressed, which should force start the search. - // The comparison was done considering the fact that we miss always one letter due to delayed setState - if (imageIdentifier.length < 2 && !forceSearch) - return; - - setSearchInProgress(true); - - let queryRegistries = searchRegistries; - if (searchRegistry !== "") { - queryRegistries = [searchRegistry]; - } - // if a user searches for `docker.io/cockpit` let docker search in the user specified registry. - if (imageIdentifier.includes('/')) { - queryRegistries = [""]; - } - - const searches = queryRegistries.map(rr => { - const registry = rr.length < 1 || rr[rr.length - 1] === "/" ? rr : rr + "/"; - return activeConnection.call({ - method: "GET", - path: client.VERSION + "/images/search", - body: "", - params: { - term: registry + imageIdentifier - } - }); - }); - - Promise.allSettled(searches) - .then(reply => { - if (reply) { - let results = []; - - for (const result of reply) { - if (result.status === "fulfilled") { - results = results.concat(JSON.parse(result.value)); - // console.log(results); - } else { - setDialogError(_("Failed to search for new images")); - setDialogErrorDetail(result.reason ? cockpit.format(_("Failed to search for images: $0"), result.reason.message) : _("Failed to search for images.")); - } - } - - setImageList(results || []); - setSearchInProgress(false); - setSearchFinished(true); - } - }); - }; - - const onKeyDown = (e) => { - if (e.key != ' ') { // Space should not trigger search - const forceSearch = e.key == 'Enter'; - if (forceSearch) { - e.preventDefault(); - } - - // Reset the timer, to make the http call after 250MS - clearTimeout(typingTimeout); - setTypingTimeout(setTimeout(() => onSearchTriggered(selectedRegistry, forceSearch), 250)); - } - }; - - const onDownloadClicked = () => { - const selectedImageName = imageList[selected].name; - if (activeConnection) - activeConnection.close(); - Dialogs.close(); - downloadImage(selectedImageName, imageTag); - }; - - const handleClose = () => { - if (activeConnection) - activeConnection.close(); - Dialogs.close(); - }; - - return ( - -
- - setImageTag(value)} /> - -
- - - } - > -
- {dialogError && } - - - setImageIdentifier(value)} /> - - - { setSelectedRegistry(value); clearTimeout(typingTimeout); onSearchTriggered(value, false) }}> - - {(searchRegistries || []).map(r => )} - - - - - - {searchInProgress && } - - {((!searchInProgress && !searchFinished) || imageIdentifier == "") && } - - {searchFinished && imageIdentifier !== '' && <> - {imageList.length == 0 && } - {imageList.length > 0 && - setSelected(key.split('-').slice(-1)[0])}> - {imageList.map((image, iter) => { - return ( - - - - {image.name} - , - - {image.description} - - ]} - /> - - - ); - })} - } - } -
- ); -}; diff --git a/ui/cockpit-docker/src/ImageUsedBy.jsx b/ui/cockpit-docker/src/ImageUsedBy.jsx deleted file mode 100644 index 6db307b..0000000 --- a/ui/cockpit-docker/src/ImageUsedBy.jsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import cockpit from 'cockpit'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Badge } from "@patternfly/react-core/dist/esm/components/Badge"; -import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List"; - -const _ = cockpit.gettext; - -const ImageUsedBy = ({ containers, showAll }) => { - if (containers === null) - return _("Loading..."); - if (containers === undefined) - return _("No containers are using this image"); - - return ( - - {containers.map(c => { - const container = c.container; - const isRunning = container.State?.Status === "running"; - return ( - - - - {isRunning && {_("Running")}} - - - ); - })} - - ); -}; - -export default ImageUsedBy; diff --git a/ui/cockpit-docker/src/Images.css b/ui/cockpit-docker/src/Images.css deleted file mode 100644 index b93b2ac..0000000 --- a/ui/cockpit-docker/src/Images.css +++ /dev/null @@ -1,23 +0,0 @@ -#containers-images div.download-in-progress { - color: grey; - font-weight: bold; -} - -/* Danger dropdown items should be red */ -.pf-v5-c-dropdown__menu-item.pf-m-danger:not(.pf-m-disabled, .pf-m-aria-disabled) { - color: var(--pf-v5-global--danger-color--200); -} - -#containers-images .pf-v5-c-table.pf-m-compact .pf-v5-c-table__action { - --pf-v5-c-table__action--PaddingTop: 0.5rem; - --pf-v5-c-table__action--PaddingBottom: 0.5rem; -} - -.containers-images .pf-v5-c-expandable-section__content { - margin-block-start: 0; -} - -/* Override font-size due to h2 being wrapped in a Flex */ -.containers-images-title { - font-size: var(--pf-v5-global--FontSize--2xl); -} diff --git a/ui/cockpit-docker/src/Images.jsx b/ui/cockpit-docker/src/Images.jsx deleted file mode 100644 index 7f6b6a6..0000000 --- a/ui/cockpit-docker/src/Images.jsx +++ /dev/null @@ -1,398 +0,0 @@ -import React from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Card, CardBody, CardFooter, CardHeader, CardTitle } from "@patternfly/react-core/dist/esm/components/Card"; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/index.js'; -import { Flex, FlexItem } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { ExpandableSection } from "@patternfly/react-core/dist/esm/components/ExpandableSection"; -import { Text, TextVariants } from "@patternfly/react-core/dist/esm/components/Text"; -import { cellWidth } from '@patternfly/react-table'; - -import cockpit from 'cockpit'; -import { ListingTable } from "cockpit-components-table.jsx"; -import { ListingPanel } from 'cockpit-components-listing-panel.jsx'; -import ImageDetails from './ImageDetails.jsx'; -import ImageHistory from './ImageHistory.jsx'; -import { ImageRunModal } from './ImageRunModal.jsx'; -import { ImageSearchModal } from './ImageSearchModal.jsx'; -import { ImageDeleteModal } from './ImageDeleteModal.jsx'; -import PruneUnusedImagesModal from './PruneUnusedImagesModal.jsx'; -import * as client from './client.js'; -import * as utils from './util.js'; -import { useDialogs, DialogsContext } from "dialogs.jsx"; - -import './Images.css'; -import '@patternfly/react-styles/css/utilities/Sizing/sizing.css'; - -import { KebabDropdown } from "cockpit-components-dropdown.jsx"; - -const _ = cockpit.gettext; - -class Images extends React.Component { - static contextType = DialogsContext; - - constructor(props) { - super(props); - this.state = { - intermediateOpened: false, - isExpanded: false, - }; - - this.downloadImage = this.downloadImage.bind(this); - this.renderRow = this.renderRow.bind(this); - } - - downloadImage(imageName, imageTag) { - let pullImageId = imageName; - if (!imageTag) - imageTag = "latest"; - - pullImageId += ":" + imageTag; - - this.setState({ imageDownloadInProgress: imageName }); - client.pullImage(pullImageId) - .then(() => { - this.setState({ imageDownloadInProgress: undefined }); - }) - .catch(ex => { - const error = cockpit.format(_("Failed to download image $0:$1"), imageName, imageTag || "latest"); - const errorDetail = ( -

{_("Error message")}: - {cockpit.format("$0 $1", ex.message, ex.reason)} -

- ); - this.setState({ imageDownloadInProgress: undefined }); - this.props.onAddNotification({ type: 'danger', error, errorDetail }); - }); - } - - onOpenNewImagesDialog = () => { - const Dialogs = this.context; - Dialogs.show( - - ); - }; - - onOpenPruneUnusedImagesDialog = () => { - this.setState({ showPruneUnusedImagesModal: true }); - }; - - getUsedByText(image) { - const { imageContainerList } = this.props; - if (imageContainerList === null) { - return { title: _("unused"), count: 0 }; - } - const containers = imageContainerList[image.Id]; - if (containers !== undefined) { - const title = cockpit.format(cockpit.ngettext("$0 container", "$0 containers", containers.length), containers.length); - return { title, count: containers.length }; - } else { - return { title: _("unused"), count: 0 }; - } - } - - calculateStats = () => { - const { images, imageContainerList } = this.props; - const unusedImages = []; - const imageStats = { - imagesTotal: 0, - imagesSize: 0, - unusedTotal: 0, - unusedSize: 0, - }; - - if (imageContainerList === null) { - return { imageStats, unusedImages }; - } - - if (images !== null) { - Object.keys(images).forEach(id => { - const image = images[id]; - imageStats.imagesTotal += 1; - imageStats.imagesSize += image.Size; - - const usedBy = imageContainerList[image.Id]; - if (image.Containers === 0 || usedBy === undefined) { - imageStats.unusedTotal += 1; - imageStats.unusedSize += image.Size; - unusedImages.push(image); - } - }); - } - - return { imageStats, unusedImages }; - }; - - renderRow(image) { - const tabs = []; - const { title: usedByText, count: usedByCount } = this.getUsedByText(image); - - const columns = [ - { title: utils.image_name(image), header: true, props: { modifier: "breakWord" } }, - { title: utils.localize_time(image.Created), props: { className: "ignore-pixels" } }, - { title: utils.truncate_id(image.Id), props: { className: "ignore-pixels" } }, - { title: cockpit.format_bytes(image.Size), props: { className: "ignore-pixels", modifier: "nowrap" } }, - { title: {usedByText}, props: { className: "ignore-pixels", modifier: "nowrap" } }, - { - title: , - props: { className: 'pf-v5-c-table__action content-action' } - }, - ]; - - tabs.push({ - name: _("Details"), - renderer: ImageDetails, - data: { - image, - containers: this.props.imageContainerList !== null ? this.props.imageContainerList[image.Id] : null, - showAll: this.props.showAll, - } - }); - tabs.push({ - name: _("History"), - renderer: ImageHistory, - data: { - image, - } - }); - return { - expandedContent: , - columns, - props: { - key: image.Id, - "data-row-id": image.Id, - }, - }; - } - - render() { - const columnTitles = [ - { title: _("Image"), transforms: [cellWidth(20)] }, - { title: _("Created"), props: { className: "ignore-pixels", width: 15 } }, - { title: _("ID"), props: { className: "ignore-pixels" } }, - { title: _("Disk space"), props: { className: "ignore-pixels" } }, - { title: _("Used by"), props: { className: "ignore-pixels" } }, - ]; - let emptyCaption = _("No images"); - if (this.props.images === null) - emptyCaption = "Loading..."; - else if (this.props.textFilter.length > 0) - emptyCaption = _("No images that match the current filter"); - - const intermediateOpened = this.state.intermediateOpened; - - let filtered = []; - if (this.props.images !== null) { - filtered = Object.keys(this.props.images).filter(id => { - const tags = this.props.images[id].RepoTags || []; - if (!intermediateOpened && tags.length < 1) - return false; - if (this.props.textFilter.length > 0) - return tags.some(tag => tag.toLowerCase().indexOf(this.props.textFilter.toLowerCase()) >= 0); - return true; - }); - } - - filtered.sort((a, b) => { - const name_a = this.props.images[a].RepoTags.length > 0 ? this.props.images[a].RepoTags[0] : ""; - const name_b = this.props.images[b].RepoTags.length > 0 ? this.props.images[b].RepoTags[0] : ""; - if (name_a === "") - return 1; - if (name_b === "") - return -1; - return name_a > name_b ? 1 : -1; - }); - - const imageRows = filtered.map(id => this.renderRow(this.props.images[id])); - - const interim = this.props.images && Object.keys(this.props.images).some(id => { - // Intermediate image does not have any tags - if (this.props.images[id].RepoTags && this.props.images[id].RepoTags.length > 0) - return false; - - // Any text filter hides all images - if (this.props.textFilter.length > 0) - return false; - - return true; - }); - - let toggleIntermediate = ""; - if (interim) { - toggleIntermediate = ( - - - - ); - } - const cardBody = ( - <> - - {toggleIntermediate} - - ); - - const { imageStats, unusedImages } = this.calculateStats(); - const imageTitleStats = ( - <> - - {cockpit.format(cockpit.ngettext("$0 image total, $1", "$0 images total, $1", imageStats.imagesTotal), imageStats.imagesTotal, cockpit.format_bytes(imageStats.imagesSize))} - - {imageStats.unusedTotal !== 0 && - - {cockpit.format(cockpit.ngettext("$0 unused image, $1", "$0 unused images, $1", imageStats.unusedTotal), imageStats.unusedTotal, cockpit.format_bytes(imageStats.unusedSize))} - - } - - ); - - return ( - - - - - - - {_("Images")} - - {imageTitleStats} - - - - - - - - - {this.props.images && Object.keys(this.props.images).length - ? this.setState(prevState => ({ isExpanded: !prevState.isExpanded }))} - isExpanded={this.state.isExpanded}> - {cardBody} - - : cardBody} - - {/* The PruneUnusedImagesModal dialog needs to keep - * its list of unused images in sync with reality at - * all times since the API call will delete whatever - * is unused at the exact time of call, and the - * dialog better be showing the correct list of - * unused images at that time. Thus, we can't use - * Dialog.show for it but include it here in the - * DOM. */} - {this.state.showPruneUnusedImagesModal && - this.setState({ showPruneUnusedImagesModal: false })} - unusedImages={unusedImages} - onAddNotification={this.props.onAddNotification} /> } - {this.state.imageDownloadInProgress && -
{_("Pulling")} {this.state.imageDownloadInProgress}...
-
} -
- ); - } -} - -const ImageOverActions = ({ handleDownloadNewImage, handlePruneUsedImages, unusedImages }) => { - const actions = [ - handleDownloadNewImage()} - > - {_("Download new image")} - , - handlePruneUsedImages()} - isDisabled={unusedImages.length === 0} - isAriaDisabled={unusedImages.length === 0} - > - {_("Prune unused images")} - - ]; - - return ( - - ); -}; - -const ImageActions = ({ image, onAddNotification }) => { - const Dialogs = useDialogs(); - - const runImage = () => { - Dialogs.show( - - {(dockerInfo) => ( - - {(Dialogs) => ( - - )} - - )} - ); - }; - - const removeImage = () => { - Dialogs.show(); - }; - - const runImageAction = ( - - ); - - const dropdownActions = [ - - {_("Create container")} - , - - {_("Delete")} - - ]; - - return ( - <> - {runImageAction} - - - ); -}; - -export default Images; diff --git a/ui/cockpit-docker/src/Notification.jsx b/ui/cockpit-docker/src/Notification.jsx deleted file mode 100644 index 3fc3ff2..0000000 --- a/ui/cockpit-docker/src/Notification.jsx +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of Cockpit. - * - * Copyright (C) 2019 Red Hat, Inc. - * - * Cockpit is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * Cockpit is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Cockpit; If not, see . - */ -import React from 'react'; -import { Alert, AlertActionCloseButton } from "@patternfly/react-core/dist/esm/components/Alert"; - -import cockpit from 'cockpit'; - -const _ = cockpit.gettext; - -let last_error = ""; - -function log_error_if_changed(error) { - // Put the error in the browser log, for easier debugging and - // matching of known issues in the integration tests. - if (error != last_error) { - last_error = error; - console.error(error); - } -} - -export const ErrorNotification = ({ errorMessage, errorDetail, onDismiss }) => { - log_error_if_changed(errorMessage + (errorDetail ? ": " + errorDetail : "")); - return ( - : null}> - { errorDetail &&

{_("Error message")}: {errorDetail}

} -
- ); -}; diff --git a/ui/cockpit-docker/src/PruneUnusedContainersModal.jsx b/ui/cockpit-docker/src/PruneUnusedContainersModal.jsx deleted file mode 100644 index 263482d..0000000 --- a/ui/cockpit-docker/src/PruneUnusedContainersModal.jsx +++ /dev/null @@ -1,96 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import { SortByDirection } from "@patternfly/react-table"; -import cockpit from 'cockpit'; -import { ListingTable } from 'cockpit-components-table.jsx'; - -import * as client from './client.js'; -import * as utils from './util.js'; - -const _ = cockpit.gettext; - -const getContainerRow = (container, selected) => { - const columns = [ - { - title: container.name, - sortKey: container.name, - props: { width: 25, }, - }, - { - title: utils.localize_time(Date.parse(container.created) / 1000), - props: { width: 20, }, - }, - ]; - return { columns, selected, props: { key: container.id } }; -}; - -const PruneUnusedContainersModal = ({ close, unusedContainers, onAddNotification }) => { - const [isPruning, setPruning] = useState(false); - const [selectedContainerIds, setSelectedContainerIds] = React.useState(unusedContainers.map(u => u.id)); - - const handlePruneUnusedContainers = () => { - setPruning(true); - - const actions = []; - - for (const id of selectedContainerIds) { - if (id.endsWith("true")) { - actions.push(client.delContainer(true, id.replace(/true$/, ""), true)); - } else { - actions.push(client.delContainer(false, id.replace(/false$/, ""), true)); - } - } - Promise.all(actions).then(close) - .catch(ex => { - const error = _("Failed to prune unused containers"); - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - close(); - }); - }; - - const columns = [ - { title: _("Name"), sortable: true }, - { title: _("Created"), sortable: true }, - ]; - - const selectAllContainers = isSelecting => setSelectedContainerIds(isSelecting ? unusedContainers.map(c => c.id) : []); - const isContainerSelected = container => selectedContainerIds.includes(container.id); - const setContainerSelected = (container, isSelecting) => setSelectedContainerIds(prevSelected => { - const otherSelectedContainerName = prevSelected.filter(r => r !== container.id); - return isSelecting ? [...otherSelectedContainerName, container.id] : otherSelectedContainerName; - }); - - const onSelectContainer = (id, _rowIndex, isSelecting) => { - const container = unusedContainers.filter(u => u.id === id)[0]; - setContainerSelected(container, isSelecting); - }; - - return ( - - - - } - > -

{_("Removes selected non-running containers")}

- onSelectContainer(rowData.props.id, rowIndex, isSelecting)} - onHeaderSelect={(_event, isSelecting) => selectAllContainers(isSelecting)} - id="unused-container-list" - rows={unusedContainers.map(container => getContainerRow(container, isContainerSelected(container))) } - variant="compact" sortBy={{ index: 0, direction: SortByDirection.asc }} /> -
- ); -}; - -export default PruneUnusedContainersModal; diff --git a/ui/cockpit-docker/src/PruneUnusedImagesModal.jsx b/ui/cockpit-docker/src/PruneUnusedImagesModal.jsx deleted file mode 100644 index 3c46506..0000000 --- a/ui/cockpit-docker/src/PruneUnusedImagesModal.jsx +++ /dev/null @@ -1,101 +0,0 @@ -import React, { useState } from 'react'; -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { Checkbox } from "@patternfly/react-core/dist/esm/components/Checkbox"; -import { Flex } from "@patternfly/react-core/dist/esm/layouts/Flex"; -import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List"; -import { Modal } from "@patternfly/react-core/dist/esm/components/Modal"; -import cockpit from 'cockpit'; - -import * as client from './client.js'; -import * as utils from './util.js'; - -import "@patternfly/patternfly/utilities/Spacing/spacing.css"; - -const _ = cockpit.gettext; - -function ImageOptions({ images, checked, handleChange, name, showCheckbox }) { - const [isExpanded, onToggle] = useState(false); - let shownImages = images; - if (!isExpanded) { - shownImages = shownImages.slice(0, 5); - } - - if (shownImages.length === 0) { - return null; - } - const listNameId = "list-" + name; - - return ( - - {showCheckbox && - handleChange(val)} - aria-owns={listNameId} - /> - } - - {shownImages.map((image, index) => - - {utils.image_name(image)} - - )} - {!isExpanded && images.length > 5 && - - } - - - ); -} - -const PruneUnusedImagesModal = ({ close, unusedImages, onAddNotification }) => { - const [isPruning, setPruning] = useState(false); - const [deleteImages, setDeleteImages] = React.useState(true); - - const handlePruneUnusedImages = () => { - setPruning(true); - - client.pruneUnusedImages().then(close) - .catch(ex => { - const error = _("Failed to prune unused images"); - onAddNotification({ type: 'danger', error, errorDetail: ex.message }); - close(); - }); - }; - - const showCheckboxes = unusedImages.length > 0; - - return ( - - - - } - > - - - - - ); -}; - -export default PruneUnusedImagesModal; diff --git a/ui/cockpit-docker/src/PublishPort.jsx b/ui/cockpit-docker/src/PublishPort.jsx deleted file mode 100644 index 92a36cd..0000000 --- a/ui/cockpit-docker/src/PublishPort.jsx +++ /dev/null @@ -1,142 +0,0 @@ -import React from 'react'; - -import { Button } from "@patternfly/react-core/dist/esm/components/Button"; -import { FormGroup } from "@patternfly/react-core/dist/esm/components/Form"; -import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect"; -import { Grid } from "@patternfly/react-core/dist/esm/layouts/Grid"; -import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput"; -import { Popover } from "@patternfly/react-core/dist/esm/components/Popover"; -import { OutlinedQuestionCircleIcon, TrashIcon } from '@patternfly/react-icons'; -import cockpit from 'cockpit'; -import ipaddr from "ipaddr.js"; - -import { FormHelper } from "cockpit-components-form-helper.jsx"; -import * as utils from './util.js'; - -const _ = cockpit.gettext; - -const MAX_PORT = 65535; - -export function validatePublishPort(value, key) { - switch (key) { - case "IP": - if (value && !ipaddr.isValid(value)) - return _("Must be a valid IP address"); - break; - case "hostPort": { - if (value) { - const hostPort = parseInt(value); - if (hostPort < 1 || hostPort > MAX_PORT) - return _("1 to 65535"); - } - - break; - } - case "containerPort": { - if (!value) - return _("Container port must not be empty"); - - const containerPort = parseInt(value); - if (containerPort < 1 || containerPort > MAX_PORT) - return _("1 to 65535"); - - break; - } - default: - console.error(`Unknown key "${key}"`); // not-covered: unreachable assertion - } -} - -export const PublishPort = ({ id, item, onChange, idx, removeitem, itemCount, validationFailed, onValidationChange }) => - ( - - - - - }> - { - utils.validationClear(validationFailed, "IP", onValidationChange); - utils.validationDebounce(() => onValidationChange({ ...validationFailed, IP: validatePublishPort(value, "IP") })); - onChange(idx, 'IP', value); - }} /> - - - - - - }> - { - utils.validationClear(validationFailed, "hostPort", onValidationChange); - utils.validationDebounce(() => onValidationChange({ ...validationFailed, hostPort: validatePublishPort(value, "hostPort") })); - onChange(idx, 'hostPort', value); - }} /> - - - - { - utils.validationClear(validationFailed, "containerPort", onValidationChange); - utils.validationDebounce(() => onValidationChange({ ...validationFailed, containerPort: validatePublishPort(value, "containerPort") })); - onChange(idx, 'containerPort', value); - }} /> - - - - onChange(idx, 'protocol', value)}> - - - - - - - - - - - ); - } - - if (this.state.serviceAvailable === null) // not detected yet - return ( - - - - {/* loading spinner */} - - - - - - ); - - if (!this.state.serviceAvailable) { - return ( - - - - } headingLevel="h2" /> - - this.setState({ enableService: checked }) } /> - - { cockpit.manifests.system && - - - - } - - - - - ); - } - - let imageContainerList = {}; - if (this.state.containers !== null) { - Object.keys(this.state.containers).forEach(c => { - const container = this.state.containers[c]; - const image = container.Image; - if (imageContainerList[image]) { - imageContainerList[image].push({ - container, - stats: this.state.containersStats[container.Id], - }); - } else { - imageContainerList[image] = [{ - container, - stats: this.state.containersStats[container.Id] - }]; - } - }); - } else - imageContainerList = null; - - let startService = ""; - const action = ( - <> - {_("Start")} - this.setState({ showStartService: false })} /> - - ); - if (!this.state.serviceAvailable && this.state.privileged) { - startService = ( - - ); - } - - const imageList = ( - this.setState({ containersFilter: "all" }) } - user={this.state.currentUser} - serviceAvailable={this.state.serviceAvailable} - /> - ); - const containerList = ( - - ); - - const notificationList = ( - - {this.state.notifications.map((notification, index) => { - return ( - this.onDismissNotification(notification.index)} />}> - {notification.errorDetail} - - ); - })} - - ); - - const contextInfo = { - cgroupVersion: this.state.cgroupVersion, - registries: this.state.registries, - selinuxAvailable: this.state.selinuxAvailable, - dockerRestartAvailable: this.state.dockerRestartAvailable, - version: this.state.version, - }; - - return ( - - - - {notificationList} - - - - - - { this.state.showStartService ? startService : null } - {imageList} - {containerList} - - - - - - ); - } -} - -export default Application; diff --git a/ui/cockpit-docker/src/client.js b/ui/cockpit-docker/src/client.js deleted file mode 100644 index 22d11ad..0000000 --- a/ui/cockpit-docker/src/client.js +++ /dev/null @@ -1,172 +0,0 @@ -import rest from './rest.js'; - -const DOCKER_ADDRESS = "/var/run/docker.sock"; -export const VERSION = "/v1.43"; - -export function getAddress() { - return DOCKER_ADDRESS; -} - -function dockerCall(name, method, args, body) { - const options = { - method, - path: VERSION + name, - body: body || "", - params: args, - }; - - if (method === "POST" && body) - options.headers = { "Content-Type": "application/json" }; - - // console.log("dockerCall", options); - - return rest.call(getAddress(), options); -} - -const dockerJson = (name, method, args, body) => dockerCall(name, method, args, body) - .then(reply => JSON.parse(reply)); - -function dockerMonitor(name, method, args, callback) { - const options = { - method, - path: VERSION + name, - body: "", - params: args, - }; - - // console.log("dockerMonitor", options); - - const connection = rest.connect(getAddress()); - return connection.monitor(options, callback); -} - -export const streamEvents = (callback) => dockerMonitor("/events", "GET", {}, callback); - -export function getInfo() { - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => reject(new Error("timeout")), 15000); - dockerJson("/info", "GET", {}) - .then(reply => resolve(reply)) - .catch(reject) - .finally(() => clearTimeout(timeout)); - }); -} - -export const getContainers = () => dockerJson("/containers/json", "GET", { all: true }); - -export const streamContainerStats = (id, callback) => dockerMonitor("/containers/" + id + "/stats", "GET", { stream: true }, callback); - -export function inspectContainer(id) { - const options = { - size: false // set true to display filesystem usage - }; - return dockerJson("/containers/" + id + "/json", "GET", options); -} - -export const delContainer = (id, force) => dockerCall("/containers/" + id, "DELETE", { force }); - -export const renameContainer = (id, config) => dockerCall("/containers/" + id + "/rename", "POST", config); - -export const createContainer = (config) => dockerJson("/containers/create", "POST", {}, JSON.stringify(config)); - -export const commitContainer = (commitData) => dockerCall("/commit", "POST", commitData); - -export const postContainer = (action, id, args) => dockerCall("/containers/" + id + "/" + action, "POST", args); - -export function execContainer(id) { - const args = { - AttachStderr: true, - AttachStdout: true, - AttachStdin: true, - Tty: true, - Cmd: ["/bin/sh"], - }; - - return dockerJson("/containers/" + id + "/exec", "POST", {}, JSON.stringify(args)); -} - -export function resizeContainersTTY(id, exec, width, height) { - const args = { - h: height, - w: width, - }; - - let point = "containers/"; - if (!exec) - point = "exec/"; - - console.log("resizeContainersTTY", point + id + "/resize", args); - return dockerCall("/" + point + id + "/resize", "POST", args); -} - -function parseImageInfo(info) { - const image = {}; - - if (info.Config) { - image.Entrypoint = info.Config.Entrypoint; - image.Command = info.Config.Cmd; - image.Ports = Object.keys(info.Config.ExposedPorts || {}); - image.Env = info.Config.Env; - } - image.Author = info.Author; - - return image; -} - -export function getImages(id) { - const options = {}; - if (id) - options.filters = JSON.stringify({ id: [id] }); - return dockerJson("/images/json", "GET", options) - .then(reply => { - const images = {}; - const promises = []; - - for (const image of reply) { - images[image.Id] = image; - promises.push(dockerJson("/images/" + image.Id + "/json", "GET", {})); - } - - return Promise.all(promises) - .then(replies => { - for (const info of replies) { - images[info.Id] = Object.assign(images[info.Id], parseImageInfo(info)); - } - return images; - }); - }); -} - -export const delImage = (id, force) => dockerJson("/images/" + id, "DELETE", { force }); - -export const untagImage = (id, repo, tag) => dockerCall("/images/" + id + "/untag", "POST", { repo, tag }); - -export function pullImage(reference) { - return new Promise((resolve, reject) => { - const options = { - fromImage: reference, - }; - dockerCall("/images/create", "POST", options) - .then(r => { - // Need to check the last response if it contains error - const responses = r.trim().split("\n"); - const response = JSON.parse(responses[responses.length - 1]); - if (response.error) { - response.message = response.error; - reject(response); - } else if (response.cause) // present for 400 and 500 errors - reject(response); - else - resolve(); - }) - .catch(reject); - }); -} - -export const pruneUnusedImages = () => dockerJson("/images/prune", "POST", {}); - -export const imageHistory = (id) => dockerJson(`/images/${id}/history`, "GET", {}); - -export const imageExists = (id) => dockerCall("/images/" + id + "/json", "GET", {}); - -export const containerExists = (id) => dockerCall("/containers/" + id + "/json", "GET", {}); diff --git a/ui/cockpit-docker/src/docker.scss b/ui/cockpit-docker/src/docker.scss deleted file mode 100644 index 6db864c..0000000 --- a/ui/cockpit-docker/src/docker.scss +++ /dev/null @@ -1,149 +0,0 @@ -@use "ct-card.scss"; -@use "page.scss"; -@import "global-variables"; -// For pf-v5-line-clamp -@import "@patternfly/patternfly/sass-utilities/mixins.scss"; -// For pf-u-disabled-color-100 -@import "@patternfly/patternfly/utilities/Text/text.css"; - -#app .pf-v5-c-card.containers-containers, #app .pf-v5-c-card.containers-images { - @extend .ct-card; -} - -.pf-v5-c-modal-box__title-text { - white-space: break-spaces; -} - -#containers-images, #containers-containers { - // Decrease padding for the image/container toggle button list - .pf-v5-c-table.pf-m-compact .pf-v5-c-table__toggle { - padding-inline-start: 0; - } -} - -@media screen and (max-width: 768px) { - // Badges should not stretch in mobile mode - .pf-v5-c-table [data-label] > .pf-v5-c-badge { - justify-self: start; - } -} - -.container-block { - display: flex; - flex-direction: column; - word-break: break-all; -} - -.container-block small { - @include pf-v5-line-clamp("1"); - color: var(--pf-v5-global--Color--200); -} - -.container-name { - font-size: var(--pf-v5-global--FontSize--lg); - font-weight: 400; -} - -.containers-run-onbuildvarclaim input { - max-inline-size: 15em; -} - -.pf-v5-c-alert__description { - overflow-wrap: anywhere; -} - -.listing-action { - inline-size: 100%; - display: flex; - justify-content: space-around; -} - -.ct-badge-container-running, .ct-badge-pod-running { - background-color: var(--pf-v5-global--info-color--100); - color: white; -} - -.ct-badge-container-healthy { - background-color: var(--pf-v5-global--success-color--100); - color: white; -} - -.ct-badge-container-unhealthy { - background-color: var(--pf-v5-global--danger-color--100); - color: white; -} - -.ct-badge-toolbox { - background-color: var(--pf-v5-global--palette--purple-100); - color: var(--pf-v5-global--palette--purple-600); - - .pf-v5-theme-dark & { - background-color: var(--pf-v5-global--palette--purple-500); - color: white; - } -} - -.ct-badge-distrobox { - background-color: var(--pf-v5-global--palette--gold-100); - color: var(--pf-v5-global--palette--gold-600); - - .pf-v5-theme-dark & { - background-color: var(--pf-v5-global--palette--gold-500); - color: white; - } -} - -.green { - color: var(--pf-v5-global--success-color--100); -} - -.red { - color: var(--pf-v5-global--danger-color--100); -} - -// Hide the header nav from the expandable rows - this should be better done with JS but the current cockpit-listing-panel implementation does not support this variant -#containers-images .ct-listing-panel-head { - display: none; -} - -.ct-grey-text { - color: var(--pf-v5-global--Color--200); -} - -.content-action { - text-align: end; - white-space: nowrap !important; -} - -// Remove doubled-up padding and borders on nested tables in mobile -.ct-listing-panel-body .ct-table tr { - --pf-v5-c-table-tr--responsive--PaddingTop: 0; - --pf-v5-c-table-tr--responsive--PaddingRight: 0; - --pf-v5-c-table-tr--responsive--PaddingBottom: 0; - --pf-v5-c-table-tr--responsive--PaddingLeft: 0; -} - -@media (max-width: $pf-v5-global--breakpoint--md - 1) { - .show-only-when-wide { - display: none; - } -} - -@media (min-width: $pf-v5-global--breakpoint--md) { - .show-only-when-narrow { - display: none; - } - - // Add borders to no pod containers list and images list - .container-pod.pf-m-plain tbody, - .containers-images tbody { - border: var(--pf-v5-c-card--m-flat--BorderWidth) solid var(--pf-v5-c-card--m-flat--BorderColor); - } -} - -// Override table padding on mobile -@media (max-width: $pf-v5-global--breakpoint--md) { - .health-logs.pf-m-grid-md.pf-v5-c-table tr:where(.pf-v5-c-table__tr):not(.pf-v5-c-table__expandable-row) { - padding: 0; - } -} diff --git a/ui/cockpit-docker/src/index.html b/ui/cockpit-docker/src/index.html deleted file mode 100644 index a0d703f..0000000 --- a/ui/cockpit-docker/src/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - docker containers - - - - - - - - - - - - -
-
- - diff --git a/ui/cockpit-docker/src/index.js b/ui/cockpit-docker/src/index.js deleted file mode 100644 index 7d8bc18..0000000 --- a/ui/cockpit-docker/src/index.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of Cockpit. - * - * Copyright (C) 2017 Red Hat, Inc. - * - * Cockpit is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * Cockpit is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Cockpit; If not, see . - */ - -import "cockpit-dark-theme"; -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import 'patternfly/patternfly-5-cockpit.scss'; -import Application from './app.jsx'; -import './docker.scss'; - -document.addEventListener("DOMContentLoaded", function () { - const root = createRoot(document.getElementById('app')); - root.render(); -}); diff --git a/ui/cockpit-docker/src/rest.js b/ui/cockpit-docker/src/rest.js deleted file mode 100644 index 5f07c29..0000000 --- a/ui/cockpit-docker/src/rest.js +++ /dev/null @@ -1,100 +0,0 @@ -import cockpit from "cockpit"; -import { debug } from "./util.js"; - -function manage_error(reject, error, content) { - let content_o = {}; - if (content) { - try { - content_o = JSON.parse(content); - } catch { - content_o.message = content; - } - } - const c = { ...error, ...content_o }; - reject(c); -} - -// calls are async, so keep track of a call counter to associate a result with a call -let call_id = 0; - -function connect(address) { - /* This doesn't create a channel until a request */ - const http = cockpit.http(address, { superuser: null }); - const connection = {}; - - connection.monitor = function(options, callback, return_raw) { - return new Promise((resolve, reject) => { - let buffer = ""; - - http.request(options) - .stream(data => { - if (return_raw) - callback(data); - else { - buffer += data; - const chunks = buffer.split("\n"); - buffer = chunks.pop(); - - chunks.forEach(chunk => { - debug("monitor", chunk); - callback(JSON.parse(chunk)); - }); - } - }) - .catch((error, content) => { - manage_error(reject, error, content); - }) - .then(resolve); - }); - }; - - connection.call = function (options) { - const id = call_id++; - debug(`call ${id}:`, JSON.stringify(options)); - return new Promise((resolve, reject) => { - options = options || {}; - http.request(options) - .then(result => { - debug(`call ${id} result:`, JSON.stringify(result)); - resolve(result); - }) - .catch((error, content) => { - debug(`call ${id} error:`, JSON.stringify(error), "content", JSON.stringify(content)); - manage_error(reject, error, content); - }); - }); - }; - - connection.close = function () { - http.close(); - }; - - return connection; -} - -/* - * Connects to the docker service, performs a single call, and closes the - * connection. - */ -async function call (address, parameters) { - const connection = connect(address); - const result = await connection.call(parameters); - connection.close(); - // if (parameters.method === "GET") - // return result; - - // let p = {}; - // try { - // p = JSON.parse(result); - // } catch { - // p = result; - // } - // console.log("call", { method: parameters.method, path: parameters.path, parameters, result: p }); - - return result; -} - -export default { - connect, - call -}; diff --git a/ui/cockpit-docker/src/util.js b/ui/cockpit-docker/src/util.js deleted file mode 100644 index deff036..0000000 --- a/ui/cockpit-docker/src/util.js +++ /dev/null @@ -1,214 +0,0 @@ -import React, { useContext } from "react"; - -import cockpit from 'cockpit'; - -import { debounce } from 'throttle-debounce'; -import * as dfnlocales from 'date-fns/locale'; -import { formatRelative } from 'date-fns'; -const _ = cockpit.gettext; - -export const DockerInfoContext = React.createContext(); -export const useDockerInfo = () => useContext(DockerInfoContext); - -export const WithDockerInfo = ({ value, children }) => { - return ( - - {children} - - ); -}; - -// https://github.com/containers/podman/blob/main/libpod/define/containerstate.go -// "Restarting" comes from special handling of restart case in Application.updateContainer() -export const states = [_("Exited"), _("Paused"), _("Stopped"), _("Removing"), _("Configured"), _("Created"), _("Restart"), _("Running")]; - -export const fallbackRegistries = ["docker.io", "quay.io"]; - -export function debug(...args) { - if (window.debugging === "all" || window.debugging?.includes("docker")) - console.debug("docker", ...args); -} - -export function truncate_id(id) { - if (!id) { - return ""; - } - - if (id.indexOf(":") !== -1) - id = id.split(":")[1]; - - return id.substr(0, 12); -} - -export function localize_time(unix_timestamp) { - if (unix_timestamp === undefined || isNaN(unix_timestamp)) - return ""; - const locale = (cockpit.language == "en") ? dfnlocales.enUS : dfnlocales[cockpit.language.replace('_', '')]; - return formatRelative(unix_timestamp * 1000, Date.now(), { locale }); -} - -export function format_cpu_usage(stats) { - const cpu_usage = stats?.cpu_stats?.cpu_usage?.total_usage; - const system_cpu_usage = stats?.cpu_stats?.system_cpu_usage; - const precpu_usage = stats?.precpu_stats?.cpu_usage?.total_usage; - const precpu_system_cpu_usage = stats?.precpu_stats?.system_cpu_usage; - - if (cpu_usage === undefined || isNaN(cpu_usage)) - return ""; - - let cpu_percent = 0; - if (precpu_usage !== undefined && precpu_system_cpu_usage !== undefined) { - const cpu_delta = cpu_usage - precpu_usage; - const system_delta = system_cpu_usage - precpu_system_cpu_usage; - if (system_delta > 0 && cpu_delta > 0) - cpu_percent = (cpu_delta / system_delta) * stats.cpu_stats.online_cpus * 100; - } - - return [cpu_percent.toFixed(2) + "%", cpu_percent]; -} - -export function format_memory_and_limit(stats) { - const usage = stats?.memory_stats?.usage; - const limit = stats?.memory_stats?.limit; - - if (usage === undefined || isNaN(usage)) - return ""; - - let mtext = ""; - let unit; - let parts; - if (limit) { - parts = cockpit.format_bytes(limit, undefined, { separate: true }); - mtext = " / " + parts.join(" "); - unit = parts[1]; - } - - if (usage) { - parts = cockpit.format_bytes(usage, unit, { separate: true }); - if (mtext) - return [_(parts[0] + mtext), usage]; - else - return [_(parts.join(" ")), usage]; - } else { - return ["", -1]; - } -} - -/* - * The functions quote_cmdline and unquote_cmdline implement - * a simple shell-like quoting syntax. They are used when letting the - * user edit a sequence of words as a single string. - * - * When parsing, words are separated by whitespace. Single and double - * quotes can be used to protect a sequence of characters that - * contains whitespace or the other quote character. A backslash can - * be used to protect any character. Quotes can appear in the middle - * of a word. - */ - -export function quote_cmdline(words) { - words = words || []; - - if (typeof words === 'string') - words = words.split(' '); - - function is_whitespace(c) { - return c == ' '; - } - - function quote(word) { - let text = ""; - let quote_char = ""; - let i; - for (i = 0; i < word.length; i++) { - if (word[i] == '\\' || word[i] == quote_char) - text += '\\'; - else if (quote_char === "") { - if (word[i] == "'" || is_whitespace(word[i])) - quote_char = '"'; - else if (word[i] == '"') - quote_char = "'"; - } - text += word[i]; - } - - return quote_char + text + quote_char; - } - - return words.map(quote).join(' '); -} - -export function unquote_cmdline(text) { - const words = []; - let next; - - function is_whitespace(c) { - return c == ' '; - } - - function skip_whitespace() { - while (next < text.length && is_whitespace(text[next])) - next++; - } - - function parse_word() { - let word = ""; - let quote_char = null; - - while (next < text.length) { - if (text[next] == '\\') { - next++; - if (next < text.length) { - word += text[next]; - } - } else if (text[next] == quote_char) { - quote_char = null; - } else if (quote_char) { - word += text[next]; - } else if (text[next] == '"' || text[next] == "'") { - quote_char = text[next]; - } else if (is_whitespace(text[next])) { - break; - } else - word += text[next]; - next++; - } - return word; - } - - next = 0; - skip_whitespace(); - while (next < text.length) { - words.push(parse_word()); - skip_whitespace(); - } - - return words; -} - -export function image_name(image) { - return image.RepoTags.length > 0 ? image.RepoTags[0] : ":"; -} - -export function is_valid_container_name(name) { - return /^[a-zA-Z0-9][a-zA-Z0-9_\\.-]*$/.test(name); -} - -/* Clears a single field in validationFailed object. - * - * Arguments: - * - validationFailed (object): Object containing list of fields with validation error - * - key (string): Specified which field from validationFailed object is clear - * - onValidationChange (func) - */ -export const validationClear = (validationFailed, key, onValidationChange) => { - if (!validationFailed) - return; - - const delta = { ...validationFailed }; - delete delta[key]; - onValidationChange(delta); -}; - -// This method needs to be outside of component as re-render would create a new instance of debounce -export const validationDebounce = debounce(500, (validationHandler) => validationHandler()); diff --git a/ui/cockpit-docker/test/browser/browser.sh b/ui/cockpit-docker/test/browser/browser.sh deleted file mode 100755 index b612914..0000000 --- a/ui/cockpit-docker/test/browser/browser.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -set -eux -cd "${0%/*}/../.." - -# HACK: ensure that critical components are up to date: https://github.com/psss/tmt/issues/682 -dnf update -y docker crun conmon criu - -# if we run during cross-project testing against our main-builds COPR, then let that win -# even if Fedora has a newer revision -main_builds_repo="$(ls /etc/yum.repos.d/*cockpit*main-builds* 2>/dev/null || true)" -if [ -n "$main_builds_repo" ]; then - echo 'priority=0' >> "$main_builds_repo" - dnf distro-sync -y --repo 'copr*' cockpit-docker -fi - -# Show critical package versions -rpm -q runc crun docker criu passt kernel-core selinux-policy cockpit-docker cockpit-bridge || true - -# Show network information, for pasta debugging -ip address show -ip -4 route show -ip -6 route show - -# allow test to set up things on the machine -mkdir -p /root/.ssh -curl https://raw.githubusercontent.com/cockpit-project/bots/main/machine/identity.pub >> /root/.ssh/authorized_keys -chmod 600 /root/.ssh/authorized_keys - -# create user account for logging in -if ! id admin 2>/dev/null; then - useradd -c Administrator -G wheel admin - echo admin:foobar | chpasswd -fi - -# set root's password -echo root:foobar | chpasswd - -# avoid sudo lecture during tests -su -c 'echo foobar | sudo --stdin whoami' - admin - -# disable core dumps, we rather investigate them upstream where test VMs are accessible -echo core > /proc/sys/kernel/core_pattern - -# grab a few images to play with; tests run offline, so they cannot download images -docker rmi --all - -# set up our expected images, in the same way that we do for upstream CI -# this sometimes runs into network issues, so retry a few times -for retry in $(seq 5); do - if curl https://raw.githubusercontent.com/cockpit-project/bots/main/images/scripts/lib/podman-images.setup | sh -eux; then - break - fi - sleep $((5 * retry * retry)) -done - -CONTAINER="$(cat .cockpit-ci/container)" - -# import the test CONTAINER image as a directory tree for nspawn -mkdir /var/tmp/tasks -podman export "$(podman create --name tasks-import $CONTAINER)" | tar -x -C /var/tmp/tasks -podman rm tasks-import -podman rmi $CONTAINER - -# image setup, shared with upstream tests -sh -x test/vm.install - -systemctl enable --now cockpit.socket docker.socket - -# Run tests in the cockpit tasks container, as unprivileged user -# Use nspawn to avoid the tests killing the tasks container itself -chown -R 1111:1111 "${TMT_TEST_DATA}" . - -SYSTEMD_SECCOMP=0 systemd-nspawn \ - -D /var/tmp/tasks/ \ - --ephemeral \ - --user user \ - --setenv=TEST_AUDIT_NO_SELINUX="${TEST_AUDIT_NO_SELINUX:-}" \ - --bind="${TMT_TEST_DATA}":/logs --setenv=LOGS=/logs \ - --bind="$(pwd)":/source --setenv=SOURCE=/source \ - --bind-ro=/usr/lib/os-release:/run/host/usr/lib/os-release \ - sh /source/test/browser/run-test.sh "$@" diff --git a/ui/cockpit-docker/test/browser/main.fmf b/ui/cockpit-docker/test/browser/main.fmf deleted file mode 100644 index 8d12fe4..0000000 --- a/ui/cockpit-docker/test/browser/main.fmf +++ /dev/null @@ -1,20 +0,0 @@ -require: - - cockpit-docker - - cockpit-ws - - cockpit-system - - criu - # HACK: https://bugzilla.redhat.com/show_bug.cgi?id=2269485 - - slirp4netns -duration: 30m - -/system: - test: ./browser.sh system - summary: Run *System tests - -/user: - test: ./browser.sh user - summary: Run *User tests - -/other: - test: ./browser.sh other - summary: Run all other tests diff --git a/ui/cockpit-docker/test/browser/run-test.sh b/ui/cockpit-docker/test/browser/run-test.sh deleted file mode 100644 index fe794b2..0000000 --- a/ui/cockpit-docker/test/browser/run-test.sh +++ /dev/null @@ -1,54 +0,0 @@ -set -eux - -PLAN="$1" - -cd "${SOURCE}" - -# tests need cockpit's bots/ libraries and test infrastructure -rm -f bots # common local case: existing bots symlink -make bots test/common - -if [ -e .git ]; then - tools/node-modules checkout - # disable detection of affected tests; testing takes too long as there is no parallelization - mv .git dot-git -else - # upstream tarballs ship test dependencies; print version for debugging - grep '"version"' node_modules/chrome-remote-interface/package.json -fi - -. /run/host/usr/lib/os-release -export TEST_OS="${ID}-${VERSION_ID/./-}" - -if [ "$TEST_OS" = "centos-8" ] || [ "$TEST_OS" = "centos-9" ]; then - TEST_OS="${TEST_OS}-stream" -fi - -# Chromium sometimes gets OOM killed on testing farm -export TEST_BROWSER=firefox - -# select subset of tests according to plan -TESTS="$(test/common/run-tests -l)" -case "$PLAN" in - system) TESTS="$(echo "$TESTS" | grep 'System$')" ;; - user) TESTS="$(echo "$TESTS" | grep 'User$')" ;; - other) TESTS="$(echo "$TESTS" | grep -vE '(System|User)$')" ;; - *) echo "Unknown test plan: $PLAN" >&2; exit 1 ;; -esac - -EXCLUDES="" - -# make it easy to check in logs -echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}" -echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}" - -RC=0 -./test/common/run-tests \ - --nondestructive \ - --machine localhost:22 \ - --browser localhost:9090 \ - $TESTS \ - $EXCLUDES \ -|| RC=$? -cp --verbose Test* "$LOGS" || true -exit $RC diff --git a/ui/cockpit-docker/test/check-application b/ui/cockpit-docker/test/check-application deleted file mode 100755 index 9525ab0..0000000 --- a/ui/cockpit-docker/test/check-application +++ /dev/null @@ -1,2714 +0,0 @@ -#!/usr/bin/python3 -cimport os, sys; os.execv(os.path.dirname(sys.argv[1]) + "/common/pywrap", sys.argv) -# Run this with --help to see available options for tracing and debugging -# See https://github.com/cockpit-project/cockpit/blob/main/test/common/testlib.py -# "class Browser" and "class MachineCase" for the available API. - -import os -import sys -import time - -import testlib -from machine.machine_core import ssh_connection - -REGISTRIES_CONF = """ -[registries.search] -registries = ['localhost:5000', 'localhost:6000'] - -[registries.insecure] -registries = ['localhost:5000', 'localhost:6000'] -""" - -NOT_RUNNING = ["Exited", "Stopped"] - -# image names used in tests -IMG_ALPINE = "localhost/test-alpine" -IMG_ALPINE_LATEST = IMG_ALPINE + ":latest" -IMG_BUSYBOX = "localhost/test-busybox" -IMG_BUSYBOX_LATEST = IMG_BUSYBOX + ":latest" -IMG_REGISTRY = "localhost/test-registry" -IMG_REGISTRY_LATEST = IMG_REGISTRY + ":latest" - - -def docker_version(cls): - version = cls.execute(False, "docker -v").strip().split(' ')[-1] - # HACK: handle possible rc versions such as 4.4.0-rc2 - return tuple(int(v.split('-')[0]) for v in version.split('.')) - - -def showImages(browser): - if browser.attr("#containers-images button.pf-v5-c-expandable-section__toggle", "aria-expanded") == 'false': - browser.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - -def checkImage(browser, name, owner): - showImages(browser) - browser.wait_visible("#containers-images table") - browser.wait_js_func("""(function (first, last) { - let items = ph_select("#containers-images table tbody"); - for (i = 0; i < items.length; i++) - if (items[i].innerText.trim().startsWith(first) && items[i].innerText.trim().includes(last)) - return true; - return false; - })""", name, owner) - - -@testlib.nondestructive -class TestApplication(testlib.MachineCase): - - def setUp(self): - super().setUp() - m = self.machine - m.execute(""" - systemctl stop docker.service; systemctl stop containerd.service; systemctl --now enable docker.socket - # Ensure docker is really stopped, otherwise it keeps the containers/ directory busy - pkill -e -9 docker || true - while pgrep docker; do sleep 0.1; done - pkill -e -9 containerd || true - while pgrep containerd; do sleep 0.1; done - findmnt --list -otarget | grep /var/lib/docker/. | xargs -r umount - sync - """) - - # backup/restore pristine docker state, so that tests can run on existing testbeds - self.restore_dir("/var/lib/docker") - - # HACK: sometimes docker leaks mounts - self.addCleanup(m.execute, """ - systemctl stop docker.service containerd.service docker.socket - - systemctl reset-failed docker.service docker.socket - docker system reset --force - pkill -e -9 docker || true - while pgrep docker; do sleep 0.1; done - pkill -e -9 containerd || true - while pgrep containerd; do sleep 0.1; done - - # HACK: sometimes docker leaks mounts - findmnt --list -otarget | grep /var/lib/docker/. | xargs -r umount - sync - """) - - # Create admin session - m.execute(""" - if [ ! -d /home/admin/.ssh ]; then - mkdir /home/admin/.ssh - cp /root/.ssh/* /home/admin/.ssh - chown -R admin:admin /home/admin/.ssh - chmod -R go-wx /home/admin/.ssh - fi - """) - self.admin_s = ssh_connection.SSHConnection(user="admin", - address=m.ssh_address, - ssh_port=m.ssh_port, - identity_file=m.identity_file) - - # HACK: system reset has 10s timeout, make that faster with an extra `stop` - # https://github.com/containers/podman/issues/21874 - # Ubuntu 22.04 has old podman that does not know about rm --time - if m.image == 'ubuntu-2204': - self.addCleanup(self.admin_s.execute, "docker rm --force --all", timeout=300) - self.addCleanup(self.admin_s.execute, "docker pod rm --force --all", timeout=300) - else: - self.addCleanup(self.admin_s.execute, "docker rm --force --time 0 --all") - self.addCleanup(self.admin_s.execute, "docker pod rm --force --time 0 --all") - - # But disable it globally so that "systemctl --user disable" does what we expect - m.execute("systemctl --global disable docker.socket") - - self.allow_journal_messages("/run.*/docker/docker: couldn't connect.*") - self.allow_journal_messages(".*/run.*/docker/docker.*Connection reset by peer") - - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008249 - self.has_criu = "debian" not in m.image and "ubuntu" not in m.image - self.has_selinux = "arch" not in m.image and "debian" not in m.image and "ubuntu" not in m.image - self.has_cgroupsV2 = m.image not in ["centos-8-stream"] and not m.image.startswith('rhel-8') - - self.system_images_count = int(self.execute(True, "docker images -n | wc -l").strip()) - self.user_images_count = int(self.execute(False, "docker images -n | wc -l").strip()) - - # allow console.error - self.allow_browser_errors( - ".*couldn't search registry \".*\": pinging container registry .*", - ".*Error occurred while connecting console: cannot resize session: cannot resize container.*", - ) - - def tearDown(self): - if self.getError(): - # dump container logs for debugging - for auth in [False, True]: - print(f"----- {'system' if auth else 'user'} containers -----", file=sys.stderr) - self.execute(auth, "docker ps -a >&2") - self.execute(auth, 'for c in $(docker ps -aq); do echo "---- $c ----" >&2; docker logs $c >&2; done') - - super().tearDown() - - def getRestartPolicy(self, auth, container_name): - cmd = f"docker inspect --format '{{{{.HostConfig.RestartPolicy}}}}' {container_name}" - return self.execute(auth, cmd).strip() - - def waitNumImages(self, expected): - self.browser.wait_js_func("ph_count_check", "#containers-images table[aria-label='Images'] > tbody", expected) - - def waitNumContainers(self, expected, auth): - if auth and self.machine.ostree_image: - extra = 1 # cockpit/ws - else: - extra = 0 - - self.browser.wait_js_func("ph_count_check", "#containers-containers tbody", expected + extra) - - def performContainerAction(self, container, cmd): - b = self.browser - b.click(f"#containers-containers tbody tr:contains('{container}') .pf-v5-c-menu-toggle") - b.click(f"#containers-containers tbody tr:contains('{container}') button.pf-v5-c-menu__item:contains({cmd})") - - def getContainerAction(self, container, cmd): - return f"#containers-containers tbody tr:contains('{container}') button.pf-v5-c-menu__item:contains({cmd})" - - def toggleExpandedContainer(self, container): - b = self.browser - b.click(f"#containers-containers tbody tr:contains('{container}') .pf-v5-c-table__toggle button") - - def getContainerAttr(self, container, key, selector=""): - b = self.browser - return b.text(f"#containers-containers tbody tr:contains('{container}') > td[data-label={key}] {selector}") - - def execute(self, system, cmd): - if system: - return self.machine.execute(cmd) - else: - return self.admin_s.execute(cmd) - - def login(self, system=True): - # HACK: The first rootless call often gets stuck or fails - # In such case we have alert banner to start the service (or just empty state) - # A real user would just hit the button so lets do the same as this is always getting - # back to us and we waste too much time reporting to docker with mixed results. - # Examples: - # https://github.com/containers/docker/issues/8762 - # https://github.com/containers/docker/issues/9251 - # https://github.com/containers/docker/issues/6660 - - b = self.browser - - self.login_and_go("/docker", superuser=system) - b.wait_visible("#app") - - with self.browser.wait_timeout(30): - try: - b.wait_not_in_text("#containers-containers", "Loading") - b.wait_not_present("#overview div.pf-v5-c-alert") - except testlib.Error: - if system: - b.click("#overview div.pf-v5-c-alert .pf-v5-c-alert__action > button:contains(Start)") - b.wait_not_present("#overview div.pf-v5-c-alert") - else: - b.click("#app .pf-v5-c-empty-state button.pf-m-primary") - b.wait_not_present("#app .pf-v5-c-empty-state button") - - def waitPodRow(self, podName, present=False): - if present: - self.browser.wait_visible("#table-" + podName) - else: - self.browser.wait_not_present("#table-" + podName) - - def waitPodContainer(self, podName, containerList, system=True): - if len(containerList): - for container in containerList: - self.waitContainer(container["id"], system, name=container["name"], image=container["image"], - cmd=container["command"], state=container["state"], pod=podName) - else: - if self.browser.val("#containers-containers-filter") == "all": - self.browser.wait_in_text("#table-" + podName + " .pf-v5-c-empty-state", "No containers in this pod") - else: - self.browser.wait_in_text("#table-" + podName + " .pf-v5-c-empty-state", - "No running containers in this pod") - - def waitContainerRow(self, container, present=True): - b = self.browser - if present: - b.wait_visible(f'#containers-containers td[data-label="Container"]:contains("{container}")') - else: - b.wait_not_present(f'#containers-containers td[data-label="Container"]:contains("{container}")') - - def performPodAction(self, podName, podOwner, action): - b = self.browser - - b.click(f"#pod-{podName}-{podOwner}-action-toggle") - b.click(f"ul.pf-v5-c-menu__list li > button.pod-action-{action.lower()}") - b.wait_not_present("ul.pf-v5-c-menu__list") - - def getStartTime(self, container: str, *, auth: bool) -> str: - # don't format the raw time strings from the API, force json format - out = self.execute(auth, "docker inspect --format '{{json .State.StartedAt}}' " + container) - return out.strip().replace('"', '') - - def waitRestart(self, container: str, old_start: str, *, auth: bool) -> int: - for _ in range(10): - new_start = self.getStartTime(container, auth=auth) - if new_start > old_start: - return new_start - time.sleep(1) - else: - self.fail("Timed out waiting for StartedAt change") - - # def testPods(self): - # b = self.browser - - # self.login() - - # self.filter_containers("running") - # if not self.machine.ostree_image: - # b.wait_in_text("#containers-containers", "No running containers") - - # # Run a pods as system - # self.machine.execute("docker pod create --infra=false --name pod-1") - - # self.waitPodRow("pod-1", False) - # self.filter_containers("all") - # self.waitPodContainer("pod-1", []) - - # def get_pod_cpu_usage(pod_name): - # cpu = self.browser.text(f"#table-{pod_name}-title .pod-cpu") - # self.assertIn('%', cpu) - # return float(cpu[:-1]) - - # def get_pod_memory(pod_name): - # memory = self.browser.text(f"#table-{pod_name}-title .pod-memory") - # try: - # value, unit = memory.split(' ') - # self.assertIn(unit, ["GB", "MB", "kB", "B"]) - # return float(value) - # except ValueError: - # # no unit → only for 0 or not initialized yet - # self.assertIn(memory, ["0", ""]) - # return 0 - - # run_cmd = f"docker run -d --pod pod-1 --name test-pod-1-system --stop-timeout 0 {IMG_ALPINE} sleep 100" - # containerId = self.machine.execute(run_cmd).strip() - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": "Running", "id": containerId}]) - # cpu = get_pod_cpu_usage("pod-1") - # b.wait(lambda: get_pod_memory("pod-1") > 0) - - # # Test that cpu usage increases - # self.machine.execute("docker exec -di test-pod-1-system sh -c 'dd bs=1024 < /dev/urandom > /dev/null'") - # b.wait(lambda: get_pod_cpu_usage("pod-1") > cpu) - - # self.machine.execute("docker pod stop -t0 pod-1") # disable timeout, so test doesn't wait endlessly - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) - # self.filter_containers("running") - # self.waitPodRow("pod-1", False) - - # self.filter_containers("all") - # b.set_input_text('#containers-filter', 'pod-1') - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) - # b.set_input_text('#containers-filter', 'test-pod-1-system') - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) - # # TODO add pixel test when this is again reachable - https://github.com/cockpit-project/bots/issues/2463 - - # # Check Pod Actions - # self.performPodAction("pod-1", "system", "Start") - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": "Running", "id": containerId}]) - - # self.performPodAction("pod-1", "system", "Pause") - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": "Paused", "id": containerId}]) - - # self.performPodAction("pod-1", "system", "Unpause") - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": "Running", "id": containerId}]) - - # self.performPodAction("pod-1", "system", "Stop") - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": NOT_RUNNING, "id": containerId}]) - - # self.machine.execute("docker pod start pod-1") - # self.waitPodContainer("pod-1", [{"name": "test-pod-1-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": "Running", "id": containerId}]) - - # old_start = self.getStartTime("test-pod-1-system", auth=True) - # self.performPodAction("pod-1", "system", "Restart") - # self.waitRestart("test-pod-1-system", old_start, auth=True) - - # self.performPodAction("pod-1", "system", "Delete") - # b.click(".pf-v5-c-modal-box button:contains(Delete)") - # # Alert should be shown, that running pods need to be force deleted. - # b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-list", "test-pod-1-system") - # b.click(".pf-v5-c-modal-box button:contains('Force delete')") - # self.waitPodRow("pod-1", False) - - # HACK: there is some race here which steals the focus from the filter input and selects the page text instead - # for _ in range(3): - # b.focus('#containers-filter') - # time.sleep(1) - # if b.eval_js('document.activeElement == document.querySelector("#containers-filter")'): - # break - # b.set_input_text('#containers-filter', '') - # self.machine.execute("podman pod create --infra=false --name pod-2") - # self.waitPodContainer("pod-2", []) - # run_cmd = f"podman run -d --pod pod-2 --name test-pod-2-system --stop-timeout 0 {IMG_ALPINE} sleep 100" - # containerId = self.machine.execute(run_cmd).strip() - # self.waitPodContainer("pod-2", [{"name": "test-pod-2-system", "image": IMG_ALPINE, - # "command": "sleep 100", "state": "Running", "id": containerId}]) - # self.machine.execute("podman rm --force -t0 test-pod-2-system") - # self.waitPodContainer("pod-2", []) - # self.performPodAction("pod-2", "system", "Delete") - # b.wait_not_in_text(".pf-v5-c-modal-box__body", "test-pod-2-system") - # b.click(".pf-v5-c-modal-box button:contains('Delete')") - # self.waitPodRow("pod-2", False) - - # # Volumes / mounts - # self.machine.execute("docker pod create -p 9999:9999 -v /tmp:/app --name pod-3") - # self.machine.execute("docker pod start pod-3") - - # self.waitPodContainer("pod-3", []) - # # Verify 1 port mapping - # b.wait_in_text("#table-pod-3-title .pod-details-ports-btn", "1") - # b.click("#table-pod-3-title .pod-details-ports-btn") - # b.wait_in_text(".pf-v5-c-popover__content", "0.0.0.0:9999 → 9999/tcp") - # # Verify 1 mount - # b.wait_in_text("#table-pod-3-title .pod-details-volumes-btn", "1") - # b.click("#table-pod-3-title .pod-details-volumes-btn") - # b.wait_in_text(".pf-v5-c-popover__content", "/tmp ↔ /app") - - def testBasicSystem(self): - self._testBasic(True) - - b = self.browser - - # Test dropping and gaining privileges - b.set_val("#containers-containers-owner", "all") - self.filter_containers("all") - self.execute(False, "docker pod create --infra=false --name pod_user") - self.execute(True, "docker pod create --infra=false --name pod_system") - - checkImage(b, IMG_REGISTRY, "system") - checkImage(b, IMG_REGISTRY, "admin") - b.wait_visible("#containers-containers .pod-name:contains('pod_user')") - b.wait_visible("#containers-containers .pod-name:contains('pod_system')") - b.wait_visible("#containers-containers .container-name:contains('a')") - b.wait_visible("#containers-containers .container-name:contains('b')") - - # Drop privileges - all system things should disappear - b.drop_superuser() - b.wait_not_present("#containers-containers .pod-name:contains('pod_system')") - b.wait_not_present("#containers-containers .container-name:contains('a')") - b.wait_visible("#containers-containers .pod-name:contains('pod_user')") - b.wait_visible("#containers-containers .container-name:contains('b')") - # Checking images is harder but if there would be more than one this would fail - b.wait_visible(f"#containers-images:contains('{IMG_REGISTRY}')") - - # Owner select should disappear - b.wait_not_present("#containers-containers-owner") - - # Also user selection in image download should not be visible - b.click("#image-actions-dropdown") - b.click("button:contains(Download new image)") - - b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') - b.wait_visible("div.pf-v5-c-modal-box footer button:contains(Download):disabled") - b.wait_not_present("#as-user") - b.click(".pf-v5-c-modal-box button:contains('Cancel')") - b.wait_not_present('div.pf-v5-c-modal-box header:contains("Search for an image")') - - # Gain privileges - b.become_superuser(passwordless=self.machine.image == "rhel4edge") - - # We are notified that we can also start the system one - b.wait_in_text("#overview div.pf-v5-c-alert .pf-v5-c-alert__title", "Docker service is available") - b.click("#overview div.pf-v5-c-alert .pf-v5-c-alert__action > button:contains(Start)") - b.wait_not_present("#overview div.pf-v5-c-alert .pf-v5-c-alert__title") - - checkImage(b, IMG_REGISTRY, "system") - checkImage(b, IMG_REGISTRY, "admin") - b.wait_visible("#containers-containers .pod-name:contains('pod_user')") - b.wait_visible("#containers-containers .pod-name:contains('pod_system')") - b.wait_visible("#containers-containers .container-name:contains('a')") - b.wait_visible("#containers-containers .container-name:contains('b')") - - # Owner select should appear - b.wait_visible("#containers-containers-owner") - - # Also user selection in image download should be visible - b.click("#image-actions-dropdown") - b.click("button:contains(Download new image)") - b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') - b.wait_visible("div.pf-v5-c-modal-box footer button:contains(Download):disabled") - b.wait_visible("#as-user") - b.click(".pf-v5-c-modal-box button:contains('Cancel')") - b.wait_not_present('div.pf-v5-c-modal-box header:contains("Search for an image")') - - # Check that when we filter only system stuff an then drop privileges that we show user stuff - b.set_val("#containers-containers-owner", "system") - b.wait_not_present("#containers-containers .pod-name:contains('pod_user')") - b.wait_not_present("#containers-containers .container-name:contains('b')") - # Checking images is harder but if there would be more than one this would fail - b.wait_visible(f"#containers-images:contains('{IMG_REGISTRY}')") - - b.drop_superuser() - b.wait_visible("#containers-containers .pod-name:contains('pod_user')") - b.wait_visible("#containers-containers .container-name:contains('b')") - # Checking images is harder but if there would be more than one this would fail - b.wait_visible(f"#containers-images:contains('{IMG_REGISTRY}')") - - # Check showing of entrypoint - b.click("#containers-containers-create-container-btn") - b.click("#create-image-image-select-typeahead") - b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_REGISTRY}")') - b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yml') - b.wait_text("#run-image-dialog-entrypoint", '/entrypoint.sh') - - # Deleting image will cleanup both command and entrypoint - b.click("button.pf-v5-c-select__toggle-clear") - b.wait_val("#run-image-dialog-command", '') - b.wait_not_present("#run-image-dialog-entrypoint") - - # Edited command will not be cleared - b.click("#create-image-image-select-typeahead") - b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_REGISTRY}")') - b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yml') - b.set_input_text("#run-image-dialog-command", '/etc/docker/registry/config.yaml') - b.click("button.pf-v5-c-select__toggle-clear") - b.wait_not_present("#run-image-dialog-entrypoint") - b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yaml') - - # Setting a new image will still keep the old command and not prefill it - b.click("#create-image-image-select-typeahead") - b.click(f'button.pf-v5-c-select__menu-item:contains({IMG_ALPINE})') - b.wait_visible("#run-image-dialog-pull-latest-image") - b.wait_val("#run-image-dialog-command", '/etc/docker/registry/config.yaml') - - b.logout() - - if self.machine.ostree_image: - self.machine.execute("echo foobar | passwd --stdin root") - self.write_file("/etc/ssh/sshd_config.d/99-root-password.conf", "PermitRootLogin yes", - post_restore_action="systemctl try-restart sshd") - self.machine.execute("systemctl try-restart sshd") - - # Test that when root is logged in we don't present "user" and "system" - self.login_and_go("/docker", user="root", enable_root_login=True) - b.wait_visible("#app") - - # `User Service is also available` banner should not be present - b.wait_not_present("#overview div.pf-v5-c-alert") - # There should not be any duplicate images listed - # The "busybox" and "alpine" images have been deleted by _testBasic. - showImages(b) - self.waitNumImages(self.system_images_count - 2) - # There should not be 'owner' selector - b.wait_not_present("#containers-containers-owner") - - # Test the isSystem boolean for searching - # https://github.com/cockpit-project/cockpit-podman/pull/891 - b.click("#containers-containers-create-container-btn") - b.set_input_text("#create-image-image-select-typeahead", "registry") - b.wait_visible('button.pf-v5-c-select__menu-item:contains("registry")') - - def testBasicUser(self): - self._testBasic(False) - - def _testBasic(self, auth): - b = self.browser - - def clickDeleteImage(image_sel): - b.click(f'{image_sel} .pf-v5-c-menu-toggle') - b.click(image_sel + " button.btn-delete") - - if not auth: - self.allow_browser_errors("Failed to start system docker.socket.*") - - expected_ws = "" - if auth and self.machine.ostree_image: - expected_ws += "ws" - - self.login(auth) - - # Check all containers - if auth: - checkImage(b, IMG_ALPINE, "system") - checkImage(b, IMG_BUSYBOX, "system") - checkImage(b, IMG_REGISTRY, "system") - - checkImage(b, IMG_ALPINE, "admin") - checkImage(b, IMG_BUSYBOX, "admin") - checkImage(b, IMG_REGISTRY, "admin") - - # Check order of images - text = b.text("#containers-images table") - if auth: - # all user images before all system images - self.assertRegex(text, ".*admin.*system.*") - self.assertNotRegex(text, ".*system.*admin.*") - else: - self.assertNotIn("system", text) - # images are sorted alphabetically - self.assertRegex(text, ".*/test-alpine.*/test-busybox.*/test-registry") - - # build a dummy image so that the timestamp is "today" (for predictable pixel tests) - # ensure that CMD neither comes first (docker rmi leaves that layer otherwise) - # nor last (then the topmost layer does not match the image ID) - IMG_HELLO_LATEST = "localhost/test-hello:latest" - self.machine.execute(f"""set -eu; D={self.vm_tmpdir}/hello; - mkdir $D - printf 'FROM scratch\\nCOPY test.txt /\\nCMD ["/run.sh"]\\nCOPY test.txt /test2.txt\\n' > $D/Containerfile - echo hello > $D/test.txt""") - self.execute(auth, f"docker build -t {IMG_HELLO_LATEST} {self.vm_tmpdir}/hello") - - # prepare image ids - much easier to pick a specific container - images = {} - for image in self.execute(auth, "docker images --noheading --no-trunc").strip().split("\n"): - # sha256: - items = image.split() - images[f"{items[0]}:{items[1]}"] = items[2].split(":")[-1] - - # show image listing toggle - hello_sel = f"#containers-images tbody tr[data-row-id=\"{images[IMG_HELLO_LATEST]}{auth}\"]".lower() - b.wait_visible(hello_sel) - b.click(hello_sel + " td.pf-v5-c-table__toggle button") - b.click(hello_sel + " .pf-v5-c-menu-toggle") - b.wait_visible(hello_sel + " button.btn-delete") - b.wait_in_text("#containers-images tbody.pf-m-expanded tr .image-details:first-child", "Command/run.sh") - # Show history - b.click("#containers-images tbody.pf-m-expanded .pf-v5-c-tabs__list li:nth-child(2) button") - first_row_sel = "#containers-images .pf-v5-c-table__expandable-row.pf-m-expanded tbody:first-of-type" - b.wait_in_text(f"{first_row_sel} td[data-label=\"ID\"]", - images[IMG_HELLO_LATEST][:12]) - created_sel = f"{first_row_sel} td[data-label=\"Created\"]" - b.wait_in_text(f"{created_sel}", "today at") - # topmost (last) layer - created_sel = f"{first_row_sel} td[data-label=\"Created by\"]" - b.wait_in_text(f"{created_sel}", "COPY") - b.wait_in_text(f"{created_sel}", "in /test2.txt") - # initial (first) layer - last_row_sel = "#containers-images .pf-v5-c-table__expandable-row.pf-m-expanded tbody:last-of-type" - b.wait_in_text(f"{last_row_sel} td[data-label=\"Created by\"]", "COPY") - - self.execute(auth, f"docker rmi {IMG_HELLO_LATEST}") - b.wait_not_present(hello_sel) - - # make sure no running containers shown; on CoreOS there's the cockpit/ws container - self.filter_containers('running') - if auth and self.machine.ostree_image: - self.waitContainerRow("ws") - else: - b.wait_in_text("#containers-containers", "No running containers") - - if auth: - # Run two containers as system (first exits immediately) - self.execute(auth, f"docker run -d --name test-sh-system --stop-timeout 0 {IMG_ALPINE} sh") - self.execute(auth, f"docker run -d --name swamped-crate-system --stop-timeout 0 {IMG_BUSYBOX} sleep 1000") - - # Test owner filtering - if auth: - self.waitNumImages(self.user_images_count + self.system_images_count) - self.waitNumContainers(2, True) - - def verify_system(): - self.waitNumImages(self.system_images_count) - b.wait_in_text("#containers-images", "system") - self.waitNumContainers(1, True) - b.wait_in_text("#containers-containers", "system") - - b.set_val("#containers-containers-owner", "system") - verify_system() - b.set_val("#containers-containers-owner", "all") - b.go("#/?owner=system") - verify_system() - - def verify_user(): - self.waitNumImages(self.user_images_count) - b.wait_in_text("#containers-images", "admin") - self.waitNumContainers(1, False) - b.wait_in_text("#containers-containers", "admin") - - b.set_val("#containers-containers-owner", "user") - verify_user() - b.set_val("#containers-containers-owner", "all") - b.go("#/?owner=user") - verify_user() - - b.set_val("#containers-containers-owner", "all") - self.waitNumImages(self.user_images_count + self.system_images_count) - self.waitNumContainers(2, True) - else: # No 'owner' selector when not privileged - b.wait_not_present("#containers-containers-owner") - - system_containers = {} - for container in self.execute(True, "docker ps --all --no-trunc").strip().split("\n")[1:]: - # - items = container.split() - system_containers[items[-1]] = items[0] - # running busybox shown - if auth: - self.waitContainerRow("swamped-crate-system") - self.waitContainer(system_containers["swamped-crate-system"], True, name='swamped-crate-system', - image=IMG_BUSYBOX, cmd="sleep 1000", state='Running') - - # exited alpine not shown - b.wait_not_in_text("#containers-containers", "alpine") - - # show all containers and check status - b.go("#/?container=all") - - # exited alpine under everything list - b.wait_visible("#containers-containers") - if auth: - self.waitContainer(system_containers["test-sh-system"], True, name='test-sh-system', image=IMG_ALPINE, - cmd='sh', state=NOT_RUNNING) - - if auth: - self.performContainerAction("swamped-crate-system", "Delete") - self.confirm_modal("Cancel") - - # Checked order of containers - expected = ["swamped-crate-user"] - if auth: - expected.extend(["swamped-crate-system", "test-sh-system"]) - expected.extend([expected_ws]) - b.wait_collected_text("#containers-containers .container-name", ''.join(sorted(expected))) - - # show running container - self.filter_containers('running') - if auth: - self.waitContainer(system_containers["swamped-crate-system"], True, name='swamped-crate-system', - image=IMG_BUSYBOX, cmd="sleep 1000", state='Running') - # check exited alpine not in running list - b.wait_not_in_text("#containers-containers", "alpine") - - # delete running container busybox using force delete - if auth: - self.performContainerAction("swamped-crate-system", "Delete") - self.confirm_modal("Force delete") - self.waitContainerRow("swamped-crate-system", False) - - self.filter_containers("all") - - if auth: - self.waitContainerRow("test-sh-system") - self.performContainerAction("test-sh-system", "Delete") - self.confirm_modal("Delete") - b.wait_not_in_text("#containers-containers", "test-sh-system") - - # delete image busybox that hasn't been used - # First try to just untag and then remove with more tags - self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:1") - self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:2") - self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:3") - self.execute(auth, f"docker tag {IMG_BUSYBOX} {IMG_BUSYBOX}:4") - - busybox_sel = f"#containers-images tbody tr[data-row-id=\"{images[IMG_BUSYBOX_LATEST]}{auth}\"]".lower() - b.click(busybox_sel + " td.pf-v5-c-table__toggle button") - - b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:1") - b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:2") - b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:3") - b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:4") - - clickDeleteImage(busybox_sel) - self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX_LATEST}']")) - b.set_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:1']", True) - b.set_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:3']", True) - b.set_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX_LATEST}']", False) - self.confirm_modal("Delete") - b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX_LATEST}") - b.wait_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:2") - b.wait_not_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:1") - b.wait_not_in_text(busybox_sel + " + tr", f"{IMG_BUSYBOX}:3") - - clickDeleteImage(busybox_sel) - b.click("#delete-all") - self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX_LATEST}']")) - self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:2']")) - self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{IMG_BUSYBOX}:4']")) - self.confirm_modal("Delete") - self.confirm_modal("Force delete") - b.wait_not_present(busybox_sel) - - # Check that we correctly show networking information - # Rootless don't have this info - if auth: - self.execute(auth, f"docker run -dt --name net_check --stop-timeout 0 {IMG_ALPINE}") - self.toggleExpandedContainer("net_check") - b.wait_in_text(".pf-m-expanded .container-details-networking", - self.execute(auth, """ - docker inspect --format '{{.NetworkSettings.Gateway}}' net_check""").strip()) - b.wait_in_text(".pf-m-expanded .container-details-networking", - self.execute(auth, """ - docker inspect --format '{{.NetworkSettings.IPAddress}}' net_check""").strip()) - b.wait_in_text(".pf-m-expanded .container-details-networking", - self.execute(auth, """ - docker inspect --format '{{.NetworkSettings.MacAddress}}' net_check""").strip()) - self.execute(auth, "docker stop net_check") - b.wait(lambda: self.execute(True, "docker ps --all | grep -e net_check -e Exited")) - self.toggleExpandedContainer("net_check") - sha = self.execute(auth, "docker inspect --format '{{.Id}}' net_check").strip() - self.waitContainer(sha, auth, state='Exited') - - # delete image alpine that has been used by a container - self.execute(auth, f"docker run -d --name test-sh4 --stop-timeout 0 {IMG_ALPINE} sh") - # our pixel test expects both containers to be in state "Exited" - sha = self.execute(auth, "docker inspect --format '{{.Id}}' test-sh4").strip() - self.waitContainer(sha, auth, name="test-sh4", state='Exited') - if auth: - b.assert_pixels('#app', "overview", ignore=[".ignore-pixels"], skip_layouts=["rtl", "mobile"]) - alpine_sel = f"#containers-images tbody tr[data-row-id=\"{images[IMG_ALPINE_LATEST]}{auth}\"]".lower() - b.wait_visible(alpine_sel) - b.click(alpine_sel + " td.pf-v5-c-table__toggle button") - clickDeleteImage(alpine_sel) - self.confirm_modal("Delete") - self.confirm_modal("Force delete") - b.wait_not_present(alpine_sel) - - b.wait_collected_text("#containers-containers .container-name", expected_ws) - self.execute(auth, f"docker run -d --name c --stop-timeout 0 {IMG_REGISTRY} sh") - b.wait_collected_text("#containers-containers .container-name", "c" + expected_ws) - self.execute(auth, f"docker run -d --name a --stop-timeout 0 {IMG_REGISTRY} sh") - b.wait_collected_text("#containers-containers .container-name", "ac" + expected_ws) - - self.execute(False, f"docker run -d --name b --stop-timeout 0 {IMG_REGISTRY} sh") - if auth: - b.wait_collected_text("#containers-containers .container-name", "abc" + expected_ws) - self.execute(False, f"docker run -d --name doremi --stop-timeout 0 {IMG_REGISTRY} sh") - b.wait_collected_text("#containers-containers .container-name", "abcdoremi" + expected_ws) - b.wait(lambda: self.getContainerAttr("doremi", "State") in NOT_RUNNING) - else: - b.wait_collected_text("#containers-containers .container-name", "abc") - - # Test intermediate images - b.wait_not_present(".listing-action") - tmpdir = self.execute(auth, "mktemp -d").strip() - self.execute(auth, f"echo 'FROM {IMG_REGISTRY}\nRUN ls' > {tmpdir}/Dockerfile") - self.execute(auth, f"docker build {tmpdir}") - - b.wait_not_in_text("#containers-images", ":") - b.click(".listing-action button:contains('Show intermediate images')") - b.wait_in_text("#containers-images", ":") - b.wait_in_text("#containers-images tbody:last-child td[data-label=Created]", "today at") - - b.click(".listing-action button:contains('Hide intermediate images')") - b.wait_not_in_text("#containers-images", ":") - - # Intermediate images are not shown in create container dialog - b.click("#containers-containers-create-container-btn") - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - b.click("#create-image-image-select-typeahead") - b.wait_visible(f".pf-v5-c-select__menu-item:contains('{IMG_REGISTRY}')") - b.wait_not_present(".pf-v5-c-select__menu-item:contains('none')") - b.click(".pf-v5-c-modal-box .btn-cancel") - b.wait_not_present(".pf-v5-c-modal-box") - - # Delete intermediate images - intermediate_image_sel = "#containers-images tbody:last-child:contains(':')" - b.click(".listing-action button:contains('Show intermediate images')") - clickDeleteImage(intermediate_image_sel) - self.confirm_modal("Delete") - b.wait_not_present(intermediate_image_sel) - - # Create intermediate image and use it in a container - tmpdir = self.execute(auth, "mktemp -d").strip() - self.execute(auth, f"echo 'FROM {IMG_REGISTRY}\nRUN ls' > {tmpdir}/Dockerfile") - IMG_INTERMEDIATE = 'localhost/test-intermediate' - self.execute(auth, f"docker build -t {IMG_INTERMEDIATE} {tmpdir}") - b.click(f'#containers-images tbody tr:contains("{IMG_INTERMEDIATE}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - b.click("#create-image-create-btn") - b.wait_not_present("div.pf-v5-c-modal-box") - self.waitContainerRow(IMG_INTERMEDIATE) - - # Integration tab should not crash with an intermediate image - self.toggleExpandedContainer(IMG_INTERMEDIATE) - b.click(".pf-m-expanded button:contains('Integration')") - - # Delete intermediate image which is in use - self.execute(auth, f"docker untag {IMG_INTERMEDIATE}") - clickDeleteImage(intermediate_image_sel) - self.confirm_modal("Delete") - self.confirm_modal("Force delete") - b.wait_not_in_text("#containers-images", ":") - b.wait_not_in_text("#containers-containers", IMG_INTERMEDIATE) - - def testCommitUser(self): - self._testCommit(False) - - def testCommitSystem(self): - self._testCommit(True) - - def _testCommit(self, auth): - b = self.browser - self.allow_browser_errors("Failed to commit container .* repository name must be lowercase") - - self.login(auth) - - # run a container (will exit immediately) and test the display of commit modal - self.execute(auth, f"docker run -d --name test-sh0 --stop-timeout 0 {IMG_ALPINE} sh -c 'ls -a'") - - self.filter_containers("all") - self.waitContainerRow("test-sh0") - self.toggleExpandedContainer("test-sh0") - - self.performContainerAction("test-sh0", "Commit") - b.wait_visible(".pf-v5-c-modal-box") - - b.wait_in_text(".pf-v5-c-modal-box__description", "state of the test-sh0 container") - - # Empty name yields warning - b.click("button:contains(Commit)") - b.wait_text("#commit-dialog-image-name-helper", "Image name is required") - b.wait_visible("button:contains(Commit):disabled") - b.wait_visible("button:contains('Force commit')") - # Warning should be cleaned when updating name - b.set_input_text("#commit-dialog-image-name", "foobar") - b.wait_not_present("button:contains('Force commit')") - b.wait_not_present("#commit-dialog-image-name-helper") - - # Existing name yields warning - b.set_input_text("#commit-dialog-image-name", IMG_ALPINE) - b.click("button:contains(Commit)") - b.wait_text("#commit-dialog-image-name-helper", "Image name is not unique") - b.wait_visible("button:contains(Commit):disabled") - b.wait_visible("button:contains('Force commit')") - # Warning should be cleaned when updating tag - b.set_input_text("#commit-dialog-image-tag", "foobar") - b.wait_not_present("button:contains('Force commit')") - b.wait_not_present("#commit-dialog-image-name-helper") - - # Check failing commit - b.set_input_text("#commit-dialog-image-name", "TEST") - b.click("button:contains(Commit)") - b.wait_in_text(".pf-v5-c-alert", "Failed to commit container test-sh0") - b.wait_in_text(".pf-v5-c-alert", "repository name must be lowercase") - - # Test cancel - self.confirm_modal("Cancel") - - # Force commit empty container - self.performContainerAction("test-sh0", "Commit") - b.wait_visible(".pf-v5-c-modal-box") - # We prefill command - b.wait_val("#commit-dialog-command", 'sh -c "ls -a"') - # Test docker format - b.set_checked("#commit-dialog-docker", True) - b.click("button:contains(Commit)") - self.confirm_modal("Force commit") - - # don't use waitNumImages() here, as we want to include anonymous images - def waitImageCount(expected): - if auth: - expected += self.system_images_count - - b.wait_in_text("#containers-images", f"{expected} images") - - waitImageCount(self.user_images_count + 1) - image_id = self.execute(auth, "docker images --sort created --format '{{.Id}}' | head -n 1").strip() - manifest_type = self.execute(auth, "docker inspect --format '{{.ManifestType}}' " + image_id).strip() - cmd = self.execute(auth, "docker inspect --format '{{.Config.Cmd}}' " + image_id).strip() - self.assertIn("docker.distribution.manifest", manifest_type) - self.assertEqual("[sh -c ls -a]", cmd) - - # Commit with name, tag, author and edited command - self.performContainerAction("test-sh0", "Commit") - b.wait_visible(".pf-v5-c-modal-box") - b.set_input_text("#commit-dialog-image-name", "newname") - b.set_input_text("#commit-dialog-image-tag", "24") - b.set_input_text("#commit-dialog-author", "MM") - b.set_input_text("#commit-dialog-command", "sh -c 'ps'") - - if auth: - b.assert_pixels(".pf-v5-c-modal-box", "commit", skip_layouts=["rtl"]) - - self.confirm_modal("Commit") - - waitImageCount(self.user_images_count + 2) - self.assertEqual(self.execute(auth, "docker inspect --format '{{.Author}}' newname:24").strip(), "MM") - self.assertEqual(self.execute(auth, "docker inspect --format '{{.Config.Cmd}}' newname:24").strip(), - "[sh -c ps]") - self.assertIn("vnd.oci.image.manifest", - self.execute(auth, "docker inspect --format '{{.ManifestType}}' newname:24").strip()) - - # Test commit of running container - self.execute(auth, f"docker run -d --name test-sh2 --stop-timeout 0 {IMG_BUSYBOX} sleep 1000") - self.performContainerAction("test-sh2", "Commit") - b.wait_visible(".pf-v5-c-modal-box") - b.set_input_text("#commit-dialog-image-name", "newname") - self.confirm_modal("Commit") - waitImageCount(self.user_images_count + 3) - self.assertEqual(self.execute(auth, - "docker inspect --format '{{.Config.Cmd}}' newname:latest").strip(), - "[sleep 1000]") - - # Test commit of running container with pause (also conflicting name through :latest) - # This only works on rootless with cgroupsv2 - if auth or self.has_cgroupsV2: - self.performContainerAction("test-sh2", "Commit") - b.wait_visible(".pf-v5-c-modal-box") - b.set_input_text("#commit-dialog-image-name", "newname") - b.set_checked("#commit-dialog-pause", True) - b.click("button:contains(Commit)") - self.confirm_modal("Force commit") - waitImageCount(self.user_images_count + 4) - - def testDownloadImage(self): - b = self.browser - execute = self.execute - - def prepare(): - # Create and start registry containers - self.execute(True, f"docker run -d -p 5000:5000 --name registry --stop-timeout 0 {IMG_REGISTRY}") - self.execute(True, f"docker run -d -p 6000:5000 --name registry_alt --stop-timeout 0 {IMG_REGISTRY}") - # Add local insecure registry into registries conf - self.machine.write("/etc/containers/registries.conf", REGISTRIES_CONF) - self.execute(True, "systemctl stop docker.service") - # Push busybox image to the local registries - self.execute(True, - f"docker tag {IMG_BUSYBOX} localhost:5000/my-busybox; docker push localhost:5000/my-busybox") - self.execute(True, - f"docker tag {IMG_BUSYBOX} localhost:6000/my-busybox; docker push localhost:6000/my-busybox") - # Untag busybox image which duplicates the image we are about to download - self.execute(True, f"docker rmi -f {IMG_BUSYBOX} localhost:5000/my-busybox localhost:6000/my-busybox") - self.execute(False, f"docker rmi -f {IMG_BUSYBOX}") - - class DownloadImageDialog(): - def __init__(self, test_obj, imageName, imageTag=None, user="system"): - self.imageName = imageName - self.imageTag = imageTag - self.user = user - self.imageSha = "" - self.assertTrue = test_obj.assertTrue - - def openDialog(self): - # Open get new image modal - b.click("#image-actions-dropdown") - b.click("button:contains(Download new image)") - b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') - b.wait_visible("div.pf-v5-c-modal-box footer button:contains(Download):disabled") - - return self - - def fillDialog(self): - # Search for image specified with self.imageName and self.imageTag - b.click(f"#{self.user}") - b.set_val('#registry-select', "localhost:5000") - # HACK: Sometimes the value is not shown fully. FIXME - b.set_input_text("#search-image-dialog-name", self.imageName, value_check=False) - if self.imageTag: - b.set_input_text(".image-tag-entry input", self.imageTag) - - return self - - def selectImageAndDownload(self): - # Select and download the self.imageName image - b.click(f".pf-v5-c-data-list .image-name:contains({self.imageName})") - b.click("div.pf-v5-c-modal-box footer button:contains(Download)") - b.wait_not_present("div.pf-v5-c-modal-box") - - return self - - def expectDownloadErrorForNonExistingTag(self): - title = f"Danger alert:Failed to download image localhost:5000/{self.imageName}:{self.imageTag}" - b.wait_visible(f'h4.pf-v5-c-alert__title:contains("{title}")') - - return self - - def expectSearchErrorForNotExistingImage(self): - b.wait_visible(f".pf-v5-c-modal-box__body:contains(No results for {self.imageName})") - b.click(".pf-v5-c-modal-box button.btn-cancel") - b.wait_not_present(".pf-v5-c-modal-box__body") - - return self - - def expectDownloadSuccess(self): - # Confirm that the modal dialog is not open anymore - b.wait_not_present('div.pf-v5-c-modal-box') - # Confirm that the image got downloaded - checkImage(b, - f"localhost:5000/{self.imageName}:{self.imageTag or 'latest'}", - "system" if self.user == "system" else "admin") - - # Confirm that no error has happened - b.wait_not_present('h4.pf-v5-c-alert__title:contains("Failed to download image")') - - # Find out this image ID - container_name = f"localhost:5000/{self.imageName}:{self.imageTag or 'latest'}" - self.imageSha = execute(self.user == "system", - f"docker inspect --format '{{{{.Id}}}}' {container_name}").strip() - - return self - - def deleteImage(self, force=False, another=None): - imageTagSuffix = ":" + (self.imageTag or 'latest') - - # Select the image row - - # show image listing toggle - imageId = f"{self.imageSha}{'true' if self.user == 'system' else 'false'}" - sel = f"#containers-images tbody tr[data-row-id=\"{imageId}\"]" - b.wait_visible(sel) - b.click(sel + " td.pf-v5-c-table__toggle button") - - # Click the delete icon on the image row - b.click(sel + " .pf-v5-c-menu-toggle") - b.click(sel + ' button.btn-delete') - - if another: - b.click("#delete-all") - sel = f".pf-v5-c-check__input[aria-label='localhost:5000/{self.imageName}{imageTagSuffix}']" - self.assertTrue(b.get_checked(sel)) - self.assertTrue(b.get_checked(f".pf-v5-c-check__input[aria-label='{another}']")) - b.click("#delete-all") - b.wait_visible("#btn-img-delete:disabled") - - b.set_checked( - f".pf-v5-c-check__input[aria-label='localhost:5000/{self.imageName}{imageTagSuffix}']", True) - b.set_checked(f".pf-v5-c-check__input[aria-label='{another}']", True) - - # Confirm deletion in the delete dialog - b.click(".pf-v5-c-modal-box #btn-img-delete") - - if force: - # Confirm force delete - b.click(".pf-v5-c-modal-box button:contains('Force delete')") - - b.wait_not_present(sel) - - return self - - prepare() - - self.login() - - # Test registries - b.click("#image-actions-dropdown") - b.click("button:contains(Download new image)") - b.wait_visible('div.pf-v5-c-modal-box header:contains("Search for an image")') - # HACK: Sometimes the value is not shown fully. FIXME - b.set_input_text("#search-image-dialog-name", "my-busybox", value_check=False) - - b.wait_visible(".pf-v5-c-data-list .image-name:contains('localhost:5000/my-busybox')") - b.wait_visible(".pf-v5-c-data-list .image-name:contains('localhost:6000/my-busybox')") - b.assert_pixels(".docker-search", "download", skip_layouts=["rtl"]) - - b.set_val('#registry-select', "localhost:6000") - b.wait_not_present(".pf-v5-c-data-list .image-name:contains('localhost:5000/my-busybox')") - b.wait_visible(".pf-v5-c-data-list .image-name:contains('localhost:6000/my-busybox')") - b.click(".pf-v5-c-modal-box button:contains('Cancel')") - b.wait_not_present('div.pf-v5-c-modal-box') - - dialog0 = DownloadImageDialog(self, imageName='my-busybox', user="system") - dialog0.openDialog() \ - .fillDialog() \ - .selectImageAndDownload() \ - .expectDownloadSuccess() - dialog0.deleteImage() - - dialog1 = DownloadImageDialog(self, imageName='my-busybox', user="user") - dialog1.openDialog() \ - .fillDialog() \ - .selectImageAndDownload() \ - .expectDownloadSuccess() - # test recognition/deletion of multiple image tags - second_tag = "localhost/copybox:latest" - self.execute(False, f"docker tag localhost:5000/my-busybox {second_tag}") - # expand details - b.click("#containers-images tr:contains('my-busybox') td.pf-v5-c-table__toggle button") - b.wait_in_text("#containers-images tbody.pf-m-expanded tr .image-details", second_tag) - dialog1.deleteImage(True, another=second_tag) - - dialog = DownloadImageDialog(self, imageName='my-busybox', imageTag='latest', user="system") - dialog.openDialog() \ - .fillDialog() \ - .selectImageAndDownload() \ - .expectDownloadSuccess() \ - .deleteImage() - - dialog = DownloadImageDialog(self, imageName='foobar') - dialog.openDialog() \ - .fillDialog() \ - .expectSearchErrorForNotExistingImage() - - dialog = DownloadImageDialog(self, imageName='my-busybox', imageTag='foobar') - dialog.openDialog() \ - .fillDialog() \ - .selectImageAndDownload() \ - .expectDownloadErrorForNonExistingTag() - - def testLifecycleOperationsUser(self): - self._testLifecycleOperations(False) - - def testLifecycleOperationsSystem(self): - self._testLifecycleOperations(True) - - def _testLifecycleOperations(self, auth): - b = self.browser - - if not auth: - self.allow_browser_errors("Failed to start system docker.socket.*") - - self.login() - self.filter_containers('all') - - # run a container - self.execute(auth, f""" - docker run -d --name swamped-crate --stop-timeout 0 {IMG_BUSYBOX} sh -c 'echo 123; sleep infinity'; - docker stop swamped-crate""") - b.wait(lambda: self.execute(auth, "docker ps --all | grep -e swamped-crate -e Exited")) - - b.wait_visible("#containers-containers") - container_sha = self.execute(auth, "docker inspect --format '{{.Id}}' swamped-crate").strip() - self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX, - state='Exited', owner="system" if auth else "admin") - b.click("#containers-containers tbody tr:contains('swamped-crate') .pf-v5-c-menu-toggle") - - if not auth: - # Checkpoint/restore is not supported on user containers yet - the related buttons should not be shown - # Check that the restore option is not present - b.wait_not_present(self.getContainerAction('swamped-crate', 'Restore')) - - # Health check is not set up - b.wait_not_present(self.getContainerAction('swamped-crate', 'Run health check')) - - b.click("#containers-containers tbody tr:contains('swamped-crate') .pf-v5-c-menu-toggle") - - # Start the container - self.performContainerAction(IMG_BUSYBOX, "Start") - - self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX, - state='Running', owner="system" if auth else "admin") - - def get_cpu_usage(sel): - cpu = self.getContainerAttr(sel, "CPU") - self.assertIn('%', cpu) - # If it not a number it will raise ValueError which is what we want to know - return float(cpu[:-1]) - - # Check we show usage - b.wait(lambda: self.getContainerAttr(IMG_BUSYBOX, "CPU") != "") - b.wait(lambda: self.getContainerAttr(IMG_BUSYBOX, "Memory") != "") - memory = self.getContainerAttr(IMG_BUSYBOX, "Memory") - if auth or self.has_cgroupsV2: - cpu = get_cpu_usage(IMG_BUSYBOX) - - self.assertIn('/', memory) - numbers = memory.split('/') - self.assertTrue(numbers[0].strip().replace('.', '', 1).isdigit()) - full = numbers[1].strip().split() - self.assertTrue(full[0].replace('.', '', 1).isdigit()) - self.assertIn(full[1], ["GB", "MB"]) - - # Test that the value is updated dynamically - self.execute(auth, "docker exec -i swamped-crate sh -c 'dd bs=1024 < /dev/urandom > /dev/null &'") - b.wait(lambda: get_cpu_usage(IMG_BUSYBOX) > cpu) - self.execute(auth, "docker exec swamped-crate sh -c 'pkill dd'") - else: - # No support for CGroupsV2 - self.assertEqual(self.getContainerAttr(IMG_BUSYBOX, "CPU"), "n/a") - self.assertEqual(memory, "n/a") - - # Restart the container; there is no steady state change in the visible UI, so look for - # a changed data-started-at attribute - old_start = self.getStartTime("swamped-crate", auth=auth) - b.wait_in_text(f'#containers-containers tr[data-started-at="{old_start}"]', "swamped-crate") - self.performContainerAction(IMG_BUSYBOX, "Force restart") - new_start = self.waitRestart("swamped-crate", old_start, auth=auth) - b.wait_in_text(f'#containers-containers tr[data-started-at="{new_start}"]', "swamped-crate") - self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX, state='Running') - - self.waitContainerRow(IMG_BUSYBOX) - if not auth: - # Check that the checkpoint option is not present for rootless - b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") - b.wait_visible(self.getContainerAction(IMG_BUSYBOX, 'Force stop')) - b.wait_not_present(self.getContainerAction(IMG_BUSYBOX, 'Checkpoint')) - b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") - # Stop the container - self.performContainerAction(IMG_BUSYBOX, "Force stop") - - self.waitContainer(container_sha, auth, name='swamped-crate', image=IMG_BUSYBOX) - b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING) - b.wait(lambda: self.getContainerAttr("swamped-crate", "CPU") == "") - b.wait(lambda: self.getContainerAttr("swamped-crate", "Memory") == "") - - # Check that container details are not lost when the container is stopped - self.toggleExpandedContainer("swamped-crate") - b.click(".pf-m-expanded button:contains('Integration')") - b.wait_visible(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Environment variables")') - - # Check that console reconnects when container starts - b.click(".pf-m-expanded button:contains('Console')") - b.wait_text(".pf-m-expanded .pf-v5-c-empty-state", "Container is not running") - self.performContainerAction("swamped-crate", "Start") - b.wait_in_text(".pf-m-expanded .xterm-accessibility-tree", "/ # ") - b.focus(".pf-m-expanded .xterm-helper-textarea") - b.key_press('clear\r') - b.wait_not_in_text(".pf-m-expanded .xterm-accessibility-tree", "clear") - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # ") - b.key_press('echo hello\r') - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(2)", "hello") - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(3)", "/ # ") - self.performContainerAction("swamped-crate", "Stop") - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(3)", "/ # disconnected ") - sha = self.execute(auth, "docker inspect --format '{{.Id}}' swamped-crate").strip() - self.waitContainer(sha, auth, name='swamped-crate', image=IMG_BUSYBOX, state=NOT_RUNNING) - self.performContainerAction("swamped-crate", "Start") - self.waitContainer(sha, auth, state='Running') - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # ") - b.wait_not_in_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(2)", "hello") - - # Check that logs reconnect when container starts - b.click(".pf-m-expanded button:contains('Logs')") - self.performContainerAction("swamped-crate", "Stop") - self.waitContainer(sha, auth, state=NOT_RUNNING) - b.wait_in_text(".pf-m-expanded .container-logs .xterm-accessibility-tree", "Streaming disconnected") - self.performContainerAction("swamped-crate", "Start") - b.wait_in_text(".pf-m-expanded .container-logs .xterm-accessibility-tree", "Streaming disconnected123") - - def testCheckpointRestore(self): - m = self.machine - b = self.browser - - self.login() - self.filter_containers('all') - - if not self.has_criu: - # On cgroupsv1 systems just check that we get expected error messages - - # Run a container - self.execute(True, f"docker run -dit --name swamped-crate --stop-timeout 0 {IMG_BUSYBOX} sh") - b.wait(lambda: self.execute(True, "docker ps --all | grep -e swamped-crate")) - - # Checkpoint the container - self.performContainerAction(IMG_BUSYBOX, "Checkpoint") - b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-keep', True) - b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-tcpEstablished', True) - b.click('.pf-v5-c-modal-box button:contains(Checkpoint)') - b.wait_not_present('.modal_dialog') - - def criu_alert(): - text = b.text(".pf-v5-c-alert.pf-m-danger > .pf-v5-c-alert__description").lower() - return "checkpoint/restore requires at least criu" in text or "failed to check for criu" in text - b.wait(criu_alert) - return - - # Run a container - mac_address = '92:d0:c6:0a:29:38' - self.execute(True, f""" - docker run -dit --mac-address {mac_address} --name swamped-crate --stop-timeout 0 {IMG_BUSYBOX} sh; - docker stop swamped-crate - """) - b.wait(lambda: self.execute(True, "docker ps --all | grep -e swamped-crate -e Exited")) - - # Check that the restore option is not present (i.e. start is a regular button) - b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") - b.wait_not_present(self.getContainerAction(IMG_BUSYBOX, 'Restore')) - b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-menu-toggle") - - # Start the container - self.performContainerAction("swamped-crate", "Start") - b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in 'Running') - - self.toggleExpandedContainer("swamped-crate") - b.wait_visible(".pf-m-expanded button:contains('Details')") - b.wait_not_present(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Latest checkpoint")') - - # Checkpoint the container - self.performContainerAction("swamped-crate", "Checkpoint") - b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-keep', True) - b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-tcpEstablished', True) - b.click('.pf-v5-c-modal-box button:contains(Checkpoint)') - - with b.wait_timeout(300): - b.wait_not_present(".pf-v5-c-modal-box") - - if self.has_criu: - b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING) - b.wait_in_text( - f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Latest checkpoint") + dd', - 'today at' - ) - else: - # expect proper error message - b.wait_in_text(".pf-v5-c-alert.pf-m-danger", "Failed to checkpoint container swamped-crate") - b.wait(lambda: "checkpoint/restore requires at least criu" in - b.text(".pf-v5-c-alert.pf-m-danger > .pf-v5-c-alert__description").lower()) - return - - # Restore the container - self.waitContainerRow("swamped-crate") - self.performContainerAction("swamped-crate", "Restore") - b.set_checked('.pf-v5-c-modal-box input#restore-dialog-keep', True) - b.set_checked('.pf-v5-c-modal-box input#restore-dialog-tcpEstablished', True) - b.set_checked('.pf-v5-c-modal-box input#restore-dialog-ignoreStaticIP', True) - b.set_checked('.pf-v5-c-modal-box input#restore-dialog-ignoreStaticMAC', True) - b.click('.pf-v5-c-modal-box button:contains(Restore)') - b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in 'Running') - - # A new MAC address should have been generated - # Fixed in docker 4.4.0 https://github.com/containers/docker/issues/16666 - cmd = "docker inspect --format '{{.NetworkSettings.MacAddress}}' swamped-crate" - new_mac_address = self.execute(True, cmd).strip() - if docker_version(self) >= (4, 4, 0): - self.assertNotEqual(new_mac_address, mac_address) - else: - self.assertEqual(new_mac_address, mac_address) - - # Checkpoint the container without stopping - self.waitContainerRow("swamped-crate") - self.performContainerAction("swamped-crate", "Checkpoint") - b.set_checked('.pf-v5-c-modal-box input#checkpoint-dialog-leaveRunning', True) - b.click('.pf-v5-c-modal-box button:contains(Checkpoint)') - b.wait_not_present('.modal_dialog') - - # Stop the container - m.execute("docker stop swamped-crate") - b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in NOT_RUNNING) - - # Restore the container - self.performContainerAction("swamped-crate", "Restore") - b.click('.pf-v5-c-modal-box button:contains(Restore)') - b.wait(lambda: self.getContainerAttr("swamped-crate", "State") in 'Running') - - def testNotRunning(self): - b = self.browser - - def disable_system(): - self.execute(True, "systemctl disable --now docker.socket; systemctl stop docker.service; systemctl stop containerd.service") - - def enable_system(): - self.execute(True, "systemctl enable --now docker.socket") - - def is_active_system(string): - b.wait(lambda: self.execute(True, "systemctl is-active docker.socket || true").strip() == string) - - def is_enabled_system(string): - b.wait(lambda: self.execute(True, "systemctl is-enabled docker.socket || true").strip() == string) - - disable_system() - self.login_and_go("/docker") - - # Troubleshoot action - b.click("#app .pf-v5-c-empty-state button.pf-m-link") - b.enter_page("/system/services") - # services page is too slow - with b.wait_timeout(60): - b.wait_in_text("#service-details", "docker.socket") - - # Start action, with enabling (by default) - b.go("/docker") - b.enter_page("/docker") - b.click("#app .pf-v5-c-empty-state button.pf-m-primary") - - b.wait_visible("#containers-containers") - b.wait_not_present("#overview div.pf-v5-c-alert.pf-m-info") - - is_active_system("active") - is_enabled_system("enabled") - - # Start action, without enabling - disable_system() - b.click("#app .pf-v5-c-empty-state input[type=checkbox]") - b.assert_pixels("#app .pf-v5-c-empty-state", "docker-service-disabled", skip_layouts=["medium", "mobile"]) - b.click("#app .pf-v5-c-empty-state button.pf-m-primary") - - b.wait_visible("#containers-containers") - is_enabled_system("disabled") - is_active_system("active") - - b.logout() - disable_system() - # HACK: Due to https://github.com/containers/docker/issues/7180, avoid - # user docker.service to time out; make sure to start it afresh - self.login_and_go("/docker") - self.login_and_go("/docker") - b.wait_in_text("#overview div.pf-v5-c-alert .pf-v5-c-alert__title", "Docker service is available") - b.click("#overview div.pf-v5-c-alert .pf-v5-c-alert__action > button:contains(Start)") - b.wait_not_present("#overview div.pf-v5-c-alert") - is_active_system("active") - is_enabled_system("enabled") - - b.logout() - disable_system() - self.login_and_go("/docker", superuser=False) - b.click("#app .pf-v5-c-empty-state button.pf-m-primary") - b.wait_visible("#containers-containers") - b.wait_not_present("#overview div.pf-v5-c-alert") - - is_active_system("inactive") - is_enabled_system("disabled") - b.logout() - - # no Troubleshoot action without cockpit-system package - disable_system() - self.restore_dir("/usr/share/cockpit/systemd") - self.machine.execute("rm /usr/share/cockpit/systemd/manifest.json") - self.login_and_go("/docker") - b.wait_visible("#app .pf-v5-c-empty-state button.pf-m-primary") - self.assertFalse(b.is_present("#app .pf-v5-c-empty-state button.pf-m-link")) - # starting still works - b.click("#app .pf-v5-c-empty-state button.pf-m-primary") - b.wait_visible("#containers-containers") - - self.allow_restart_journal_messages() - self.allow_journal_messages(".*docker/docker.sock/.*: couldn't connect:.*") - self.allow_journal_messages(".*docker/docker.sock: .*Connection.*Error.*") - self.allow_journal_messages(".*docker/docker.sock/.*/events.*: received truncated HTTP response.*") - - def testCreateContainerSystem(self): - self._testCreateContainer(True) - - def testCreateContainerUser(self): - self._testCreateContainer(False) - - def _testCreateContainer(self, auth): - new_container = 'new-container' - self.execute(True, f"docker run -d --name {new_container} --stop-timeout 0 {IMG_BUSYBOX} touch /latest") - self.execute(True, f"docker commit {new_container} newimage") - new_image_sha = self.execute(True, "docker inspect --format '{{.Id}}' newimage").strip() - - self.execute(True, f"docker run -d -p 5000:5000 --name registry --stop-timeout 0 {IMG_REGISTRY}") - self.execute(True, f"docker run -d -p 6000:5000 --name registry_alt --stop-timeout 0 {IMG_REGISTRY}") - # Add local insecure registry into registries conf - self.machine.write("/etc/containers/registries.conf", REGISTRIES_CONF) - self.execute(True, "systemctl stop docker.service") - # Push busybox image to the local registries - self.execute(True, - f"docker tag {IMG_BUSYBOX} localhost:5000/my-busybox; docker push localhost:5000/my-busybox") - self.execute(True, - f"docker tag {IMG_BUSYBOX} localhost:6000/my-busybox; docker push localhost:6000/my-busybox") - # Untag busybox image which duplicates the image we are about to download - self.execute(True, f"docker rmi -f {IMG_BUSYBOX} localhost:5000/my-busybox localhost:6000/my-busybox") - - self.login(auth) - - b = self.browser - container_name = "busybox-downloaded" - - b.click("#containers-containers button.pf-v5-c-button.pf-m-primary") - b.set_input_text("#run-image-dialog-name", container_name) - - # Test invalid input - b.set_input_text("#create-image-image-select-typeahead", "|alpi*ne?\\") - b.wait_text("button.pf-v5-c-select__menu-item:not(.pf-m-disabled)", "localhost/test-alpine:latest") - - # No local results found - b.set_input_text("#create-image-image-select-typeahead", "notfound") - - b.click('button.pf-v5-c-toggle-group__button:contains("Local")') - b.wait_text("button.pf-v5-c-select__menu-item.pf-m-disabled", "No images found") - - # Local results found - b.set_input_text("#create-image-image-select-typeahead", "registry") - if auth: - b.assert_pixels(".pf-v5-c-modal-box", "image-select", skip_layouts=["rtl"]) - b.click('button.pf-v5-c-toggle-group__button:contains("Local")') - b.wait_text("button.pf-v5-c-select__menu-item", IMG_REGISTRY_LATEST) - - # Local registry - b.set_input_text("#create-image-image-select-typeahead", "my-busybox") - b.click('button.pf-v5-c-toggle-group__button:contains("localhost:5000")') - b.wait_text("button.pf-v5-c-select__menu-item:not(.pf-m-disabled)", "localhost:5000/my-busybox") - - # Select image - b.click('button.pf-v5-c-select__menu-item:contains("localhost:5000/my-busybox")') - - # Remote image, no pull latest image option - b.wait_not_present("#run-image-dialog-pull-latest-image") - - # Create Container, image is pulled and should end up being "running" - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - sel = " span:not(.downloading)" - b.wait(lambda: self.getContainerAttr(container_name, "State", sel) in 'Running') - self.execute(auth, f"docker exec {container_name} test ! -e /latest") - - # Now that we have downloaded an image, verify that selecting download latest image - # downloads the latest image we now push to the registry. Note this image has a /latest file - # to differnatiate it from the other local image. - self.execute(True, f"docker push {new_image_sha} localhost:5000/my-busybox") - self.execute(True, f"docker push {new_image_sha} localhost:6000/my-busybox") - self.execute(True, f"docker rmi {new_image_sha}") - - container_name = "busybox-latest" - - b.click("#containers-containers button.pf-v5-c-button.pf-m-primary") - b.set_input_text("#run-image-dialog-name", container_name) - - # Local registry - b.set_input_text("#create-image-image-select-typeahead", "my-busybox") - b.click('button.pf-v5-c-toggle-group__button:contains("Local")') - - # Select image - b.click('button.pf-v5-c-select__menu-item:contains("localhost:5000/my-busybox")') - - # Pull the latest image - b.set_checked("#run-image-dialog-pull-latest-image", True) - - # Create Container, image is pulled and should end up being "running" - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - sel = " span:not(.downloading)" - b.wait(lambda: self.getContainerAttr(container_name, "State", sel) in 'Running') - # Verify that the latest file exists - output = self.execute(auth, f"docker exec {container_name} ls -lh /latest").strip() - self.assertNotIn("No such file or directory", output) - - # Test creating a container with - if auth: - container_name = "busybox-download-admin" - b.click("#containers-containers button.pf-v5-c-button.pf-m-primary") - - # Start container as admin - b.click('#run-image-dialog-owner-user') - - # Create Container, image is pulled and should end up being "Running" - b.set_input_text("#run-image-dialog-name", container_name) - - b.set_input_text("#create-image-image-select-typeahead", IMG_BUSYBOX) - b.click('button.pf-v5-c-toggle-group__button:contains("Local")') - b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_BUSYBOX}")') - - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - b.wait(lambda: self.getContainerAttr(container_name, "State", sel) in 'Running') - - def testRunImageSystem(self): - self._testRunImage(True) - - def testRunImageUser(self): - self._testRunImage(False) - - def _testRunImage(self, auth): - b = self.browser - m = self.machine - - # Just drop user images so we can use simpler selectors - if auth: - self.execute(False, "docker rmi --all") - - self.login(auth) - - b.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - b.wait_in_text("#containers-images", IMG_BUSYBOX) - b.wait_in_text("#containers-images", IMG_ALPINE) - if auth: - b.wait_not_in_text("#containers-images", "admin") - - # Check command in alpine - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_ALPINE}")') - b.click(f'#containers-images tbody tr:contains("{IMG_ALPINE}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - # depending on the precise container, this can be /bin/sh or /bin/ash - cmd = self.execute(auth, 'docker image inspect --format "{{.Config.Cmd}}" ' + IMG_ALPINE) - cmd = cmd.strip().replace('[', '').replace(']', '') - b.wait_attr("#run-image-dialog-command", "value", cmd) - b.click(".btn-cancel") - - # Open run image dialog - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - # Inspect and fill modal dialog - b.wait_val("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) - - # Check that there is autogenerated name and then overwrite it - b.wait_not_val("#run-image-dialog-name", "") - b.set_input_text("#run-image-dialog-name", "busybox-with-tty") - - b.wait_visible("#run-image-dialog-command[value='sh']") - - # Check memory configuration - # Only works with CGroupsV2 - if auth or self.has_cgroupsV2: - b.set_checked("#run-image-dialog-memory-limit-checkbox", True) - b.wait_visible("#run-image-dialog-memory-limit-checkbox:checked") - b.wait_visible('#run-image-dialog-memory-limit input[value="512"]') - b.set_input_text("#run-image-dialog-memory-limit input[type=number]", "0.5") - b.set_val('#memory-unit-select', "GB") - - # CPU shares work only with system containers - if auth: - # Check that the checkbox is enabled when clicked on the field - b.wait_visible("#run-image-dialog-cpu-priority-checkbox:not(:checked)") - b.click('#run-image-cpu-priority') - b.wait_visible("#run-image-dialog-cpu-priority-checkbox:checked") - b.set_checked("#run-image-dialog-cpu-priority-checkbox", False) - - b.set_checked("#run-image-dialog-cpu-priority-checkbox", True) - b.wait_visible("#run-image-dialog-cpu-priority-checkbox:checked") - b.wait_visible('#run-image-dialog-cpu-priority input[value="1024"]') - b.set_input_text("#run-image-dialog-cpu-priority input[type=number]", "512") - else: - b.wait_not_present("#run-image-dialog-cpu-priority-checkbox") - - # Enable tty - b.set_checked("#run-image-dialog-tty", True) - - # Set up command line - b.set_input_text('#run-image-dialog-command', - "sh -c 'for i in $(seq 20); do sleep 1; echo $i; done; sleep infinity'") - - if auth: - # Set restart policy to 3 retries - b.set_val("#run-image-dialog-restart-policy", "on-failure") - b.set_input_text('#run-image-dialog-restart-retries input', '3') - else: # no lingering enabled so it's disabled - b.wait_not_present("#run-image-dialog-restart-policy") - - # Switch to Integration tab - b.click("#pf-tab-1-create-image-dialog-tab-integration") - - # Configure published ports - b.click('.publish-port-form .btn-add') - b.set_input_text('#run-image-dialog-publish-0-host-port', '6000') - b.set_input_text('#run-image-dialog-publish-0-container-port', '5000') - b.click('.publish-port-form .btn-add') - b.set_input_text('#run-image-dialog-publish-1-ip-address', '127.0.0.1') - b.set_input_text('#run-image-dialog-publish-1-host-port', '6001') - b.set_input_text('#run-image-dialog-publish-1-container-port', '5001') - b.set_val('#run-image-dialog-publish-1-protocol', "udp") - b.click('.publish-port-form .btn-add') - b.set_input_text('#run-image-dialog-publish-2-ip-address', '7001') - b.set_input_text('#run-image-dialog-publish-2-host-port', '7001') - b.click('#run-image-dialog-publish-2-btn-close') - b.click('.publish-port-form .btn-add') - b.set_input_text('#run-image-dialog-publish-3-container-port', '8001') - b.click('.publish-port-form .btn-add') - b.set_input_text('#run-image-dialog-publish-4-ip-address', '127.0.0.2') - b.set_input_text('#run-image-dialog-publish-4-container-port', '9001') - - # Configure env - b.click('.env-form .btn-add') - b.set_input_text('#run-image-dialog-env-0-key', 'APPLE') - b.set_input_text('#run-image-dialog-env-0-value', 'ORANGE') - b.click('.env-form .btn-add') - b.set_input_text('#run-image-dialog-env-1-key', 'PEAR') - b.set_input_text('#run-image-dialog-env-1-value', 'BANANA') - b.click('.env-form .btn-add') - b.set_input_text('#run-image-dialog-env-2-key', 'MELON') - b.set_input_text('#run-image-dialog-env-2-value', 'GRAPE') - b.click('#run-image-dialog-env-2-btn-close') - b.click('.env-form .btn-add') - # Test inputting an key=var entry - b.set_val('#run-image-dialog-env-3-value', - "RHUBARB=STRAWBERRY DURIAN=LEMON TEST_URL=wss://cockpit/?start=1&stop=0") - # set_val does not trigger onChange so append a space. - b.set_input_text('#run-image-dialog-env-3-value', ' ', append=True, value_check=False) - - b.click('.env-form .btn-add') - b.set_input_text('#run-image-dialog-env-6-key', 'HOSTNAME') - b.set_input_text('#run-image-dialog-env-6-value', 'busybox') - - # Test inputting a var with = in it doesn't reset key - b.click('.env-form .btn-add') - b.set_input_text('#run-image-dialog-env-7-key', 'TEST') - b.set_input_text('#run-image-dialog-env-7-value', 'REBASE=1') - - # Configure volumes - b.click('.volume-form .btn-add') - rodir, rwdir = m.execute("mktemp; mktemp").split('\n')[:2] - m.execute(f"chown admin:admin {rodir}") - m.execute(f"chown admin:admin {rwdir}") - b.set_checked("#run-image-dialog-volume-0-mode", False) - - if self.has_selinux: - b.set_val('#run-image-dialog-volume-0-selinux', "z") - else: - b.wait_not_present('#run-image-dialog-volume-0-selinux') - - b.set_file_autocomplete_val("#run-image-dialog-volume-0 .pf-v5-c-select", rodir) - b.key_press(["\r"]) - b.set_input_text('#run-image-dialog-volume-0-container-path', '/tmp/ro') - ro_label = m.execute(f"ls -dZ {rodir}").split(" ")[0] - b.key_press(["\r"]) - b.click('.volume-form .btn-add') - b.wait_visible('#run-image-dialog-volume-1') - b.click('#run-image-dialog-volume-1-btn-close') - b.wait_not_present('#run-image-dialog-volume-1') - b.click('.volume-form .btn-add') - - if auth: - b.assert_pixels(".pf-v5-c-modal-box", "integration", - ignore=["#run-image-dialog-volume-0 .pf-v5-c-select__toggle-typeahead"], - skip_layouts=["rtl"]) - - if self.has_selinux: - b.set_val('#run-image-dialog-volume-2-selinux', "Z") - else: - b.wait_not_present('#run-image-dialog-volume-2-selinux') - - b.set_file_autocomplete_val("#run-image-dialog-volume-2 .pf-v5-c-select", rwdir) - b.key_press(["\r"]) - b.set_input_text('#run-image-dialog-volume-2-container-path', '/tmp/rw') - rw_label = m.execute(f"ls -dZ {rwdir}").split(" ")[0] - - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - b.wait_not_present("div.pf-v5-c-modal-box") - self.waitContainerRow(IMG_BUSYBOX) - sha = self.execute(auth, "docker inspect --format '{{.Id}}' busybox-with-tty").strip() - self.waitContainer(sha, auth, name='busybox-with-tty', image=IMG_BUSYBOX, - cmd='sh -c "for i in $(seq 20); do sleep 1; echo $i; done; sleep infinity"', - state='Running', owner="system" if auth else "admin") - hasTTY = self.execute(auth, "docker inspect --format '{{.Config.Tty}}' busybox-with-tty").strip() - self.assertEqual(hasTTY, 'true') - # Only works with CGroupsV2 - if auth or self.has_cgroupsV2: - memory = self.execute(auth, "docker inspect --format '{{.HostConfig.Memory}}' busybox-with-tty").strip() - self.assertEqual(memory, '500000000') - - if auth: - cpuShares = self.execute(auth, - "docker inspect --format '{{.HostConfig.CpuShares}}' busybox-with-tty").strip() - self.assertEqual(cpuShares, '512') - - restartPolicy = self.getRestartPolicy(auth, "busybox-with-tty") - if auth: - self.assertEqual(restartPolicy, '{on-failure 3}') - else: - # No restart policy - # format changed in podman 5.1 (https://github.com/containers/podman/pull/22322) - self.assertIn(restartPolicy, ['{ 0}', '{no 0}']) - - b.wait(lambda: "3" in self.execute(auth, "docker logs busybox-with-tty")) - - self.toggleExpandedContainer(IMG_BUSYBOX) - - b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Created") + dd', 'today at') - - b.click(".pf-m-expanded button:contains('Integration')") - - b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', - '0.0.0.0:6000 \u2192 5000/tcp') - b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', - '127.0.0.1:6001 \u2192 5001/udp') - b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', - '127.0.0.2:') - b.wait_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', - ' \u2192 8001/tcp') - b.wait_not_in_text(f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Ports") + dd', - '7001/tcp') - - ports = self.execute(auth, "docker inspect --format '{{.NetworkSettings.Ports}}' busybox-with-tty") - self.assertIn('5000/tcp:[{ 6000}]', ports) - self.assertIn('5001/udp:[{127.0.0.1 6001}]', ports) - self.assertIn('8001/tcp:[{', ports) - self.assertIn('9001/tcp:[{127.0.0.2 ', ports) - self.assertNotIn('7001/tcp', ports) - - env_select = f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Environment variables") + dd' - b.wait_in_text(env_select, 'APPLE=ORANGE') - b.wait_in_text(env_select, 'PEAR=BANANA') - b.wait_in_text(env_select, 'RHUBARB=STRAWBERRY') - b.wait_in_text(env_select, 'DURIAN=LEMON') - b.wait_in_text(env_select, 'TEST_URL=wss://cockpit/?start=1&stop=0') - b.wait_in_text(env_select, 'HOSTNAME=busybox') - b.wait_in_text(env_select, 'TEST=REBASE=1') - # variables are present in env but are not displayed in the UI - b.wait_not_in_text(env_select, 'container=docker') - b.wait_not_in_text(env_select, 'TERM=xterm') - b.wait_not_in_text(env_select, 'HOME=/root') - b.wait_not_in_text(env_select, 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin') - - b.click(".container-integration button:contains('Show more')") - # previously hidden variables are now visible - b.wait_in_text(env_select, 'container=docker') - b.wait_in_text(env_select, 'TERM=xterm') - b.wait_in_text(env_select, 'HOME=/root') - b.wait_in_text(env_select, 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin') - - env = self.execute(auth, "docker exec busybox-with-tty env") - self.assertIn('APPLE=ORANGE', env) - self.assertIn('PEAR=BANANA', env) - self.assertIn('RHUBARB=STRAWBERRY', env) - self.assertIn('DURIAN=LEMON', env) - self.assertIn('HOSTNAME=busybox', env) - self.assertIn('TEST=REBASE=1', env) - self.assertIn('container=docker', env) - self.assertIn('TERM=xterm', env) - self.assertIn('HOME=/root', env) - self.assertIn('PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', env) - self.assertNotIn('MELON=GRAPE', env) - - vol_select = f'#containers-containers tr:contains("{IMG_BUSYBOX}") dt:contains("Volumes") + dd' - b.wait_in_text(vol_select, f"{rodir} \u2192 /tmp/ro") - b.wait_in_text(vol_select, f"{rwdir} \u2194 /tmp/rw") - - romnt = self.execute(auth, "docker exec busybox-with-tty cat /proc/self/mountinfo | grep /tmp/ro") - self.assertIn('ro', romnt) - self.assertIn(rodir[4:], romnt) - rwmnt = self.execute(auth, "docker exec busybox-with-tty cat /proc/self/mountinfo | grep /tmp/rw") - self.assertIn('rw', rwmnt) - self.assertIn(rwdir[4:], rwmnt) - - if self.has_selinux: - # rw was set to :Z so it should change, but not be shared - rw_label_new = m.execute(f"ls -dZ {rwdir}").split(" ")[0] - self.assertNotEqual(rw_label, rw_label_new) - self.assertRegex(rw_label_new, r"container_file_t:s0:c\d*,c\d*$") - - # ro was set to :z to it should change and be shared - ro_label_new = m.execute(f"ls -dZ {rodir}").split(" ")[0] - self.assertNotEqual(ro_label, ro_label_new) - self.assertRegex(ro_label_new, "container_file_t:s0$") - - def get_int(n): - try: - return int(n) - except ValueError: - return 0 - - b.wait_not_present("button:contains('Health check logs')") - b.click(".pf-m-expanded button:contains('Logs')") - b.wait_text(".pf-m-expanded .container-logs .xterm-accessibility-tree > div:nth-child(1)", "1") - - # firefox optimizes these out when not visible - b.eval_js(""" - document.querySelector('.pf-m-expanded .container-logs .xterm-accessibility-tree').scrollIntoView() - """) - b.wait_in_text(".pf-m-expanded .container-logs .xterm-accessibility-tree", "6") - - b.click(".pf-m-expanded button:contains('Console')") - b.wait(lambda: - get_int(b.text(".pf-m-expanded .container-terminal .xterm-accessibility-tree > div:nth-child(3)")) > 7) - - # Create another instance without port publishing - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') - self.toggleExpandedContainer(IMG_BUSYBOX) - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - b.wait_val("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) - b.set_input_text("#run-image-dialog-name", "busybox-without-publish") - - # Set up command line - b.set_input_text('#run-image-dialog-command', - "sh -c 'for i in $(seq 20); do echo $i; sleep 3; done; sleep infinity'") - - # Run without tty, console should be able to `exec` - b.set_checked("#run-image-dialog-tty", False) - - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - b.wait_not_present("div.pf-v5-c-modal-box") - - self.waitContainerRow("busybox-without-publish") - self.toggleExpandedContainer("busybox-without-publish") - b.wait_not_present(""" - #containers-containers tbody tr:contains("busybox-without-publish") + tr dt:contains("Ports") - """) - - # Rootless only works with CGroupsV2 - if auth or self.has_cgroupsV2: - cpuShares = self.execute(auth, """ - docker inspect --format '{{.HostConfig.CpuShares}}' busybox-without-publish - """).strip() - # docker ≥ 1.8 translates 0 default into actual value - self.assertIn(cpuShares, ['0', '1024']) - - b.set_val("#containers-containers-filter", "all") - - b.click(".pf-m-expanded button:contains('Console')") - b.wait_in_text(".pf-m-expanded .xterm-accessibility-tree", "/ # ") - b.focus(".pf-m-expanded .xterm-helper-textarea") - b.key_press('clear\r') - b.wait_not_in_text(".pf-m-expanded .xterm-accessibility-tree", "clear") - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # ") - b.key_press('echo hello\r') - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(2)", "hello") - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(3)", "/ # ") - b.wait_text(".pf-m-expanded .xterm-accessibility-tree > div:nth-child(1)", "/ # echo hello") - - b.go("#/?name=tty") - self.check_containers(["busybox-with-tty"], ["busybox-without-publish"]) - b.go("#/?name=busy") - self.check_containers(["busybox-with-tty", "busybox-without-publish"], []) - - b.set_input_text('#containers-filter', 'tty') - self.check_containers(["busybox-with-tty"], ["busybox-without-publish"]) - self.check_images([], [IMG_ALPINE, IMG_BUSYBOX, IMG_REGISTRY]) - b.set_input_text('#containers-filter', 'busy') - b.wait_js_cond('window.location.hash === "#/?name=busy"') - self.check_containers(["busybox-with-tty", "busybox-without-publish"], []) - self.check_images([IMG_BUSYBOX], [IMG_ALPINE, IMG_REGISTRY]) - b.set_input_text('#containers-filter', 'alpine') - b.wait_js_cond('window.location.hash === "#/?name=alpine"') - self.check_containers([], ["busybox-with-tty", "busybox-without-publish"]) - self.check_images([IMG_ALPINE], [IMG_BUSYBOX, IMG_REGISTRY]) - b.set_input_text('#containers-filter', '') - self.check_containers(["busybox-with-tty", "busybox-without-publish"], []) - self.check_images([IMG_ALPINE, IMG_BUSYBOX, IMG_REGISTRY], []) - b.wait_js_cond('window.location.hash === "#/"') - - self.filter_containers("running") - id_with_tty = self.execute(auth, "docker inspect --format '{{.Id}}' busybox-with-tty").strip() - - container_sel = f'#containers-images tbody tr:contains("{IMG_BUSYBOX}")' - b.click(f'{container_sel} td.pf-v5-c-table__toggle button') - # running container, just selects it, but leaves "Only running" alone - b.click(f"{container_sel} + tr div.ct-listing-panel-body dt:contains('Used by') + dd button:contains('busybox-with-tty')") # noqa: E501 - b.wait_js_cond('window.location.hash === "#' + id_with_tty + '"') - b.wait_val("#containers-containers-filter", "running") - # FIXME: expanding running container details does not actually work right now - # b.wait_in_text("#containers-containers tr.pf-m-expanded .container-details", "sleep infinity") - # stopped container, switches to showing all containers - - # Create a container without starting it - self.filter_containers("all") - container_name = "busybox-not-started" - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - b.wait_val("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) - b.set_input_text("#run-image-dialog-name", container_name) - b.set_input_text("#run-image-dialog-command", "sh -c sleep infinity") - - b.click('.pf-v5-c-modal-box__footer #create-image-create-btn') - b.wait_not_present("div.pf-v5-c-modal-box") - - sha = self.execute(auth, "docker inspect --format '{{.Id}}' " + container_name).strip() - self.waitContainer(sha, auth, name=container_name, image=IMG_BUSYBOX, state=['Configured', 'Created']) - - self.filter_containers("running") - b.wait_not_in_text("#containers-containers", "busybox-not-started") - container_sel = f"#containers-images tbody tr:contains('{IMG_BUSYBOX}') + tr div.ct-listing-panel-body" - b.click(f"{container_sel} dt:contains('Used by') + dd button:contains('busybox-not-started')") - b.wait_js_cond(f"window.location.hash === '#{sha}'") - b.wait_val("#containers-containers-filter", "all") - b.wait_in_text("#containers-containers", "busybox-not-started") - # auto-expands container details - b.wait_in_text("#containers-containers tbody tr:contains('busybox-not-started') + tr", "sleep infinity") - - b.click(f'#containers-images tbody tr:contains("{IMG_ALPINE}") td.pf-v5-c-table__toggle button') - b.wait_in_text(f"#containers-images tbody tr:contains('{IMG_ALPINE}') td[data-label='Used by']", 'unused') - - b.set_input_text('#containers-filter', 'foobar') - b.wait_in_text('#containers-containers .pf-v5-c-empty-state', 'No containers that match the current filter') - b.wait_in_text('#containers-images .pf-v5-c-empty-state', 'No images that match the current filter') - b.set_input_text('#containers-filter', '') - - if not auth or not self.machine.ostree_image: # don't kill ws container - # Ubuntu 22.04 has old docker that does not know about --time - if m.image != 'ubuntu-2204': - # Remove all containers first as it is not possible to set --time 0 to rmi command - self.execute(auth, "docker rm --all --force --time 0") - self.execute(auth, "docker rmi -af") - b.wait_in_text('#containers-containers .pf-v5-c-empty-state', 'No containers') - b.set_val("#containers-containers-filter", "running") - b.wait_in_text('#containers-containers .pf-v5-c-empty-state', 'No running containers') - b.wait_in_text('#containers-images .pf-v5-c-empty-state', 'No images') - - def check_content(self, kind, present, not_present): - b = self.browser - for item in present: - b.wait_visible(f'#containers-{kind} tbody tr:first-child:contains({item})') - for item in not_present: - b.wait_not_present(f'#containers-{kind} tbody tr:first-child:contains({item})') - - def check_containers(self, present, not_present): - self.check_content("containers", present, not_present) - - def check_images(self, present, not_present): - self.check_content("images", present, not_present) - - def waitContainer(self, row_id, auth, name="", image="", cmd="", owner="", state=None, pod="no-pod"): - """Check the container with row_name has the expected values - "image" can be substring, "state" might be string or array of possible states, other are - checked for exact match. - """ - sel = "#containers-containers #table-" + pod + f" tbody tr[data-row-id=\"{row_id}{auth}\"]".lower() - b = self.browser - if name: - b.wait_text(sel + " .container-name", name) - if image: - b.wait_in_text(sel + " .container-block small:nth-child(2)", image) - if cmd: - b.wait_text(sel + " .container-block small:last-child", cmd) - if owner: - if owner == "system": - b.wait_text(sel + " td[data-label=Owner]", owner) - else: - b.wait_text(sel + " td[data-label=Owner]", "user: " + owner) - if state is not None: - if not isinstance(state, list): - state = [state] - b.wait(lambda: b.text(sel + " td[data-label=State]") in state) - - def filter_containers(self, value): - """Use dropdown menu in the header to filter containers""" - b = self.browser - b.set_val("#containers-containers-filter", value) - - def confirm_modal(self, text): - """Wait for the pop up window and click the button with text""" - b = self.browser - b.click(f".pf-v5-c-modal-box footer button:contains({text})") - b.wait_not_present(f".pf-v5-c-modal-box footer button:contains({text})") - - def testPruneUnusedImagesSystem(self): - self._testPruneUnusedImagesSystem(True) - - def testPruneUnusedImagesUser(self): - self._testPruneUnusedImagesSystem(False) - - @testlib.skipOstree("no root login available on ostree") - def testPruneUnusedImagesRoot(self): - self._testPruneUnusedImagesSystem(False, True) - - def _testPruneUnusedImagesSystem(self, auth, root=False): - b = self.browser - if root: - self.login_and_go("/docker", user="root", enable_root_login=True) - b.wait_visible("#app") - else: - self.login(auth) - - leftover_images = 1 - # cockpit-ws image - if self.machine.ostree_image and auth: - leftover_images += 1 - - # By default we have 3 unused images, start one. - self.execute(auth or root, f"docker run -d --name used_image --stop-timeout 0 {IMG_ALPINE} sh") - b.click("#image-actions-dropdown") - b.click("#prune-unused-images-button") - - if auth: - b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", - (self.user_images_count + self.system_images_count) - leftover_images) - elif root: - b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", - self.system_images_count - leftover_images) - else: - b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", - self.user_images_count - leftover_images) - b.click(".pf-v5-c-modal-box button:contains(Prune)") - - # When being superuser, admin images are also removed - if auth: - self.waitNumImages(leftover_images) - checkImage(b, IMG_ALPINE, "system") - else: - self.waitNumImages(leftover_images) - # Two images removed, one in use kept - b.wait_not_present(f"#containers-images:contains('{IMG_BUSYBOX}')") - b.wait_not_present(f"#containers-images:contains('{IMG_REGISTRY}')") - b.wait_visible(f"#containers-images:contains('{IMG_ALPINE}')") - - # Prune button should now be disabled - b.click("#image-actions-dropdown") - b.wait_visible(".pf-m-disabled.pf-v5-c-menu__list-item:contains(Prune unused images)") - - def testPruneUnusedImagesSystemSelections(self): - """ Test the prune unused images selection options""" - b = self.browser - self.login(True) - - b.click("#image-actions-dropdown") - b.click("button:contains(Prune unused images)") - - # Deselect both - b.click("#deleteSystemImages") - b.click("#deleteUserImages") - b.wait_visible(".pf-v5-c-modal-box button:contains(Prune):disabled") - - # Admin / user images are selected - expected_images = self.user_images_count + self.system_images_count - if self.machine.ostree_image: - expected_images -= 1 - b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", expected_images) - # Select user images - b.click("#deleteUserImages") - b.click(".pf-v5-c-modal-box button:contains(Prune)") - - # System images are left over - self.waitNumImages(self.system_images_count) - checkImage(b, IMG_ALPINE, "system") - checkImage(b, IMG_BUSYBOX, "system") - checkImage(b, IMG_REGISTRY, "system") - - # Pruning again, should delete all system images - b.click("#image-actions-dropdown") - b.click("button:contains(Prune unused images)") - b.wait_js_func("ph_count_check", ".pf-v5-c-modal-box__body .pf-v5-c-list li", - self.system_images_count - 1 if self.machine.ostree_image else self.system_images_count) - b.click(".pf-v5-c-modal-box button:contains(Prune)") - self.waitNumImages(1 if self.machine.ostree_image else 0) - - # Prune button should now be disabled - b.click("#image-actions-dropdown") - b.wait_visible(".pf-v5-c-menu__list-item.pf-m-disabled:contains(Prune unused images)") - - def testPruneUnusedContainersSystem(self): - self._testPruneUnusedContainersSystem(True) - - def testPruneUnusedContainersUser(self): - self._testPruneUnusedContainersSystem(False) - - def _testPruneUnusedContainersSystem(self, auth): - """Test the prune unused container image dialog""" - - b = self.browser - self.login(auth) - - # Create running and non-running containers - self.execute(auth, "docker pod create --name pod") - notrunninginpodId = self.execute(auth, f""" - docker run --name inpod --pod pod -tid {IMG_BUSYBOX} sh -c 'exit 1'""").strip() - runninginpodId = self.execute(auth, f""" - docker run --name inpodrunning --pod pod -tid {IMG_BUSYBOX} sh -c 'sleep infinity'""").strip() - - self.execute(auth, f"docker run --name notrunning -tid {IMG_BUSYBOX} sh -c 'exit 1'") - self.execute(auth, f"docker run --name containerrunning -tid {IMG_BUSYBOX} sh -c 'sleep infinity'") - - # Create containers for the opposite of what we are, admin or super admin - if auth: - self.execute(False, f"docker run --name adminnotrunning -tid {IMG_BUSYBOX} sh 'exit 1'") - b.wait(lambda: self.getContainerAttr("adminnotrunning", "State") in NOT_RUNNING) - self.execute(False, f"docker run --name adminrunning -tid {IMG_BUSYBOX} sh -c 'sleep infinity'") - b.wait(lambda: self.getContainerAttr("adminrunning", "State") == "Running") - - b.click("#containers-actions-dropdown") - b.click("button:contains(Prune unused containers)") - - if auth: - b.wait_in_text(".pf-v5-c-modal-box__body tbody:nth-of-type(1) td[data-label=Name]", "adminnotrunning") - b.wait_in_text(".pf-v5-c-modal-box__body tbody:nth-of-type(2) td[data-label=Name]", "notrunning") - else: - b.wait_in_text(".pf-v5-c-modal-box__body tbody td[data-label=Name]", "notrunning") - - b.click(".pf-v5-c-modal-box button:contains(Prune)") - b.wait_not_present(".pf-v5-c-modal-box__body") - - if auth: - self.waitContainerRow("notrunning", False) - self.waitContainerRow("adminnotrunning", False) - else: - self.waitContainerRow("notrunning", False) - - # Verify running containers still exists - self.waitContainerRow("containerrunning") - pods = [{"name": "inpod", "state": "Exited", "id": notrunninginpodId, - "image": IMG_BUSYBOX, "command": 'sh -c "exit 1"'}, - {"name": "inpodrunning", "state": "Running", "id": runninginpodId, - "image": IMG_BUSYBOX, "command": 'sh -c "sleep infinity"'}] - self.waitPodContainer("pod", pods, auth) - - def testCreateContainerValidation(self): - def validateField(groupSelector, value, errorMessage, resetValue=""): - b.set_input_text(f"{groupSelector} input", value) - b.wait_visible(".pf-v5-c-modal-box__footer #create-image-create-run-btn:not(:disabled)") - b.wait_in_text(f"{groupSelector} .pf-v5-c-helper-text__item-text", errorMessage) - b.wait_visible(".pf-v5-c-modal-box__footer #create-image-create-run-btn[aria-disabled=true]") - # Reset to acceptable value and verify the validation message is not present - b.set_input_text(f"{groupSelector} input", resetValue) - b.wait_not_present(f"{groupSelector} .pf-v5-c-helper-text__item-text") - b.wait_visible(".pf-v5-c-modal-box__footer #create-image-create-run-btn:not(:disabled)") - - # Test the validation errors - - # complaint about port conflict - self.allow_browser_errors("error: Container failed to be started:.*") - self.allow_browser_errors("No routable interface.*") - self.allow_browser_errors(".*ddress already in use.*5000.*") - b = self.browser - self.login(False) - container_name = 'portused' - - # Start a docker container which uses a port - self.execute(False, f"docker run -d -p 5000:5000 --name registry --stop-timeout 0 {IMG_REGISTRY}") - b.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - validateField("#image-name-group", "registry", "Name already in use") - - # Switch to Integration tab - b.click("#pf-tab-1-create-image-dialog-tab-integration") - - # Test validation of port mapping - b.click('.publish-port-form .btn-add') - b.set_input_text("#run-image-dialog-publish-0-container-port-group input", "1") - validateField("#run-image-dialog-publish-0-ip-address-group", "abcd", "valid IP address") - validateField("#run-image-dialog-publish-0-host-port-group", "-1", "1 to 65535") - validateField("#run-image-dialog-publish-0-host-port-group", "99999", "1 to 65535") - validateField("#run-image-dialog-publish-0-container-port-group", "-1", "1 to 65535", resetValue="1") - validateField("#run-image-dialog-publish-0-container-port-group", "", "must not be empty", resetValue="1") - validateField("#run-image-dialog-publish-0-container-port-group", "99999", "1 to 65535", resetValue="1") - - # Test validation of volumes - b.click('.volume-form .btn-add') - b.set_input_text("#run-image-dialog-volume-0-container-path-group input", "/somepath") - validateField("#run-image-dialog-volume-0-container-path-group", "", "not be empty", resetValue="/somepath") - - # Test validation of environment variables - b.click('.env-form .btn-add') - b.set_input_text("#run-image-dialog-env-0-key-group input", "sometext") - validateField("#run-image-dialog-env-0-key-group", "", "must not be empty", resetValue="sometext") - - b.set_input_text("#run-image-dialog-name", container_name) - - # Port address is already in use - b.set_input_text('#run-image-dialog-publish-0-host-port', '5000') - b.set_input_text('#run-image-dialog-publish-0-container-port', '5000') - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - # Can be "[aA]ddress" - b.wait_in_text(".pf-v5-c-alert", "ddress already in use") - - # Changing the port should allow creation of container - b.set_input_text('#run-image-dialog-publish-0-host-port', '5001') - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - b.wait_not_present("#run-image-dialog-name") - - self.waitContainerRow(container_name) - - # Test validation JavaScript errors when removing invalid environment entries - container_name = 'env-var-validation' - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - b.set_input_text("#run-image-dialog-name", container_name) - b.click("#pf-tab-1-create-image-dialog-tab-integration") - - # Make sure our form validation does not crash when adding and removing invalid entries - b.click('.env-form .btn-add') - b.click('.env-form .btn-add') - b.click('.env-form .btn-add') - b.set_input_text("#run-image-dialog-env-1-key-group input", "something") - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - - b.wait_in_text("#run-image-dialog-env-0-key-group .pf-v5-c-helper-text__item-text", "must not be empty") - b.wait_in_text("#run-image-dialog-env-2-key-group .pf-v5-c-helper-text__item-text", "must not be empty") - - # remove invalid entries - b.click('#run-image-dialog-env-0-btn-close') - b.click('#run-image-dialog-env-2-btn-close') - - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - self.waitContainerRow(container_name) - - def _testHealthcheck(self, auth): - b = self.browser - - # Just drop user images so we can use simpler selectors - if auth: - self.execute(False, f"docker rmi {IMG_BUSYBOX}") - - self.login(auth) - - b.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - b.set_input_text("#run-image-dialog-name", "healthy") - - b.click("#pf-tab-2-create-image-dialog-tab-healthcheck") - b.set_input_text('#run-image-dialog-healthcheck-command', 'true') - b.set_input_text('#run-image-healthcheck-interval input', '325') - b.set_input_text('#run-image-healthcheck-timeout input', '35') - b.set_input_text('#run-image-healthcheck-start-period input', '5') - b.click('#run-image-healthcheck-retries .pf-v5-c-input-group__item:nth-child(1) button') - b.wait_val("#run-image-healthcheck-retries input", 2) - if auth: - b.assert_pixels('.pf-v5-c-modal-box', "healthcheck-modal", skip_layouts=["rtl"]) - # Test that the healthcheck option is not available before docker 4.3 - if docker_version(self) < (4, 3, 0): - b.wait_not_present("#run-image-healthcheck-action") - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - - self.waitContainerRow("healthy") - b.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - healthy_sha = self.execute(auth, "docker inspect --format '{{.Id}}' healthy").strip() - self.waitContainer(healthy_sha, auth, state='RunningHealthy') - - self.toggleExpandedContainer("healthy") - b.click(".pf-m-expanded button:contains('Health check')") - - b.wait_in_text('#container-details-healthcheck dt:contains("Command") + dd', 'true') - b.wait_in_text('#container-details-healthcheck dt:contains("Interval") + dd', '325 seconds') - b.wait_in_text('#container-details-healthcheck dt:contains("Retries") + dd', '2') - b.wait_in_text('#container-details-healthcheck dt:contains("Timeout") + dd', '35 seconds') - b.wait_in_text('#container-details-healthcheck dt:contains("Start period") + dd', '5 seconds') - b.wait_not_present('#container-details-healthcheck dt:contains("Failing streak")') - if docker_version(self) >= (4, 3, 0): - b.wait_in_text('#container-details-healthcheck dt:contains("When unhealthy") + dd', 'No action') - - self.assertEqual(self.execute(auth, "docker inspect --format '{{.Config.Healthcheck}}' healthy").strip(), - "{[true] 5s 5m25s 35s 2}") - - # single successful health check - b.wait_in_text(".ct-listing-panel-body tbody tr", "Passed health run") - b.wait_visible(".ct-listing-panel-body tbody:nth-of-type(1) svg.green") - b.wait_not_present(".ct-listing-panel-body tbody:nth-of-type(2)") - - # Trigger run manually, adds one more healthy run - self.performContainerAction("healthy", "Run health check") - b.wait_visible(".ct-listing-panel-body tbody:nth-of-type(2) svg.green") - b.wait_not_present(".ct-listing-panel-body tbody:nth-of-type(3)") - - self.toggleExpandedContainer("healthy") - - self.execute(auth, f"docker run --name sick -dt --health-cmd false --health-interval 5s {IMG_BUSYBOX}") - self.waitContainerRow("sick") - unhealthy_sha = self.execute(auth, "docker inspect --format '{{.Id}}' sick").strip() - self.waitContainer(unhealthy_sha, auth, state='RunningUnhealthy') - # Unhealthy should be first - expected_ws = "" - if auth and self.machine.ostree_image: - expected_ws = "ws" - b.wait_collected_text("#containers-containers .container-name", "healthysick" + expected_ws) - - self.toggleExpandedContainer("sick") - b.click(".pf-m-expanded button:contains('Health check')") - b.wait_visible(".pf-m-expanded .ct-listing-panel-body tbody:nth-of-type(1)") - b.wait_visible(".pf-m-expanded .ct-listing-panel-body tbody:nth-of-type(4)") - b.wait_visible(".pf-m-expanded .ct-listing-panel-body tbody:nth-of-type(2) svg.red") - b.wait_visible('.pf-m-expanded #container-details-healthcheck dt:contains("Failing streak")') - failures = int(b.text('.pf-m-expanded #container-details-healthcheck dt:contains("Failing streak") + dd')) - self.assertGreater(failures, 3) - if auth: - b.wait_js_func("ph_count_check", ".pf-m-expanded table[aria-label=Logs] tbody tr", 5) - b.assert_pixels(".pf-m-expanded .pf-v5-c-table__expandable-row-content", - "healthcheck-details", - ignore=["thead", "#container-details-healthcheck dt:contains('Failing streak') + dd", - "td[data-label='Started at']"], - skip_layouts=["rtl"]) - - self.toggleExpandedContainer("sick") - b.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - b.wait_visible('#containers-images td[data-label="Image"]:contains("busybox:latest")') - b.click('#containers-images tbody tr:contains("busybox:latest") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - # Test the health check action, only supported in docker 4.3 and later. - # To test this we make a healthcheck which depends on a file, so when starting the - # container is healthy, after we remove the file the healthcheck should fail and our - # configured action should executed. - if docker_version(self) < (4, 3, 0): - return - - containername = "healthaction" - b.set_input_text("#run-image-dialog-name", containername) - b.set_input_text("#run-image-dialog-command", "/bin/sh -c 'echo 1 > /healthy && sleep infinity'") - - b.click("#pf-tab-2-create-image-dialog-tab-healthcheck") - b.set_input_text('#run-image-dialog-healthcheck-command', '/bin/test -f /healthy') - b.set_input_text('#run-image-healthcheck-interval input', '1') - b.set_input_text('#run-image-healthcheck-timeout input', '1') - b.click('#run-image-healthcheck-action-2') - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - - self.waitContainerRow(containername) - self.toggleExpandedContainer(containername) - b.wait(lambda: self.getContainerAttr(containername, "State") == "RunningHealthy") - b.click(".pf-m-expanded button:contains('Health check')") - b.wait_in_text('.pf-m-expanded #container-details-healthcheck dt:contains("When unhealthy") + dd', - 'Force stop') - # Removing the file should kill the container - status = self.execute(auth, f"docker exec {containername} rm -f /healthy").strip() - b.wait(lambda: self.getContainerAttr(containername, - "State", "span:not(.ct-badge-container-unhealthy)") in NOT_RUNNING) - status = self.execute(auth, f"docker inspect --format '{{{{.State.Health.Status}}}}' {containername}").strip() - self.assertEqual(status, "unhealthy") - - def testHealthcheckSystem(self): - self._testHealthcheck(True) - - def testHealthcheckUser(self): - self._testHealthcheck(False) - - - def testdockerRestartEnabledSystem(self): - self._testdockerRestartEnabled(True) - - def _testdockerRestartEnabled(self, auth): - b = self.browser - if auth: - self.addCleanup(self.machine.execute, "systemctl disable docker-restart.service") - - # Drop user images for easy selection - if auth: - self.execute(False, f"docker rmi {IMG_BUSYBOX}") - - self.login(auth) - b.click("#containers-images button.pf-v5-c-expandable-section__toggle") - - def create_container(name, policy=None): - b.wait_visible(f'#containers-images td[data-label="Image"]:contains("{IMG_BUSYBOX}")') - b.click(f'#containers-images tbody tr:contains("{IMG_BUSYBOX}") .ct-container-create') - b.wait_visible('div.pf-v5-c-modal-box header:contains("Create container")') - - b.set_input_text("#run-image-dialog-name", name) - if policy: - b.set_val("#run-image-dialog-restart-policy", "always") - b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn') - self.waitContainerRow(name) - - container_name = 'none' - create_container(container_name) - # format changed in podman 5.1 (https://github.com/containers/podman/pull/22322) - self.assertIn(self.getRestartPolicy(auth, container_name), ['{ 0}', '{no 0}']) - - container_name = 'restart' - create_container(container_name, 'always') - self.assertEqual(self.getRestartPolicy(auth, container_name), '{always 0}') - if auth: - dockerRestartEnabled = self.execute(True, "systemctl is-enabled docker-restart.service || true").strip() - self.assertEqual(dockerRestartEnabled, 'enabled') - - def testPauseResumeContainerSystem(self): - self._testPauseResumeContainer(True) - - def testPauseResumeContainerUser(self): - # rootless cgroupv1 containers do not support pausing - if not self.has_cgroupsV2: - return - self._testPauseResumeContainer(False) - - def _testPauseResumeContainer(self, auth): - b = self.browser - container_name = "pauseresume" - - self.execute(auth, f"docker run -dt --name {container_name} --stop-timeout 0 {IMG_ALPINE}") - self.login(auth) - - self.waitContainerRow(container_name) - self.toggleExpandedContainer(container_name) - b.wait_not_present(self.getContainerAction(container_name, 'Resume')) - self.performContainerAction(container_name, "Pause") - - # show all containers and check status - self.filter_containers('all') - - # Check that container details are not lost when the container is paused - b.click(".pf-m-expanded button:contains('Integration')") - b.wait_visible(f'#containers-containers tr:contains("{IMG_ALPINE}") dt:contains("Environment variables")') - - b.wait(lambda: self.getContainerAttr(container_name, "State") == "Paused") - b.wait_not_present(self.getContainerAction(container_name, 'Pause')) - self.performContainerAction(container_name, "Resume") - b.wait(lambda: self.getContainerAttr(container_name, "State") == "Running") - - def testRenameContainerSystem(self): - self._testRenameContainer(True) - - def _testRenameContainer(self, auth): - b = self.browser - container_name = "rename" - container_name_new = "rename-new" - - self.execute(auth, f"docker container create -t --name {container_name} {IMG_BUSYBOX}") - self.login(auth) - - self.filter_containers('all') - - self.waitContainerRow(container_name) - self.toggleExpandedContainer(container_name) - self.performContainerAction(container_name, "Rename") - - # the container name should be in the "Rename container" header - b.wait_in_text("#pf-modal-part-1", container_name) - b.set_input_text("#rename-dialog-container-name", "") - b.wait_in_text("#commit-dialog-image-name-helper", "Container name is required") - b.set_input_text("#rename-dialog-container-name", "banana???") - b.wait_in_text("#commit-dialog-image-name-helper", "Name can only contain letters, numbers") - - b.set_input_text("#rename-dialog-container-name", container_name_new) - b.click('#btn-rename-dialog-container') - b.wait_not_present("#rename-dialog-container-name") - - self.execute(auth, f"docker inspect --format '{{{{.Id}}}}' {container_name_new}").strip() - self.waitContainerRow(container_name_new) - - # rename using the enter key - self.toggleExpandedContainer(container_name_new) - self.performContainerAction(container_name_new, "Rename") - - container_name_new = "rename-new-enter" - b.set_input_text("#rename-dialog-container-name", "") - b.focus("#rename-dialog-container-name") - b.key_press("\r") # Simulate enter key - b.wait_in_text("#commit-dialog-image-name-helper", "Container name is required") - b.set_input_text("#rename-dialog-container-name", container_name_new) - b.focus("#rename-dialog-container-name") - b.key_press("\r") # Simulate enter key - b.wait_not_present("#rename-dialog-container-name") - - self.execute(auth, f"docker inspect --format '{{{{.Id}}}}' {container_name_new}").strip() - self.waitContainerRow(container_name_new) - - def testMultipleContainers(self): - self.login() - - # Create 31 containers - for i in range(31): - self.execute(True, f"docker run -dt --name container{i} --stop-timeout 0 {IMG_BUSYBOX}") - - self.waitContainerRow("container30") - - # Generic cleanup takes too long and timeouts, so remove these container manually one by one - for i in range(31): - self.execute(True, f"docker rm -f container{i}") - - def testSpecialContainers(self): - m = self.machine - b = self.browser - - toolbox_label = "com.github.containers.toolbox=true" - distrobox_label = "manager=distrobox" - - container_1_id = m.execute(f"docker run -d --name container_1 -l {toolbox_label} {IMG_BUSYBOX}").strip() - container_2_id = m.execute(f"docker run -d --name container_2 -l {distrobox_label} {IMG_BUSYBOX}").strip() - - self.login() - - self.waitContainerRow('container_1') - self.waitContainerRow('container_2') - - container_1_sel = f"#containers-containers tbody tr[data-row-id=\"{container_1_id}{'true'}\"]" - container_2_sel = f"#containers-containers tbody tr[data-row-id=\"{container_2_id}{'true'}\"]" - - b.wait_visible(container_1_sel + " .ct-badge-toolbox:contains('toolbox')") - b.wait_visible(container_2_sel + " .ct-badge-distrobox:contains('distrobox')") - - # def testCreatePodSystem(self): - # self._createPod(True) - - # def testCreatePodUser(self): - # self._createPod(False) - - # def _createPod(self, auth): - # b = self.browser - # m = self.machine - # pod_name = "testpod1" - - # self.login(auth) - - # b.click("#containers-containers-create-pod-btn") - # b.set_input_text("#create-pod-dialog-name", "") - # b.wait_visible(".pf-v5-c-modal-box__footer #create-pod-create-btn:disabled") - # b.wait_in_text("#pod-name-group .pf-v5-c-helper-text__item-text", "Invalid characters") - - # b.set_input_text("#create-pod-dialog-name", pod_name) - # b.wait_visible(".pf-v5-c-modal-box__footer #create-pod-create-btn:not(:disabled)") - - # b.click('.publish-port-form .btn-add') - # b.set_input_text("#create-pod-dialog-publish-0-container-port-group input", "-1") - # b.click(".pf-v5-c-modal-box__footer #create-pod-create-btn") - # b.wait_in_text("#create-pod-dialog-publish-0-container-port-group .pf-v5-c-helper-text__item-text", - # "1 to 65535") - # b.click("#create-pod-dialog-publish-0-btn-close") - - # if auth: - # b.wait_visible("#create-pod-dialog-owner-system:checked") - # else: - # b.wait_not_present("#create-pod-dialog-owner-system") - - # Ports - # b.click('.publish-port-form .btn-add') - # b.set_input_text('#create-pod-dialog-publish-1-host-port', '6000') - # b.set_input_text('#create-pod-dialog-publish-1-container-port', '5000') - # b.click('.publish-port-form .btn-add') - # b.set_input_text('#create-pod-dialog-publish-2-ip-address', '127.0.0.1') - # b.set_input_text('#create-pod-dialog-publish-2-host-port', '6001') - # b.set_input_text('#create-pod-dialog-publish-2-container-port', '5001') - # b.set_val('#create-pod-dialog-publish-2-protocol', "udp") - # b.click('.publish-port-form .btn-add') - # b.set_input_text('#create-pod-dialog-publish-3-ip-address', '127.0.0.2') - # b.set_input_text('#create-pod-dialog-publish-3-container-port', '9001') - - # Volumes - # if self.machine.image not in ["ubuntu-2204"]: - # b.click('.volume-form .btn-add') - # rodir, rwdir = m.execute("mktemp; mktemp").split('\n')[:2] - # m.execute(f"chown admin:admin {rodir}") - # m.execute(f"chown admin:admin {rwdir}") - - # if self.has_selinux: - # b.set_val('#create-pod-dialog-volume-0-selinux', "z") - # else: - # b.wait_not_present('#create-pod-dialog-volume-0-selinux') - - # b.set_file_autocomplete_val("#create-pod-dialog-volume-0 .pf-v5-c-select", rodir) - # b.set_input_text('#create-pod-dialog-volume-0-container-path', '/tmp/ro') - # b.click('.volume-form .btn-add') - - # b.set_file_autocomplete_val("#create-pod-dialog-volume-1 .pf-v5-c-select", rwdir) - # b.set_input_text('#create-pod-dialog-volume-1-container-path', '/tmp/rw') - - # b.click("#create-pod-create-btn") - # b.set_val("#containers-containers-filter", "all") - # self.waitPodContainer(pod_name, []) - - # container_name = 'test-pod-1-system' if auth else 'test-pod-1' - # cmd = f"docker run -d --pod {pod_name} --name {container_name} --stop-timeout 0 {IMG_ALPINE} sleep 500" - # containerId = self.execute(auth, cmd).strip() - # self.waitPodContainer(pod_name, - # [{"name": container_name, "image": IMG_ALPINE, - # "command": "sleep 500", "state": "Running", "id": containerId}], auth) - - # self.toggleExpandedContainer(container_name) - # b.click(".pf-m-expanded button:contains('Integration')") - # if self.machine.image not in ["ubuntu-2204"]: - # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Volumes") + dd', - # f"{rodir} \u2194 /tmp/ro") - # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Volumes") + dd', - # f"{rwdir} \u2194 /tmp/rw") - - # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Ports") + dd', - # '0.0.0.0:6000 \u2192 5000/tcp') - # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Ports") + dd', - # '127.0.0.1:6001 \u2192 5001/udp') - # b.wait_in_text('#containers-containers tr:contains("alpine") dt:contains("Ports") + dd', - # ' \u2192 9001/tcp') - - - # Create pod as admin - # if auth: - # pod_name = 'testpod2' - # b.click("#containers-containers-create-pod-btn") - # b.set_input_text("#create-pod-dialog-name", pod_name) - # b.click("#create-pod-dialog-owner-user") - # b.click("#create-pod-create-btn") - - # b.set_val("#containers-containers-filter", "all") - # self.waitPodContainer(pod_name, []) - - @testlib.skipImage("passthrough log driver not supported", "ubuntu-2204") - def testLogErrors(self): - b = self.browser - container_name = "logissue" - self.login() - - self.execute(False, - f"docker run --log-driver=passthrough --name {container_name} -d {IMG_ALPINE} false /etc/sysctl.d/00-local-userns.conf - systemctl restart systemd-sysctl - - # disable services that get in the way of /var/lib/containers - if systemctl is-enabled docker.service; then - systemctl disable docker.service - fi -fi - -# don't force https:// (self-signed cert) -mkdir -p /etc/cockpit -printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf - -if systemctl is-active -q firewalld.service; then - firewall-cmd --add-service=cockpit --permanent -fi - -. /usr/lib/os-release - -# Remove extra images, tests assume our specific set -# Since 4.0 docker now ships the pause image -docker images --format '{{.Repository}}:{{.Tag}}' | grep -Ev 'localhost/test-|pause|cockpit/ws' | xargs -r docker rmi -f - -# tests reset podman, save the images -mkdir -p /var/lib/test-images -for img in $(podman images --format '{{.Repository}}:{{.Tag}}'); do - fname="$(echo "$img" | tr -dc '[a-zA-Z-]')" - podman save -o "/var/lib/test-images/${fname}.tar" "$img" -done - -# 15minutes after boot tmp files are removed and docker stores some tmp lock files -systemctl disable --now systemd-tmpfiles-clean.timer -systemctl --global disable systemd-tmpfiles-clean.timer diff --git a/ui/general/manifest.json b/ui/general/manifest.json index 25f56a4..a092b10 100644 --- a/ui/general/manifest.json +++ b/ui/general/manifest.json @@ -35,7 +35,7 @@ "Health": { "label": "Health", "path": "health.html", - "order": 4, + "order": 5, "keywords": [ { "matches": ["checklist"] diff --git a/ui/cockpit-docker/src/manifest.json b/ui/overrides/docker/override.json similarity index 55% rename from ui/cockpit-docker/src/manifest.json rename to ui/overrides/docker/override.json index 6f0aec2..c0a5f08 100644 --- a/ui/cockpit-docker/src/manifest.json +++ b/ui/overrides/docker/override.json @@ -1,11 +1,8 @@ { - "conditions": [ - {"path-exists": "/lib/systemd/system/docker.socket"} - ], "menu": { "index": { - "label": "Docker containers", - "order": 50, + "label": "Docker Containers", + "order": 4, "keywords": [ { "matches": ["docker", "container", "image"] @@ -13,4 +10,5 @@ ] } } + } -- 2.40.1 From 175ba308084a2fc4c3b1d7d37e76eaa718c31b4f Mon Sep 17 00:00:00 2001 From: Youssof Date: Thu, 14 Nov 2024 17:54:47 +0000 Subject: [PATCH 9/9] Fix spelling mistake --- ui/general/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/general/manifest.json b/ui/general/manifest.json index a092b10..f1e7c32 100644 --- a/ui/general/manifest.json +++ b/ui/general/manifest.json @@ -3,7 +3,7 @@ "menu": { "MAVLink": { - "label": "MAVLink Telemtry", + "label": "MAVLink Telemetry", "path": "mavlink.html", "order": 1, "keywords": [ -- 2.40.1